mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-12-28 19:25:27 +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
|
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
|
@ -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()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user