diff options
| author | myd7349 <myd7349@gmail.com> | 2019-01-14 20:31:58 +0800 |
|---|---|---|
| committer | myd7349 <myd7349@gmail.com> | 2019-01-14 20:36:51 +0800 |
| commit | 57f7f49aba15b05d3093445bb813c1f5cfbbd6c5 (patch) | |
| tree | 5a28508bc0cf72eb7cbbaab37180a1335a544c51 | |
| parent | ce7c2294c9985a2eab4baa95f7176b43be5b30d8 (diff) | |
| download | vcpkg-57f7f49aba15b05d3093445bb813c1f5cfbbd6c5.tar.gz vcpkg-57f7f49aba15b05d3093445bb813c1f5cfbbd6c5.zip | |
[spdlog] Update to 1.3.0
| -rw-r--r-- | ports/spdlog/CONTROL | 2 | ||||
| -rw-r--r-- | ports/spdlog/disable-master-project-check.patch | 17 | ||||
| -rw-r--r-- | ports/spdlog/fmt-external-cmake-option.patch | 100 | ||||
| -rw-r--r-- | ports/spdlog/portfile.cmake | 7 |
4 files changed, 21 insertions, 105 deletions
diff --git a/ports/spdlog/CONTROL b/ports/spdlog/CONTROL index 8ff960a23..6214deb4d 100644 --- a/ports/spdlog/CONTROL +++ b/ports/spdlog/CONTROL @@ -1,4 +1,4 @@ Source: spdlog -Version: 1.2.1 +Version: 1.3.0 Description: Very fast, header only, C++ logging library Build-Depends: fmt diff --git a/ports/spdlog/disable-master-project-check.patch b/ports/spdlog/disable-master-project-check.patch new file mode 100644 index 000000000..69f5882da --- /dev/null +++ b/ports/spdlog/disable-master-project-check.patch @@ -0,0 +1,17 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index e1d9656..f8cb60c 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -46,9 +46,9 @@ add_library(spdlog::spdlog ALIAS spdlog) + + # Check if spdlog is being used directly or via add_subdirectory + set(SPDLOG_MASTER_PROJECT OFF) +-if (CMAKE_CURRENT_SOURCE_DIR STREQUAL CMAKE_SOURCE_DIR) +- set(SPDLOG_MASTER_PROJECT ON) +-endif() ++#if (CMAKE_CURRENT_SOURCE_DIR STREQUAL CMAKE_SOURCE_DIR) ++# set(SPDLOG_MASTER_PROJECT ON) ++#endif() + + option(SPDLOG_BUILD_EXAMPLES "Build examples" ${SPDLOG_MASTER_PROJECT}) + option(SPDLOG_BUILD_BENCH "Build benchmarks" ${SPDLOG_MASTER_PROJECT}) diff --git a/ports/spdlog/fmt-external-cmake-option.patch b/ports/spdlog/fmt-external-cmake-option.patch deleted file mode 100644 index 635eb3b23..000000000 --- a/ports/spdlog/fmt-external-cmake-option.patch +++ /dev/null @@ -1,100 +0,0 @@ -diff --git a/CMakeLists.txt b/CMakeLists.txt -index fc75346..5b3a5c8 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -59,6 +59,12 @@ cmake_dependent_option(SPDLOG_BUILD_TESTING - "BUILD_TESTING" OFF - ) - -+option(SPDLOG_FMT_EXTERNAL "Use external fmt library instead of bundled" OFF) -+ -+if(SPDLOG_FMT_EXTERNAL) -+ find_package(fmt REQUIRED CONFIG) -+endif() -+ - target_include_directories( - spdlog - INTERFACE -@@ -66,6 +72,11 @@ target_include_directories( - "$<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>" - ) - -+if(SPDLOG_FMT_EXTERNAL) -+ target_compile_definitions(spdlog INTERFACE SPDLOG_FMT_EXTERNAL) -+ target_link_libraries(spdlog INTERFACE fmt::fmt) -+endif() -+ - set(HEADER_BASE "${CMAKE_CURRENT_SOURCE_DIR}/include") - - if(SPDLOG_BUILD_EXAMPLES) -@@ -88,7 +99,8 @@ set(config_install_dir "${CMAKE_INSTALL_LIBDIR}/cmake/${PROJECT_NAME}") - set(include_install_dir "${CMAKE_INSTALL_INCLUDEDIR}") - set(pkgconfig_install_dir "${CMAKE_INSTALL_LIBDIR}/pkgconfig") - set(version_config "${CMAKE_BINARY_DIR}/${PROJECT_NAME}ConfigVersion.cmake") --set(project_config "${PROJECT_NAME}Config.cmake") -+set(project_config "${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}Config.cmake") -+set(targets_config "${PROJECT_NAME}Targets.cmake") - set(pkg_config "${CMAKE_BINARY_DIR}/${PROJECT_NAME}.pc") - set(targets_export_name "${PROJECT_NAME}Targets") - set(namespace "${PROJECT_NAME}::") -@@ -101,6 +113,8 @@ write_basic_package_version_file( - - # configure pkg config file - configure_file("cmake/spdlog.pc.in" "${pkg_config}" @ONLY) -+# configure spdlogConfig.cmake file -+configure_file("cmake/Config.cmake.in" "${project_config}" @ONLY) - - # install targets - install( -@@ -114,9 +128,9 @@ install( - DESTINATION "${include_install_dir}" - ) - --# install project version file -+# install project config and version file - install( -- FILES "${version_config}" -+ FILES "${project_config}" "${version_config}" - DESTINATION "${config_install_dir}" - ) - -@@ -126,19 +140,19 @@ install( - DESTINATION "${pkgconfig_install_dir}" - ) - --# install project config file -+# install targets config file - install( - EXPORT "${targets_export_name}" - NAMESPACE "${namespace}" - DESTINATION "${config_install_dir}" -- FILE ${project_config} -+ FILE ${targets_config} - ) - --# export build directory config file -+# export build directory targets file - export( - EXPORT ${targets_export_name} - NAMESPACE "${namespace}" -- FILE ${project_config} -+ FILE ${targets_config} - ) - - # register project in CMake user registry -diff --git a/cmake/Config.cmake.in b/cmake/Config.cmake.in -index ba0b36f..0b0fd11 100644 ---- a/cmake/Config.cmake.in -+++ b/cmake/Config.cmake.in -@@ -21,4 +21,11 @@ - # * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
- # *************************************************************************/
-
-+set(SPDLOG_FMT_EXTERNAL @SPDLOG_FMT_EXTERNAL@)
-+
- include("${CMAKE_CURRENT_LIST_DIR}/@targets_export_name@.cmake")
-+
-+if(SPDLOG_FMT_EXTERNAL)
-+ include(CMakeFindDependencyMacro)
-+ find_dependency(fmt CONFIG)
-+endif()
diff --git a/ports/spdlog/portfile.cmake b/ports/spdlog/portfile.cmake index c676c6467..ccc961b18 100644 --- a/ports/spdlog/portfile.cmake +++ b/ports/spdlog/portfile.cmake @@ -3,18 +3,17 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO gabime/spdlog - REF v1.2.1 - SHA512 418f91efc207fa227558212d82c41639c0bb59e84ea47447e0b6276c4842e97f1f8aaf5802c071ef15d80ec525e317e70b6a39661a6c96ab39d33d9bd1570da1 + REF v1.3.0 + SHA512 019a52d4b6c66287ee2a6e8177457ecbbb78e1cb894f4a0a90b83a84d66cd37b397cdf77892d9116e4c34113bd3277d606d578bc96ec6521ae7745f08b1aa54f HEAD_REF v1.x PATCHES - fmt-external-cmake-option.patch # This patch is in the upstream project and can be removed next version update. + disable-master-project-check.patch ) vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} PREFER_NINJA OPTIONS - -DSPDLOG_BUILD_TESTING=OFF -DSPDLOG_FMT_EXTERNAL=ON ) |
