CMake: De-duplicate list input handling code in QtProcessConfigureArgs
Change-Id: I9fd77dd81f67fcc9a0306ab0d627257f209cdb08 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
This commit is contained in:
parent
584d4be174
commit
f107713452
@ -517,6 +517,14 @@ macro(translate_path_input name cmake_var)
|
||||
endif()
|
||||
endmacro()
|
||||
|
||||
macro(translate_list_input name cmake_var)
|
||||
if(DEFINED INPUT_${name})
|
||||
list(JOIN INPUT_${name} "\\;" value)
|
||||
list(APPEND cmake_args "-D${cmake_var}=${value}")
|
||||
drop_input(${name})
|
||||
endif()
|
||||
endmacro()
|
||||
|
||||
foreach(feature ${commandline_known_features})
|
||||
qt_feature_normalize_name("${feature}" cmake_feature)
|
||||
translate_boolean_input(${feature} FEATURE_${cmake_feature})
|
||||
@ -590,19 +598,8 @@ elseif(nr_of_build_configs GREATER 1)
|
||||
list(APPEND cmake_args "-DCMAKE_CONFIGURATION_TYPES=${escaped_build_configs}")
|
||||
endif()
|
||||
|
||||
drop_input(device-option)
|
||||
if(INPUT_device-option)
|
||||
unset(escaped_device_options)
|
||||
list(JOIN INPUT_device-option "\\;" escaped_device_options)
|
||||
list(APPEND cmake_args "-DQT_QMAKE_DEVICE_OPTIONS=${escaped_device_options}")
|
||||
endif()
|
||||
|
||||
drop_input(rpaths)
|
||||
if(INPUT_rpaths)
|
||||
unset(escaped_paths)
|
||||
list(JOIN INPUT_rpaths "\\;" escaped_paths)
|
||||
list(APPEND cmake_args "-DQT_EXTRA_RPATHS=${escaped_paths}")
|
||||
endif()
|
||||
translate_list_input(device-option QT_QMAKE_DEVICE_OPTIONS)
|
||||
translate_list_input(rpaths QT_EXTRA_RPATHS)
|
||||
|
||||
foreach(input ${config_inputs})
|
||||
push("-DINPUT_${input}=${INPUT_${input}}")
|
||||
|
Loading…
Reference in New Issue
Block a user