mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-11-28 06:09:00 +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
|
||||
${CURRENT_PACKAGES_DIR}/debug/lib/libmongocxx.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()
|
||||
file(REMOVE ${CURRENT_PACKAGES_DIR}/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…
Reference in New Issue
Block a user