diff options
| author | Ethan Morgan <ethan@gweithio.com> | 2026-02-14 16:44:06 +0000 |
|---|---|---|
| committer | Ethan Morgan <ethan@gweithio.com> | 2026-02-14 16:44:06 +0000 |
| commit | 54409423f767d8b1cf30cb7d0efca6b4ca138823 (patch) | |
| tree | d915ac7828703ce4b963efdd9728a1777ba18c1e /vcpkg/ports/fmt | |
Diffstat (limited to 'vcpkg/ports/fmt')
| -rw-r--r-- | vcpkg/ports/fmt/portfile.cmake | 28 | ||||
| -rw-r--r-- | vcpkg/ports/fmt/usage | 8 | ||||
| -rw-r--r-- | vcpkg/ports/fmt/vcpkg.json | 17 |
3 files changed, 53 insertions, 0 deletions
diff --git a/vcpkg/ports/fmt/portfile.cmake b/vcpkg/ports/fmt/portfile.cmake new file mode 100644 index 0000000..1136ea7 --- /dev/null +++ b/vcpkg/ports/fmt/portfile.cmake @@ -0,0 +1,28 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO fmtlib/fmt + REF "${VERSION}" + SHA512 f0da82c545b01692e9fd30fdfb613dbb8dd9716983dcd0ff19ac2a8d36f74beb5540ef38072fdecc1e34191b3682a8542ecbf3a61ef287dbba0a2679d4e023f2 + HEAD_REF master +) + +vcpkg_cmake_configure( + SOURCE_PATH "${SOURCE_PATH}" + OPTIONS + -DFMT_CMAKE_DIR=share/fmt + -DFMT_TEST=OFF + -DFMT_DOC=OFF +) + +vcpkg_cmake_install() +vcpkg_cmake_config_fixup() +vcpkg_fixup_pkgconfig() +vcpkg_copy_pdbs() + +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}") +vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/LICENSE") diff --git a/vcpkg/ports/fmt/usage b/vcpkg/ports/fmt/usage new file mode 100644 index 0000000..e5a9d70 --- /dev/null +++ b/vcpkg/ports/fmt/usage @@ -0,0 +1,8 @@ +The package fmt provides CMake targets: + + find_package(fmt CONFIG REQUIRED) + target_link_libraries(main PRIVATE fmt::fmt) + + # Or use the header-only version + find_package(fmt CONFIG REQUIRED) + target_link_libraries(main PRIVATE fmt::fmt-header-only) diff --git a/vcpkg/ports/fmt/vcpkg.json b/vcpkg/ports/fmt/vcpkg.json new file mode 100644 index 0000000..f928cd3 --- /dev/null +++ b/vcpkg/ports/fmt/vcpkg.json @@ -0,0 +1,17 @@ +{ + "name": "fmt", + "version": "12.1.0", + "description": "{fmt} is an open-source formatting library providing a fast and safe alternative to C stdio and C++ iostreams.", + "homepage": "https://github.com/fmtlib/fmt", + "license": "MIT", + "dependencies": [ + { + "name": "vcpkg-cmake", + "host": true + }, + { + "name": "vcpkg-cmake-config", + "host": true + } + ] +} |