diff options
| author | Alexander Karatarakis <alex@karatarakis.com> | 2017-02-15 15:05:17 -0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2017-02-15 15:05:17 -0800 |
| commit | aeae9969b2f682414d7dcce05fd436966dc743fc (patch) | |
| tree | 33d47fbc51a07a24b71d7fab50e378380c4a68b8 | |
| parent | 9d51b11b3930157fb78ab2272779b8f8540c9857 (diff) | |
| parent | f19c145ab5129bc68aa17d6f377ae0d772b913ca (diff) | |
| download | vcpkg-aeae9969b2f682414d7dcce05fd436966dc743fc.tar.gz vcpkg-aeae9969b2f682414d7dcce05fd436966dc743fc.zip | |
Merge pull request #652 from Microsoft/dev/roschuma/openvr
[openvr] Initial commit of 1.0.5
| -rw-r--r-- | ports/openvr/CONTROL | 3 | ||||
| -rw-r--r-- | ports/openvr/portfile.cmake | 54 |
2 files changed, 57 insertions, 0 deletions
diff --git a/ports/openvr/CONTROL b/ports/openvr/CONTROL new file mode 100644 index 000000000..2a2228ba2 --- /dev/null +++ b/ports/openvr/CONTROL @@ -0,0 +1,3 @@ +Source: openvr +Version: 1.0.5 +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. diff --git a/ports/openvr/portfile.cmake b/ports/openvr/portfile.cmake new file mode 100644 index 000000000..94e90143d --- /dev/null +++ b/ports/openvr/portfile.cmake @@ -0,0 +1,54 @@ +# Common Ambient Variables: +# VCPKG_ROOT_DIR = <C:\path\to\current\vcpkg> +# TARGET_TRIPLET is the current triplet (x86-windows, etc) +# PORT is the current port name (zlib, etc) +# CURRENT_BUILDTREES_DIR = ${VCPKG_ROOT_DIR}\buildtrees\${PORT} +# CURRENT_PACKAGES_DIR = ${VCPKG_ROOT_DIR}\packages\${PORT}_${TARGET_TRIPLET} +# + +include(vcpkg_common_functions) +set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/openvr-1.0.5) +vcpkg_download_distfile(ARCHIVE + URLS "https://github.com/ValveSoftware/openvr/archive/v1.0.5.zip" + FILENAME "openvr-v1.0.5.zip" + SHA512 18c2e3f7a8754d0e9389c953d0af70788c77adf43f51d25b6664beaeb407dc8d2daa755396c45ce2b4be1b08d333b378810dbebdf3c9bb5f5a03a9d372dc97b0 +) +vcpkg_extract_source_archive(${ARCHIVE}) + +set(VCPKG_LIBRARY_LINKAGE dynamic) + +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() + +if(VCPKG_CMAKE_SYSTEM_NAME) + message(FATAL_ERROR "Package only supports windows desktop.") +endif() + +file(MAKE_DIRECTORY + ${CURRENT_PACKAGES_DIR}/lib + ${CURRENT_PACKAGES_DIR}/bin + ${CURRENT_PACKAGES_DIR}/debug/lib + ${CURRENT_PACKAGES_DIR}/debug/bin +) +file(COPY ${SOURCE_PATH}/lib/${ARCH_PATH}/openvr_api.lib DESTINATION ${CURRENT_PACKAGES_DIR}/lib) +file(COPY ${SOURCE_PATH}/lib/${ARCH_PATH}/openvr_api.lib DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib) +file(COPY + ${SOURCE_PATH}/bin/${ARCH_PATH}/openvr_api.dll + ${SOURCE_PATH}/bin/${ARCH_PATH}/openvr_api.pdb + DESTINATION ${CURRENT_PACKAGES_DIR}/bin +) +file(COPY + ${SOURCE_PATH}/bin/${ARCH_PATH}/openvr_api.dll + ${SOURCE_PATH}/bin/${ARCH_PATH}/openvr_api.pdb + DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin +) +file(COPY ${SOURCE_PATH}/headers DESTINATION ${CURRENT_PACKAGES_DIR}) +file(RENAME ${CURRENT_PACKAGES_DIR}/headers ${CURRENT_PACKAGES_DIR}/include) + +file(COPY ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/openvr) +file(RENAME ${CURRENT_PACKAGES_DIR}/share/openvr/LICENSE ${CURRENT_PACKAGES_DIR}/share/openvr/copyright) |
