CMake: Fix configure -no-rpath
The -no-rpath configure switch had no effect. Pick-to: 6.5 Change-Id: I306ec33249a219066ce94d18da5f1ca3d92905e1 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io> Reviewed-by: Alexey Edelev <alexey.edelev@qt.io> Reviewed-by: Amir Masoud Abdol <amir.abdol@qt.io> Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
This commit is contained in:
parent
20821877bb
commit
392d9a5419
@ -82,12 +82,6 @@ function(qt_apply_rpaths)
|
|||||||
return()
|
return()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
# Rpaths explicitly disabled (like for uikit), equivalent to qmake's no_qt_rpath.
|
|
||||||
# Or feature was turned OFF.
|
|
||||||
if(QT_DISABLE_RPATH OR NOT QT_FEATURE_rpath)
|
|
||||||
return()
|
|
||||||
endif()
|
|
||||||
|
|
||||||
qt_parse_all_arguments(arg "qt_apply_rpaths" "RELATIVE_RPATH" "TARGET;INSTALL_PATH" "" ${ARGN})
|
qt_parse_all_arguments(arg "qt_apply_rpaths" "RELATIVE_RPATH" "TARGET;INSTALL_PATH" "" ${ARGN})
|
||||||
if(NOT arg_TARGET)
|
if(NOT arg_TARGET)
|
||||||
message(FATAL_ERROR "No target given to qt_apply_rpaths.")
|
message(FATAL_ERROR "No target given to qt_apply_rpaths.")
|
||||||
@ -95,6 +89,21 @@ function(qt_apply_rpaths)
|
|||||||
set(target "${arg_TARGET}")
|
set(target "${arg_TARGET}")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
# Rpaths explicitly disabled (like for uikit), equivalent to qmake's no_qt_rpath.
|
||||||
|
# Or feature was turned OFF.
|
||||||
|
if(QT_DISABLE_RPATH OR NOT QT_FEATURE_rpath)
|
||||||
|
set_target_properties(${target} PROPERTIES
|
||||||
|
SKIP_BUILD_RPATH ON
|
||||||
|
SKIP_INSTALL_RPATH ON
|
||||||
|
)
|
||||||
|
if(APPLE)
|
||||||
|
set_target_properties(${target} PROPERTIES
|
||||||
|
MACOSX_RPATH OFF
|
||||||
|
)
|
||||||
|
endif()
|
||||||
|
return()
|
||||||
|
endif()
|
||||||
|
|
||||||
# If a target is not built (which can happen for tools when crosscompiling, we shouldn't try
|
# If a target is not built (which can happen for tools when crosscompiling, we shouldn't try
|
||||||
# to apply properties.
|
# to apply properties.
|
||||||
if(NOT TARGET "${target}")
|
if(NOT TARGET "${target}")
|
||||||
|
Loading…
x
Reference in New Issue
Block a user