diff --git a/CMakeLists.txt b/CMakeLists.txt index a20ebde80..a7cb3f859 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -2,7 +2,11 @@ # SPDX-License-Identifier: BSL-1.0 cmake_minimum_required(VERSION 3.10.2) -project(XRT VERSION 21.0.0) +project( + XRT + VERSION 21.0.0 + LANGUAGES C CXX + ) # CMake 3.11 introduced CMP0072 - Prefer GLVND if(POLICY CMP0072) diff --git a/src/xrt/targets/openxr/active_runtime.cmake b/src/xrt/targets/openxr/active_runtime.cmake index 336bc84d8..d3b2ca615 100644 --- a/src/xrt/targets/openxr/active_runtime.cmake +++ b/src/xrt/targets/openxr/active_runtime.cmake @@ -1,21 +1,22 @@ # Copyright 2019, Benjamin Saunders +# Copyright 2019-2023, Collabora, Ltd. # SPDX-License-Identifier: BSL-1.0 -include(GNUInstallDirs) - set(MANIFEST_RELATIVE_DIR @MANIFEST_RELATIVE_DIR@) set(XR_API_MAJOR @XR_API_MAJOR@) set(RUNTIME_TARGET @RUNTIME_TARGET@) +set(CURRENT_BIN_DIR @CMAKE_CURRENT_BINARY_DIR@) +set(CMAKE_INSTALL_SYSCONFDIR @CMAKE_INSTALL_SYSCONFDIR@) -execute_process(COMMAND ${CMAKE_COMMAND} -E rm -f ${CMAKE_BINARY_DIR}/active_runtime.json) +execute_process(COMMAND "${CMAKE_COMMAND}" -E rm -f "${CURRENT_BIN_DIR}/active_runtime.json") execute_process( COMMAND - ${CMAKE_COMMAND} -E create_symlink - ${CMAKE_INSTALL_PREFIX}/${MANIFEST_RELATIVE_DIR}/${RUNTIME_TARGET}.json - ${CMAKE_BINARY_DIR}/active_runtime.json + "${CMAKE_COMMAND}" -E create_symlink + "${CMAKE_INSTALL_PREFIX}/${MANIFEST_RELATIVE_DIR}/${RUNTIME_TARGET}.json" + "${CURRENT_BIN_DIR}/active_runtime.json" ) file( INSTALL - DESTINATION "${CMAKE_INSTALL_FULL_SYSCONFDIR}/xdg/openxr/${XR_API_MAJOR}" - TYPE FILE FILES "${CMAKE_BINARY_DIR}/active_runtime.json" + DESTINATION "/${CMAKE_INSTALL_SYSCONFDIR}/xdg/openxr/${XR_API_MAJOR}" + TYPE FILE FILES "${CURRENT_BIN_DIR}/active_runtime.json" )