mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-12-28 19:25:27 +08:00
Merge pull request #310 from sdcb/libbson
[mongo-*] Enable static build, upgrade package version
This commit is contained in:
commit
23a5a229ce
@ -1,35 +0,0 @@
|
||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index d09a298..e64a6cd 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -12,7 +12,6 @@ include(CheckIncludeFile)
|
||||
include(CheckStructHasMember)
|
||||
include(CheckSymbolExists)
|
||||
include(TestBigEndian)
|
||||
-include(InstallRequiredSystemLibraries)
|
||||
|
||||
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${PROJECT_SOURCE_DIR}/build/cmake)
|
||||
|
||||
@@ -47,13 +46,6 @@ TEST_BIG_ENDIAN(BSON_BIG_ENDIAN)
|
||||
set (BSON_PTHREAD_ONCE_INIT_NEEDS_BRACES 0)
|
||||
set (BSON_HAVE_DECIMAL128 0)
|
||||
|
||||
-#librt needed on linux for clock_gettime
|
||||
-find_library(RT_LIBRARY rt)
|
||||
-if (RT_LIBRARY)
|
||||
- #set required libraries for CHECK_FUNCTION_EXISTS
|
||||
- set(CMAKE_REQUIRED_LIBRARIES ${RT_LIBRARY})
|
||||
-endif()
|
||||
-
|
||||
# See https://public.kitware.com/Bug/view.php?id=15659
|
||||
CHECK_SYMBOL_EXISTS(snprintf stdio.h BSON_HAVE_SNPRINTF)
|
||||
if (NOT BSON_HAVE_SNPRINTF)
|
||||
@@ -314,7 +306,7 @@ install(
|
||||
)
|
||||
install(
|
||||
FILES ${HEADERS}
|
||||
- DESTINATION "include/libbson-${BSON_API_VERSION}"
|
||||
+ DESTINATION "include"
|
||||
)
|
||||
|
||||
set(VERSION "${BSON_VERSION}")
|
@ -1,3 +1,3 @@
|
||||
Source: libbson
|
||||
Version: 1.4.2
|
||||
Version: 1.5.0-rc6
|
||||
Description: libbson is a library providing useful routines related to building, parsing, and iterating BSON documents.
|
@ -1,28 +1,52 @@
|
||||
if (VCPKG_LIBRARY_LINKAGE STREQUAL static)
|
||||
message(STATUS "Warning: Static building not supported yet. Building dynamic.")
|
||||
set(VCPKG_LIBRARY_LINKAGE dynamic)
|
||||
endif()
|
||||
include(vcpkg_common_functions)
|
||||
set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/libbson-1.4.2)
|
||||
set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/libbson-1.5.0-rc6)
|
||||
|
||||
vcpkg_download_distfile(ARCHIVE
|
||||
URLS "https://github.com/mongodb/libbson/releases/download/1.4.2/libbson-1.4.2.tar.gz"
|
||||
FILENAME "libbson-1.4.2.tar.gz"
|
||||
SHA512 4cc8f833978483af3dcbc30bede33f2a9b448930fabf7be2d5581c8368e875dc1707d31eae209c747e69be1f82fa525c7362c5ac9c4e0b6b3f3346dd5147860e
|
||||
URLS "https://github.com/mongodb/libbson/archive/1.5.0-rc6.tar.gz"
|
||||
FILENAME "libbson-1.5.0-rc6.tar.gz"
|
||||
SHA512 15cf590b488f7de8d614ddcc2c1536b05b607311f3cd3353418469c7a62177124fb4fb1c53f51b0de4c7491b21051c1ec47fbc12856cc69e37baebb3d65897c5
|
||||
)
|
||||
vcpkg_extract_source_archive(${ARCHIVE})
|
||||
|
||||
vcpkg_apply_patches(
|
||||
SOURCE_PATH ${SOURCE_PATH}
|
||||
PATCHES ${CMAKE_CURRENT_LIST_DIR}/0001_cmake.patch
|
||||
)
|
||||
|
||||
vcpkg_configure_cmake(
|
||||
SOURCE_PATH ${SOURCE_PATH}
|
||||
OPTIONS
|
||||
-DENABLE_TESTS=OFF
|
||||
-DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=ON
|
||||
)
|
||||
|
||||
vcpkg_install_cmake()
|
||||
|
||||
file(RENAME
|
||||
${CURRENT_PACKAGES_DIR}/include/libbson-1.0
|
||||
${CURRENT_PACKAGES_DIR}/temp)
|
||||
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/include)
|
||||
file(RENAME ${CURRENT_PACKAGES_DIR}/temp ${CURRENT_PACKAGES_DIR}/include)
|
||||
|
||||
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
|
||||
|
||||
file(COPY ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/libbson)
|
||||
file(RENAME ${CURRENT_PACKAGES_DIR}/share/libbson/COPYING ${CURRENT_PACKAGES_DIR}/share/libbson/copyright)
|
||||
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/bson-1.0.lib)
|
||||
file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/lib/bson-1.0.lib)
|
||||
|
||||
file(RENAME
|
||||
${CURRENT_PACKAGES_DIR}/lib/bson-static-1.0.lib
|
||||
${CURRENT_PACKAGES_DIR}/lib/bson-1.0.lib)
|
||||
file(RENAME
|
||||
${CURRENT_PACKAGES_DIR}/debug/lib/bson-static-1.0.lib
|
||||
${CURRENT_PACKAGES_DIR}/debug/lib/bson-1.0.lib)
|
||||
|
||||
# drop the __declspec(dllimport) when building static
|
||||
vcpkg_apply_patches(
|
||||
SOURCE_PATH ${CURRENT_PACKAGES_DIR}/include
|
||||
PATCHES
|
||||
${CMAKE_CURRENT_LIST_DIR}/static.patch
|
||||
)
|
||||
else()
|
||||
file(REMOVE ${CURRENT_PACKAGES_DIR}/lib/bson-static-1.0.lib)
|
||||
file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/lib/bson-static-1.0.lib)
|
||||
endif()
|
||||
|
||||
file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/libbson RENAME copyright)
|
13
ports/libbson/static.patch
Normal file
13
ports/libbson/static.patch
Normal file
@ -0,0 +1,13 @@
|
||||
diff --git a/bson-macros.h b/bson-macros.h
|
||||
index 909bf6c..0a1f612 100644
|
||||
--- a/bson-macros.h
|
||||
+++ b/bson-macros.h
|
||||
@@ -69,7 +69,7 @@
|
||||
# ifdef BSON_COMPILATION
|
||||
# define BSON_API __declspec(dllexport)
|
||||
# else
|
||||
-# define BSON_API __declspec(dllimport)
|
||||
+# define BSON_API
|
||||
# endif
|
||||
#elif defined(__GNUC__)
|
||||
# define BSON_API __attribute__ ((visibility ("default")))
|
@ -1,4 +1,4 @@
|
||||
Source: mongo-c-driver
|
||||
Version: 1.4.2
|
||||
Version: 1.5.0-rc6
|
||||
Build-Depends: libbson
|
||||
Description: Client library written in C for MongoDB.
|
@ -1,30 +1,47 @@
|
||||
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-c-driver-1.4.2)
|
||||
set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/mongo-c-driver-1.5.0-rc6)
|
||||
|
||||
vcpkg_download_distfile(ARCHIVE
|
||||
URLS "https://github.com/mongodb/mongo-c-driver/releases/download/1.4.2/mongo-c-driver-1.4.2.tar.gz"
|
||||
FILENAME "mongo-c-driver-1.4.2.tar.gz"
|
||||
SHA512 402b9d0f2ae957a07336c9a6d971440472acef8e17a3ba5e89635ca454a13d4b7cf5f9b71151ed6182c012efb5fac6684acfc00443c6bca07cdd04b9f7eddaeb
|
||||
URLS "https://github.com/mongodb/mongo-c-driver/archive/1.5.0-rc6.tar.gz"
|
||||
FILENAME "mongo-c-driver-1.5.0-rc6.tar.gz"
|
||||
SHA512 708caf4e963bad97b4802456c6f5809a0ba8c24fe5faaf0e91aa889a0690df4324005f8d324b3bfc80ffc76f1594612a8d391d7421dd914c58369c24cf8cc965
|
||||
)
|
||||
vcpkg_extract_source_archive(${ARCHIVE})
|
||||
|
||||
vcpkg_apply_patches(
|
||||
SOURCE_PATH ${SOURCE_PATH}
|
||||
PATCHES ${CMAKE_CURRENT_LIST_DIR}/0001_cmake.patch
|
||||
)
|
||||
|
||||
vcpkg_configure_cmake(
|
||||
SOURCE_PATH ${SOURCE_PATH}
|
||||
OPTIONS
|
||||
-DBSON_ROOT_DIR=${CURRENT_INSTALLED_DIR}
|
||||
-DENABLE_TESTS=OFF
|
||||
-DENABLE_EXAMPLES=OFF
|
||||
-DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=ON
|
||||
)
|
||||
|
||||
vcpkg_install_cmake()
|
||||
|
||||
file(RENAME
|
||||
${CURRENT_PACKAGES_DIR}/include/libmongoc-1.0
|
||||
${CURRENT_PACKAGES_DIR}/temp)
|
||||
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/include)
|
||||
file(RENAME ${CURRENT_PACKAGES_DIR}/temp ${CURRENT_PACKAGES_DIR}/include)
|
||||
|
||||
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
|
||||
|
||||
file(COPY ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/mongo-c-driver)
|
||||
file(RENAME ${CURRENT_PACKAGES_DIR}/share/mongo-c-driver/COPYING ${CURRENT_PACKAGES_DIR}/share/mongo-c-driver/copyright)
|
||||
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/mongoc-1.0.lib)
|
||||
file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/lib/mongoc-1.0.lib)
|
||||
|
||||
file(RENAME
|
||||
${CURRENT_PACKAGES_DIR}/lib/mongoc-static-1.0.lib
|
||||
${CURRENT_PACKAGES_DIR}/lib/mongoc-1.0.lib)
|
||||
file(RENAME
|
||||
${CURRENT_PACKAGES_DIR}/debug/lib/mongoc-static-1.0.lib
|
||||
${CURRENT_PACKAGES_DIR}/debug/lib/mongoc-1.0.lib)
|
||||
else()
|
||||
file(REMOVE ${CURRENT_PACKAGES_DIR}/lib/mongoc-static-1.0.lib)
|
||||
file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/lib/mongoc-static-1.0.lib)
|
||||
endif()
|
||||
|
||||
file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/mongo-c-driver RENAME copyright)
|
@ -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,21 @@
|
||||
if (VCPKG_LIBRARY_LINKAGE STREQUAL static)
|
||||
message(STATUS "Warning: Static building not supported yet. Building dynamic.") #Blocked by libbson
|
||||
message(STATUS "Warning: Static building not supported yet. Building dynamic.") #Blocked by build failure
|
||||
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 +23,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…
x
Reference in New Issue
Block a user