diff options
author | Joerg Bornemann <joerg.bornemann@qt.io> | 2019-11-07 08:51:03 +0100 |
---|---|---|
committer | Alexandru Croitor <alexandru.croitor@qt.io> | 2019-11-07 10:02:58 +0000 |
commit | 6b193c88a7071b8ab9c81d2408b633a62226cf63 (patch) | |
tree | d0a7b2303b68ea057b127821195434ee78034d01 /CMakeLists.txt | |
parent | 344e4ec827ba74266454800bcd29d4a5618c0e40 (diff) |
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 <leander.beernaert@qt.io>
Reviewed-by: Qt CMake Build Bot
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 20 |
1 files changed, 10 insertions, 10 deletions
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() |