CMake: Support the -rpath configure argument
Task-number: QTBUG-85373 Change-Id: I04bdf307556aeab607a95d153cbe19254044c1f4 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
This commit is contained in:
parent
619ec7bc15
commit
544b08f664
@ -33,6 +33,7 @@ unset(generator)
|
|||||||
set(auto_detect_generator TRUE)
|
set(auto_detect_generator TRUE)
|
||||||
unset(build_configs)
|
unset(build_configs)
|
||||||
unset(device_options)
|
unset(device_options)
|
||||||
|
unset(extra_rpaths)
|
||||||
while(configure_args)
|
while(configure_args)
|
||||||
list(POP_FRONT configure_args arg)
|
list(POP_FRONT configure_args arg)
|
||||||
if(arg STREQUAL "-cmake")
|
if(arg STREQUAL "-cmake")
|
||||||
@ -138,6 +139,9 @@ while(configure_args)
|
|||||||
list(POP_FRONT configure_args edition)
|
list(POP_FRONT configure_args edition)
|
||||||
string(REGEX REPLACE "^c\\+\\+" "" edition "${edition}")
|
string(REGEX REPLACE "^c\\+\\+" "" edition "${edition}")
|
||||||
push("-DCMAKE_CXX_STANDARD=${edition}")
|
push("-DCMAKE_CXX_STANDARD=${edition}")
|
||||||
|
elseif(arg STREQUAL "-rpath")
|
||||||
|
pop_path_argument()
|
||||||
|
list(APPEND extra_rpaths "${path}")
|
||||||
elseif(arg STREQUAL "--")
|
elseif(arg STREQUAL "--")
|
||||||
# Everything after this argument will be passed to CMake verbatim.
|
# Everything after this argument will be passed to CMake verbatim.
|
||||||
push(${configure_args})
|
push(${configure_args})
|
||||||
@ -168,6 +172,12 @@ if(device_options)
|
|||||||
list(APPEND cmake_args "-DQT_QMAKE_DEVICE_OPTIONS=${escaped_device_options}")
|
list(APPEND cmake_args "-DQT_QMAKE_DEVICE_OPTIONS=${escaped_device_options}")
|
||||||
endif()
|
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)
|
if(NOT generator AND auto_detect_generator)
|
||||||
find_program(ninja ninja)
|
find_program(ninja ninja)
|
||||||
if(ninja)
|
if(ninja)
|
||||||
|
Loading…
Reference in New Issue
Block a user