diff options
Diffstat (limited to 'support_installing_the_loader.diff')
-rw-r--r-- | support_installing_the_loader.diff | 103 |
1 files changed, 0 insertions, 103 deletions
diff --git a/support_installing_the_loader.diff b/support_installing_the_loader.diff deleted file mode 100644 index 2a45ed57f128..000000000000 --- a/support_installing_the_loader.diff +++ /dev/null @@ -1,103 +0,0 @@ -From cf5374bcb851796bcbccff813e921e3e60cae6de Mon Sep 17 00:00:00 2001 -From: Christoph Haag <christoph.haag@collabora.com> -Date: Wed, 15 May 2019 15:51:52 +0200 -Subject: [PATCH] Install layers and pkg-config file on Linux - ---- - CMakeLists.txt | 12 ++++++++++++ - src/api_layers/CMakeLists.txt | 13 +++++++++++-- - src/loader/CMakeLists.txt | 10 ++++++++++ - 3 files changed, 33 insertions(+), 2 deletions(-) - -diff --git a/CMakeLists.txt b/CMakeLists.txt -index 35ea536..42830f7 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -22,12 +22,24 @@ - cmake_minimum_required(VERSION 3.0) - project(OPENXR) - -+# Enable IDE GUI folders. "Helper targets" that don't have interesting source code should set their FOLDER property to this - set_property(GLOBAL PROPERTY USE_FOLDERS ON) -+set(LOADER_HELPER_FOLDER "Helper Targets") - set_property(GLOBAL PROPERTY PREDEFINED_TARGETS_FOLDER "") - - add_subdirectory(include) - add_subdirectory(src) - -+# uninstall target -+if(NOT TARGET uninstall) -+ configure_file("${CMAKE_CURRENT_SOURCE_DIR}/src/cmake/cmake_uninstall.cmake.in" -+ "${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake" -+ IMMEDIATE -+ @ONLY) -+ add_custom_target(uninstall COMMAND ${CMAKE_COMMAND} -P ${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake) -+ set_target_properties(uninstall PROPERTIES FOLDER ${LOADER_HELPER_FOLDER}) -+endif() -+ - find_program(BASH_COMMAND NAMES bash) - if(BASH_COMMAND AND EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/specification/Makefile") - option(BUILD_SPECIFICATION "Run './makeAllExts all' in the specification directory as part of the build - intended for one-step checking of spec changes" OFF) -diff --git a/src/api_layers/CMakeLists.txt b/src/api_layers/CMakeLists.txt -index 140c834..5ea2438 100644 ---- a/src/api_layers/CMakeLists.txt -+++ b/src/api_layers/CMakeLists.txt -@@ -178,7 +178,7 @@ else() - gen_xr_layer_json( - ${CMAKE_CURRENT_BINARY_DIR}/XrApiLayer_api_dump.json - api_dump -- ${CMAKE_CURRENT_BINARY_DIR}/libXrApiLayer_api_dump.so -+ libXrApiLayer_api_dump.so - 1 - "API Layer to record api calls as they occur" - "" -@@ -190,7 +190,7 @@ else() - gen_xr_layer_json( - ${CMAKE_CURRENT_BINARY_DIR}/XrApiLayer_core_validation.json - core_validation -- ${CMAKE_CURRENT_BINARY_DIR}/libXrApiLayer_core_validation.so -+ libXrApiLayer_core_validation.so - 1 - "API Layer to record api calls as they occur" - "" -@@ -221,3 +221,12 @@ add_custom_target(core_validation_json_file DEPENDS - ${CMAKE_CURRENT_BINARY_DIR}/XrApiLayer_core_validation.json - ) - -+# Install explicit layers on Linux -+set(TARGET_NAMES -+ XrApiLayer_api_dump -+ XrApiLayer_core_validation) -+if(CMAKE_SYSTEM_NAME STREQUAL "Linux") -+ foreach(TARGET_NAME ${TARGET_NAMES}) -+ install(FILES ${CMAKE_CURRENT_BINARY_DIR}/${TARGET_NAME}.json DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/openxr/${MAJOR}/api_layers/explicit.d) -+ endforeach() -+endif() -diff --git a/src/loader/CMakeLists.txt b/src/loader/CMakeLists.txt -index 92985a5..7a1c32f 100644 ---- a/src/loader/CMakeLists.txt -+++ b/src/loader/CMakeLists.txt -@@ -17,6 +17,8 @@ - - #set (CMAKE_VERBOSE_MAKEFILE 1) - -+include(GNUInstallDirs) -+ - # Use this feature for Windows to automatically generate an exports file for the DLL. - # See https://blog.kitware.com/create-dlls-on-windows-without-declspec-using-new-cmake-export-all-feature/ - include(GenerateExportHeader) -@@ -114,6 +116,14 @@ if(CMAKE_SYSTEM_NAME STREQUAL "Linux") - - add_custom_target(lib${LOADER_NAME}.so.${MAJOR}.${MINOR} ALL - COMMAND ${CMAKE_COMMAND} -E create_symlink lib${LOADER_NAME}.so.${MAJOR}.${MINOR}.${PATCH} lib${LOADER_NAME}.so.${MAJOR}.${MINOR}) -+ -+ install(TARGETS ${LOADER_NAME} -+ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} -+ ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} -+ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}) -+ set(XR_API_VERSION "${MAJOR}.${MINOR}") -+ configure_file("openxr.pc.in" "openxr.pc" @ONLY) -+ install(FILES "${CMAKE_CURRENT_BINARY_DIR}/openxr.pc" DESTINATION "${CMAKE_INSTALL_LIBDIR}/pkgconfig") - elseif(CMAKE_SYSTEM_NAME STREQUAL "Windows") - foreach(configuration in CMAKE_C_FLAGS_DEBUG - CMAKE_C_FLAGS_RELEASE |