Skip to content

Commit

Permalink
Add the 'FEATURE_qmake' feature
Browse files Browse the repository at this point in the history
Add a conditional build of the qmake.

Task-number: QTBUG-89369
Change-Id: I8d7968ffb20ea31df2f85fff055e0d131ed06a36
Reviewed-by: Joerg Bornemann <[email protected]>
  • Loading branch information
semlanik committed Mar 4, 2021
1 parent fcc453d commit 1f8f13c
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 14 deletions.
19 changes: 5 additions & 14 deletions qmake/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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()

Expand Down
12 changes: 12 additions & 0 deletions qmake/configure.cmake
Original file line number Diff line number Diff line change
@@ -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()
1 change: 1 addition & 0 deletions qt_cmdline.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 1f8f13c

Please sign in to comment.