Revert "CMake: Fix configure -no-rpath"
This reverts commit854986836a
. This reverts commit392d9a5419
. Turns out that enabling this option is now breaking the Qt build, because tools that are called by the Qt build cannot run anymore due to the lack of rpaths. Before, QT_DISABLE_RPATH was simply turning off Qt's additional rpaths but left CMake's rpath defaults intact. To implement a working -no-rpath switch we must add Linux and macOS code paths to _qt_internal_generate_tool_command_wrapper and set LD_LIBRARY_PATH/DYLD_LIBRARY_PATH and friends. Pick-to: 6.5 Fixes: QTBUG-110816 Change-Id: I021d5e6cd775cbe5b2411d6771ab2545cb04f799 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
This commit is contained in:
parent
d6bdc5e9b6
commit
2af494c930
@ -82,6 +82,12 @@ function(qt_apply_rpaths)
|
||||
return()
|
||||
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()
|
||||
|
||||
cmake_parse_arguments(PARSE_ARGV 0 arg
|
||||
"RELATIVE_RPATH"
|
||||
"TARGET;INSTALL_PATH"
|
||||
@ -110,21 +116,6 @@ function(qt_apply_rpaths)
|
||||
message(FATAL_ERROR "No INSTALL_PATH given to qt_apply_rpaths.")
|
||||
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()
|
||||
|
||||
set(rpaths "")
|
||||
|
||||
# Modify the install path to contain the nested structure of a framework.
|
||||
|
Loading…
Reference in New Issue
Block a user