mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-12-21 09:10:06 +08:00
48 lines
1.6 KiB
CMake
48 lines
1.6 KiB
CMake
include(vcpkg_common_functions)
|
|
|
|
vcpkg_from_github(
|
|
OUT_SOURCE_PATH SOURCE_PATH
|
|
REPO ValveSoftware/openvr
|
|
REF v1.0.13
|
|
SHA512 3ec901f9363f9517fd3246cf58c0792c2446c39d61997a46375756b0965e6fad6902a5d1b87eb65c579e1b615cbb6e6688e7dc8ced957e5dc50b4c4dcbbb36b9
|
|
HEAD_REF master
|
|
)
|
|
|
|
set(VCPKG_LIBRARY_LINKAGE dynamic)
|
|
|
|
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()
|
|
|
|
if(VCPKG_CMAKE_SYSTEM_NAME)
|
|
message(FATAL_ERROR "Package only supports windows desktop.")
|
|
endif()
|
|
|
|
file(MAKE_DIRECTORY
|
|
${CURRENT_PACKAGES_DIR}/lib
|
|
${CURRENT_PACKAGES_DIR}/bin
|
|
${CURRENT_PACKAGES_DIR}/debug/lib
|
|
${CURRENT_PACKAGES_DIR}/debug/bin
|
|
)
|
|
file(COPY ${SOURCE_PATH}/lib/${ARCH_PATH}/openvr_api.lib DESTINATION ${CURRENT_PACKAGES_DIR}/lib)
|
|
file(COPY ${SOURCE_PATH}/lib/${ARCH_PATH}/openvr_api.lib DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib)
|
|
file(COPY
|
|
${SOURCE_PATH}/bin/${ARCH_PATH}/openvr_api.dll
|
|
${SOURCE_PATH}/bin/${ARCH_PATH}/openvr_api.pdb
|
|
DESTINATION ${CURRENT_PACKAGES_DIR}/bin
|
|
)
|
|
file(COPY
|
|
${SOURCE_PATH}/bin/${ARCH_PATH}/openvr_api.dll
|
|
${SOURCE_PATH}/bin/${ARCH_PATH}/openvr_api.pdb
|
|
DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin
|
|
)
|
|
file(COPY ${SOURCE_PATH}/headers DESTINATION ${CURRENT_PACKAGES_DIR})
|
|
file(RENAME ${CURRENT_PACKAGES_DIR}/headers ${CURRENT_PACKAGES_DIR}/include)
|
|
|
|
file(COPY ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/openvr)
|
|
file(RENAME ${CURRENT_PACKAGES_DIR}/share/openvr/LICENSE ${CURRENT_PACKAGES_DIR}/share/openvr/copyright)
|