aboutsummaryrefslogtreecommitdiff
path: root/vcpkg/ports/openvr
diff options
context:
space:
mode:
Diffstat (limited to 'vcpkg/ports/openvr')
-rw-r--r--vcpkg/ports/openvr/portfile.cmake41
-rw-r--r--vcpkg/ports/openvr/vcpkg.json9
2 files changed, 50 insertions, 0 deletions
diff --git a/vcpkg/ports/openvr/portfile.cmake b/vcpkg/ports/openvr/portfile.cmake
new file mode 100644
index 0000000..3fa096c
--- /dev/null
+++ b/vcpkg/ports/openvr/portfile.cmake
@@ -0,0 +1,41 @@
+vcpkg_check_linkage(ONLY_DYNAMIC_LIBRARY)
+
+vcpkg_from_github(
+ OUT_SOURCE_PATH SOURCE_PATH
+ REPO ValveSoftware/openvr
+ REF v2.5.1
+ SHA512 e224737e75f21ec074ca8450a1f1d81764aafeec924cc92a3f5571efc466d74280cb59b0ddfcd251431165ffbfae8aa0c8afe94144fe1c9106a3aa4c2761f3dc
+ HEAD_REF master
+)
+
+if(VCPKG_TARGET_IS_WINDOWS)
+ if(VCPKG_TARGET_ARCHITECTURE STREQUAL "x64")
+ set(ARCH_PATH "win64")
+ elseif(VCPKG_TARGET_ARCHITECTURE STREQUAL "x86")
+ set(ARCH_PATH "win32")
+ else()
+ message(FATAL_ERROR "Package only supports x64 and x86 Windows.")
+ endif()
+elseif(VCPKG_TARGET_IS_LINUX)
+ if(VCPKG_TARGET_ARCHITECTURE STREQUAL "x64")
+ set(ARCH_PATH "linux64")
+ elseif(VCPKG_TARGET_ARCHITECTURE STREQUAL "x86")
+ set(ARCH_PATH "linux32")
+ elseif(VCPKG_TARGET_ARCHITECTURE STREQUAL "arm64")
+ set(ARCH_PATH "linuxarm64")
+ else()
+ message(FATAL_ERROR "Package only supports x64, x86 and arm64 Linux.")
+ endif()
+else()
+ message(FATAL_ERROR "Package only supports Windows and Linux.")
+endif()
+
+file(COPY ${SOURCE_PATH}/lib/${ARCH_PATH}/ DESTINATION ${CURRENT_PACKAGES_DIR}/lib)
+file(COPY ${SOURCE_PATH}/lib/${ARCH_PATH}/ DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib)
+
+file(COPY ${SOURCE_PATH}/bin/${ARCH_PATH}/ DESTINATION ${CURRENT_PACKAGES_DIR}/bin)
+file(COPY ${SOURCE_PATH}/bin/${ARCH_PATH}/ DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin)
+
+file(INSTALL ${SOURCE_PATH}/headers DESTINATION ${CURRENT_PACKAGES_DIR} RENAME include)
+
+file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright)
diff --git a/vcpkg/ports/openvr/vcpkg.json b/vcpkg/ports/openvr/vcpkg.json
new file mode 100644
index 0000000..0a98d94
--- /dev/null
+++ b/vcpkg/ports/openvr/vcpkg.json
@@ -0,0 +1,9 @@
+{
+ "name": "openvr",
+ "version": "2.5.1",
+ "port-version": 1,
+ "description": "An API and runtime that allows access to VR hardware from multiple vendors without requiring that applications have specific knowledge of the hardware they are targeting.",
+ "homepage": "https://github.com/ValveSoftware/openvr",
+ "license": "BSD-3-Clause",
+ "supports": "(windows & !uwp & (x64 | x86)) | (linux & (x64 | x86 | arm64))"
+}