aboutsummaryrefslogtreecommitdiff
path: root/vcpkg/ports/cli11
diff options
context:
space:
mode:
authorEthan Morgan <ethan@gweithio.com>2026-02-14 16:44:06 +0000
committerEthan Morgan <ethan@gweithio.com>2026-02-14 16:44:06 +0000
commit54409423f767d8b1cf30cb7d0efca6b4ca138823 (patch)
treed915ac7828703ce4b963efdd9728a1777ba18c1e /vcpkg/ports/cli11
move to own git serverHEADmaster
Diffstat (limited to 'vcpkg/ports/cli11')
-rw-r--r--vcpkg/ports/cli11/portfile.cmake29
-rw-r--r--vcpkg/ports/cli11/revert-1012-pkgconfig.diff10
-rw-r--r--vcpkg/ports/cli11/vcpkg.json18
3 files changed, 57 insertions, 0 deletions
diff --git a/vcpkg/ports/cli11/portfile.cmake b/vcpkg/ports/cli11/portfile.cmake
new file mode 100644
index 0000000..1ce3c5b
--- /dev/null
+++ b/vcpkg/ports/cli11/portfile.cmake
@@ -0,0 +1,29 @@
+vcpkg_from_github(
+ OUT_SOURCE_PATH SOURCE_PATH
+ REPO CLIUtils/CLI11
+ REF "v${VERSION}"
+ SHA512 28ff846ca0b736c784d1660b4d1470f34f55fed650c80fb6a2ec26519eaacbb80dd1aa951a4517097579f4aa0cf9527a13f3359744e589e31f852d1bea0ecfc8
+ HEAD_REF main
+ PATCHES
+ revert-1012-pkgconfig.diff
+)
+
+vcpkg_cmake_configure(
+ SOURCE_PATH "${SOURCE_PATH}"
+ OPTIONS
+ -DCLI11_BUILD_EXAMPLES=OFF
+ -DCLI11_BUILD_DOCS=OFF
+ -DCLI11_BUILD_TESTS=OFF
+ -DCLI11_PRECOMPILED=ON
+ -DCMAKE_CXX_STANDARD=17
+)
+
+vcpkg_cmake_install()
+
+vcpkg_cmake_config_fixup(CONFIG_PATH share/cmake/CLI11)
+vcpkg_fixup_pkgconfig()
+file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include" "${CURRENT_PACKAGES_DIR}/debug/share")
+
+vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/include/CLI/CLI.hpp" "#pragma once" "#pragma once\n#ifndef CLI11_COMPILE\n#define CLI11_COMPILE\n#endif")
+
+vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/LICENSE")
diff --git a/vcpkg/ports/cli11/revert-1012-pkgconfig.diff b/vcpkg/ports/cli11/revert-1012-pkgconfig.diff
new file mode 100644
index 0000000..d48e616
--- /dev/null
+++ b/vcpkg/ports/cli11/revert-1012-pkgconfig.diff
@@ -0,0 +1,10 @@
+diff --git a/cmake/CLI11GeneratePkgConfig.cmake b/cmake/CLI11GeneratePkgConfig.cmake
+index 7ed87f077..a9c5eb885 100644
+--- a/cmake/CLI11GeneratePkgConfig.cmake
++++ b/cmake/CLI11GeneratePkgConfig.cmake
+@@ -4,4 +4,4 @@ else()
+ configure_file("cmake/CLI11.pc.in" "CLI11.pc" @ONLY)
+ endif()
+
+-install(FILES "${PROJECT_BINARY_DIR}/CLI11.pc" DESTINATION "${CMAKE_INSTALL_DATADIR}/pkgconfig")
++install(FILES "${PROJECT_BINARY_DIR}/CLI11.pc" DESTINATION "${CMAKE_INSTALL_LIBDIR}/pkgconfig")
diff --git a/vcpkg/ports/cli11/vcpkg.json b/vcpkg/ports/cli11/vcpkg.json
new file mode 100644
index 0000000..07d14b7
--- /dev/null
+++ b/vcpkg/ports/cli11/vcpkg.json
@@ -0,0 +1,18 @@
+{
+ "name": "cli11",
+ "version": "2.6.1",
+ "description": "CLI11 is a command line parser for C++11 and beyond that provides a rich feature set with a simple and intuitive interface.",
+ "homepage": "https://github.com/CLIUtils/CLI11",
+ "license": "BSD-3-Clause",
+ "supports": "!uwp",
+ "dependencies": [
+ {
+ "name": "vcpkg-cmake",
+ "host": true
+ },
+ {
+ "name": "vcpkg-cmake-config",
+ "host": true
+ }
+ ]
+}