summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexey Edelev <alexey.edelev@qt.io>2021-02-01 19:35:41 +0100
committerAlexey Edelev <alexey.edelev@qt.io>2021-03-04 09:49:44 +0100
commit1f8f13cbe7a3a015ae62ff1524b22422adc9e094 (patch)
tree04c7b2225e1e315ae816576c88add770a8d79fdc
parentfcc453df5cd03a24dad3328d930cc3ef2a1b05ef (diff)
Add the 'FEATURE_qmake' feature
Add a conditional build of the qmake. Task-number: QTBUG-89369 Change-Id: I8d7968ffb20ea31df2f85fff055e0d131ed06a36 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
-rw-r--r--qmake/CMakeLists.txt19
-rw-r--r--qmake/configure.cmake12
-rw-r--r--qt_cmdline.cmake1
3 files changed, 18 insertions, 14 deletions
diff --git a/qmake/CMakeLists.txt b/qmake/CMakeLists.txt
index 9cf6a3a4b5..2a46a6f3c8 100644
--- a/qmake/CMakeLists.txt
+++ b/qmake/CMakeLists.txt
@@ -4,20 +4,11 @@
## qmake Tool:
#####################################################################
-# TODO: Probably it's time to introduce QT_FEATURE_qmake?
-if(NOT (QT_FEATURE_settings AND QT_FEATURE_alloca AND (QT_FEATURE_alloca_malloc_h OR NOT WIN32) AND
- QT_FEATURE_cborstreamwriter AND QT_FEATURE_datestring AND QT_FEATURE_regularexpression AND
- QT_FEATURE_temporaryfile))
- message(WARNING "Skip building qmake in specified configuration.\
-Required features:
- QT_FEATURE_settings ${QT_FEATURE_settings}
- QT_FEATURE_alloca ${QT_FEATURE_alloca}
- QT_FEATURE_cborstreamwriter ${QT_FEATURE_cborstreamwriter}
- QT_FEATURE_datestring ${QT_FEATURE_datestring}
- QT_FEATURE_getauxval ${QT_FEATURE_getauxval}
- QT_FEATURE_regularexpression ${QT_FEATURE_regularexpression}
- QT_FEATURE_temporaryfile ${QT_FEATURE_temporaryfile}
-")
+# qmake is out of any module, so we manually evaluate the required features.
+include("${CMAKE_CURRENT_SOURCE_DIR}/configure.cmake")
+qt_feature_evaluate_features("${CMAKE_CURRENT_SOURCE_DIR}/configure.cmake")
+
+if(NOT QT_FEATURE_qmake)
return()
endif()
diff --git a/qmake/configure.cmake b/qmake/configure.cmake
new file mode 100644
index 0000000000..f1b839dcef
--- /dev/null
+++ b/qmake/configure.cmake
@@ -0,0 +1,12 @@
+qt_feature("qmake" PRIVATE
+ SECTION "Core tools"
+ LABEL "qmake tool"
+ PURPOSE "The qmake tool helps simplify the build process for development projects across different platforms"
+ CONDITION QT_FEATURE_settings AND QT_FEATURE_alloca AND
+ (QT_FEATURE_alloca_malloc_h OR NOT WIN32) AND QT_FEATURE_cborstreamwriter AND
+ QT_FEATURE_datestring AND QT_FEATURE_regularexpression AND QT_FEATURE_temporaryfile
+)
+
+qt_configure_add_summary_section(NAME "Core tools")
+qt_configure_add_summary_entry(ARGS "qmake")
+qt_configure_end_summary_section()
diff --git a/qt_cmdline.cmake b/qt_cmdline.cmake
index 10cc67d7ec..a476d05c35 100644
--- a/qt_cmdline.cmake
+++ b/qt_cmdline.cmake
@@ -7,6 +7,7 @@ qt_commandline_subconfig(src/widgets)
qt_commandline_subconfig(src/printsupport)
qt_commandline_subconfig(src/plugins/sqldrivers)
qt_commandline_subconfig(src/testlib)
+qt_commandline_subconfig(qmake) # special case
qt_commandline_custom(qmakeArgs)
qt_commandline_option(prefix TYPE string)
qt_commandline_option(hostprefix TYPE optionalString)