mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-12-29 03:34:26 +08:00
2fe92f4d1f
<!-- If your PR fixes issues, please note that here by adding "Fixes #NNNNNN." for each fixed issue on separate lines. --> Fix https://github.com/microsoft/vcpkg/issues/37921 <!-- If you are still working on the PR, open it as a Draft: https://github.blog/2019-02-14-introducing-draft-pull-requests/. --> <!-- If this PR updates an existing port, please uncomment and fill out this checklist:--> - [x] Changes comply with the [maintainer guide](https://github.com/microsoft/vcpkg-docs/blob/main/vcpkg/contributing/maintainer-guide.md). - [x] SHA512s are updated for each updated download. - [ ] ~~The "supports" clause reflects platforms that may be fixed by this new version.~~ - [ ] ~~Any fixed [CI baseline](https://github.com/microsoft/vcpkg/blob/master/scripts/ci.baseline.txt) entries are removed from that file.~~ - [ ] ~~Any patches that are no longer applied are deleted from the port's directory.~~ - [x] The version database is fixed by rerunning `./vcpkg x-add-version --all` and committing the result. - [x] Only one version is added to each modified port's versions file.
39 lines
1.3 KiB
Diff
39 lines
1.3 KiB
Diff
diff --git a/src/libmongoc/CMakeLists.txt b/src/libmongoc/CMakeLists.txt
|
|
index 3070c43..0052a4e 100644
|
|
--- a/src/libmongoc/CMakeLists.txt
|
|
+++ b/src/libmongoc/CMakeLists.txt
|
|
@@ -820,7 +820,7 @@ set_property(
|
|
"MONGOC_CYRUS_PLUGIN_PATH_PREFIX=$<IF:$<STREQUAL:${CYRUS_PLUGIN_PATH_PREFIX},>,NULL,\"${CYRUS_PLUGIN_PATH_PREFIX}\">"
|
|
)
|
|
|
|
-if (ENABLE_SHARED)
|
|
+if (NOT MONGOC_ENABLE_STATIC_BUILD)
|
|
add_library (mongoc_shared SHARED ${SOURCES} ${HEADERS} ${HEADERS_FORWARDING})
|
|
if(WIN32)
|
|
# Add resource-definition script for Windows shared library (.dll).
|
|
@@ -1262,7 +1262,7 @@ if (MONGOC_ENABLE_STATIC_INSTALL)
|
|
list (APPEND TARGETS_TO_INSTALL mongoc_static)
|
|
endif ()
|
|
|
|
-if (ENABLE_SHARED)
|
|
+if (NOT MONGOC_ENABLE_STATIC_BUILD)
|
|
list (APPEND TARGETS_TO_INSTALL mongoc_shared)
|
|
endif ()
|
|
|
|
@@ -1317,6 +1317,7 @@ endif()
|
|
set_property(TARGET ${TARGETS_TO_INSTALL} APPEND PROPERTY pkg_config_INCLUDE_DIRECTORIES "${MONGOC_HEADER_INSTALL_DIR}")
|
|
|
|
# Deprecated alias for libmongoc-1.0.pc, see CDRIVER-2086.
|
|
+if(NOT MONGOC_ENABLE_STATIC_INSTALL)
|
|
if (MONGOC_ENABLE_SSL)
|
|
configure_file (
|
|
${CMAKE_CURRENT_SOURCE_DIR}/src/libmongoc-ssl-1.0.pc.in
|
|
@@ -1327,6 +1328,7 @@ if (MONGOC_ENABLE_SSL)
|
|
DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig
|
|
)
|
|
endif ()
|
|
+endif ()
|
|
|
|
include (CMakePackageConfigHelpers)
|
|
|