2017-06-15 06:55:26 +08:00
|
|
|
vcpkg_from_github(
|
|
|
|
OUT_SOURCE_PATH SOURCE_PATH
|
|
|
|
REPO fmtlib/fmt
|
2023-05-22 09:05:01 +08:00
|
|
|
REF "${VERSION}"
|
|
|
|
SHA512 6188508d74ca1ed75bf6441b152c07ca83971d3104b37f33784a7b55dfcc614d6243e77e0a14220018586fdb86207cc033eece834e7acd5e0907ed4c97403f3b
|
2017-06-15 06:55:26 +08:00
|
|
|
HEAD_REF master
|
2021-04-08 04:28:15 +08:00
|
|
|
PATCHES
|
|
|
|
fix-write-batch.patch
|
2022-07-06 06:58:12 +08:00
|
|
|
fix-format-conflict.patch
|
2016-09-22 00:45:16 +08:00
|
|
|
)
|
2021-03-19 06:06:03 +08:00
|
|
|
|
2021-03-01 05:17:19 +08:00
|
|
|
vcpkg_cmake_configure(
|
2021-09-08 02:55:54 +08:00
|
|
|
SOURCE_PATH "${SOURCE_PATH}"
|
2016-09-22 00:45:16 +08:00
|
|
|
OPTIONS
|
2016-11-11 11:04:45 +08:00
|
|
|
-DFMT_CMAKE_DIR=share/fmt
|
2016-09-22 00:45:16 +08:00
|
|
|
-DFMT_TEST=OFF
|
2016-09-30 02:17:57 +08:00
|
|
|
-DFMT_DOC=OFF
|
2016-09-22 00:45:16 +08:00
|
|
|
)
|
|
|
|
|
2021-03-01 05:17:19 +08:00
|
|
|
vcpkg_cmake_install()
|
2023-05-22 09:05:01 +08:00
|
|
|
vcpkg_cmake_config_fixup()
|
|
|
|
vcpkg_fixup_pkgconfig()
|
|
|
|
vcpkg_copy_pdbs()
|
2016-11-11 11:04:45 +08:00
|
|
|
|
2023-05-22 09:05:01 +08:00
|
|
|
if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic)
|
2020-08-07 08:09:10 +08:00
|
|
|
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
|
|
|
|
2023-05-22 09:05:01 +08:00
|
|
|
file(REMOVE_RECURSE
|
|
|
|
"${CURRENT_PACKAGES_DIR}/debug/include"
|
|
|
|
"${CURRENT_PACKAGES_DIR}/debug/share"
|
|
|
|
)
|
2016-09-22 00:45:16 +08:00
|
|
|
|
2021-09-08 02:55:54 +08:00
|
|
|
file(INSTALL "${CMAKE_CURRENT_LIST_DIR}/usage" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}")
|
2023-05-22 09:05:01 +08:00
|
|
|
vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/LICENSE.rst")
|