From 544b08f6642c60155b189af3e2a19f41754fc07f Mon Sep 17 00:00:00 2001 From: Joerg Bornemann Date: Mon, 6 Jul 2020 10:00:08 +0200 Subject: CMake: Support the -rpath configure argument Task-number: QTBUG-85373 Change-Id: I04bdf307556aeab607a95d153cbe19254044c1f4 Reviewed-by: Alexandru Croitor --- cmake/QtProcessConfigureArgs.cmake | 10 ++++++++++ 1 file changed, 10 insertions(+) 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) -- cgit v1.2.3