Skip to content

Commit

Permalink
[protobuf] Fix problem with define PROTOBUF_USE_DLLS
Browse files Browse the repository at this point in the history
  • Loading branch information
KindDragon committed Sep 7, 2017
1 parent d2514bf commit 92e30b1
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion ports/protobuf/CONTROL
Original file line number Diff line number Diff line change
@@ -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
6 changes: 3 additions & 3 deletions ports/protobuf/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down

0 comments on commit 92e30b1

Please sign in to comment.