cmake: Apparently Windows needs backslashes in the manifest files.

This commit is contained in:
Ryan Pavlik 2022-04-21 16:23:49 -05:00
parent aa4f43b049
commit ad6b70267e
2 changed files with 5 additions and 1 deletions

View file

@ -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 $<TARGET_FILE:${RUNTIME_TARGET}>)
set(runtime_path $<SHELL_PATH:$<TARGET_FILE:${RUNTIME_TARGET}>>)
# 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)

View file

@ -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)