vcpkg/ports/spdlog/portfile.cmake

33 lines
1015 B
CMake
Raw Normal View History

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
2019-01-14 20:31:58 +08:00
REF v1.3.0
SHA512 019a52d4b6c66287ee2a6e8177457ecbbb78e1cb894f4a0a90b83a84d66cd37b397cdf77892d9116e4c34113bd3277d606d578bc96ec6521ae7745f08b1aa54f
HEAD_REF v1.x
PATCHES
2019-01-14 20:31:58 +08:00
disable-master-project-check.patch
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_FMT_EXTERNAL=ON
2016-10-11 16:06:50 -05:00
)
vcpkg_install_cmake()
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
# use vcpkg-provided fmt library (see also option SPDLOG_FMT_EXTERNAL above)
2017-02-25 16:52:57 +01:00
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/include/spdlog/fmt/bundled)
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)