early-access version 2853
This commit is contained in:
16
externals/vcpkg/ports/openxr-loader/002-fix-hpp-gen.patch
vendored
Executable file
16
externals/vcpkg/ports/openxr-loader/002-fix-hpp-gen.patch
vendored
Executable file
@@ -0,0 +1,16 @@
|
||||
diff --git a/scripts/hpp_genxr.py b/scripts/hpp_genxr.py
|
||||
index 6b95fe4..3a19058 100755
|
||||
--- a/scripts/hpp_genxr.py
|
||||
+++ b/scripts/hpp_genxr.py
|
||||
@@ -80,6 +80,11 @@ def genTarget(args):
|
||||
"XR_MSFT_controller_model",
|
||||
# Projection of static string fails
|
||||
"XR_MSFT_spatial_graph_bridge",
|
||||
+ "XR_MSFT_spatial_anchor_persistence",
|
||||
+ "XR_MSFT_holographic_window_attachment",
|
||||
+ # Projection of UuidMSFT fails
|
||||
+ "XR_MSFT_scene_understanding",
|
||||
+ "XR_MSFT_scene_understanding_serialization",
|
||||
))
|
||||
|
||||
# Turn lists of names/patterns into matching regular expressions
|
23
externals/vcpkg/ports/openxr-loader/fix-jinja2.patch
vendored
Executable file
23
externals/vcpkg/ports/openxr-loader/fix-jinja2.patch
vendored
Executable file
@@ -0,0 +1,23 @@
|
||||
From d80c7dc3f4810fc49e4444590d39ef71e8a9b01c Mon Sep 17 00:00:00 2001
|
||||
From: Adam Johnson <AdamJohnso@gmail.com>
|
||||
Date: Sat, 19 Feb 2022 19:42:31 -0500
|
||||
Subject: [PATCH] Fix bad import in jinja2
|
||||
|
||||
---
|
||||
external/python/jinja2/utils.py | 6 +++++-
|
||||
1 file changed, 5 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/external/python/jinja2/utils.py b/external/python/jinja2/utils.py
|
||||
index db9c5d06..f198e3ef 100644
|
||||
--- a/external/python/jinja2/utils.py
|
||||
+++ b/external/python/jinja2/utils.py
|
||||
@@ -639,4 +639,8 @@ def __repr__(self):
|
||||
|
||||
|
||||
# Imported here because that's where it was in the past
|
||||
-from markupsafe import Markup, escape, soft_unicode
|
||||
+from markupsafe import Markup, escape
|
||||
+try:
|
||||
+ from markupsafe import soft_unicode
|
||||
+except ImportError:
|
||||
+ from markupsafe import soft_str as soft_unicode
|
30
externals/vcpkg/ports/openxr-loader/fix-openxr-sdk-jsoncpp.patch
vendored
Executable file
30
externals/vcpkg/ports/openxr-loader/fix-openxr-sdk-jsoncpp.patch
vendored
Executable file
@@ -0,0 +1,30 @@
|
||||
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
|
||||
index c75b145..386494c 100644
|
||||
--- a/src/CMakeLists.txt
|
||||
+++ b/src/CMakeLists.txt
|
||||
@@ -89,7 +89,7 @@ if(NOT VULKAN_INCOMPATIBLE)
|
||||
endif()
|
||||
|
||||
find_package(Threads REQUIRED)
|
||||
-find_package(JsonCpp)
|
||||
+find_package(jsoncpp CONFIG REQUIRED)
|
||||
|
||||
### All options defined here
|
||||
option(BUILD_LOADER "Build loader" ON)
|
||||
diff --git a/src/loader/CMakeLists.txt b/src/loader/CMakeLists.txt
|
||||
index 6a88cf4..0821a3d 100644
|
||||
--- a/src/loader/CMakeLists.txt
|
||||
+++ b/src/loader/CMakeLists.txt
|
||||
@@ -68,7 +68,11 @@ add_library(openxr_loader ${LIBRARY_TYPE}
|
||||
${openxr_loader_RESOURCE_FILE}
|
||||
)
|
||||
if(BUILD_WITH_SYSTEM_JSONCPP)
|
||||
- target_link_libraries(openxr_loader PRIVATE JsonCpp::JsonCpp)
|
||||
+ if(BUILD_SHARED_LIBS)
|
||||
+ target_link_libraries(openxr_loader PRIVATE jsoncpp_lib)
|
||||
+ else()
|
||||
+ target_link_libraries(openxr_loader PRIVATE jsoncpp_static)
|
||||
+ endif()
|
||||
else()
|
||||
target_sources(openxr_loader
|
||||
PRIVATE
|
82
externals/vcpkg/ports/openxr-loader/portfile.cmake
vendored
Executable file
82
externals/vcpkg/ports/openxr-loader/portfile.cmake
vendored
Executable file
@@ -0,0 +1,82 @@
|
||||
|
||||
vcpkg_from_github(
|
||||
OUT_SOURCE_PATH SOURCE_PATH
|
||||
REPO KhronosGroup/OpenXR-SDK
|
||||
REF release-1.0.22
|
||||
SHA512 fe3c393c2d11981b42355acd8dbc337727120bcd0ff595abac1975c4ce5f68bb74a9a1b4c959e64e9a847ae5d504100d31979ffd7d9702c55b2dbd889de17d3e
|
||||
HEAD_REF master
|
||||
PATCHES
|
||||
fix-openxr-sdk-jsoncpp.patch
|
||||
)
|
||||
|
||||
vcpkg_from_github(
|
||||
OUT_SOURCE_PATH SDK_SOURCE_PATH
|
||||
REPO KhronosGroup/OpenXR-SDK-Source
|
||||
REF release-1.0.22
|
||||
SHA512 92802d57a45ca1d697d3cea1b3f5619af4ba36156cb28c2c39b2295a74ebc45907caf371c916c54ec3be44a2f3ae447ffc1cd62f54b7b24f7a081408328c7651
|
||||
HEAD_REF master
|
||||
PATCHES
|
||||
fix-openxr-sdk-jsoncpp.patch
|
||||
fix-jinja2.patch
|
||||
)
|
||||
|
||||
vcpkg_from_github(
|
||||
OUT_SOURCE_PATH HPP_SOURCE_PATH
|
||||
REPO KhronosGroup/OpenXR-hpp
|
||||
REF release-1.0.21
|
||||
SHA512 cda111f20392a64d5f4de6bd71f1fe7fe39d688bb2376c6b1841763459e32fd6d03b9552804b5ee464ba84cd4c05cfdaa1a6e8a8e5da3eae6b94c7797c65cb36
|
||||
HEAD_REF master
|
||||
PATCHES
|
||||
002-fix-hpp-gen.patch
|
||||
)
|
||||
|
||||
# Weird behavior inside the OpenXR loader. On Windows they force shared libraries to use static crt, and
|
||||
# vice-versa. Might be better in future iterations to patch the CMakeLists.txt for OpenXR
|
||||
if (VCPKG_TARGET_IS_UWP OR VCPKG_TARGET_IS_WINDOWS)
|
||||
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)
|
||||
|
||||
vcpkg_cmake_configure(
|
||||
SOURCE_PATH "${SOURCE_PATH}"
|
||||
OPTIONS
|
||||
-DBUILD_API_LAYERS=OFF
|
||||
-DBUILD_TESTS=OFF
|
||||
-DBUILD_CONFORMANCE_TESTS=OFF
|
||||
-DDYNAMIC_LOADER=${DYNAMIC_LOADER}
|
||||
-DPYTHON_EXECUTABLE="${PYTHON3}"
|
||||
-DBUILD_WITH_SYSTEM_JSONCPP=ON
|
||||
)
|
||||
|
||||
vcpkg_cmake_install()
|
||||
|
||||
# Generate the OpenXR C++ bindings
|
||||
set(ENV{OPENXR_REPO} "${SDK_SOURCE_PATH}")
|
||||
file(STRINGS "${HPP_SOURCE_PATH}/headers.txt" HEADER_LIST REGEX "^openxr.*")
|
||||
foreach(HEADER ${HEADER_LIST})
|
||||
vcpkg_execute_required_process(
|
||||
COMMAND ${PYTHON3} "${HPP_SOURCE_PATH}/scripts/hpp_genxr.py" -registry "${SDK_SOURCE_PATH}/specification/registry/xr.xml" -o "${CURRENT_PACKAGES_DIR}/include/openxr" ${HEADER}
|
||||
WORKING_DIRECTORY "${HPP_SOURCE_PATH}"
|
||||
LOGNAME openxrhpp
|
||||
)
|
||||
endforeach()
|
||||
|
||||
if(VCPKG_TARGET_IS_WINDOWS)
|
||||
vcpkg_cmake_config_fixup(PACKAGE_NAME OpenXR CONFIG_PATH cmake)
|
||||
else()
|
||||
vcpkg_cmake_config_fixup(PACKAGE_NAME OpenXR CONFIG_PATH lib/cmake/openxr)
|
||||
endif()
|
||||
|
||||
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
|
||||
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share")
|
||||
|
||||
vcpkg_fixup_pkgconfig()
|
||||
vcpkg_copy_pdbs()
|
||||
file(INSTALL "${SOURCE_PATH}/LICENSE" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)
|
28
externals/vcpkg/ports/openxr-loader/vcpkg.json
vendored
Executable file
28
externals/vcpkg/ports/openxr-loader/vcpkg.json
vendored
Executable file
@@ -0,0 +1,28 @@
|
||||
{
|
||||
"name": "openxr-loader",
|
||||
"version": "1.0.22",
|
||||
"port-version": 3,
|
||||
"description": "A royalty-free, open standard that provides high-performance access to Augmented Reality (AR) and Virtual Reality (VR)—collectively known as XR—platforms and devices",
|
||||
"homepage": "https://github.com/KhronosGroup/OpenXR-SDK",
|
||||
"license": "Apache-2.0",
|
||||
"supports": "!uwp & !osx",
|
||||
"dependencies": [
|
||||
"jsoncpp",
|
||||
{
|
||||
"name": "vcpkg-cmake",
|
||||
"host": true
|
||||
},
|
||||
{
|
||||
"name": "vcpkg-cmake-config",
|
||||
"host": true
|
||||
}
|
||||
],
|
||||
"features": {
|
||||
"vulkan": {
|
||||
"description": "Vulkan functionality for OpenXR",
|
||||
"dependencies": [
|
||||
"vulkan"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user