Fix configure -no-rpath for CMake < 3.18
We must not set rpath-related properties on INTERFACE libraries. Move
the code that sets the properties below the bail out for INTERFACE
libraries.
This amends commit 392d9a5419
.
Pick-to: 6.5
Fixes: QTBUG-110513
Change-Id: Ie395f1482245c4522917f982d2f3bc745c0b2abc
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
This commit is contained in:
parent
3027e49893
commit
854986836a
@ -94,21 +94,6 @@ 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}")
|
||||||
@ -125,6 +110,21 @@ function(qt_apply_rpaths)
|
|||||||
message(FATAL_ERROR "No INSTALL_PATH given to qt_apply_rpaths.")
|
message(FATAL_ERROR "No INSTALL_PATH given to qt_apply_rpaths.")
|
||||||
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()
|
||||||
|
|
||||||
set(rpaths "")
|
set(rpaths "")
|
||||||
|
|
||||||
# Modify the install path to contain the nested structure of a framework.
|
# Modify the install path to contain the nested structure of a framework.
|
||||||
|
Loading…
Reference in New Issue
Block a user