mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-11-27 19:59:06 +08:00
7aa9416869
- [x] Changes comply with the [maintainer guide](https://github.com/microsoft/vcpkg-docs/blob/main/vcpkg/contributing/maintainer-guide.md). - [x] SHA512s are updated for each updated download. - [x] The "supports" clause reflects platforms that may be fixed by this new version. - [x] Any fixed [CI baseline](https://github.com/microsoft/vcpkg/blob/master/scripts/ci.baseline.txt) entries are removed from that file. - [x] Any patches that are no longer applied are deleted from the port's directory. - [x] The version database is fixed by rerunning `./vcpkg x-add-version --all` and committing the result. - [x] Only one version is added to each modified port's versions file. --------- Co-authored-by: Cheney Wang <38240633+Cheney-W@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 v2.5.1
|
|
SHA512 e224737e75f21ec074ca8450a1f1d81764aafeec924cc92a3f5571efc466d74280cb59b0ddfcd251431165ffbfae8aa0c8afe94144fe1c9106a3aa4c2761f3dc
|
|
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)
|