mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-12-12 13:49:06 +08:00
9b9c16fa53
Current version v2.1.0 cannot be compiled with gcc14, this minor version fixes that https://github.com/mpusz/mp-units/issues/575 - [x] Changes comply with the [maintainer guide](https://github.com/microsoft/vcpkg-docs/blob/main/vcpkg/contributing/maintainer-guide.md). - [x] SHA512s are updated for each updated download. - [ ] The "supports" clause reflects platforms that may be fixed by this new version. - [ ] Any fixed [CI baseline](https://github.com/microsoft/vcpkg/blob/master/scripts/ci.baseline.txt) entries are removed from that file. - [ ] Any patches that are no longer applied are deleted from the port's directory. - [x] The version database is fixed by rerunning `./vcpkg x-add-version --all` and committing the result. - [x] Only one version is added to each modified port's versions file.
35 lines
963 B
CMake
35 lines
963 B
CMake
if(VCPKG_TARGET_IS_LINUX)
|
|
message("Note: `mp-units` requires Clang16+ or GCC11+")
|
|
endif()
|
|
|
|
vcpkg_from_github(
|
|
OUT_SOURCE_PATH SOURCE_PATH
|
|
REPO mpusz/units
|
|
REF "v${VERSION}"
|
|
SHA512 5e01cc4ee6cbbaf81f02c9268dfa8f0ca348925a85f84704f06405874edb478437837900e6fbe882aba9e9040235310d82b6420fd81b39eb1cc8d38570e48613
|
|
PATCHES
|
|
config.patch
|
|
)
|
|
|
|
set(USE_LIBFMT OFF)
|
|
if ("use-libfmt" IN_LIST FEATURES)
|
|
set(USE_LIBFMT ON)
|
|
endif()
|
|
|
|
vcpkg_cmake_configure(
|
|
SOURCE_PATH "${SOURCE_PATH}/src"
|
|
OPTIONS
|
|
-DMP_UNITS_USE_LIBFMT=${USE_LIBFMT}
|
|
)
|
|
|
|
vcpkg_cmake_install()
|
|
|
|
vcpkg_cmake_config_fixup(CONFIG_PATH "lib/cmake/${PORT}")
|
|
|
|
# Handle copyright/readme/package files
|
|
vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/LICENSE.md")
|
|
file(INSTALL "${SOURCE_PATH}/README.md" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}")
|
|
|
|
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug"
|
|
"${CURRENT_PACKAGES_DIR}/lib") # Header only
|