From ad6b70267e30c836cc514c40f9300c86ef1b0805 Mon Sep 17 00:00:00 2001 From: Ryan Pavlik Date: Thu, 21 Apr 2022 16:23:49 -0500 Subject: [PATCH] cmake: Apparently Windows needs backslashes in the manifest files. --- src/xrt/targets/openxr/CMakeLists.txt | 2 +- src/xrt/targets/openxr/make_manifest.cmake | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/xrt/targets/openxr/CMakeLists.txt b/src/xrt/targets/openxr/CMakeLists.txt index 1938d9fe2..b53a0c5dd 100644 --- a/src/xrt/targets/openxr/CMakeLists.txt +++ b/src/xrt/targets/openxr/CMakeLists.txt @@ -64,7 +64,7 @@ install( ### # Generate runtime manifest with absolute path to runtime intended for development without installing set(MANIFEST_INPUT ${CMAKE_CURRENT_SOURCE_DIR}/openxr_monado.in.json) -set(runtime_path $) +set(runtime_path $>) # Need this step because file(GENERATE) only evaluates generator expressions, and not what configure_file does. configure_file(${MANIFEST_INPUT} ${CMAKE_CURRENT_BINARY_DIR}/intermediate_manifest.json) diff --git a/src/xrt/targets/openxr/make_manifest.cmake b/src/xrt/targets/openxr/make_manifest.cmake index 55286084f..9042d103c 100644 --- a/src/xrt/targets/openxr/make_manifest.cmake +++ b/src/xrt/targets/openxr/make_manifest.cmake @@ -32,6 +32,10 @@ else() set(RUNTIME_PATH ${RUNTIME_FILENAME}) endif() +if(WIN32) + string(REPLACE "/" [[\\]] RUNTIME_PATH ${RUNTIME_PATH}) +endif() + set(runtime_path ${RUNTIME_PATH}) if("x${CMAKE_INSTALL_COMPONENT}x" STREQUAL "xUnspecifiedx" OR NOT CMAKE_INSTALL_COMPONENT)