mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-12-27 03:27:50 +08:00
b065d5fec0
* [openvr] Added Linux support * [openvr] Updated to v1.10.30 * [openvr] Updated port file with modern variables and better platform checking * [openvr] Updated ci.baseline.txt as Linux is supported now
41 lines
1.6 KiB
CMake
41 lines
1.6 KiB
CMake
vcpkg_fail_port_install(ON_ARCH "arm" ON_TARGET "uwp" "osx")
|
|
|
|
vcpkg_from_github(
|
|
OUT_SOURCE_PATH SOURCE_PATH
|
|
REPO ValveSoftware/openvr
|
|
REF 26fa19eb86ab3c589af2bdbc77449d61a8ff799b # v1.10.30
|
|
SHA512 821e113c6a847a244cd138869b5c8192c67054e6b8d39c0764d4e88f7a839146e9d9ec1f189cd5566f8954ad07ee0c86cbf8d353806c9bceb0f0a45def1a0ca2
|
|
HEAD_REF master
|
|
)
|
|
|
|
set(VCPKG_LIBRARY_LINKAGE dynamic)
|
|
|
|
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) |