add and use qtHaveModule() function

this is much more elegant than the so far propagated !isEmpty(QT.foo.name).
also replace feature-specific tests (no-gui and no-widgets) and the
obsolete contains(QT_CONFIG, foo) syntax.

Change-Id: Ia4b3c8febcabf9eeca67b1f9173a523820b1038b
Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
Reviewed-by: Tasuku Suzuki <stasuku@gmail.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
This commit is contained in:
Oswald Buddenhagen 2012-12-21 12:09:56 +01:00 committed by The Qt Project
parent 7706c31eaa
commit 586adeabe4
78 changed files with 98 additions and 91 deletions

View File

@ -3,7 +3,7 @@ SUBDIRS = listnames \
pingpong \
complexpingpong
!contains(QT_CONFIG, no-widgets) {
qtHaveModule(widgets) {
SUBDIRS += chat \
remotecontrolledcar
}

View File

@ -8,7 +8,7 @@ SUBDIRS = \
xml \
qpa
!contains(QT_CONFIG, no-widgets) {
qtHaveModule(widgets) {
SUBDIRS += widgets \
ipc \
sql \
@ -17,12 +17,12 @@ SUBDIRS = \
gestures
}
wince*|embedded|x11:!contains(QT_CONFIG, no-gui): SUBDIRS += embedded
wince*|embedded|x11:qtHaveModule(gui): SUBDIRS += embedded
contains(QT_BUILD_PARTS, tools):!contains(QT_CONFIG, no-gui):!contains(QT_CONFIG, no-widgets):SUBDIRS += qtestlib
contains(QT_CONFIG, opengl):!contains(QT_CONFIG, no-widgets):SUBDIRS += opengl
contains(QT_CONFIG, dbus): SUBDIRS += dbus
contains(QT_CONFIG, concurrent): SUBDIRS += qtconcurrent
contains(QT_BUILD_PARTS, tools):qtHaveModule(gui):qtHaveModule(widgets): SUBDIRS += qtestlib
qtHaveModule(opengl):qtHaveModule(widgets): SUBDIRS += opengl
qtHaveModule(dbus): SUBDIRS += dbus
qtHaveModule(concurrent): SUBDIRS += qtconcurrent
aggregate.files = aggregate/examples.pro
aggregate.path = $$[QT_INSTALL_EXAMPLES]

View File

@ -4,7 +4,7 @@ SUBDIRS = \
download \
downloadmanager
!contains(QT_CONFIG, no-widgets) {
qtHaveModule(widgets) {
SUBDIRS += \
blockingfortuneclient \
broadcastreceiver \

View File

@ -5,7 +5,7 @@ TEMPLATE = app
SOURCES += main.cpp
contains(QT_CONFIG, opengl) {
qtHaveModule(opengl) {
QT += opengl
SOURCES += mainwidget.cpp \

View File

@ -8,7 +8,7 @@ SUBDIRS = imagescaling \
SUBDIRS += progressdialog
}
contains(QT_CONFIG, no-widgets) {
!qtHaveModule(widgets) {
SUBDIRS -= \
imagescaling \
progressdialog \

View File

@ -4,4 +4,4 @@ CONFIG += no_docs_target
SUBDIRS = semaphores \
waitconditions
!contains(QT_CONFIG, no-widgets):SUBDIRS += mandelbrot
qtHaveModule(widgets): SUBDIRS += mandelbrot

View File

@ -1,5 +1,5 @@
QT += widgets
!isEmpty(QT.printsupport.name): QT += printsupport
qtHaveModule(printsupport): QT += printsupport
HEADERS = mainwindow.h \
scribblearea.h

View File

@ -1,5 +1,5 @@
QT += widgets
contains(QT_CONFIG, opengl):QT += opengl
qtHaveModule(opengl): QT += opengl
HEADERS += boat.h \
bomb.h \
mainwindow.h \

View File

@ -5,8 +5,8 @@ SOURCES += main.cpp
SOURCES += mainwindow.cpp view.cpp chip.cpp
QT += widgets
!isEmpty(QT.printsupport.name): QT += printsupport
contains(QT_CONFIG, opengl):QT += opengl
qtHaveModule(printsupport): QT += printsupport
qtHaveModule(opengl): QT += opengl
build_all:!build_pass {
CONFIG -= build_all

View File

@ -15,6 +15,6 @@ SUBDIRS = \
contains(DEFINES, QT_NO_CURSOR)|contains(DEFINES, QT_NO_DRAGANDDROP): SUBDIRS -= dragdroprobot
contains(QT_CONFIG, opengl):!contains(QT_CONFIG, opengles1):!contains(QT_CONFIG, opengles2):{
qtHaveModule(opengl):!contains(QT_CONFIG, opengles.) {
SUBDIRS += boxes
}

View File

@ -17,7 +17,7 @@ FORMS += \
form.ui
QT += widgets
contains(QT_CONFIG, opengl):QT += opengl
qtHaveModule(opengl): QT += opengl
# install
target.path = $$[QT_INSTALL_EXAMPLES]/widgets/graphicsview/padnavigator

View File

@ -1,5 +1,5 @@
QT += widgets
!isEmpty(QT.printsupport.name): QT += printsupport
qtHaveModule(printsupport): QT += printsupport
HEADERS = imagemodel.h \
mainwindow.h \

View File

@ -1,6 +1,6 @@
QT += widgets
!isEmpty(QT.printsupport.name): QT += printsupport
#unix:contains(QT_CONFIG, dbus):QT += dbus widgets
qtHaveModule(printsupport): QT += printsupport
#unix:qtHaveModule(dbus): QT += dbus widgets
HEADERS += printview.h spreadsheet.h spreadsheetdelegate.h spreadsheetitem.h
SOURCES += main.cpp \

View File

@ -1,5 +1,5 @@
QT += widgets
!isEmpty(QT.printsupport.name): QT += printsupport
qtHaveModule(printsupport): QT += printsupport
HEADERS = mainwindow.h
SOURCES = main.cpp \

View File

@ -1,7 +1,7 @@
SOURCES += main.cpp xform.cpp
HEADERS += xform.h
contains(QT_CONFIG, opengl)|contains(QT_CONFIG, opengles1)|contains(QT_CONFIG, opengles2) {
qtHaveModule(opengl) {
DEFINES += QT_OPENGL_SUPPORT
QT += opengl
}

View File

@ -6,7 +6,7 @@ SHARED_FOLDER = ../shared
include($$SHARED_FOLDER/shared.pri)
RESOURCES += composition.qrc
contains(QT_CONFIG, opengl) {
qtHaveModule(opengl) {
DEFINES += QT_OPENGL_SUPPORT
QT += opengl
}

View File

@ -7,7 +7,7 @@ include($$SHARED_FOLDER/shared.pri)
RESOURCES += deform.qrc
contains(QT_CONFIG, opengl) {
qtHaveModule(opengl) {
DEFINES += QT_OPENGL_SUPPORT
QT += opengl
}

View File

@ -1,5 +1,5 @@
QT += widgets
!isEmpty(QT.printsupport.name): QT += printsupport
qtHaveModule(printsupport): QT += printsupport
FORMS = mainwindowbase.ui
HEADERS = mainwindow.h

View File

@ -6,7 +6,7 @@ SHARED_FOLDER = ../shared
include($$SHARED_FOLDER/shared.pri)
RESOURCES += gradients.qrc
contains(QT_CONFIG, opengl) {
qtHaveModule(opengl) {
DEFINES += QT_OPENGL_SUPPORT
QT += opengl
}

View File

@ -7,7 +7,7 @@ include($$SHARED_FOLDER/shared.pri)
RESOURCES += pathstroke.qrc
contains(QT_CONFIG, opengl) {
qtHaveModule(opengl) {
DEFINES += QT_OPENGL_SUPPORT
QT += opengl
}

View File

@ -1,6 +1,6 @@
INCLUDEPATH += $$PWD
contains(QT_CONFIG, opengl)|contains(QT_CONFIG, opengles1)|contains(QT_CONFIG, opengles2) {
qtHaveModule(opengl) {
DEFINES += QT_OPENGL_SUPPORT
QT += opengl widgets
}

View File

@ -1,7 +1,7 @@
TEMPLATE = lib
CONFIG += static
contains(QT_CONFIG, opengl)|contains(QT_CONFIG, opengles1)|contains(QT_CONFIG, opengles2) {
qtHaveModule(opengl) {
DEFINES += QT_OPENGL_SUPPORT
QT += opengl
}

View File

@ -1,5 +1,5 @@
QT += widgets
!isEmpty(QT.printsupport.name): QT += printsupport
qtHaveModule(printsupport): QT += printsupport
HEADERS = detailsdialog.h \
mainwindow.h

View File

@ -1,5 +1,5 @@
QT += widgets
!isEmpty(QT.printsupport.name): QT += printsupport
qtHaveModule(printsupport): QT += printsupport
TEMPLATE = app
TARGET = textedit

View File

@ -3,7 +3,7 @@ SUBDIRS = \
factorial \
pingpong
!contains(QT_CONFIG, no-widgets) {
qtHaveModule(widgets) {
SUBDIRS += \
eventtransitions \
rogue \

View File

@ -5,4 +5,4 @@ SUBDIRS = hellothread \
clock \
movedobject
contains(QT_CONFIG, concurrent): SUBDIRS += helloconcurrent
qtHaveModule(concurrent): SUBDIRS += helloconcurrent

View File

@ -1,5 +1,5 @@
QT += widgets
!isEmpty(QT.printsupport.name): QT += printsupport
qtHaveModule(printsupport): QT += printsupport
HEADERS = imageviewer.h
SOURCES = imageviewer.cpp \

View File

@ -1,5 +1,5 @@
QT += widgets
!isEmpty(QT.printsupport.name): QT += printsupport
qtHaveModule(printsupport): QT += printsupport
HEADERS = mainwindow.h \
scribblearea.h

View File

@ -2,7 +2,7 @@ TEMPLATE = subdirs
SUBDIRS = htmlinfo \
xmlstreamlint
!contains(QT_CONFIG, no-widgets) {
qtHaveModule(widgets) {
SUBDIRS += dombookmarks \
rsslisting \
saxbookmarks \

View File

@ -53,6 +53,6 @@ insignificant_test:!isEmpty(check.commands) {
check.commands = -$${check.commands}
}
isEmpty(QT.widgets.name):CONFIG += insignificant_test # QTBUG-28540
!qtHaveModule(widgets): CONFIG += insignificant_test # QTBUG-28540
QMAKE_EXTRA_TARGETS *= check

View File

@ -51,6 +51,13 @@ defineTest(qtProcessModuleFlags) {
export($$1)
}
# qt module
defineTest(qtHaveModule) {
!isEmpty(QT.$${1}.name): \
return(true)
return(false)
}
# qt module, UsePrivate flag, libs variable
defineTest(qtAddModule) {
MODULE_NAME = $$eval(QT.$${1}.name)

View File

@ -1,4 +1,4 @@
contains(QT_CONFIG, dbus):contains(QT_CONFIG, xcb):contains(QT_CONFIG, accessibility) {
qtHaveModule(dbus):contains(QT_CONFIG, xcb):contains(QT_CONFIG, accessibility) {
QT += dbus
include(../../3rdparty/atspi2/atspi2.pri)

View File

@ -1,6 +1,6 @@
TEMPLATE = subdirs
linux*:contains(QT_CONFIG, dbus) {
linux*:qtHaveModule(dbus) {
SUBDIRS += generic
SUBDIRS += connman networkmanager
}

View File

@ -1,4 +1,4 @@
TEMPLATE = subdirs
contains(QT_CONFIG, dbus) {
qtHaveModule(dbus) {
!macx:!win32:SUBDIRS += ibus maliit
}

View File

@ -82,7 +82,7 @@ LIBS += -framework Cocoa -framework IOKit
QT += core-private gui-private platformsupport-private
!contains(QT_CONFIG, no-widgets) {
qtHaveModule(widgets) {
OBJECTIVE_SOURCES += \
qpaintengine_mac.mm \
qprintengine_mac.mm \

View File

@ -1,7 +1,7 @@
TEMPLATE = subdirs
SUBDIRS *= sqldrivers bearer
!contains(QT_CONFIG, no-gui): SUBDIRS *= imageformats platforms platforminputcontexts generic
!contains(QT_CONFIG, no-widgets): SUBDIRS += accessible
qtHaveModule(gui): SUBDIRS *= imageformats platforms platforminputcontexts generic
qtHaveModule(widgets): SUBDIRS += accessible
!wince*:!contains(QT_CONFIG, no-widgets):SUBDIRS += printsupport
!wince*:qtHaveModule(widgets): SUBDIRS += printsupport

View File

@ -18,7 +18,7 @@ SUBDIRS += \
wince*: SUBDIRS -= printsupport
cross_compile: SUBDIRS -= tools
isEmpty(QT.opengl.name): SUBDIRS -= opengl
!unix|embedded|!contains(QT_CONFIG, dbus): SUBDIRS -= dbus
contains(QT_CONFIG, no-widgets): SUBDIRS -= widgets printsupport
!contains(QT_CONFIG, concurrent): SUBDIRS -= concurrent
!qtHaveModule(opengl): SUBDIRS -= opengl
!unix|embedded|!qtHaveModule(dbus): SUBDIRS -= dbus
!qtHaveModule(widgets): SUBDIRS -= widgets printsupport
!qtHaveModule(concurrent): SUBDIRS -= concurrent

View File

@ -8,5 +8,5 @@ SUBDIRS=\
qsequentialanimationgroup \
qvariantanimation
contains(QT_CONFIG, no-widgets): SUBDIRS -= \
!qtHaveModule(widgets): SUBDIRS -= \
qpropertyanimation

View File

@ -17,5 +17,5 @@ SUBPROGRAMS = \
!contains(QMAKE_PLATFORM, wince): SUBPROGRAMS += testForwarding
contains(QT_CONFIG, no-widgets): SUBPROGRAMS -= \
!qtHaveModule(widgets): SUBPROGRAMS -= \
testGuiProcess

View File

@ -3,7 +3,7 @@ TEMPLATE=subdirs
SUBDIRS = qabstractitemmodel \
qstringlistmodel
!contains(QT_CONFIG, no-widgets): SUBDIRS += \
qtHaveModule(widgets): SUBDIRS += \
qabstractproxymodel \
qidentityproxymodel \
qitemmodel \

View File

@ -2,6 +2,6 @@ CONFIG += testcase
CONFIG += parallel_test
TARGET = tst_qpointer
QT += testlib
!contains(QT_CONFIG, no-widgets): QT += widgets
qtHaveModule(widgets): QT += widgets
SOURCES = tst_qpointer.cpp
DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0

View File

@ -2,6 +2,6 @@ CONFIG += testcase
CONFIG += parallel_test
TARGET = tst_qstatemachine
QT = core-private testlib gui
!contains(QT_CONFIG, no-widgets): QT += widgets
qtHaveModule(widgets): QT += widgets
SOURCES = tst_qstatemachine.cpp
DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0

View File

@ -3,7 +3,7 @@ CONFIG += parallel_test
TARGET = tst_qicon
QT += testlib
!contains(QT_CONFIG, no-widgets): QT += widgets
qtHaveModule(widgets): QT += widgets
SOURCES += tst_qicon.cpp
RESOURCES = tst_qicon.qrc

View File

@ -2,7 +2,7 @@ CONFIG += testcase
CONFIG += parallel_test
TARGET = tst_qmovie
QT += testlib
!contains(QT_CONFIG, no-widgets): QT += widgets
qtHaveModule(widgets): QT += widgets
SOURCES += tst_qmovie.cpp
MOC_DIR=tmp

View File

@ -2,7 +2,7 @@ CONFIG += testcase
CONFIG += parallel_test
TARGET = tst_qpicture
QT += testlib
!contains(QT_CONFIG, no-widgets): QT += widgets
qtHaveModule(widgets): QT += widgets
SOURCES += tst_qpicture.cpp

View File

@ -2,7 +2,7 @@ CONFIG += testcase
TARGET = tst_qpixmap
QT += core-private gui-private testlib
!contains(QT_CONFIG, no-widgets): QT += widgets widgets-private
qtHaveModule(widgets): QT += widgets widgets-private
SOURCES += tst_qpixmap.cpp
!wince* {

View File

@ -3,5 +3,5 @@ SUBDIRS= \
qstandarditem \
qstandarditemmodel
isEmpty(QT.widgets.name):SUBDIRS -= \
!qtHaveModule(widgets): SUBDIRS -= \
qstandarditemmodel

View File

@ -19,6 +19,6 @@ SUBDIRS=\
qwindow \
qguiapplication \
contains(QT_CONFIG, no-widgets): SUBDIRS -= \
!qtHaveModule(widgets): SUBDIRS -= \
qmouseevent_modal \
qtouchevent

View File

@ -3,8 +3,8 @@ CONFIG += parallel_test
TARGET = tst_qpainter
QT += testlib
!contains(QT_CONFIG, no-widgets): QT += widgets widgets-private
!contains(QT_CONFIG, no-widgets):!wince*: QT += printsupport
qtHaveModule(widgets): QT += widgets widgets-private
qtHaveModule(widgets):!wince*: QT += printsupport
SOURCES += tst_qpainter.cpp

View File

@ -3,7 +3,7 @@ CONFIG += parallel_test
TARGET = tst_qfont
QT += testlib
QT += core-private gui-private
!contains(QT_CONFIG, no-widgets): QT += widgets
qtHaveModule(widgets): QT += widgets
SOURCES += tst_qfont.cpp

View File

@ -3,5 +3,5 @@ CONFIG += parallel_test
TARGET = tst_qsyntaxhighlighter
SOURCES += tst_qsyntaxhighlighter.cpp
QT += testlib
!contains(QT_CONFIG, no-widgets) QT += widgets
qtHaveModule(widgets) QT += widgets
DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0

View File

@ -2,7 +2,7 @@ CONFIG += testcase
CONFIG += parallel_test
TARGET = tst_qtextdocumentlayout
QT += testlib
!contains(QT_CONFIG, no-widgets) QT += widgets
qtHaveModule(widgets) QT += widgets
SOURCES += tst_qtextdocumentlayout.cpp

View File

@ -6,7 +6,7 @@ CONFIG += testcase
CONFIG += parallel_test
TARGET = tst_qtextobject
QT += testlib
!contains(QT_CONFIG, no-widgets): QT += widgets
qtHaveModule(widgets): QT += widgets
SOURCES += tst_qtextobject.cpp

View File

@ -2,7 +2,7 @@ CONFIG += testcase
CONFIG += parallel_test
TARGET = tst_qtexttable
QT += testlib
!contains(QT_CONFIG, no-widgets): QT += widgets
qtHaveModule(widgets): QT += widgets
SOURCES += tst_qtexttable.cpp

View File

@ -4,7 +4,7 @@
CONFIG += testcase
TARGET = tst_qgl
requires(contains(QT_CONFIG,opengl))
requires(qtHaveModule(opengl))
QT += widgets widgets-private opengl-private gui-private core-private testlib
SOURCES += tst_qgl.cpp

View File

@ -5,7 +5,7 @@
CONFIG += testcase
CONFIG += parallel_test
TARGET = tst_qglbuffer
requires(contains(QT_CONFIG,opengl))
requires(qtHaveModule(opengl))
QT += opengl widgets testlib
SOURCES += tst_qglbuffer.cpp

View File

@ -1,7 +1,7 @@
CONFIG += testcase
CONFIG += parallel_test
TARGET = tst_qglfunctions
requires(contains(QT_CONFIG,opengl))
requires(qtHaveModule(opengl))
QT += opengl widgets testlib
SOURCES += tst_qglfunctions.cpp

View File

@ -1,6 +1,6 @@
CONFIG += testcase
TARGET = tst_qglthreads
requires(contains(QT_CONFIG,opengl))
requires(qtHaveModule(opengl))
QT += opengl widgets testlib gui-private core-private
HEADERS += tst_qglthreads.h

View File

@ -6,7 +6,7 @@ DEFINES += SRCDIR=\\\"$$PWD\\\"
QT += xml svg network testlib
contains(QT_CONFIG, opengl):QT += opengl
qtHaveModule(opengl): QT += opengl
include($$ARTHUR/datagenerator/datagenerator.pri)

View File

@ -26,7 +26,7 @@ SUBDIRS=\
qtokenautomaton \
windowsmobile \
contains(QT_CONFIG, no-widgets): SUBDIRS -= \
!qtHaveModule(widgets): SUBDIRS -= \
baselineexample \
gestures \
headersclean \

View File

@ -4,5 +4,5 @@ SUBDIRS=\
qsqlrelationaltablemodel \
qsqltablemodel \
contains(QT_CONFIG, no-widgets): SUBDIRS -= \
!qtHaveModule(widgets): SUBDIRS -= \
qsqlquerymodel

View File

@ -31,7 +31,7 @@ SOURCES += tst_moc.cpp
QT -= gui
QT += sql network testlib
contains(QT_CONFIG, dbus){
qtHaveModule(dbus) {
DEFINES += WITH_DBUS
QT += dbus
}

View File

@ -5,4 +5,4 @@ SUBDIRS=\
moc \
rcc \
contains(QT_CONFIG, dbus):SUBDIRS += qdbuscpp2xml qdbusxml2cpp
qtHaveModule(dbus): SUBDIRS += qdbuscpp2xml qdbusxml2cpp

View File

@ -6,7 +6,7 @@ QT += gui-private widgets testlib
INCLUDEPATH += .
SOURCES += tst_qmdiarea.cpp
DEFINES += QT_NO_CAST_TO_ASCII QT_NO_CAST_FROM_ASCII
contains(QT_CONFIG, opengl):QT += opengl
qtHaveModule(opengl): QT += opengl
mac {
LIBS += -framework Security

View File

@ -5,8 +5,8 @@ SUBDIRS = \
network \
sql \
# removed-by-refactor contains(QT_CONFIG, opengl): SUBDIRS += opengl
contains(QT_CONFIG, dbus): SUBDIRS += dbus
# removed-by-refactor qtHaveModule(opengl): SUBDIRS += opengl
qtHaveModule(dbus): SUBDIRS += dbus
check-trusted.CONFIG += recursive
QMAKE_EXTRA_TARGETS += check-trusted

View File

@ -7,6 +7,6 @@ SUBDIRS = \
qvariant \
qcoreapplication
isEmpty(QT.widgets.name): SUBDIRS -= \
!qtHaveModule(widgets): SUBDIRS -= \
qmetaobject \
qobject

View File

@ -6,7 +6,7 @@ CONFIG += release exceptions
SOURCES += main.cpp
RESOURCES += qregexp.qrc
!isEmpty(QT.script.name):!pcre {
qtHaveModule(script):!pcre {
DEFINES += HAVE_JSC
QT += script
}

View File

@ -1,2 +1,2 @@
TEMPLATE = subdirs
!isEmpty(QT.widgets.name):SUBDIRS = qanimation
qtHaveModule(widgets): SUBDIRS = qanimation

View File

@ -1,7 +1,7 @@
TEMPLATE = app
QT += svg testlib
contains(QT_CONFIG, opengl):QT += opengl
qtHaveModule(opengl): QT += opengl
HEADERS += widgets/gvbwidget.h \
widgets/abstractscrollarea.h \

View File

@ -8,7 +8,7 @@ SUBDIRS = \
qgraphicsview \
qgraphicswidget
isEmpty(QT.widgets.name): SUBDIRS -= \
!qtHaveModule(widgets): SUBDIRS -= \
qgraphicsanchorlayout \
qgraphicsitem \
qgraphicsscene \

View File

@ -4,7 +4,7 @@ HEADERS += mainwindow.h view.h chip.h
SOURCES += main.cpp
SOURCES += mainwindow.cpp view.cpp chip.cpp
contains(QT_CONFIG, opengl):QT += opengl
qtHaveModule(opengl): QT += opengl
build_all:!build_pass {
CONFIG -= build_all

View File

@ -10,4 +10,4 @@ RESOURCES += \
chiptester/images.qrc
QT += widgets
contains(QT_CONFIG, opengl) QT += opengl
qtHaveModule(opengl): QT += opengl

View File

@ -17,5 +17,5 @@ TRUSTED_BENCHMARKS += \
include(../trusted-benchmarks.pri)
isEmpty(QT.widgets.name): SUBDIRS -= \
!qtHaveModule(widgets): SUBDIRS -= \
itemviews

View File

@ -6,5 +6,5 @@ SUBDIRS = \
qpixmap \
qpixmapcache
isEmpty(QT.widgets.name): SUBDIRS -= \
!qtHaveModule(widgets): SUBDIRS -= \
qimagereader

View File

@ -1,4 +1,4 @@
TEMPLATE = subdirs
!isEmpty(QT.widgets.name):SUBDIRS = \
qtHaveModule(widgets): SUBDIRS = \
qapplication \
qwidget

View File

@ -6,7 +6,7 @@ SUBDIRS = \
qtracebench \
qtbench
isEmpty(QT.widgets.name): SUBDIRS -= \
!qtHaveModule(widgets): SUBDIRS -= \
qpainter \
qtracebench \
qtbench

View File

@ -1,3 +1,3 @@
TEMPLATE = subdirs
!isEmpty(QT.widgets.name):SUBDIRS = \
qtHaveModule(widgets): SUBDIRS = \
qstylesheetstyle

View File

@ -13,6 +13,6 @@ SOURCES += interactivewidget.cpp \
RESOURCES += icons.qrc \
$$LANCELOT_DIR/images.qrc
contains(QT_CONFIG, opengl)|contains(QT_CONFIG, opengles1)|contains(QT_CONFIG, opengles2):QT += opengl
qtHaveModule(opengl): QT += opengl
DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0