2023-11-17 08:52:43 +08:00
|
|
|
diff --git a/build/cmake/libmongoc-static-1.0-config.cmake.in b/build/cmake/libmongoc-static-1.0-config.cmake.in
|
|
|
|
index bec3163..a32d5f3 100644
|
|
|
|
--- a/build/cmake/libmongoc-static-1.0-config.cmake.in
|
|
|
|
+++ b/build/cmake/libmongoc-static-1.0-config.cmake.in
|
|
|
|
@@ -24,6 +24,9 @@ set (MONGOC_STATIC_VERSION_FULL @libmongoc_VERSION_FULL@)
|
|
|
|
|
|
|
|
include(CMakeFindDependencyMacro)
|
|
|
|
find_dependency (mongoc-1.0)
|
|
|
|
+if("@ENABLE_SNAPPY@" STREQUAL "ON")
|
|
|
|
+ find_dependency(Snappy CONFIG)
|
|
|
|
+endif()
|
|
|
|
|
|
|
|
set(MONGOC_STATIC_LIBRARY mongo::mongoc_static)
|
|
|
|
set(MONGOC_STATIC_LIBRARIES mongo::mongoc_static)
|
2022-11-03 05:39:31 +08:00
|
|
|
diff --git a/src/libmongoc/CMakeLists.txt b/src/libmongoc/CMakeLists.txt
|
2024-08-06 15:35:47 +08:00
|
|
|
index 0a18f5a..5346a9d 100644
|
2022-11-03 05:39:31 +08:00
|
|
|
--- a/src/libmongoc/CMakeLists.txt
|
|
|
|
+++ b/src/libmongoc/CMakeLists.txt
|
2023-11-17 08:52:43 +08:00
|
|
|
@@ -50,7 +50,7 @@ endif ()
|
2022-11-03 05:39:31 +08:00
|
|
|
set (ZLIB_INCLUDE_DIRS "")
|
|
|
|
if (ENABLE_ZLIB MATCHES "SYSTEM|AUTO")
|
|
|
|
message (STATUS "Searching for zlib CMake packages")
|
|
|
|
- include (FindZLIB)
|
|
|
|
+ find_package(ZLIB REQUIRED)
|
|
|
|
if (ZLIB_FOUND)
|
2023-08-18 03:56:00 +08:00
|
|
|
message (STATUS " zlib found version \"${ZLIB_VERSION_STRING}\"")
|
|
|
|
message (STATUS " zlib include path \"${ZLIB_INCLUDE_DIRS}\"")
|
2023-11-17 08:52:43 +08:00
|
|
|
@@ -468,10 +468,10 @@ else ()
|
2022-11-03 05:39:31 +08:00
|
|
|
endif ()
|
|
|
|
|
|
|
|
# Sets SNAPPY_LIBRARIES and SNAPPY_INCLUDE_DIRS.
|
|
|
|
-include (FindSnappy)
|
|
|
|
-if (SNAPPY_INCLUDE_DIRS)
|
|
|
|
+if(ENABLE_SNAPPY)
|
|
|
|
+ find_package(Snappy CONFIG REQUIRED)
|
|
|
|
+ set(SNAPPY_LIBRARIES Snappy::snappy)
|
|
|
|
set (MONGOC_ENABLE_COMPRESSION 1)
|
|
|
|
- include_directories ("${SNAPPY_INCLUDE_DIRS}")
|
|
|
|
endif ()
|
|
|
|
|
2023-11-17 08:52:43 +08:00
|
|
|
mongo_bool01 (MONGOC_ENABLE_SHM_COUNTERS ENABLE_SHM_COUNTERS)
|
2024-08-06 15:35:47 +08:00
|
|
|
@@ -759,7 +759,7 @@ set (STATIC_LIBRARIES
|
|
|
|
)
|
|
|
|
|
|
|
|
# utf8proc configuration
|
|
|
|
-find_package(Utf8Proc REQUIRED)
|
|
|
|
+find_package(unofficial-utf8proc CONFIG REQUIRED)
|
|
|
|
set(UTF8PROC_INCLUDE_DIRS, "")
|
|
|
|
if (USE_BUNDLED_UTF8PROC)
|
|
|
|
set (
|
|
|
|
@@ -955,7 +955,7 @@ if (MONGOC_ENABLE_STATIC_BUILD)
|
|
|
|
set_target_properties (mongoc_static PROPERTIES
|
|
|
|
VERSION 0.0.0
|
|
|
|
OUTPUT_NAME "${MONGOC_OUTPUT_BASENAME}-static-${MONGOC_API_VERSION}"
|
|
|
|
- pkg_config_REQUIRES "libbson-static-1.0"
|
|
|
|
+ pkg_config_REQUIRES "libbson-static-1.0 libutf8proc"
|
|
|
|
)
|
|
|
|
if(MONGOC_ENABLE_STATIC_INSTALL)
|
|
|
|
mongo_generate_pkg_config (mongoc_static FILENAME libmongoc-static-${MONGOC_API_VERSION}.pc INSTALL)
|
2022-11-03 05:39:31 +08:00
|
|
|
diff --git a/src/libmongoc/src/mongoc-config.cmake b/src/libmongoc/src/mongoc-config.cmake
|
2024-08-06 15:35:47 +08:00
|
|
|
index 31e6cbc..cdbb756 100644
|
2022-11-03 05:39:31 +08:00
|
|
|
--- a/src/libmongoc/src/mongoc-config.cmake
|
|
|
|
+++ b/src/libmongoc/src/mongoc-config.cmake
|
2023-11-17 08:52:43 +08:00
|
|
|
@@ -1,5 +1,8 @@
|
2022-11-03 05:39:31 +08:00
|
|
|
include(CMakeFindDependencyMacro)
|
2023-11-17 08:52:43 +08:00
|
|
|
find_dependency(bson-1.0 @libmongoc_VERSION@)
|
2024-08-06 15:35:47 +08:00
|
|
|
+if("@ENABLE_SNAPPY@")
|
2022-11-03 05:39:31 +08:00
|
|
|
+ find_dependency(Snappy CONFIG)
|
|
|
|
+endif()
|
2023-11-17 08:52:43 +08:00
|
|
|
|
|
|
|
# If we need to import a TLS package for our imported targets, do that now:
|
|
|
|
set(MONGOC_TLS_BACKEND [[@TLS_BACKEND@]])
|
2024-08-06 15:35:47 +08:00
|
|
|
@@ -13,8 +16,6 @@ if(_tls_package)
|
|
|
|
set(CMAKE_MODULE_PATH "${_prev_path}")
|
|
|
|
endif()
|
|
|
|
|
|
|
|
-include("${CMAKE_CURRENT_LIST_DIR}/mongoc-targets.cmake")
|
|
|
|
-
|
|
|
|
unset(_required)
|
|
|
|
unset(_quiet)
|
|
|
|
if(${CMAKE_FIND_PACKAGE_NAME}_FIND_REQUIRED)
|
|
|
|
@@ -29,9 +30,8 @@ if(NOT _mongoc_built_with_bundled_utf8proc AND NOT TARGET PkgConfig::PC_UTF8PROC
|
|
|
|
# libmongoc was compiled against an external utf8proc and links against a
|
|
|
|
# FindPkgConfig-generated IMPORTED target. Find that package and generate that
|
|
|
|
# imported target here:
|
|
|
|
- find_dependency(PkgConfig)
|
|
|
|
- pkg_check_modules(PC_UTF8PROC ${_required} ${_quiet} libutf8proc IMPORTED_TARGET GLOBAL)
|
|
|
|
endif()
|
|
|
|
+find_dependency(unofficial-utf8proc CONFIG)
|
|
|
|
|
|
|
|
# Find dependencies for SASL
|
|
|
|
set(_sasl_backend [[@SASL_BACKEND@]])
|
|
|
|
@@ -43,3 +43,5 @@ if(_sasl_backend STREQUAL "Cyrus")
|
|
|
|
find_dependency(SASL2 2.0)
|
|
|
|
set(CMAKE_MODULE_PATH "${_prev_path}")
|
|
|
|
endif()
|
|
|
|
+
|
|
|
|
+include("${CMAKE_CURRENT_LIST_DIR}/mongoc-targets.cmake")
|