From 59a70d372915336b8da0a133f0876d1fa5b6f852 Mon Sep 17 00:00:00 2001 From: codicodi Date: Sat, 25 Feb 2017 16:52:57 +0100 Subject: [PATCH] [spdlog] update to 0.12.0 --- ports/spdlog/CONTROL | 3 ++- ports/spdlog/portfile.cmake | 17 +++++++++++++---- 2 files changed, 15 insertions(+), 5 deletions(-) diff --git a/ports/spdlog/CONTROL b/ports/spdlog/CONTROL index dea187f2e29..e4e9a7fc344 100644 --- a/ports/spdlog/CONTROL +++ b/ports/spdlog/CONTROL @@ -1,3 +1,4 @@ Source: spdlog -Version: 0.11.0 +Version: 0.12.0 Description: Very fast, header only, C++ logging library +Build-Depends: fmt diff --git a/ports/spdlog/portfile.cmake b/ports/spdlog/portfile.cmake index f8a4c61fff4..2354a0be739 100644 --- a/ports/spdlog/portfile.cmake +++ b/ports/spdlog/portfile.cmake @@ -1,15 +1,18 @@ #header-only library include(vcpkg_common_functions) -set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/spdlog-0.11.0) +set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/spdlog-0.12.0) vcpkg_download_distfile(ARCHIVE - URLS "https://github.com/gabime/spdlog/archive/v0.11.0.zip" - FILENAME "v0.11.0.zip" - SHA512 4e759b8a18d0e3f256d974920260ebb6c6792885651290637a8a7210731e1d24a6f662d7dc7d3ae165a78c6e738229bd4b6922f36df26581bf43c8bca7c90314 + URLS "https://github.com/gabime/spdlog/archive/v0.12.0.zip" + FILENAME "v0.12.0.zip" + SHA512 2ef251bf4496b3a17ca055f8ee087864b95eb1eb50d43cbe675bdb6f7cb2e5386460c222f4ed9b95d0f21fdb811f43e3b6a1cfaa45523760ff6125a329d8a02a ) vcpkg_extract_source_archive(${ARCHIVE}) vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DSPDLOG_BUILD_TESTING=OFF ) vcpkg_install_cmake() @@ -23,6 +26,12 @@ file(RENAME ${CURRENT_PACKAGES_DIR}/lib/cmake/spdlog/ ${CURRENT_PACKAGES_DIR}/sh file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/lib/cmake) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib/cmake) +# use vcpkg-provided fmt library +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/include/spdlog/fmt/bundled) +file(READ ${CURRENT_PACKAGES_DIR}/include/spdlog/tweakme.h SPDLOG_TWEAKME_CONTENTS) +string(REPLACE "// #define SPDLOG_FMT_EXTERNAL" "#define SPDLOG_FMT_EXTERNAL" SPDLOG_TWEAKME_CONTENTS ${SPDLOG_TWEAKME_CONTENTS}) +file(WRITE ${CURRENT_PACKAGES_DIR}/include/spdlog/tweakme.h ${SPDLOG_TWEAKME_CONTENTS}) + # Handle copyright file(COPY ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/spdlog) file(RENAME ${CURRENT_PACKAGES_DIR}/share/spdlog/LICENSE ${CURRENT_PACKAGES_DIR}/share/spdlog/copyright)