summaryrefslogtreecommitdiffstats
path: root/src
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
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')
-rw-r--r--src/3rdparty/CMakeLists.txt6
-rw-r--r--src/CMakeLists.txt8
-rw-r--r--src/tools/CMakeLists.txt4
3 files changed, 12 insertions, 6 deletions
diff --git a/src/3rdparty/CMakeLists.txt b/src/3rdparty/CMakeLists.txt
index d6ef4f3a56..56b81bb7af 100644
--- a/src/3rdparty/CMakeLists.txt
+++ b/src/3rdparty/CMakeLists.txt
@@ -1,17 +1,17 @@
# special case skip regeneration
# The file is maintained manually
-if(QT_FEATURE_png AND NOT QT_FEATURE_system_png)
+if(QT_FEATURE_gui AND QT_FEATURE_png AND NOT QT_FEATURE_system_png)
add_subdirectory(libpng)
endif()
qt_install_3rdparty_library_wrap_config_extra_file(BundledLibpng)
-if(QT_FEATURE_freetype AND NOT QT_FEATURE_system_freetype)
+if(QT_FEATURE_gui AND QT_FEATURE_freetype AND NOT QT_FEATURE_system_freetype)
add_subdirectory(freetype)
endif()
qt_install_3rdparty_library_wrap_config_extra_file(BundledFreetype)
-if(QT_FEATURE_harfbuzz AND NOT QT_FEATURE_system_harfbuzz)
+if(QT_FEATURE_gui AND QT_FEATURE_harfbuzz AND NOT QT_FEATURE_system_harfbuzz)
add_subdirectory(harfbuzz-ng)
endif()
qt_install_3rdparty_library_wrap_config_extra_file(BundledHarfbuzz)
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)
diff --git a/src/tools/CMakeLists.txt b/src/tools/CMakeLists.txt
index 425a99b552..463f8bcc5b 100644
--- a/src/tools/CMakeLists.txt
+++ b/src/tools/CMakeLists.txt
@@ -9,5 +9,7 @@ add_subdirectory(qvkgen)
# Only include the following tools when performing a host build
if(NOT CMAKE_CROSSCOMPILING)
add_subdirectory(androiddeployqt)
- add_subdirectory(androidtestrunner)
+ if(QT_FEATURE_gui)
+ add_subdirectory(androidtestrunner)
+ endif()
endif()