Skip to content

Commit

Permalink
Copybara import of the project:
Browse files Browse the repository at this point in the history
--
58c1fde by Chitoge Kirisaki <[email protected]>:

Fix linking errors for MSVC

COPYBARA_INTEGRATE_REVIEW=#142 from chitoge:main 58c1fde
PiperOrigin-RevId: 687334496
Change-Id: I47df247c49e70db6ad7284d96f8bdf392d8ab7fe
  • Loading branch information
chitoge authored and copybara-github committed Oct 18, 2024
1 parent 624377d commit a857298
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion cmake/BinExportDeps.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,10 @@ set(ABSL_CXX_STANDARD ${CMAKE_CXX_STANDARD} CACHE STRING "" FORCE)
set(ABSL_PROPAGATE_CXX_STD ON CACHE BOOL "" FORCE)
set(ABSL_USE_EXTERNAL_GOOGLETEST ON CACHE BOOL "" FORCE)
set(ABSL_FIND_GOOGLETEST OFF CACHE BOOL "" FORCE)
if(MSVC)
# Link MSVCRT statically for abseil
set(ABSL_MSVC_STATIC_RUNTIME ON CACHE BOOL "" FORCE)
endif()
if(BUILD_TESTING AND BINEXPORT_BUILD_TESTING)
# Need this for absl::status_matchers to be available
set(ABSL_BUILD_TESTING ON CACHE BOOL "" FORCE)
Expand All @@ -80,6 +84,10 @@ set(protobuf_BUILD_TESTS OFF CACHE BOOL "" FORCE)
set(protobuf_BUILD_SHARED_LIBS OFF CACHE BOOL "" FORCE)
set(protobuf_INSTALL OFF CACHE BOOL "" FORCE)
set(protobuf_WITH_ZLIB OFF CACHE BOOL "" FORCE)
if(MSVC)
# Link MSVCRT statically for protoc
set(protobuf_MSVC_STATIC_RUNTIME ON CACHE BOOL "" FORCE)
endif()
FetchContent_MakeAvailable(protobuf)
binexport_check_target(protobuf::libprotobuf)
binexport_check_target(protobuf::protoc)
Expand Down Expand Up @@ -147,4 +155,3 @@ if(BINEXPORT_ENABLE_IDAPRO)
endif()

#set(BUILD_TESTING ${BINEXPORT_SAVE_BUILD_TESTING})

0 comments on commit a857298

Please sign in to comment.