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>
This commit is contained in:
Alexey Edelev 2021-02-01 19:35:41 +01:00
parent fcc453df5c
commit 1f8f13cbe7
3 changed files with 18 additions and 14 deletions

View File

@ -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()

12
qmake/configure.cmake Normal file
View File

@ -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()

View File

@ -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)