diff options
| author | Robert Schumacher <roschuma@microsoft.com> | 2017-07-07 17:51:59 -0700 |
|---|---|---|
| committer | Robert Schumacher <roschuma@microsoft.com> | 2017-07-07 17:51:59 -0700 |
| commit | 5e45ee4a2d7668c3431bd029bdab3cc41f185369 (patch) | |
| tree | 8f5ee599ccd01b5d0ab1bf0ab525a9b405bee741 | |
| parent | 596d80efb502237d12fb9f235b59e83c99485a6b (diff) | |
| download | vcpkg-5e45ee4a2d7668c3431bd029bdab3cc41f185369.tar.gz vcpkg-5e45ee4a2d7668c3431bd029bdab3cc41f185369.zip | |
[protobuf] Fix protobuf headers to encode dynamic/static link. Fixes #1354. Fixes #1353.
| -rw-r--r-- | ports/protobuf/CONTROL | 2 | ||||
| -rw-r--r-- | ports/protobuf/portfile.cmake | 10 |
2 files changed, 11 insertions, 1 deletions
diff --git a/ports/protobuf/CONTROL b/ports/protobuf/CONTROL index 43e4ad1e8..2ba75ed23 100644 --- a/ports/protobuf/CONTROL +++ b/ports/protobuf/CONTROL @@ -1,4 +1,4 @@ Source: protobuf -Version: 3.3.0-1 +Version: 3.3.0-2 Build-Depends: zlib Description: Protocol Buffers - Google's data interchange format
\ No newline at end of file diff --git a/ports/protobuf/portfile.cmake b/ports/protobuf/portfile.cmake index 852086ff5..52574ecee 100644 --- a/ports/protobuf/portfile.cmake +++ b/ports/protobuf/portfile.cmake @@ -85,6 +85,16 @@ else() protobuf_try_remove_recurse_wait(${CURRENT_PACKAGES_DIR}/debug/bin/protoc.exe) endif() +foreach(FILE ${CURRENT_PACKAGES_DIR}/include/google/protobuf/arena.h ${CURRENT_PACKAGES_DIR}/include/google/protobuf/stubs/port.h) + file(READ ${FILE} _contents) + if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) + string(REPLACE "defined(PROTOBUF_USE_DLLS)" "1" _contents ${_contents}) + else() + string(REPLACE "defined(PROTOBUF_USE_DLLS)" "0" _contents ${_contents}) + endif() + file(WRITE ${FILE} ${_contents}) +endforeach() + file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/protobuf RENAME copyright) file(INSTALL ${TOOL_PATH}/bin/protoc.exe DESTINATION ${CURRENT_PACKAGES_DIR}/tools) vcpkg_copy_pdbs() |
