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/arg-router | |
Diffstat (limited to 'vcpkg/ports/arg-router')
| -rw-r--r-- | vcpkg/ports/arg-router/always-depend-on-boost.patch | 22 | ||||
| -rw-r--r-- | vcpkg/ports/arg-router/portfile.cmake | 33 | ||||
| -rw-r--r-- | vcpkg/ports/arg-router/usage | 8 | ||||
| -rw-r--r-- | vcpkg/ports/arg-router/vcpkg.json | 23 |
4 files changed, 86 insertions, 0 deletions
diff --git a/vcpkg/ports/arg-router/always-depend-on-boost.patch b/vcpkg/ports/arg-router/always-depend-on-boost.patch new file mode 100644 index 0000000..2334430 --- /dev/null +++ b/vcpkg/ports/arg-router/always-depend-on-boost.patch @@ -0,0 +1,22 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 2828e64..7b84de3 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -40,6 +40,8 @@ endif() + include("${CMAKE_CURRENT_SOURCE_DIR}/cmake/build_types/documentation.cmake") + + set(BOOST_VERSION 1.74) ++find_package(Boost ${BOOST_VERSION} REQUIRED) ++ + if(NOT INSTALLATION_ONLY) + include("${CMAKE_CURRENT_SOURCE_DIR}/cmake/versioning/version.cmake") + include("${CMAKE_CURRENT_SOURCE_DIR}/cmake/copyright_checker.cmake") +@@ -48,8 +50,6 @@ if(NOT INSTALLATION_ONLY) + include("${CMAKE_CURRENT_SOURCE_DIR}/cmake/sanitizers.cmake") + include("${CMAKE_CURRENT_SOURCE_DIR}/cmake/ccache.cmake") + +- find_package(Boost ${BOOST_VERSION} REQUIRED) +- + find_package(span-lite QUIET) + if (NOT span-lite_FOUND) + message(WARNING "span-lite package not found, you will need to compile against C++20 or higher") diff --git a/vcpkg/ports/arg-router/portfile.cmake b/vcpkg/ports/arg-router/portfile.cmake new file mode 100644 index 0000000..e70e85c --- /dev/null +++ b/vcpkg/ports/arg-router/portfile.cmake @@ -0,0 +1,33 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO cmannett85/arg_router + REF v${VERSION} + HEAD_REF main + SHA512 0348a39c0e091b1b0d6887528f6d48372162ed2526fb81935761cf93ff006fc685bbf834d44cea60cdaf4d8b2e947b6cb1a81c901c02aaba68a0dfd16a12ca20 + PATCHES + always-depend-on-boost.patch # https://github.com/cmannett85/arg_router/pull/398 +) + +set(VCPKG_BUILD_TYPE release) # header-only port +vcpkg_cmake_configure( + SOURCE_PATH "${SOURCE_PATH}" + OPTIONS + -DINSTALLATION_ONLY=ON +) + +vcpkg_cmake_install() +vcpkg_install_copyright( + FILE_LIST "${SOURCE_PATH}/LICENSE" +) +file(COPY "${CMAKE_CURRENT_LIST_DIR}/usage" + DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" +) + +vcpkg_cmake_config_fixup( + PACKAGE_NAME arg_router +) + +file(REMOVE "${CURRENT_PACKAGES_DIR}/include/arg_router/LICENSE" + "${CURRENT_PACKAGES_DIR}/include/arg_router/README.md" +) + diff --git a/vcpkg/ports/arg-router/usage b/vcpkg/ports/arg-router/usage new file mode 100644 index 0000000..45a916a --- /dev/null +++ b/vcpkg/ports/arg-router/usage @@ -0,0 +1,8 @@ +The package arg-router is a header-only library and so is typically used like this: + + find_package(arg_router REQUIRED) + target_link_libraries(my_exe PUBLIC arg_router::arg_router) + +For more information, see the docs here: + + https://github.com/cmannett85/arg_router diff --git a/vcpkg/ports/arg-router/vcpkg.json b/vcpkg/ports/arg-router/vcpkg.json new file mode 100644 index 0000000..09a5704 --- /dev/null +++ b/vcpkg/ports/arg-router/vcpkg.json @@ -0,0 +1,23 @@ +{ + "name": "arg-router", + "version": "1.4.0", + "port-version": 1, + "description": "C++ command line argument parsing and routing.", + "homepage": "https://github.com/cmannett85/arg_router", + "documentation": "https://cmannett85.github.io/arg_router/", + "license": "BSL-1.0", + "dependencies": [ + "boost-lexical-cast", + "boost-mp11", + "boost-preprocessor", + "span-lite", + { + "name": "vcpkg-cmake", + "host": true + }, + { + "name": "vcpkg-cmake-config", + "host": true + } + ] +} |