2019-07-16 05:42:45 +08:00
|
|
|
|
2020-08-20 12:16:32 +08:00
|
|
|
vcpkg_from_github(
|
|
|
|
OUT_SOURCE_PATH SOURCE_PATH
|
|
|
|
REPO KhronosGroup/OpenXR-SDK
|
2023-12-01 18:15:12 +08:00
|
|
|
REF "release-${VERSION}"
|
|
|
|
SHA512 6efc7596e707f95366dbcdbac9bd7d0c20735a2175b4edf56a9e8a112cf0ab8b664069fe942313164a37119032ddbf5671bc88ab5f276005dd36e4a4dabba1c7
|
2020-08-20 12:16:32 +08:00
|
|
|
HEAD_REF master
|
2020-10-15 01:22:37 +08:00
|
|
|
PATCHES
|
|
|
|
fix-openxr-sdk-jsoncpp.patch
|
2020-08-20 12:16:32 +08:00
|
|
|
)
|
2019-07-16 05:42:45 +08:00
|
|
|
|
2020-08-20 12:16:32 +08:00
|
|
|
vcpkg_from_github(
|
|
|
|
OUT_SOURCE_PATH SDK_SOURCE_PATH
|
|
|
|
REPO KhronosGroup/OpenXR-SDK-Source
|
2023-12-01 18:15:12 +08:00
|
|
|
REF "release-${VERSION}"
|
|
|
|
SHA512 04bdb0f16078209b5edd175a3396f70e1ceb8cfa382c65b8fda388e565480e3844daf68e0d987e72ed8c21d3148af0b41a2170911ec1660565887e0e5ae6d2bf
|
2020-08-20 12:16:32 +08:00
|
|
|
HEAD_REF master
|
2020-10-15 01:22:37 +08:00
|
|
|
PATCHES
|
|
|
|
fix-openxr-sdk-jsoncpp.patch
|
2022-02-23 04:06:26 +08:00
|
|
|
fix-jinja2.patch
|
2020-08-20 12:16:32 +08:00
|
|
|
)
|
2019-07-16 05:42:45 +08:00
|
|
|
|
|
|
|
vcpkg_from_github(
|
2020-08-20 12:16:32 +08:00
|
|
|
OUT_SOURCE_PATH HPP_SOURCE_PATH
|
|
|
|
REPO KhronosGroup/OpenXR-hpp
|
2023-12-01 18:15:12 +08:00
|
|
|
REF 63db9919822f8af6f7bf7416ba6a015d4617202e
|
|
|
|
SHA512 9e768f485d1631f8e74f35f028a64e2d64e33d362c53ae1c54427a10786e3befdd24089927319aa1a4b4c3e010247bd6cb3394bcee460c467c637ab6bc7bec90
|
2019-07-16 05:42:45 +08:00
|
|
|
HEAD_REF master
|
2021-08-27 01:54:11 +08:00
|
|
|
PATCHES
|
2023-12-01 18:15:12 +08:00
|
|
|
python3_8_compatibility.patch
|
2019-07-16 05:42:45 +08:00
|
|
|
)
|
|
|
|
|
|
|
|
# Weird behavior inside the OpenXR loader. On Windows they force shared libraries to use static crt, and
|
2021-12-07 14:43:34 +08:00
|
|
|
# vice-versa. Might be better in future iterations to patch the CMakeLists.txt for OpenXR
|
2020-08-20 12:16:32 +08:00
|
|
|
if (VCPKG_TARGET_IS_UWP OR VCPKG_TARGET_IS_WINDOWS)
|
2019-07-16 05:42:45 +08:00
|
|
|
if(VCPKG_LIBRARY_LINKAGE STREQUAL static)
|
|
|
|
set(DYNAMIC_LOADER OFF)
|
|
|
|
set(VCPKG_CRT_LINKAGE dynamic)
|
|
|
|
else()
|
|
|
|
set(DYNAMIC_LOADER ON)
|
|
|
|
set(VCPKG_CRT_LINKAGE static)
|
|
|
|
endif()
|
|
|
|
endif()
|
|
|
|
|
|
|
|
vcpkg_find_acquire_program(PYTHON3)
|
|
|
|
|
2021-12-07 14:43:34 +08:00
|
|
|
vcpkg_cmake_configure(
|
|
|
|
SOURCE_PATH "${SOURCE_PATH}"
|
2019-07-16 05:42:45 +08:00
|
|
|
OPTIONS
|
|
|
|
-DBUILD_API_LAYERS=OFF
|
|
|
|
-DBUILD_TESTS=OFF
|
2019-08-01 04:03:44 +08:00
|
|
|
-DBUILD_CONFORMANCE_TESTS=OFF
|
2019-07-16 05:42:45 +08:00
|
|
|
-DDYNAMIC_LOADER=${DYNAMIC_LOADER}
|
2021-12-07 14:43:34 +08:00
|
|
|
-DPYTHON_EXECUTABLE="${PYTHON3}"
|
2020-10-15 01:22:37 +08:00
|
|
|
-DBUILD_WITH_SYSTEM_JSONCPP=ON
|
2019-07-16 05:42:45 +08:00
|
|
|
)
|
|
|
|
|
2021-12-07 14:43:34 +08:00
|
|
|
vcpkg_cmake_install()
|
2019-07-16 05:42:45 +08:00
|
|
|
|
2023-12-01 18:15:12 +08:00
|
|
|
# Generate the OpenXR C++ bindings
|
2021-12-07 14:43:34 +08:00
|
|
|
set(ENV{OPENXR_REPO} "${SDK_SOURCE_PATH}")
|
2023-12-01 18:15:12 +08:00
|
|
|
vcpkg_execute_required_process(
|
|
|
|
COMMAND ${PYTHON3} "${HPP_SOURCE_PATH}/scripts/hpp_genxr.py" -quiet -registry "${SDK_SOURCE_PATH}/specification/registry/xr.xml" -o "${CURRENT_PACKAGES_DIR}/include/openxr"
|
|
|
|
WORKING_DIRECTORY "${HPP_SOURCE_PATH}"
|
|
|
|
LOGNAME "openxr-hpp"
|
|
|
|
)
|
2020-08-20 12:16:32 +08:00
|
|
|
|
|
|
|
if(VCPKG_TARGET_IS_WINDOWS)
|
2022-04-08 00:47:57 +08:00
|
|
|
vcpkg_cmake_config_fixup(PACKAGE_NAME OpenXR CONFIG_PATH cmake)
|
|
|
|
else()
|
|
|
|
vcpkg_cmake_config_fixup(PACKAGE_NAME OpenXR CONFIG_PATH lib/cmake/openxr)
|
2020-08-20 12:16:32 +08:00
|
|
|
endif()
|
|
|
|
|
2021-12-07 14:43:34 +08:00
|
|
|
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
|
|
|
|
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share")
|
2019-07-16 05:42:45 +08:00
|
|
|
|
2022-01-06 12:20:25 +08:00
|
|
|
vcpkg_fixup_pkgconfig()
|
2019-07-16 05:42:45 +08:00
|
|
|
vcpkg_copy_pdbs()
|
2021-12-07 14:43:34 +08:00
|
|
|
file(INSTALL "${SOURCE_PATH}/LICENSE" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)
|