2020-07-07 03:51:58 +08:00
|
|
|
vcpkg_check_linkage(ONLY_DYNAMIC_LIBRARY)
|
2018-01-25 13:49:13 +08:00
|
|
|
|
|
|
|
vcpkg_from_github(
|
|
|
|
OUT_SOURCE_PATH SOURCE_PATH
|
|
|
|
REPO ValveSoftware/openvr
|
2024-05-09 02:13:42 +08:00
|
|
|
REF v2.5.1
|
|
|
|
SHA512 e224737e75f21ec074ca8450a1f1d81764aafeec924cc92a3f5571efc466d74280cb59b0ddfcd251431165ffbfae8aa0c8afe94144fe1c9106a3aa4c2761f3dc
|
2018-01-25 13:49:13 +08:00
|
|
|
HEAD_REF master
|
2017-02-09 16:33:02 +08:00
|
|
|
)
|
|
|
|
|
2020-04-04 01:24:16 +08:00
|
|
|
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()
|
2017-02-09 16:33:02 +08:00
|
|
|
else()
|
2020-04-04 01:24:16 +08:00
|
|
|
message(FATAL_ERROR "Package only supports Windows and Linux.")
|
2017-02-09 16:33:02 +08:00
|
|
|
endif()
|
|
|
|
|
2020-04-04 01:24:16 +08:00
|
|
|
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)
|
2017-02-09 16:33:02 +08:00
|
|
|
|
2020-04-04 01:24:16 +08:00
|
|
|
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)
|
2017-02-09 16:33:02 +08:00
|
|
|
|
2020-07-07 03:51:58 +08:00
|
|
|
file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright)
|