2020-09-10 03:10:56 +08:00
|
|
|
vcpkg_from_github(
|
|
|
|
OUT_SOURCE_PATH SOURCE_PATH
|
|
|
|
REPO mpusz/units
|
2023-06-22 13:41:20 +08:00
|
|
|
REF "v${VERSION}"
|
|
|
|
SHA512 6369c886629955c6457911b98a702c29bacce58e9049e1da700055a3f8b1981cce4f545c1d09550ec1c57f8805f7fc1f0198118950a14b2a7b797dd437ed72df
|
2020-09-10 03:10:56 +08:00
|
|
|
PATCHES
|
2023-06-22 13:41:20 +08:00
|
|
|
config.patch
|
2020-09-10 03:10:56 +08:00
|
|
|
)
|
|
|
|
|
2023-06-22 13:41:20 +08:00
|
|
|
set(USE_LIBFMT OFF)
|
|
|
|
if ("use-libfmt" IN_LIST FEATURES)
|
|
|
|
set(USE_LIBFMT ON)
|
|
|
|
endif()
|
|
|
|
|
2021-11-16 06:18:12 +08:00
|
|
|
vcpkg_cmake_configure(
|
2022-08-03 14:17:02 +08:00
|
|
|
SOURCE_PATH "${SOURCE_PATH}/src"
|
2023-06-22 13:41:20 +08:00
|
|
|
OPTIONS
|
|
|
|
-DUNITS_USE_LIBFMT=${USE_LIBFMT}
|
2020-09-10 03:10:56 +08:00
|
|
|
)
|
|
|
|
|
2021-11-16 06:18:12 +08:00
|
|
|
vcpkg_cmake_install()
|
|
|
|
|
|
|
|
vcpkg_cmake_config_fixup(CONFIG_PATH "lib/cmake/${PORT}")
|
2020-09-10 03:10:56 +08:00
|
|
|
|
|
|
|
# Handle copyright/readme/package files
|
2023-06-22 13:41:20 +08:00
|
|
|
vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/LICENSE.md")
|
2021-11-16 06:18:12 +08:00
|
|
|
file(INSTALL "${SOURCE_PATH}/README.md" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}")
|
2020-09-10 03:10:56 +08:00
|
|
|
|
|
|
|
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug"
|
2023-06-22 13:41:20 +08:00
|
|
|
"${CURRENT_PACKAGES_DIR}/lib") # Header only
|