2016-10-26 19:44:28 -07:00
|
|
|
#header-only library
|
2016-10-11 16:06:50 -05:00
|
|
|
include(vcpkg_common_functions)
|
2017-05-20 13:01:31 +02:00
|
|
|
vcpkg_from_github(
|
|
|
|
OUT_SOURCE_PATH SOURCE_PATH
|
|
|
|
REPO gabime/spdlog
|
2018-10-25 10:38:15 -07:00
|
|
|
REF v1.2.1
|
|
|
|
SHA512 418f91efc207fa227558212d82c41639c0bb59e84ea47447e0b6276c4842e97f1f8aaf5802c071ef15d80ec525e317e70b6a39661a6c96ab39d33d9bd1570da1
|
2018-07-04 18:54:04 -07:00
|
|
|
HEAD_REF v1.x
|
2016-10-11 16:06:50 -05:00
|
|
|
)
|
|
|
|
|
|
|
|
vcpkg_configure_cmake(
|
|
|
|
SOURCE_PATH ${SOURCE_PATH}
|
2017-02-25 16:57:03 +01:00
|
|
|
PREFER_NINJA
|
2017-02-25 16:52:57 +01:00
|
|
|
OPTIONS
|
|
|
|
-DSPDLOG_BUILD_TESTING=OFF
|
2016-10-11 16:06:50 -05:00
|
|
|
)
|
|
|
|
|
|
|
|
vcpkg_install_cmake()
|
|
|
|
|
2018-08-06 10:08:30 +02:00
|
|
|
vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/spdlog)
|
2016-10-11 16:06:50 -05:00
|
|
|
|
2017-05-20 13:01:31 +02:00
|
|
|
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug)
|
|
|
|
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/lib)
|
2016-10-11 16:06:50 -05:00
|
|
|
|
2017-02-25 16:52:57 +01:00
|
|
|
# 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)
|
2017-05-20 13:01:31 +02:00
|
|
|
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}")
|
2017-02-25 16:52:57 +01:00
|
|
|
|
2016-10-11 16:06:50 -05:00
|
|
|
# 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)
|