mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-12-28 03:10:57 +08:00
[protobuf] Fix problem with define PROTOBUF_USE_DLLS
This commit is contained in:
parent
d2514bfbc5
commit
92e30b10ec
@ -1,4 +1,4 @@
|
||||
Source: protobuf
|
||||
Version: 3.3.0-3
|
||||
Version: 3.4.0
|
||||
Build-Depends: zlib
|
||||
Description: Protocol Buffers - Google's data interchange format
|
@ -92,12 +92,12 @@ 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)
|
||||
foreach(FILE ${CURRENT_PACKAGES_DIR}/include/google/protobuf/stubs/platform_macros.h)
|
||||
file(READ ${FILE} _contents)
|
||||
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()
|
||||
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()
|
||||
file(WRITE ${FILE} "${_contents}")
|
||||
endforeach()
|
||||
|
Loading…
x
Reference in New Issue
Block a user