[mongo-c-driver] Fix for custom VCPKG_BUILD_TYPE (#18569)

* Fix mongo-c-driver for custom VCPKG_BUILD_TYPE

* Update version

* Update ports/mongo-c-driver/portfile.cmake

* Update versions/m-/mongo-c-driver.json

Co-authored-by: Jack·Boos·Yu <47264268+JackBoosY@users.noreply.github.com>
Co-authored-by: Billy Robert ONeal III <bion@microsoft.com>
This commit is contained in:
Johannes Schönberger 2021-07-01 19:03:05 +03:00 committed by GitHub
parent d93cf33a22
commit 9e104306a7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 28 additions and 15 deletions

View File

@ -1,6 +1,6 @@
Source: mongo-c-driver
Version: 1.16.1
Port-Version: 4
Port-Version: 5
Build-Depends: libbson, openssl (!windows), zlib
Description: Client library written in C for MongoDB.
Homepage: https://github.com/mongodb/mongo-c-driver

View File

@ -85,21 +85,29 @@ file(RENAME ${CURRENT_PACKAGES_DIR}/temp ${CURRENT_PACKAGES_DIR}/include)
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
if (VCPKG_LIBRARY_LINKAGE STREQUAL static)
if(VCPKG_CMAKE_SYSTEM_NAME AND NOT VCPKG_TARGET_IS_UWP)
if(NOT VCPKG_TARGET_IS_WINDOWS)
if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "release")
file(RENAME
${CURRENT_PACKAGES_DIR}/lib/libmongoc-static-1.0.a
${CURRENT_PACKAGES_DIR}/lib/libmongoc-1.0.a)
endif()
if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug")
file(RENAME
${CURRENT_PACKAGES_DIR}/debug/lib/libmongoc-static-1.0.a
${CURRENT_PACKAGES_DIR}/debug/lib/libmongoc-1.0.a)
endif()
else()
if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "release")
file(RENAME
${CURRENT_PACKAGES_DIR}/lib/mongoc-static-1.0.lib
${CURRENT_PACKAGES_DIR}/lib/mongoc-1.0.lib)
endif()
if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug")
file(RENAME
${CURRENT_PACKAGES_DIR}/debug/lib/mongoc-static-1.0.lib
${CURRENT_PACKAGES_DIR}/debug/lib/mongoc-1.0.lib)
endif()
endif()
# drop the __declspec(dllimport) when building static
vcpkg_replace_string(${CURRENT_PACKAGES_DIR}/include/mongoc/mongoc-macros.h

View File

@ -4078,7 +4078,7 @@
},
"mongo-c-driver": {
"baseline": "1.16.1",
"port-version": 4
"port-version": 5
},
"mongo-cxx-driver": {
"baseline": "3.4.0-5",

View File

@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "6a68782eaa1afe2fc3de47db769e230ebd542ca7",
"version-string": "1.16.1",
"port-version": 5
},
{
"git-tree": "6b948f7f7ff67f47481c2630ba40ab300bceee01",
"version-string": "1.16.1",