Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[fmt] Add C++20 module feature cppmodule #32801

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions ports/fmt/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,19 @@ vcpkg_from_github(
fix-format-conflict.patch
)

vcpkg_check_features(
OUT_FEATURE_OPTIONS FEATURE_OPTIONS
FEATURES
cppmodule FMT_MODULE
)

vcpkg_cmake_configure(
SOURCE_PATH "${SOURCE_PATH}"
OPTIONS
-DFMT_CMAKE_DIR=share/fmt
-DFMT_TEST=OFF
-DFMT_DOC=OFF
${FEATURE_OPTIONS}
)

vcpkg_cmake_install()
Expand All @@ -34,5 +41,7 @@ file(REMOVE_RECURSE
"${CURRENT_PACKAGES_DIR}/debug/share"
)

vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/share/fmt/fmt-targets.cmake" "${CMAKE_CURRENT_BINARY_DIR}" "`dirname $0`/../../../..")

file(INSTALL "${CMAKE_CURRENT_LIST_DIR}/usage" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}")
vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/LICENSE.rst")
8 changes: 7 additions & 1 deletion ports/fmt/vcpkg.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"name": "fmt",
"version": "10.0.0",
"port-version": 1,
"description": "Formatting library for C++. It can be used as a safe alternative to printf or as a fast alternative to IOStreams.",
"homepage": "https://github.com/fmtlib/fmt",
"license": "MIT",
Expand All @@ -13,5 +14,10 @@
"name": "vcpkg-cmake-config",
"host": true
}
]
],
"features": {
"cppmodule": {
"description": "Build a module instead of a traditional library"
}
}
}
2 changes: 1 addition & 1 deletion versions/baseline.json
Original file line number Diff line number Diff line change
Expand Up @@ -2590,7 +2590,7 @@
},
"fmt": {
"baseline": "10.0.0",
"port-version": 0
"port-version": 1
},
"folly": {
"baseline": "2023.07.03.00",
Expand Down
5 changes: 5 additions & 0 deletions versions/f-/fmt.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "d8b508f47e8b19dc689c5b936538d6f41dbc47f7",
"version": "10.0.0",
"port-version": 1
},
{
"git-tree": "eedb31bb1318118ec6a2d1bec60ab12e484092fd",
"version": "10.0.0",
Expand Down
Loading