vcpkg/ports/fmt/portfile.cmake

39 lines
1006 B
CMake
Raw Normal View History

2017-06-15 06:55:26 +08:00
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO fmtlib/fmt
REF "${VERSION}"
2024-01-05 09:00:31 +08:00
SHA512 27df90c681ec37e55625062a79e3b83589b6d7e94eff37a3b412bb8c1473f757a8adb727603acc9185c3490628269216843b7d7bd5a3cb37f0029da5d1495ffa
2017-06-15 06:55:26 +08:00
HEAD_REF master
PATCHES
2024-02-27 17:02:58 +08:00
fix-visibility.patch
fix-write-batch.patch
)
vcpkg_cmake_configure(
SOURCE_PATH "${SOURCE_PATH}"
OPTIONS
2016-11-11 11:04:45 +08:00
-DFMT_CMAKE_DIR=share/fmt
-DFMT_TEST=OFF
-DFMT_DOC=OFF
)
vcpkg_cmake_install()
vcpkg_cmake_config_fixup()
vcpkg_fixup_pkgconfig()
vcpkg_copy_pdbs()
2016-11-11 11:04:45 +08:00
if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic)
vcpkg_replace_string(${CURRENT_PACKAGES_DIR}/include/fmt/core.h
"defined(FMT_SHARED)"
"1"
)
2016-11-11 11:04:45 +08:00
endif()
2017-06-15 06:55:26 +08:00
file(REMOVE_RECURSE
"${CURRENT_PACKAGES_DIR}/debug/include"
"${CURRENT_PACKAGES_DIR}/debug/share"
)
file(INSTALL "${CMAKE_CURRENT_LIST_DIR}/usage" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}")
2024-01-03 06:39:37 +08:00
vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/LICENSE")