aboutsummaryrefslogtreecommitdiff
path: root/vcpkg/ports/hlslpp
diff options
context:
space:
mode:
Diffstat (limited to 'vcpkg/ports/hlslpp')
-rw-r--r--vcpkg/ports/hlslpp/hlslpp-config.cmake2
-rw-r--r--vcpkg/ports/hlslpp/portfile.cmake19
-rw-r--r--vcpkg/ports/hlslpp/usage4
-rw-r--r--vcpkg/ports/hlslpp/vcpkg.json18
4 files changed, 43 insertions, 0 deletions
diff --git a/vcpkg/ports/hlslpp/hlslpp-config.cmake b/vcpkg/ports/hlslpp/hlslpp-config.cmake
new file mode 100644
index 0000000..81d6d99
--- /dev/null
+++ b/vcpkg/ports/hlslpp/hlslpp-config.cmake
@@ -0,0 +1,2 @@
+add_library(unofficial::hlslpp::hlslpp INTERACE IMPORTED)
+target_include_directories(unofficial::hlslpp::hlslpp INTERFACE "${CMAKE_CURRENT_LIST_DIR}/../../include/hlslpp")
diff --git a/vcpkg/ports/hlslpp/portfile.cmake b/vcpkg/ports/hlslpp/portfile.cmake
new file mode 100644
index 0000000..8bf8a49
--- /dev/null
+++ b/vcpkg/ports/hlslpp/portfile.cmake
@@ -0,0 +1,19 @@
+vcpkg_from_github(
+ OUT_SOURCE_PATH SOURCE_PATH
+ REPO redorav/hlslpp
+ REF "${VERSION}"
+ SHA512 5946a4d5b50a337fc13ec1ea30b1e11962fa28fa9c199163c18e25d938bd07bbf2853cde3611006c11ad2107d6b158a52638b2b29ad0f71329d756c22c2563f8
+ HEAD_REF master
+)
+
+file(INSTALL "${SOURCE_PATH}/include" DESTINATION "${CURRENT_PACKAGES_DIR}/include/")
+file(RENAME "${CURRENT_PACKAGES_DIR}/include/include" "${CURRENT_PACKAGES_DIR}/include/hlslpp")
+
+# Copy and rename License -> copyright.
+vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/LICENSE")
+
+# Copy the cmake config file, which is used to setup the imported target.
+file(INSTALL "${CMAKE_CURRENT_LIST_DIR}/${PORT}-config.cmake" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}")
+
+# Copy and show the usage.
+configure_file("${CMAKE_CURRENT_LIST_DIR}/usage" "${CURRENT_PACKAGES_DIR}/share/${PORT}/usage" COPYONLY)
diff --git a/vcpkg/ports/hlslpp/usage b/vcpkg/ports/hlslpp/usage
new file mode 100644
index 0000000..b7b4da5
--- /dev/null
+++ b/vcpkg/ports/hlslpp/usage
@@ -0,0 +1,4 @@
+hlslpp provides a CMake package:
+
+ find_package(unofficial-hlslpp CONFIG REQUIRED)
+ target_link_libraries(main PUBLIC unofficial::hlslpp::hlslpp)
diff --git a/vcpkg/ports/hlslpp/vcpkg.json b/vcpkg/ports/hlslpp/vcpkg.json
new file mode 100644
index 0000000..37ce51d
--- /dev/null
+++ b/vcpkg/ports/hlslpp/vcpkg.json
@@ -0,0 +1,18 @@
+{
+ "name": "hlslpp",
+ "version": "3.6",
+ "description": "Math library using HLSL syntax with multiplatform SIMD support.",
+ "homepage": "https://github.com/redorav/hlslpp",
+ "license": "MIT",
+ "supports": "!x86",
+ "dependencies": [
+ {
+ "name": "vcpkg-cmake",
+ "host": true
+ },
+ {
+ "name": "vcpkg-cmake-config",
+ "host": true
+ }
+ ]
+}