mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-12-22 17:57:49 +08:00
cdf7ef172b
* Update openvr to 1.23.7 * Update CI baseline Co-authored-by: chausner <chausner@users.noreply.github.com>
40 lines
1.5 KiB
CMake
40 lines
1.5 KiB
CMake
vcpkg_check_linkage(ONLY_DYNAMIC_LIBRARY)
|
|
|
|
vcpkg_from_github(
|
|
OUT_SOURCE_PATH SOURCE_PATH
|
|
REPO ValveSoftware/openvr
|
|
REF v1.23.7
|
|
SHA512 c5942483ffca5cb9f80b52e49833756a5730efb75498ae0374e7f1c1344d52ea7b6b2d26584d415f777dda219fd418b0a20abb2132a0a0fe0ea30b60608f8cb7
|
|
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)
|