mirror of
https://gitlab.freedesktop.org/monado/monado.git
synced 2024-12-29 11:06:18 +00:00
oxr: Use absolute path of runtime library in manifest
Improves robustness when there might be multiple libraries by the same name visible to the loader.
This commit is contained in:
parent
43f2a0f054
commit
40d8446ba8
|
@ -31,21 +31,6 @@ file(
|
|||
}
|
||||
")
|
||||
|
||||
###
|
||||
# Generate runtime manifest with relative path to runtime intendend for installed release build
|
||||
# (assumes the runtime library is in the loader's search path)
|
||||
file(
|
||||
GENERATE
|
||||
OUTPUT "${CMAKE_BINARY_DIR}/${RUNTIME_TARGET}.json"
|
||||
CONTENT
|
||||
"{
|
||||
\"file_format_version\": \"1.0.0\",
|
||||
\"runtime\": {
|
||||
\"library_path\": \"$<TARGET_SONAME_FILE_NAME:${RUNTIME_TARGET}>\"
|
||||
}
|
||||
}
|
||||
")
|
||||
|
||||
include_directories(
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/../../targets/common
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/../../auxiliary
|
||||
|
@ -91,6 +76,21 @@ endif()
|
|||
|
||||
if(CMAKE_SYSTEM_NAME STREQUAL "Linux")
|
||||
include(GNUInstallDirs)
|
||||
|
||||
###
|
||||
# Generate runtime manifest with absolute path to installed runtime
|
||||
file(
|
||||
GENERATE
|
||||
OUTPUT "${CMAKE_BINARY_DIR}/${RUNTIME_TARGET}.json"
|
||||
CONTENT
|
||||
"{
|
||||
\"file_format_version\": \"1.0.0\",
|
||||
\"runtime\": {
|
||||
\"library_path\": \"${CMAKE_INSTALL_FULL_LIBDIR}/$<TARGET_SONAME_FILE_NAME:${RUNTIME_TARGET}>\"
|
||||
}
|
||||
}
|
||||
")
|
||||
|
||||
install(TARGETS ${RUNTIME_TARGET}
|
||||
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
|
||||
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
|
||||
|
|
Loading…
Reference in a new issue