CMake: Support -bindir, -libdir, -*dir configure arguments

Task-number: QTBUG-85373
Change-Id: I0df181cb017561c3f0af5ab3fecb76008b89c0d2
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
This commit is contained in:
Joerg Bornemann 2020-07-03 15:09:38 +02:00
parent 3ac054d6a8
commit ab559e25af

View File

@ -95,6 +95,16 @@ while(configure_args)
elseif(arg STREQUAL "-qt-host-path")
pop_path_argument()
push("-DQT_HOST_PATH=${path}")
elseif(arg MATCHES "^-host.*dir")
message(FATAL_ERROR "${arg} is not supported anymore.")
elseif(arg MATCHES
"^-(bin|lib|archdata|libexec|qml|data|doc|translation|sysconf|examples|tests)dir$")
string(TOUPPER "${CMAKE_MATCH_1}" type)
list(POP_FRONT configure_args dir)
push("-DINSTALL_${type}DIR=${dir}")
elseif(arg STREQUAL "-plugindir")
list(POP_FRONT configure_args dir)
push("-DINSTALL_PLUGINSDIR=${dir}")
elseif(arg STREQUAL "--")
# Everything after this argument will be passed to CMake verbatim.
push(${configure_args})