vcpkg/ports/openvr/portfile.cmake
Rémy Tassoux 7c5e2356f1
[openvr] Update to 1.12.5 (#12219)
* [openvr] Update to 1.12.5

https://github.com/ValveSoftware/openvr/releases/tag/v1.12.5

* [openvr] Fix static build faillure

* [openvr] revert aa222ad9f8

* [openvr] update ci.baseline.txt
2020-07-06 12:51:58 -07:00

41 lines
1.6 KiB
CMake

vcpkg_fail_port_install(ON_ARCH "arm" ON_TARGET "uwp" "osx")
vcpkg_check_linkage(ONLY_DYNAMIC_LIBRARY)
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO ValveSoftware/openvr
REF 3a010f0f668d8de59fcba75b14e08a6a08ec68a0 # v1.12.5
SHA512 a96b8d4bceb23cea64b8f276a4ec70a5ac2a09ec317da37561bf55527bbf3dda2423b4f7323ed93301384c387061498f6089ae1ef50ad6ff77f46f0af662ccd3
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")
else()
message(FATAL_ERROR "Package only supports x64 and x86 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)