diff --git a/.github/workflows/vcpkg-release.yml b/.github/workflows/vcpkg-release.yml new file mode 100644 index 0000000..bb1cfad --- /dev/null +++ b/.github/workflows/vcpkg-release.yml @@ -0,0 +1,14 @@ +# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception + +name: vcpkg registry release +on: + release: + types: [published] +jobs: + vcpkg-release: + uses: ednolan/infra-workflows/.github/workflows/reusable-beman-vcpkg-release.yml@ednolan/vcpkg-release-workflow + with: + port_name: beman-transform-view + registry_repo: ednolan/vcpkg-registry + secrets: + VCPKG_REGISTRY_TOKEN: ${{ secrets.VCPKG_REGISTRY_TOKEN }} diff --git a/port/portfile.cmake.in b/port/portfile.cmake.in new file mode 100644 index 0000000..948f51e --- /dev/null +++ b/port/portfile.cmake.in @@ -0,0 +1,28 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO bemanproject/transform_view + REF "v@VERSION@" + SHA512 @SHA512@ + HEAD_REF main +) + +vcpkg_cmake_configure( + SOURCE_PATH "${SOURCE_PATH}" + OPTIONS + -DBEMAN_TRANSFORM_VIEW_BUILD_TESTS=OFF + -DBEMAN_TRANSFORM_VIEW_BUILD_EXAMPLES=OFF +) + +vcpkg_cmake_install() + +vcpkg_cmake_config_fixup( + PACKAGE_NAME beman.transform_view + CONFIG_PATH lib/cmake/beman.transform_view +) + +file(REMOVE_RECURSE + "${CURRENT_PACKAGES_DIR}/debug" + "${CURRENT_PACKAGES_DIR}/lib" +) + +vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/LICENSE") diff --git a/port/vcpkg.json.in b/port/vcpkg.json.in new file mode 100644 index 0000000..0d06eb0 --- /dev/null +++ b/port/vcpkg.json.in @@ -0,0 +1,17 @@ +{ + "name": "beman-transform-view", + "version-semver": "@VERSION@", + "description": "A conditionally borrowed std::ranges::transform_view", + "homepage": "https://github.com/bemanproject/transform_view", + "license": "Apache-2.0 WITH LLVM-exception", + "dependencies": [ + { + "name": "vcpkg-cmake", + "host": true + }, + { + "name": "vcpkg-cmake-config", + "host": true + } + ] +}