aboutsummaryrefslogtreecommitdiff
path: root/ports/mongo-cxx-driver/fix-dependency-libbson.patch
blob: de9b9d7b63e7d5f98244d250eef12ee12fd826a2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
diff --git a/src/bsoncxx/CMakeLists.txt b/src/bsoncxx/CMakeLists.txt
index 69b53b3..655b33a 100644
--- a/src/bsoncxx/CMakeLists.txt
+++ b/src/bsoncxx/CMakeLists.txt
@@ -78,15 +78,15 @@ set(LIBBSON_REQUIRED_VERSION 1.13.0)
 set(LIBBSON_REQUIRED_ABI_VERSION 1.0)
 
 if (BUILD_SHARED_LIBS)
-    find_package(libbson-${LIBBSON_REQUIRED_ABI_VERSION} ${LIBBSON_REQUIRED_VERSION} REQUIRED)
+    find_package(libbson-${LIBBSON_REQUIRED_ABI_VERSION} ${LIBBSON_REQUIRED_VERSION} CONFIG REQUIRED)
     set(libbson_libraries ${BSON_LIBRARIES})
     set(libbson_include_directories ${BSON_INCLUDE_DIRS})
     set(libbson_definitions ${BSON_DEFINITIONS})
 else()
-    find_package(libbson-static-${LIBBSON_REQUIRED_ABI_VERSION} ${LIBBSON_REQUIRED_VERSION} REQUIRED)
-    set(libbson_libraries ${BSON_STATIC_LIBRARIES})
-    set(libbson_include_directories ${BSON_STATIC_INCLUDE_DIRS})
-    set(libbson_definitions ${BSON_STATIC_DEFINITIONS})
+    find_package(libbson-${LIBBSON_REQUIRED_ABI_VERSION} ${LIBBSON_REQUIRED_VERSION} CONFIG REQUIRED)
+    set(libbson_libraries ${BSON_LIBRARIES})
+    set(libbson_include_directories ${BSON_INCLUDE_DIRS})
+    set(libbson_definitions ${BSON_DEFINITIONS})
 endif()
 
 add_subdirectory(third_party)