mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-12-27 10:21:07 +08:00
define MONGOCXX_STATIC in export.hpp
This commit is contained in:
parent
9d3a91cce2
commit
db2b51c06a
@ -76,6 +76,13 @@ if (VCPKG_LIBRARY_LINKAGE STREQUAL static)
|
|||||||
file(RENAME
|
file(RENAME
|
||||||
${CURRENT_PACKAGES_DIR}/debug/lib/libmongocxx.lib
|
${CURRENT_PACKAGES_DIR}/debug/lib/libmongocxx.lib
|
||||||
${CURRENT_PACKAGES_DIR}/debug/lib/mongocxx.lib)
|
${CURRENT_PACKAGES_DIR}/debug/lib/mongocxx.lib)
|
||||||
|
|
||||||
|
# define MONGOCXX_STATIC in config/export.hpp
|
||||||
|
vcpkg_apply_patches(
|
||||||
|
SOURCE_PATH ${CURRENT_PACKAGES_DIR}/include
|
||||||
|
PATCHES
|
||||||
|
${CMAKE_CURRENT_LIST_DIR}/static.patch
|
||||||
|
)
|
||||||
else()
|
else()
|
||||||
file(REMOVE ${CURRENT_PACKAGES_DIR}/lib/libbsoncxx.lib)
|
file(REMOVE ${CURRENT_PACKAGES_DIR}/lib/libbsoncxx.lib)
|
||||||
file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/lib/libbsoncxx.lib)
|
file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/lib/libbsoncxx.lib)
|
||||||
|
12
ports/mongo-cxx-driver/static.patch
Normal file
12
ports/mongo-cxx-driver/static.patch
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
diff --git a/mongocxx/config/export.hpp b/mongocxx/config/export.hpp
|
||||||
|
index 61a3e74..7fc951c 100644
|
||||||
|
--- a/mongocxx/config/export.hpp
|
||||||
|
+++ b/mongocxx/config/export.hpp
|
||||||
|
@@ -2,6 +2,7 @@
|
||||||
|
#ifndef MONGOCXX_API_H
|
||||||
|
#define MONGOCXX_API_H
|
||||||
|
|
||||||
|
+#define MONGOCXX_STATIC
|
||||||
|
#ifdef MONGOCXX_STATIC
|
||||||
|
# define MONGOCXX_API
|
||||||
|
# define MONGOCXX_PRIVATE
|
Loading…
x
Reference in New Issue
Block a user