From 6b193c88a7071b8ab9c81d2408b633a62226cf63 Mon Sep 17 00:00:00 2001 From: Joerg Bornemann Date: Thu, 7 Nov 2019 08:51:03 +0100 Subject: Fix usage of BUILD_SHARED_LIBS in configure.cmake Feature conditions that used BUILD_SHARED_LIBS evaluated to false, e.g. FEATURE_framework. The options must be declared before the configuration files are included. Change-Id: I1ccda8234b334371d22e19f7f6d4fba3a1e7b857 Reviewed-by: Leander Beernaert Reviewed-by: Qt CMake Build Bot Reviewed-by: Alexandru Croitor --- CMakeLists.txt | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'CMakeLists.txt') diff --git a/CMakeLists.txt b/CMakeLists.txt index 98fe694adc..273a169aee 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -26,6 +26,16 @@ find_package(QtBuildInternals CMAKE_FIND_ROOT_PATH_BOTH) unset(QT_BUILD_INTERNALS_SKIP_CMAKE_MODULE_PATH_ADDITION) qt_build_repo_begin() +## Should this Qt be static or dynamically linked? +option(BUILD_SHARED_LIBS "Build Qt statically or dynamically" ON) +set(QT_BUILD_SHARED_LIBS ${BUILD_SHARED_LIBS}) + +## Should this Qt be built with Werror? +option(WARNINGS_ARE_ERRORS "Build Qt with warnings as errors" ${FEATURE_developer_build}) + +## Should Qt be built using PCH? +option(BUILD_WITH_PCH "Build Qt using precompiled headers?" ON) + ## QtBase specific configure tests: include(QtBaseConfigureTests) @@ -37,16 +47,6 @@ include(QtBaseGlobalTargets) qt_set_language_standards() -## Should this Qt be static or dynamically linked? -option(BUILD_SHARED_LIBS "Build Qt statically or dynamically" ON) -set(QT_BUILD_SHARED_LIBS ${BUILD_SHARED_LIBS}) - -## Should this Qt be built with Werror? -option(WARNINGS_ARE_ERRORS "Build Qt with warnings as errors" ${FEATURE_developer_build}) - -## Should Qt be built using PCH? -option(BUILD_WITH_PCH "Build Qt using precompiled headers?" ON) - ## Decide whether tools will be built. qt_check_if_tools_will_be_built() -- cgit v1.2.3