aboutsummaryrefslogtreecommitdiff
path: root/vcpkg/ports/str-view
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/str-view
move to own git serverHEADmaster
Diffstat (limited to 'vcpkg/ports/str-view')
-rw-r--r--vcpkg/ports/str-view/portfile.cmake28
-rw-r--r--vcpkg/ports/str-view/usage4
-rw-r--r--vcpkg/ports/str-view/vcpkg.json17
3 files changed, 49 insertions, 0 deletions
diff --git a/vcpkg/ports/str-view/portfile.cmake b/vcpkg/ports/str-view/portfile.cmake
new file mode 100644
index 0000000..e3e0f5d
--- /dev/null
+++ b/vcpkg/ports/str-view/portfile.cmake
@@ -0,0 +1,28 @@
+vcpkg_from_github(
+ OUT_SOURCE_PATH SOURCE_PATH
+ REPO agl-alexglopez/str_view
+ REF "v${VERSION}"
+ SHA512 a92c4f5fcfb199e09461cc3e872787dfb79ef1aff237b4a863e016185f42d5902976235c65c29fa632e199ed9a77e2d56a5187c6242e382182e9b0c13ba85bb7
+ HEAD_REF main
+)
+
+vcpkg_cmake_configure(
+ SOURCE_PATH "${SOURCE_PATH}"
+)
+
+vcpkg_cmake_install()
+
+vcpkg_cmake_config_fixup(
+ PACKAGE_NAME "str_view"
+ CONFIG_PATH "lib/cmake/str_view"
+)
+
+vcpkg_copy_pdbs()
+file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
+
+if(VCPKG_TARGET_IS_WINDOWS AND VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic")
+ vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/include/str_view/str_view.h" "defined(SV_CONSUME_DLL)" "1")
+endif()
+
+vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/LICENSE")
+configure_file("${CMAKE_CURRENT_LIST_DIR}/usage" "${CURRENT_PACKAGES_DIR}/share/${PORT}/usage" COPYONLY)
diff --git a/vcpkg/ports/str-view/usage b/vcpkg/ports/str-view/usage
new file mode 100644
index 0000000..e995826
--- /dev/null
+++ b/vcpkg/ports/str-view/usage
@@ -0,0 +1,4 @@
+str_view provides CMake targets:
+
+ find_package(str_view CONFIG REQUIRED)
+ target_link_libraries(main PRIVATE str_view::str_view)
diff --git a/vcpkg/ports/str-view/vcpkg.json b/vcpkg/ports/str-view/vcpkg.json
new file mode 100644
index 0000000..585c31d
--- /dev/null
+++ b/vcpkg/ports/str-view/vcpkg.json
@@ -0,0 +1,17 @@
+{
+ "name": "str-view",
+ "version": "0.5.4",
+ "description": "A simple, robust, and convenient library for read-only string handling in C.",
+ "homepage": "https://github.com/agl-alexglopez/str_view",
+ "license": "MIT",
+ "dependencies": [
+ {
+ "name": "vcpkg-cmake",
+ "host": true
+ },
+ {
+ "name": "vcpkg-cmake-config",
+ "host": true
+ }
+ ]
+}