diff options
| author | sdcb <sdflysha@qq.com> | 2016-11-23 10:11:17 +0800 |
|---|---|---|
| committer | sdcb <sdflysha@qq.com> | 2016-11-23 10:11:17 +0800 |
| commit | a26bf41ac3107f34ca6851f4872f8aaa0b798b71 (patch) | |
| tree | eea004482edbe2d10e10129f1be502a5cf85b0f1 | |
| parent | c4af75153435a36353077e2f631b0703e969e1b5 (diff) | |
| download | vcpkg-a26bf41ac3107f34ca6851f4872f8aaa0b798b71.tar.gz vcpkg-a26bf41ac3107f34ca6851f4872f8aaa0b798b71.zip | |
[mongo-cxx-driver] using BUILD_SHARED_LIBS instead of self-defined macro.
related to: https://github.com/Microsoft/vcpkg/pull/316
| -rw-r--r-- | ports/mongo-cxx-driver/disable_shared.patch | 8 | ||||
| -rw-r--r-- | ports/mongo-cxx-driver/portfile.cmake | 5 |
2 files changed, 4 insertions, 9 deletions
diff --git a/ports/mongo-cxx-driver/disable_shared.patch b/ports/mongo-cxx-driver/disable_shared.patch index 46a258326..5f2f9a04e 100644 --- a/ports/mongo-cxx-driver/disable_shared.patch +++ b/ports/mongo-cxx-driver/disable_shared.patch @@ -1,5 +1,5 @@ diff --git a/src/bsoncxx/CMakeLists.txt b/src/bsoncxx/CMakeLists.txt -index a9a7ada..f4534b1 100644 +index a9a7ada..6b87a6d 100644 --- a/src/bsoncxx/CMakeLists.txt +++ b/src/bsoncxx/CMakeLists.txt @@ -117,9 +117,15 @@ if (WIN32) @@ -9,7 +9,7 @@ index a9a7ada..f4534b1 100644 -add_library(bsoncxx SHARED - ${bsoncxx_sources} -) -+if(ENABLE_SHARED) ++if(BUILD_SHARED_LIBS) + add_library(bsoncxx SHARED + ${bsoncxx_sources} + ) @@ -22,7 +22,7 @@ index a9a7ada..f4534b1 100644 set(bsoncxx_libs ${LIBBSON_LIBRARIES}) diff --git a/src/mongocxx/CMakeLists.txt b/src/mongocxx/CMakeLists.txt -index 2ef54e4..a2c8ca4 100644 +index 2ef54e4..53a13f7 100644 --- a/src/mongocxx/CMakeLists.txt +++ b/src/mongocxx/CMakeLists.txt @@ -134,9 +134,15 @@ set_target_properties(mongocxx_mocked PROPERTIES @@ -32,7 +32,7 @@ index 2ef54e4..a2c8ca4 100644 -add_library(mongocxx SHARED - ${mongocxx_sources} -) -+if(ENABLE_SHARED) ++if(BUILD_SHARED_LIBS) + add_library(mongocxx SHARED + ${mongocxx_sources} + ) diff --git a/ports/mongo-cxx-driver/portfile.cmake b/ports/mongo-cxx-driver/portfile.cmake index 7c3247d48..fa0549fd7 100644 --- a/ports/mongo-cxx-driver/portfile.cmake +++ b/ports/mongo-cxx-driver/portfile.cmake @@ -15,17 +15,12 @@ vcpkg_apply_patches( ${CMAKE_CURRENT_LIST_DIR}/disable_shared.patch ) -if (VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) - set(ENABLE_SHARED ON) -endif() - vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} OPTIONS -DLIBBSON_DIR=${CURRENT_INSTALLED_DIR} -DLIBMONGOC_DIR=${CURRENT_INSTALLED_DIR} -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=ON - -DENABLE_SHARED=${ENABLE_SHARED} ) vcpkg_install_cmake() |
