From dbbfe8e455bf56c1220332272071eb39c5f9b6bd Mon Sep 17 00:00:00 2001 From: Benjamin Saunders Date: Fri, 16 Aug 2019 14:52:45 +0000 Subject: [PATCH] Handle CMAKE_INSTALL_LIBDIR being absolute This seems to be common in distro packaging environments. --- src/xrt/targets/openxr/make_manifest.cmake | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/xrt/targets/openxr/make_manifest.cmake b/src/xrt/targets/openxr/make_manifest.cmake index c5a4e6e21..268500718 100644 --- a/src/xrt/targets/openxr/make_manifest.cmake +++ b/src/xrt/targets/openxr/make_manifest.cmake @@ -12,7 +12,10 @@ string(REGEX REPLACE "/$" "" MANIFEST_RELATIVE_DIR "${MANIFEST_RELATIVE_DIR}") if(OPENXR_INSTALL_ABSOLUTE_RUNTIME_PATH) # Absolute path to runtime - set(RUNTIME_PATH ${CMAKE_INSTALL_PREFIX}/${RUNTIME_RELATIVE_DIR}/${RUNTIME_FILENAME}) + set(RUNTIME_PATH ${RUNTIME_RELATIVE_DIR}/${RUNTIME_FILENAME}) + if(NOT IS_ABSOLUTE ${RUNTIME_RELATIVE_DIR}) + set(RUNTIME_PATH ${CMAKE_INSTALL_PREFIX}/${RUNTIME_PATH}) + endif() else() # Relative path to runtime: requires it exist on the system shared library search path. set(RUNTIME_PATH ${RUNTIME_FILENAME})