mirror of
https://github.com/microsoft/vcpkg.git
synced 2025-01-07 21:05:21 +08:00
33 lines
1015 B
CMake
33 lines
1015 B
CMake
#header-only library
|
|
include(vcpkg_common_functions)
|
|
vcpkg_from_github(
|
|
OUT_SOURCE_PATH SOURCE_PATH
|
|
REPO gabime/spdlog
|
|
REF v1.3.0
|
|
SHA512 019a52d4b6c66287ee2a6e8177457ecbbb78e1cb894f4a0a90b83a84d66cd37b397cdf77892d9116e4c34113bd3277d606d578bc96ec6521ae7745f08b1aa54f
|
|
HEAD_REF v1.x
|
|
PATCHES
|
|
disable-master-project-check.patch
|
|
)
|
|
|
|
vcpkg_configure_cmake(
|
|
SOURCE_PATH ${SOURCE_PATH}
|
|
PREFER_NINJA
|
|
OPTIONS
|
|
-DSPDLOG_FMT_EXTERNAL=ON
|
|
)
|
|
|
|
vcpkg_install_cmake()
|
|
|
|
vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/spdlog)
|
|
|
|
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug)
|
|
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/lib)
|
|
|
|
# use vcpkg-provided fmt library (see also option SPDLOG_FMT_EXTERNAL above)
|
|
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/include/spdlog/fmt/bundled)
|
|
|
|
# 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)
|