2020-03-26 11:43:02 +08:00
|
|
|
diff --git a/src/libmongoc/CMakeLists.txt b/src/libmongoc/CMakeLists.txt
|
2020-05-02 03:43:06 +08:00
|
|
|
index 91d97dc..ccebc2a 100644
|
2020-03-26 11:43:02 +08:00
|
|
|
--- a/src/libmongoc/CMakeLists.txt
|
|
|
|
+++ b/src/libmongoc/CMakeLists.txt
|
2020-05-02 03:43:06 +08:00
|
|
|
@@ -698,6 +698,9 @@ if (NOT MONGOC_ENABLE_STATIC)
|
2020-03-26 11:43:02 +08:00
|
|
|
add_library (mongoc_shared SHARED ${SOURCES} ${HEADERS} ${HEADERS_FORWARDING})
|
|
|
|
set_target_properties (mongoc_shared PROPERTIES CMAKE_CXX_VISIBILITY_PRESET hidden)
|
2020-05-02 03:43:06 +08:00
|
|
|
target_link_libraries (mongoc_shared PRIVATE ${LIBRARIES} PUBLIC ${BSON_LIBRARIES})
|
2020-03-26 11:43:02 +08:00
|
|
|
+if (WIN32)
|
2020-05-02 03:43:06 +08:00
|
|
|
+ target_link_libraries (mongoc_shared PRIVATE Advapi32)
|
2020-03-26 11:43:02 +08:00
|
|
|
+endif()
|
2020-05-02 03:43:06 +08:00
|
|
|
target_include_directories (mongoc_shared BEFORE PUBLIC ${MONGOC_INTERNAL_INCLUDE_DIRS})
|
|
|
|
target_include_directories (mongoc_shared PRIVATE ${PRIVATE_ZLIB_INCLUDES})
|
|
|
|
target_include_directories (mongoc_shared PRIVATE ${LIBMONGOCRYPT_INCLUDE_DIRECTORIES})
|
|
|
|
@@ -710,6 +713,9 @@ set_target_properties (mongoc_shared PROPERTIES OUTPUT_NAME "${MONGOC_OUTPUT_BAS
|
|
|
|
else ()
|
2020-03-26 11:43:02 +08:00
|
|
|
add_library (mongoc_static STATIC ${SOURCES} ${HEADERS} ${HEADERS_FORWARDING})
|
2020-05-02 03:43:06 +08:00
|
|
|
target_link_libraries (mongoc_static ${STATIC_LIBRARIES} ${BSON_LIBRARIES})
|
|
|
|
+ if (WIN32)
|
2020-03-26 11:43:02 +08:00
|
|
|
+ target_link_libraries (mongoc_static Advapi32)
|
|
|
|
+ endif()
|
2020-05-02 03:43:06 +08:00
|
|
|
target_include_directories (mongoc_static BEFORE PUBLIC ${MONGOC_INTERNAL_INCLUDE_DIRS})
|
|
|
|
target_include_directories (mongoc_static PRIVATE ${PRIVATE_ZLIB_INCLUDES})
|
|
|
|
target_include_directories (mongoc_static PRIVATE ${LIBMONGOCRYPT_INCLUDE_DIRECTORIES})
|