vcpkg/ports/mongo-c-driver/fix-arm-build.patch

25 lines
1.4 KiB
Diff
Raw Normal View History

diff --git a/src/libmongoc/CMakeLists.txt b/src/libmongoc/CMakeLists.txt
index c8a4f02..78f69f2 100644
--- a/src/libmongoc/CMakeLists.txt
+++ b/src/libmongoc/CMakeLists.txt
@@ -645,6 +645,9 @@ endif ()
add_library (mongoc_shared SHARED ${SOURCES} ${HEADERS} ${HEADERS_FORWARDING})
set_target_properties (mongoc_shared PROPERTIES CMAKE_CXX_VISIBILITY_PRESET hidden)
target_link_libraries (mongoc_shared ${LIBRARIES} ${BSON_LIBRARIES})
+if (WIN32)
+ target_link_libraries (mongoc_shared Advapi32)
+endif()
target_include_directories (mongoc_shared BEFORE PUBLIC ${BSON_INCLUDE_DIRS} ${MONGOC_INTERNAL_INCLUDE_DIRS})
target_compile_definitions (mongoc_shared PUBLIC MONGOC_COMPILATION ${BSON_DEFINITIONS})
@@ -654,6 +657,9 @@ set_target_properties (mongoc_shared PROPERTIES OUTPUT_NAME "mongoc-${MONGOC_API
if (MONGOC_ENABLE_STATIC)
add_library (mongoc_static STATIC ${SOURCES} ${HEADERS} ${HEADERS_FORWARDING})
target_link_libraries (mongoc_static ${LIBRARIES} ${BSON_STATIC_LIBRARIES})
+ if (WIN32)
+ target_link_libraries (mongoc_static Advapi32)
+ endif()
target_include_directories (mongoc_static BEFORE PUBLIC ${BSON_STATIC_INCLUDE_DIRS} ${MONGOC_INTERNAL_INCLUDE_DIRS})
target_compile_definitions (mongoc_static PUBLIC MONGOC_COMPILATION MONGOC_STATIC ${BSON_STATIC_DEFINITIONS})
set_target_properties (mongoc_static PROPERTIES VERSION 0.0.0)