mirror of
https://github.com/cemu-project/vcpkg.git
synced 2025-02-23 02:57:09 +01:00
Merge pull request #1800 from KindDragon/protobuf-fix
[protobuf] Fix define PROTOBUF_USE_DLLS with static linking
This commit is contained in:
commit
f52106a03a
@ -1,4 +1,4 @@
|
||||
Source: protobuf
|
||||
Version: 3.4.0
|
||||
Version: 3.4.0-1
|
||||
Build-Depends: zlib
|
||||
Description: Protocol Buffers - Google's data interchange format
|
@ -92,15 +92,11 @@ else()
|
||||
protobuf_try_remove_recurse_wait(${CURRENT_PACKAGES_DIR}/debug/bin/protoc.exe)
|
||||
endif()
|
||||
|
||||
foreach(FILE ${CURRENT_PACKAGES_DIR}/include/google/protobuf/stubs/platform_macros.h)
|
||||
file(READ ${FILE} _contents)
|
||||
if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic)
|
||||
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 "\#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()
|
||||
if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic)
|
||||
file(READ ${CURRENT_PACKAGES_DIR}/include/google/protobuf/stubs/platform_macros.h _contents)
|
||||
string(REPLACE "\#endif // GOOGLE_PROTOBUF_PLATFORM_MACROS_H_" "\#define PROTOBUF_USE_DLLS\n\#endif // GOOGLE_PROTOBUF_PLATFORM_MACROS_H_" _contents "${_contents}")
|
||||
file(WRITE ${CURRENT_PACKAGES_DIR}/include/google/protobuf/stubs/platform_macros.h "${_contents}")
|
||||
endif()
|
||||
|
||||
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)
|
||||
|
Loading…
x
Reference in New Issue
Block a user