aboutsummaryrefslogtreecommitdiff
path: root/vcpkg/ports/volk
diff options
context:
space:
mode:
Diffstat (limited to 'vcpkg/ports/volk')
-rw-r--r--vcpkg/ports/volk/portfile.cmake25
-rw-r--r--vcpkg/ports/volk/usage4
-rw-r--r--vcpkg/ports/volk/vcpkg.json22
3 files changed, 51 insertions, 0 deletions
diff --git a/vcpkg/ports/volk/portfile.cmake b/vcpkg/ports/volk/portfile.cmake
new file mode 100644
index 0000000..a2685a0
--- /dev/null
+++ b/vcpkg/ports/volk/portfile.cmake
@@ -0,0 +1,25 @@
+# volk is not prepared to be a DLL.
+vcpkg_check_linkage(ONLY_STATIC_LIBRARY)
+
+vcpkg_from_github(
+ OUT_SOURCE_PATH SOURCE_PATH
+ REPO zeux/volk
+ REF "vulkan-sdk-${VERSION}"
+ SHA512 0be7705dfd643582fcd156972b69216e2f42bdf4cf42846a9ad21e5165cb38c0c1912d2786d4bfff8553c3b9b3664318e6efe9067ce1d73417539999434826cb
+ HEAD_REF master
+)
+
+vcpkg_cmake_configure(
+ SOURCE_PATH "${SOURCE_PATH}"
+ OPTIONS
+ -DVOLK_INSTALL=ON
+ -DVULKAN_HEADERS_INSTALL_DIR=${CURRENT_INSTALLED_DIR}
+)
+vcpkg_cmake_install()
+vcpkg_copy_pdbs()
+vcpkg_cmake_config_fixup(CONFIG_PATH lib/cmake/volk)
+
+file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
+
+vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/LICENSE.md")
+file(INSTALL "${CMAKE_CURRENT_LIST_DIR}/usage" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}")
diff --git a/vcpkg/ports/volk/usage b/vcpkg/ports/volk/usage
new file mode 100644
index 0000000..1feb18c
--- /dev/null
+++ b/vcpkg/ports/volk/usage
@@ -0,0 +1,4 @@
+volk provides CMake targets:
+
+ find_package(volk CONFIG REQUIRED)
+ target_link_libraries(main PRIVATE volk::volk volk::volk_headers)
diff --git a/vcpkg/ports/volk/vcpkg.json b/vcpkg/ports/volk/vcpkg.json
new file mode 100644
index 0000000..7adc2c1
--- /dev/null
+++ b/vcpkg/ports/volk/vcpkg.json
@@ -0,0 +1,22 @@
+{
+ "name": "volk",
+ "version": "1.4.309.0",
+ "description": [
+ "Meta loader for Vulkan API.",
+ "Note that the static library target volk::volk is built without platform-specific defines.",
+ "Use the header-only target volk::volk_headers if you require platform-specific extensions."
+ ],
+ "homepage": "https://github.com/zeux/volk",
+ "license": "MIT",
+ "dependencies": [
+ {
+ "name": "vcpkg-cmake",
+ "host": true
+ },
+ {
+ "name": "vcpkg-cmake-config",
+ "host": true
+ },
+ "vulkan-headers"
+ ]
+}