mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-11-28 04:09:00 +08:00
[mongo-cxx-driver] Upgrade to 3.0.3
Enable static build Disable test and example
This commit is contained in:
parent
6fc5aeae74
commit
260f5f20c3
@ -1,64 +0,0 @@
|
||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index 695f64c..87807d6 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -59,7 +59,6 @@ set(CMAKE_CXX_EXTENSIONS OFF)
|
||||
|
||||
# Include the required modules
|
||||
include(GenerateExportHeader)
|
||||
-include(InstallRequiredSystemLibraries)
|
||||
|
||||
# If the user did not customize the install prefix,
|
||||
# set it to live under build so we don't inadverently pollute /usr/local
|
||||
diff --git a/cmake/FindLibBSON.cmake b/cmake/FindLibBSON.cmake
|
||||
index 52f5de0..7a0be52 100644
|
||||
--- a/cmake/FindLibBSON.cmake
|
||||
+++ b/cmake/FindLibBSON.cmake
|
||||
@@ -26,7 +26,7 @@ if(LIBBSON_DIR)
|
||||
# Trust the user's override path by default
|
||||
set(LIBBSON_LIBRARIES bson-1.0 CACHE INTERNAL "")
|
||||
set(LIBBSON_LIBRARY_DIRS ${LIBBSON_DIR}/lib CACHE INTERNAL "")
|
||||
- set(LIBBSON_INCLUDE_DIRS ${LIBBSON_DIR}/include/libbson-1.0 CACHE INTERNAL "")
|
||||
+ set(LIBBSON_INCLUDE_DIRS ${LIBBSON_DIR}/include CACHE INTERNAL "")
|
||||
find_package_handle_standard_args(LIBBSON DEFAULT_MSG LIBBSON_LIBRARIES LIBBSON_LIBRARY_DIRS LIBBSON_INCLUDE_DIRS)
|
||||
elseif (PKG_CONFIG_FOUND)
|
||||
# The best we can do until libbson starts installing a libbson-config.cmake file
|
||||
diff --git a/cmake/FindLibMongoC.cmake b/cmake/FindLibMongoC.cmake
|
||||
index 830de11..7e0bc76 100644
|
||||
--- a/cmake/FindLibMongoC.cmake
|
||||
+++ b/cmake/FindLibMongoC.cmake
|
||||
@@ -26,7 +26,7 @@ if(LIBMONGOC_DIR)
|
||||
# Trust the user's override path by default
|
||||
set(LIBMONGOC_LIBRARIES mongoc-1.0 CACHE INTERNAL "")
|
||||
set(LIBMONGOC_LIBRARY_DIRS ${LIBMONGOC_DIR}/lib CACHE INTERNAL "")
|
||||
- set(LIBMONGOC_INCLUDE_DIRS ${LIBMONGOC_DIR}/include/libmongoc-1.0 CACHE INTERNAL "")
|
||||
+ set(LIBMONGOC_INCLUDE_DIRS ${LIBMONGOC_DIR}/include CACHE INTERNAL "")
|
||||
find_package_handle_standard_args(LIBMONGOC DEFAULT_MSG LIBMONGOC_LIBRARIES LIBMONGOC_LIBRARY_DIRS LIBMONGOC_INCLUDE_DIRS)
|
||||
elseif (PKG_CONFIG_FOUND)
|
||||
# The best we can do until libMONGOC starts installing a libmongoc-config.cmake file
|
||||
diff --git a/src/bsoncxx/CMakeLists.txt b/src/bsoncxx/CMakeLists.txt
|
||||
index cea1bc9..481529c 100644
|
||||
--- a/src/bsoncxx/CMakeLists.txt
|
||||
+++ b/src/bsoncxx/CMakeLists.txt
|
||||
@@ -60,7 +60,7 @@ endif()
|
||||
|
||||
set(BSONCXX_VERSION ${BSONCXX_VERSION_MAJOR}.${BSONCXX_VERSION_MINOR}.${BSONCXX_VERSION_PATCH}${BSONCXX_VERSION_EXTRA})
|
||||
set(BSONCXX_INLINE_NAMESPACE "v${BSONCXX_ABI_VERSION}")
|
||||
-set(BSONCXX_HEADER_INSTALL_DIR "include/bsoncxx/${BSONCXX_INLINE_NAMESPACE}" CACHE INTERNAL "")
|
||||
+set(BSONCXX_HEADER_INSTALL_DIR "include" CACHE INTERNAL "")
|
||||
|
||||
set(LIBBSON_REQUIRED_VERSION 1.3.4)
|
||||
set(LIBBSON_REQUIRED_ABI_VERSION 1.0)
|
||||
diff --git a/src/mongocxx/CMakeLists.txt b/src/mongocxx/CMakeLists.txt
|
||||
index fdbe61a..7d5c2c9 100644
|
||||
--- a/src/mongocxx/CMakeLists.txt
|
||||
+++ b/src/mongocxx/CMakeLists.txt
|
||||
@@ -32,7 +32,7 @@ set(MONGOCXX_ABI_VERSION _noabi)
|
||||
|
||||
set(MONGOCXX_VERSION ${MONGOCXX_VERSION_MAJOR}.${MONGOCXX_VERSION_MINOR}.${MONGOCXX_VERSION_PATCH}${MONGOCXX_VERSION_EXTRA})
|
||||
set(MONGOCXX_INLINE_NAMESPACE "v${MONGOCXX_ABI_VERSION}")
|
||||
-set(MONGOCXX_HEADER_INSTALL_DIR "include/mongocxx/${MONGOCXX_INLINE_NAMESPACE}" CACHE INTERNAL "")
|
||||
+set(MONGOCXX_HEADER_INSTALL_DIR "include" CACHE INTERNAL "")
|
||||
|
||||
add_subdirectory(config)
|
||||
|
@ -1,4 +1,4 @@
|
||||
Source: mongo-cxx-driver
|
||||
Version: 3.0.2
|
||||
Version: 3.0.3
|
||||
Build-Depends: boost,libbson,mongo-c-driver
|
||||
Description: MongoDB C++ Driver.
|
149
ports/mongo-cxx-driver/disable_test_and_example.patch
Normal file
149
ports/mongo-cxx-driver/disable_test_and_example.patch
Normal file
@ -0,0 +1,149 @@
|
||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index 4538920..e783ff5 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -74,66 +74,66 @@ endif()
|
||||
|
||||
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
|
||||
|
||||
-add_custom_target(hugo_dir
|
||||
- COMMAND ${CMAKE_COMMAND} -E make_directory hugo
|
||||
-)
|
||||
-
|
||||
-add_custom_target(hugo
|
||||
- DEPENDS hugo_dir
|
||||
- WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/docs
|
||||
- COMMAND hugo
|
||||
- VERBATIM
|
||||
-)
|
||||
-
|
||||
-add_custom_target(hugo-deploy
|
||||
- DEPENDS hugo
|
||||
- WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
|
||||
- COMMAND etc/deploy-to-ghpages.pl --hugo git@github.com:mongodb/mongo-cxx-driver
|
||||
- VERBATIM
|
||||
-)
|
||||
-
|
||||
-add_custom_target(docs_dir_current
|
||||
- COMMAND ${CMAKE_COMMAND} -E make_directory docs/api/current
|
||||
-)
|
||||
-
|
||||
-add_custom_target(doxygen-current
|
||||
- DEPENDS docs_dir_current
|
||||
- WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
|
||||
- COMMAND doxygen ${CMAKE_CURRENT_SOURCE_DIR}/Doxyfile
|
||||
- VERBATIM
|
||||
-)
|
||||
-
|
||||
-add_custom_target(doxygen-all
|
||||
- WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
|
||||
- COMMAND etc/generate-all-apidocs.pl
|
||||
- VERBATIM
|
||||
-)
|
||||
-
|
||||
-add_custom_target(doxygen-deploy
|
||||
- DEPENDS doxygen-all
|
||||
- WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
|
||||
- COMMAND etc/deploy-to-ghpages.pl --doxygen git@github.com:mongodb/mongo-cxx-driver
|
||||
- VERBATIM
|
||||
-)
|
||||
-
|
||||
-add_custom_target(format
|
||||
- python ${CMAKE_SOURCE_DIR}/etc/clang_format.py format
|
||||
- VERBATIM
|
||||
-)
|
||||
-
|
||||
-add_custom_target(format-lint
|
||||
- python ${CMAKE_SOURCE_DIR}/etc/clang_format.py lint
|
||||
- VERBATIM
|
||||
-)
|
||||
-
|
||||
-add_custom_target(docs
|
||||
- DEPENDS hugo doxygen-current
|
||||
-)
|
||||
-
|
||||
-set(THIRD_PARTY_SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/src/third_party)
|
||||
+#add_custom_target(hugo_dir
|
||||
+# COMMAND ${CMAKE_COMMAND} -E make_directory hugo
|
||||
+#)
|
||||
+#
|
||||
+#add_custom_target(hugo
|
||||
+# DEPENDS hugo_dir
|
||||
+# WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/docs
|
||||
+# COMMAND hugo
|
||||
+# VERBATIM
|
||||
+#)
|
||||
+#
|
||||
+#add_custom_target(hugo-deploy
|
||||
+# DEPENDS hugo
|
||||
+# WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
|
||||
+# COMMAND etc/deploy-to-ghpages.pl --hugo git@github.com:mongodb/mongo-cxx-driver
|
||||
+# VERBATIM
|
||||
+#)
|
||||
+#
|
||||
+#add_custom_target(docs_dir_current
|
||||
+# COMMAND ${CMAKE_COMMAND} -E make_directory docs/api/current
|
||||
+#)
|
||||
+#
|
||||
+#add_custom_target(doxygen-current
|
||||
+# DEPENDS docs_dir_current
|
||||
+# WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
|
||||
+# COMMAND doxygen ${CMAKE_CURRENT_SOURCE_DIR}/Doxyfile
|
||||
+# VERBATIM
|
||||
+#)
|
||||
+#
|
||||
+#add_custom_target(doxygen-all
|
||||
+# WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
|
||||
+# COMMAND etc/generate-all-apidocs.pl
|
||||
+# VERBATIM
|
||||
+#)
|
||||
+#
|
||||
+#add_custom_target(doxygen-deploy
|
||||
+# DEPENDS doxygen-all
|
||||
+# WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
|
||||
+# COMMAND etc/deploy-to-ghpages.pl --doxygen git@github.com:mongodb/mongo-cxx-driver
|
||||
+# VERBATIM
|
||||
+#)
|
||||
+#
|
||||
+#add_custom_target(format
|
||||
+# python ${CMAKE_SOURCE_DIR}/etc/clang_format.py format
|
||||
+# VERBATIM
|
||||
+#)
|
||||
+#
|
||||
+#add_custom_target(format-lint
|
||||
+# python ${CMAKE_SOURCE_DIR}/etc/clang_format.py lint
|
||||
+# VERBATIM
|
||||
+#)
|
||||
+#
|
||||
+#add_custom_target(docs
|
||||
+# DEPENDS hugo doxygen-current
|
||||
+#)
|
||||
+#
|
||||
+#set(THIRD_PARTY_SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/src/third_party)
|
||||
|
||||
enable_testing()
|
||||
|
||||
add_subdirectory(src)
|
||||
|
||||
-add_subdirectory(examples EXCLUDE_FROM_ALL)
|
||||
+#add_subdirectory(examples EXCLUDE_FROM_ALL)
|
||||
diff --git a/src/bsoncxx/CMakeLists.txt b/src/bsoncxx/CMakeLists.txt
|
||||
index 010f5e4..a9a7ada 100644
|
||||
--- a/src/bsoncxx/CMakeLists.txt
|
||||
+++ b/src/bsoncxx/CMakeLists.txt
|
||||
@@ -202,4 +202,4 @@ install(
|
||||
DESTINATION lib/cmake/libbsoncxx-${BSONCXX_VERSION}
|
||||
)
|
||||
|
||||
-add_subdirectory(test)
|
||||
+#add_subdirectory(test)
|
||||
diff --git a/src/mongocxx/CMakeLists.txt b/src/mongocxx/CMakeLists.txt
|
||||
index 12d188b..2ef54e4 100644
|
||||
--- a/src/mongocxx/CMakeLists.txt
|
||||
+++ b/src/mongocxx/CMakeLists.txt
|
||||
@@ -209,4 +209,4 @@ install(
|
||||
DESTINATION lib/cmake/libmongocxx-${MONGOCXX_VERSION}
|
||||
)
|
||||
|
||||
-add_subdirectory(test)
|
||||
+#add_subdirectory(test)
|
@ -1,20 +1,16 @@
|
||||
if (VCPKG_LIBRARY_LINKAGE STREQUAL static)
|
||||
message(STATUS "Warning: Static building not supported yet. Building dynamic.") #Blocked by libbson
|
||||
set(VCPKG_LIBRARY_LINKAGE dynamic)
|
||||
endif()
|
||||
include(vcpkg_common_functions)
|
||||
set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/mongo-cxx-driver-r3.0.2)
|
||||
set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/mongo-cxx-driver-r3.0.3)
|
||||
|
||||
vcpkg_download_distfile(ARCHIVE
|
||||
URLS "https://codeload.github.com/mongodb/mongo-cxx-driver/zip/r3.0.2"
|
||||
FILENAME "mongo-cxx-driver-r3.0.2.zip"
|
||||
SHA512 f3f1902df22ad58090ec2d4f22c9746d32b12552934d0eaf686b7e3b2e65ac9eeff9e28944cde75c5f5834735e8b76f879e1ca0e7095195f22e3ce6dd92b4524
|
||||
URLS "https://github.com/mongodb/mongo-cxx-driver/archive/r3.0.3.tar.gz"
|
||||
FILENAME "mongo-cxx-driver-r3.0.3.tar.gz"
|
||||
SHA512 29f7ae77dab160c4279eb2eba8e960b25afc7118bf82570d240f5c68e1e17b10dc99910c855888467c304d70399f2d02031463b0c168a95ad0b9323742ccfd35
|
||||
)
|
||||
vcpkg_extract_source_archive(${ARCHIVE})
|
||||
|
||||
vcpkg_apply_patches(
|
||||
SOURCE_PATH ${SOURCE_PATH}
|
||||
PATCHES ${CMAKE_CURRENT_LIST_DIR}/0001_cmake.patch
|
||||
PATCHES ${CMAKE_CURRENT_LIST_DIR}/disable_test_and_example.patch
|
||||
)
|
||||
|
||||
vcpkg_configure_cmake(
|
||||
@ -22,13 +18,62 @@ vcpkg_configure_cmake(
|
||||
OPTIONS
|
||||
-DLIBBSON_DIR=${CURRENT_INSTALLED_DIR}
|
||||
-DLIBMONGOC_DIR=${CURRENT_INSTALLED_DIR}
|
||||
-DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=ON
|
||||
)
|
||||
|
||||
vcpkg_install_cmake()
|
||||
|
||||
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/lib/cmake)
|
||||
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib/cmake)
|
||||
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
|
||||
file(RENAME
|
||||
${CURRENT_PACKAGES_DIR}/include/bsoncxx/v_noabi/bsoncxx
|
||||
${CURRENT_PACKAGES_DIR}/temp)
|
||||
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/include/bsoncxx)
|
||||
file(RENAME ${CURRENT_PACKAGES_DIR}/temp ${CURRENT_PACKAGES_DIR}/include/bsoncxx)
|
||||
|
||||
file(COPY ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/mongo-cxx-driver)
|
||||
file(RENAME ${CURRENT_PACKAGES_DIR}/share/mongo-cxx-driver/LICENSE ${CURRENT_PACKAGES_DIR}/share/mongo-cxx-driver/copyright)
|
||||
file(RENAME
|
||||
${CURRENT_PACKAGES_DIR}/include/mongocxx/v_noabi/mongocxx
|
||||
${CURRENT_PACKAGES_DIR}/temp)
|
||||
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/include/mongocxx)
|
||||
file(RENAME ${CURRENT_PACKAGES_DIR}/temp ${CURRENT_PACKAGES_DIR}/include/mongocxx)
|
||||
|
||||
file(REMOVE_RECURSE
|
||||
${CURRENT_PACKAGES_DIR}/lib/cmake
|
||||
${CURRENT_PACKAGES_DIR}/debug/lib/cmake
|
||||
|
||||
${CURRENT_PACKAGES_DIR}/include/bsoncxx/cmake
|
||||
${CURRENT_PACKAGES_DIR}/include/bsoncxx/config/private
|
||||
${CURRENT_PACKAGES_DIR}/include/bsoncxx/private
|
||||
${CURRENT_PACKAGES_DIR}/include/bsoncxx/test
|
||||
${CURRENT_PACKAGES_DIR}/include/bsoncxx/third_party
|
||||
|
||||
${CURRENT_PACKAGES_DIR}/include/mongocxx/cmake
|
||||
${CURRENT_PACKAGES_DIR}/include/mongocxx/config/private
|
||||
${CURRENT_PACKAGES_DIR}/include/mongocxx/test
|
||||
${CURRENT_PACKAGES_DIR}/include/mongocxx/test_util
|
||||
${CURRENT_PACKAGES_DIR}/include/mongocxx/private
|
||||
${CURRENT_PACKAGES_DIR}/include/mongocxx/exception/private
|
||||
|
||||
${CURRENT_PACKAGES_DIR}/debug/include)
|
||||
|
||||
|
||||
if (VCPKG_LIBRARY_LINKAGE STREQUAL static)
|
||||
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin)
|
||||
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/bin)
|
||||
file(REMOVE ${CURRENT_PACKAGES_DIR}/lib/bsoncxx.lib)
|
||||
file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/lib/bsoncxx.lib)
|
||||
file(REMOVE ${CURRENT_PACKAGES_DIR}/lib/mongocxx.lib)
|
||||
file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/lib/mongocxx.lib)
|
||||
|
||||
file(RENAME
|
||||
${CURRENT_PACKAGES_DIR}/lib/libbsoncxx.lib
|
||||
${CURRENT_PACKAGES_DIR}/lib/bsoncxx.lib)
|
||||
file(RENAME
|
||||
${CURRENT_PACKAGES_DIR}/debug/lib/libmongocxx.lib
|
||||
${CURRENT_PACKAGES_DIR}/debug/lib/mongocxx.lib)
|
||||
else()
|
||||
file(REMOVE ${CURRENT_PACKAGES_DIR}/lib/libbsoncxx.lib)
|
||||
file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/lib/libbsoncxx.lib)
|
||||
file(REMOVE ${CURRENT_PACKAGES_DIR}/lib/libmongocxx.lib)
|
||||
file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/lib/libmongocxx.lib)
|
||||
endif()
|
||||
|
||||
file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/mongo-cxx-driver RENAME copyright)
|
Loading…
Reference in New Issue
Block a user