summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoerg Bornemann <joerg.bornemann@qt.io>2020-07-06 10:00:08 +0200
committerJoerg Bornemann <joerg.bornemann@qt.io>2020-07-08 07:09:14 +0200
commit544b08f6642c60155b189af3e2a19f41754fc07f (patch)
treec09bc5b140a82e12eea620ee9a04b73d0724bf4c
parent619ec7bc15a75d76182fb107e706ce882919e98a (diff)
CMake: Support the -rpath configure argument
Task-number: QTBUG-85373 Change-Id: I04bdf307556aeab607a95d153cbe19254044c1f4 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
-rw-r--r--cmake/QtProcessConfigureArgs.cmake10
1 files changed, 10 insertions, 0 deletions
diff --git a/cmake/QtProcessConfigureArgs.cmake b/cmake/QtProcessConfigureArgs.cmake
index 63607ef72a..18845b9ccb 100644
--- a/cmake/QtProcessConfigureArgs.cmake
+++ b/cmake/QtProcessConfigureArgs.cmake
@@ -33,6 +33,7 @@ unset(generator)
set(auto_detect_generator TRUE)
unset(build_configs)
unset(device_options)
+unset(extra_rpaths)
while(configure_args)
list(POP_FRONT configure_args arg)
if(arg STREQUAL "-cmake")
@@ -138,6 +139,9 @@ while(configure_args)
list(POP_FRONT configure_args edition)
string(REGEX REPLACE "^c\\+\\+" "" edition "${edition}")
push("-DCMAKE_CXX_STANDARD=${edition}")
+ elseif(arg STREQUAL "-rpath")
+ pop_path_argument()
+ list(APPEND extra_rpaths "${path}")
elseif(arg STREQUAL "--")
# Everything after this argument will be passed to CMake verbatim.
push(${configure_args})
@@ -168,6 +172,12 @@ if(device_options)
list(APPEND cmake_args "-DQT_QMAKE_DEVICE_OPTIONS=${escaped_device_options}")
endif()
+if(extra_rpaths)
+ unset(escaped_paths)
+ list(JOIN extra_rpaths "\\;" escaped_paths)
+ list(APPEND cmake_args "-DQT_EXTRA_RPATHS=${escaped_paths}")
+endif()
+
if(NOT generator AND auto_detect_generator)
find_program(ninja ninja)
if(ninja)