CMake: Support -static, -shared and -framework configure arguments

Task-number: QTBUG-85373
Change-Id: I0a1db7dcb4cb1738fa1ba0a687d41c5f5a613364
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
This commit is contained in:
Joerg Bornemann 2020-07-06 09:09:14 +02:00
parent 45d4e4b06c
commit fe5fa1d974

View File

@ -114,6 +114,13 @@ while(configure_args)
set(build_configs Debug Release)
elseif(arg STREQUAL "-force-debug-info")
set(force_debug_info ON)
elseif(arg STREQUAL "-shared")
push("-DBUILD_SHARED_LIBS=ON")
elseif(arg STREQUAL "-static")
push("-DBUILD_SHARED_LIBS=OFF")
elseif(arg MATCHES "^-(no-)?framework")
calculate_state()
push("-DFEATURE_framework=${state}")
elseif(arg STREQUAL "--")
# Everything after this argument will be passed to CMake verbatim.
push(${configure_args})