summaryrefslogtreecommitdiffstats
path: root/src/CMakeLists.txt
diff options
context:
space:
mode:
authorAlex Richardson <Alexander.Richardson@cl.cam.ac.uk>2020-09-03 15:01:05 +0100
committerAlexandru Croitor <alexandru.croitor@qt.io>2020-09-15 20:05:32 +0200
commit44920e7fb272f49423c925555e8ae3bc38ffd8a4 (patch)
tree35d318f26cbdc006f7eaf4ff993e3e497b3f25b3 /src/CMakeLists.txt
parent93fc3afe71467ca6aeffa41d7a6f4a170f82b62e (diff)
CMake: Fix building with -DQT_FEATURE_gui=OFF
Some CMake files currently assume that QtGui is always enabled and we get a configure-time failure without these changes. Task-number: QTBUG-86053 Change-Id: I28e32c180c32221f32519017bac6b518a19d5983 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Diffstat (limited to 'src/CMakeLists.txt')
-rw-r--r--src/CMakeLists.txt8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index e0d2c0180e..78ee63baae 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -5,8 +5,12 @@
# should be built.
# The order of evaluation matters.
qt_feature_evaluate_features("${CMAKE_CURRENT_SOURCE_DIR}/corelib/configure.cmake")
-qt_feature_evaluate_features("${CMAKE_CURRENT_SOURCE_DIR}/network/configure.cmake")
-qt_feature_evaluate_features("${CMAKE_CURRENT_SOURCE_DIR}/gui/configure.cmake")
+if(QT_FEATURE_network)
+ qt_feature_evaluate_features("${CMAKE_CURRENT_SOURCE_DIR}/network/configure.cmake")
+endif()
+if(QT_FEATURE_gui)
+ qt_feature_evaluate_features("${CMAKE_CURRENT_SOURCE_DIR}/gui/configure.cmake")
+endif()
add_subdirectory(3rdparty)