[protobuf] Fix problem with define PROTOBUF_USE_DLLS

This commit is contained in:
Arkady Shapkin 2017-09-07 14:52:59 +03:00
parent d2514bfbc5
commit 92e30b10ec
2 changed files with 4 additions and 4 deletions

View File

@ -1,4 +1,4 @@
Source: protobuf Source: protobuf
Version: 3.3.0-3 Version: 3.4.0
Build-Depends: zlib Build-Depends: zlib
Description: Protocol Buffers - Google's data interchange format Description: Protocol Buffers - Google's data interchange format

View File

@ -92,12 +92,12 @@ else()
protobuf_try_remove_recurse_wait(${CURRENT_PACKAGES_DIR}/debug/bin/protoc.exe) protobuf_try_remove_recurse_wait(${CURRENT_PACKAGES_DIR}/debug/bin/protoc.exe)
endif() endif()
foreach(FILE ${CURRENT_PACKAGES_DIR}/include/google/protobuf/arena.h ${CURRENT_PACKAGES_DIR}/include/google/protobuf/stubs/port.h) foreach(FILE ${CURRENT_PACKAGES_DIR}/include/google/protobuf/stubs/platform_macros.h)
file(READ ${FILE} _contents) file(READ ${FILE} _contents)
if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic)
string(REPLACE "defined(PROTOBUF_USE_DLLS)" "1" _contents "${_contents}") string(REPLACE "\#endif // GOOGLE_PROTOBUF_PLATFORM_MACROS_H_" "\#define PROTOBUF_USE_DLLS 1\n\#endif // GOOGLE_PROTOBUF_PLATFORM_MACROS_H_" _contents "${_contents}")
else() else()
string(REPLACE "defined(PROTOBUF_USE_DLLS)" "0" _contents "${_contents}") string(REPLACE "\#endif // GOOGLE_PROTOBUF_PLATFORM_MACROS_H_" "\#define PROTOBUF_USE_DLLS 0\n\#endif // GOOGLE_PROTOBUF_PLATFORM_MACROS_H_" _contents "${_contents}")
endif() endif()
file(WRITE ${FILE} "${_contents}") file(WRITE ${FILE} "${_contents}")
endforeach() endforeach()