summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSimon Hausmann <simon.hausmann@qt.io>2018-10-24 15:20:27 +0200
committerTobias Hunger <tobias.hunger@qt.io>2018-11-01 11:48:46 +0000
commite9c45bbdddd4df005bdaa5eea9740d351e6eaea2 (patch)
tree23765d4650f8f349d1f32e0fe4b1bc678cae7568
parent345e6b0213b1273b698163064f80d33bc7ce64a9 (diff)
Begin port of qtbase to CMake
Done-by: Alexandru Croitor <alexandru.croitor@qt.io> Done-by: Frederik Gladhorn <frederik.gladhorn@qt.io> Done-by: Kevin Funk <kevin.funk@kdab.com> Done-by: Mikhail Svetkin <mikhail.svetkin@qt.io> Done-by: Simon Hausmann <simon.hausmann@qt.io> Done-by: Tobias Hunger <tobias.hunger@qt.io> Done-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io> Done-by: Volker Krause <volker.krause@kdab.com> Change-Id: Ida4f8bd190f9a4849a1af7b5b7981337a5df5310 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io> Reviewed-by: Tobias Hunger <tobias.hunger@qt.io> Reviewed-by: Mikhail Svetkin <mikhail.svetkin@qt.io>
-rw-r--r--.gitignore2
-rw-r--r--CMakeLists.txt43
-rw-r--r--cmake/3rdparty/extra-cmake-modules/COPYING-CMAKE-SCRIPTS22
-rw-r--r--cmake/3rdparty/extra-cmake-modules/find-modules/ECMFindModuleHelpersStub.cmake1
-rw-r--r--cmake/3rdparty/extra-cmake-modules/find-modules/FindWayland.cmake143
-rw-r--r--cmake/3rdparty/extra-cmake-modules/find-modules/FindX11_XCB.cmake118
-rw-r--r--cmake/3rdparty/extra-cmake-modules/find-modules/FindXCB.cmake201
-rw-r--r--cmake/3rdparty/extra-cmake-modules/modules/ECMEnableSanitizers.cmake173
-rw-r--r--cmake/3rdparty/extra-cmake-modules/modules/ECMFindModuleHelpers.cmake297
-rw-r--r--cmake/3rdparty/extra-cmake-modules/qt_attribution.json15
-rw-r--r--cmake/3rdparty/kwin/COPYING-CMAKE-SCRIPTS22
-rw-r--r--cmake/3rdparty/kwin/FindFontconfig.cmake50
-rw-r--r--cmake/3rdparty/kwin/FindLibdrm.cmake126
-rw-r--r--cmake/3rdparty/kwin/FindLibinput.cmake125
-rw-r--r--cmake/3rdparty/kwin/FindXKB.cmake101
-rw-r--r--cmake/3rdparty/kwin/Findgbm.cmake125
-rw-r--r--cmake/3rdparty/kwin/qt_attribution.json17
-rw-r--r--cmake/FindAtomic.cmake37
-rw-r--r--cmake/FindGLib.cmake3
-rw-r--r--cmake/FindLibsystemd.cmake3
-rw-r--r--cmake/FindLibudev.cmake3
-rw-r--r--cmake/FindPCRE2.cmake13
-rw-r--r--cmake/FindWrapDoubleConversion.cmake36
-rw-r--r--cmake/Finddouble-conversion.cmake30
-rw-r--r--cmake/QtBaseConfigureTests.cmake139
-rw-r--r--cmake/QtBaseGlobalTargets.cmake58
-rw-r--r--cmake/QtBuild.cmake1080
-rw-r--r--cmake/QtCompilerOptimization.cmake106
-rw-r--r--cmake/QtConfig.cmake.in43
-rw-r--r--cmake/QtFeature.cmake435
-rw-r--r--cmake/QtModuleConfig.cmake.in9
-rw-r--r--cmake/QtPlatformSupport.cmake41
-rw-r--r--cmake/QtPostProcess.cmake32
-rw-r--r--cmake/QtSetup.cmake47
-rw-r--r--cmake/README.md103
-rw-r--r--cmake/tests/features/CMakeLists.txt42
-rw-r--r--cmake/tests/features/configure.cmake35
-rw-r--r--cmake/tests/features/src/CMakeLists.txt7
-rw-r--r--configure.cmake421
-rw-r--r--configure.json11
-rw-r--r--examples/CMakeLists.txt3
-rw-r--r--examples/gui/CMakeLists.txt1
-rw-r--r--examples/gui/rasterwindow/CMakeLists.txt18
-rw-r--r--qmake/CMakeLists.txt2
-rw-r--r--src/3rdparty/CMakeLists.txt2
-rw-r--r--src/3rdparty/harfbuzz/CMakeLists.txt11
-rw-r--r--src/3rdparty/tinycbor/CMakeLists.txt2
-rw-r--r--src/CMakeLists.txt65
-rw-r--r--src/corelib/CMakeLists.txt781
-rw-r--r--src/corelib/configure.cmake712
-rw-r--r--src/corelib/configure.json27
-rw-r--r--src/corelib/global/qconfig.cpp.in65
-rw-r--r--src/dbus/CMakeLists.txt58
-rw-r--r--src/gui/CMakeLists.txt494
-rw-r--r--src/gui/configure.cmake946
-rw-r--r--src/gui/configure.json20
-rw-r--r--src/gui/painting/qcoregraphics.mm2
-rw-r--r--src/network/CMakeLists.txt382
-rw-r--r--src/network/configure.cmake265
-rw-r--r--src/network/configure.json18
-rw-r--r--src/opengl/CMakeLists.txt58
-rw-r--r--src/platformheaders/CMakeLists.txt7
-rw-r--r--src/platformheaders/fake.cpp0
-rw-r--r--src/platformsupport/CMakeLists.txt23
-rw-r--r--src/platformsupport/accessibility/CMakeLists.txt16
-rw-r--r--src/platformsupport/clipboard/CMakeLists.txt27
-rw-r--r--src/platformsupport/edid/CMakeLists.txt15
-rw-r--r--src/platformsupport/eventdispatchers/CMakeLists.txt39
-rw-r--r--src/platformsupport/fontdatabases/CMakeLists.txt106
-rw-r--r--src/platformsupport/fontdatabases/fake.cpp0
-rw-r--r--src/platformsupport/graphics/CMakeLists.txt15
-rw-r--r--src/platformsupport/services/CMakeLists.txt24
-rw-r--r--src/platformsupport/themes/CMakeLists.txt55
-rw-r--r--src/plugins/CMakeLists.txt3
-rw-r--r--src/plugins/platforms/CMakeLists.txt10
-rw-r--r--src/plugins/platforms/cocoa/CMakeLists.txt115
-rw-r--r--src/plugins/platforms/xcb/CMakeLists.txt172
-rw-r--r--src/plugins/sqldrivers/configure.json4
-rw-r--r--src/testlib/CMakeLists.txt89
-rw-r--r--src/testlib/configure.cmake21
-rw-r--r--src/tools/CMakeLists.txt2
-rw-r--r--src/tools/bootstrap/CMakeLists.txt151
-rw-r--r--src/tools/moc/CMakeLists.txt10
-rw-r--r--src/tools/qfloat16-tables/CMakeLists.txt2
-rw-r--r--src/tools/qmocscanner/CMakeLists.txt10
-rw-r--r--src/tools/qmocscanner/main.cpp623
-rw-r--r--src/tools/qvkgen/CMakeLists.txt5
-rw-r--r--src/tools/rcc/CMakeLists.txt1
-rw-r--r--src/tools/tracegen/CMakeLists.txt10
-rw-r--r--src/tools/uic/CMakeLists.txt16
-rw-r--r--src/widgets/CMakeLists.txt612
-rw-r--r--src/widgets/configure.cmake567
-rw-r--r--src/xml/CMakeLists.txt30
-rw-r--r--src/xml/configure.cmake22
-rw-r--r--tests/CMakeLists.txt1
-rw-r--r--tests/auto/CMakeLists.txt55
-rw-r--r--tests/auto/corelib/CMakeLists.txt12
-rw-r--r--tests/auto/corelib/animation/CMakeLists.txt6
-rw-r--r--tests/auto/corelib/animation/qabstractanimation/CMakeLists.txt1
-rw-r--r--tests/auto/corelib/animation/qanimationgroup/CMakeLists.txt1
-rw-r--r--tests/auto/corelib/animation/qparallelanimationgroup/CMakeLists.txt1
-rw-r--r--tests/auto/corelib/animation/qpauseanimation/CMakeLists.txt1
-rw-r--r--tests/auto/corelib/animation/qsequentialanimationgroup/CMakeLists.txt1
-rw-r--r--tests/auto/corelib/animation/qvariantanimation/CMakeLists.txt1
-rw-r--r--tests/auto/corelib/codecs/CMakeLists.txt3
-rw-r--r--tests/auto/corelib/codecs/qtextcodec/CMakeLists.txt5
-rw-r--r--tests/auto/corelib/codecs/qtextcodec/echo/CMakeLists.txt1
-rw-r--r--tests/auto/corelib/codecs/utf8/CMakeLists.txt1
-rw-r--r--tests/auto/corelib/global/CMakeLists.txt12
-rw-r--r--tests/auto/corelib/global/q_func_info/CMakeLists.txt1
-rw-r--r--tests/auto/corelib/global/qflags/CMakeLists.txt1
-rw-r--r--tests/auto/corelib/global/qfloat16/CMakeLists.txt1
-rw-r--r--tests/auto/corelib/global/qgetputenv/CMakeLists.txt1
-rw-r--r--tests/auto/corelib/global/qglobal/CMakeLists.txt1
-rw-r--r--tests/auto/corelib/global/qglobalstatic/CMakeLists.txt8
-rw-r--r--tests/auto/corelib/global/qhooks/CMakeLists.txt1
-rw-r--r--tests/auto/corelib/global/qlogging/CMakeLists.txt10
-rw-r--r--tests/auto/corelib/global/qnumeric/CMakeLists.txt1
-rw-r--r--tests/auto/corelib/global/qrand/CMakeLists.txt1
-rw-r--r--tests/auto/corelib/global/qrandomgenerator/CMakeLists.txt1
-rw-r--r--tests/auto/corelib/global/qtendian/CMakeLists.txt1
-rw-r--r--tests/auto/corelib/io/CMakeLists.txt12
-rw-r--r--tests/auto/corelib/io/largefile/CMakeLists.txt6
-rw-r--r--tests/auto/corelib/io/qbuffer/CMakeLists.txt1
-rw-r--r--tests/auto/corelib/io/qdataurl/CMakeLists.txt1
-rw-r--r--tests/auto/corelib/io/qfilesystementry/CMakeLists.txt7
-rw-r--r--tests/auto/corelib/io/qfilesystemwatcher/CMakeLists.txt1
-rw-r--r--tests/auto/corelib/io/qipaddress/CMakeLists.txt1
-rw-r--r--tests/auto/corelib/io/qloggingcategory/CMakeLists.txt1
-rw-r--r--tests/auto/corelib/io/qnodebug/CMakeLists.txt1
-rw-r--r--tests/auto/corelib/io/qprocessenvironment/CMakeLists.txt1
-rw-r--r--tests/auto/corelib/io/qstorageinfo/CMakeLists.txt1
-rw-r--r--tests/auto/corelib/io/qurlquery/CMakeLists.txt1
-rw-r--r--tests/auto/corelib/itemmodels/CMakeLists.txt4
-rw-r--r--tests/auto/corelib/itemmodels/qabstractproxymodel/CMakeLists.txt1
-rw-r--r--tests/auto/corelib/itemmodels/qitemselectionmodel/CMakeLists.txt1
-rw-r--r--tests/auto/corelib/itemmodels/qstringlistmodel/CMakeLists.txt4
-rw-r--r--tests/auto/corelib/kernel/CMakeLists.txt13
-rw-r--r--tests/auto/corelib/kernel/qdeadlinetimer/CMakeLists.txt1
-rw-r--r--tests/auto/corelib/kernel/qelapsedtimer/CMakeLists.txt1
-rw-r--r--tests/auto/corelib/kernel/qeventdispatcher/CMakeLists.txt1
-rw-r--r--tests/auto/corelib/kernel/qmath/CMakeLists.txt1
-rw-r--r--tests/auto/corelib/kernel/qmetaenum/CMakeLists.txt1
-rw-r--r--tests/auto/corelib/kernel/qmetamethod/CMakeLists.txt1
-rw-r--r--tests/auto/corelib/kernel/qmetaobject/CMakeLists.txt1
-rw-r--r--tests/auto/corelib/kernel/qmetaobjectbuilder/CMakeLists.txt1
-rw-r--r--tests/auto/corelib/kernel/qmetaproperty/CMakeLists.txt1
-rw-r--r--tests/auto/corelib/kernel/qmimedata/CMakeLists.txt1
-rw-r--r--tests/auto/corelib/kernel/qsignalmapper/CMakeLists.txt1
-rw-r--r--tests/auto/corelib/kernel/qwineventnotifier/CMakeLists.txt1
-rw-r--r--tests/auto/corelib/mimetypes/CMakeLists.txt2
-rw-r--r--tests/auto/corelib/mimetypes/qmimetype/CMakeLists.txt1
-rw-r--r--tests/auto/corelib/serialization/CMakeLists.txt5
-rw-r--r--tests/auto/corelib/serialization/qcborstreamreader/CMakeLists.txt6
-rw-r--r--tests/auto/corelib/serialization/qcborstreamwriter/CMakeLists.txt5
-rw-r--r--tests/auto/corelib/serialization/qcborvalue/CMakeLists.txt6
-rw-r--r--tests/auto/corelib/serialization/qcborvalue_json/CMakeLists.txt1
-rw-r--r--tests/auto/corelib/statemachine/CMakeLists.txt2
-rw-r--r--tests/auto/corelib/statemachine/qstate/CMakeLists.txt1
-rw-r--r--tests/auto/corelib/thread/CMakeLists.txt13
-rw-r--r--tests/auto/corelib/thread/qatomicint/CMakeLists.txt1
-rw-r--r--tests/auto/corelib/thread/qatomicpointer/CMakeLists.txt1
-rw-r--r--tests/auto/corelib/thread/qfuture/CMakeLists.txt1
-rw-r--r--tests/auto/corelib/thread/qfuturesynchronizer/CMakeLists.txt1
-rw-r--r--tests/auto/corelib/thread/qmutexlocker/CMakeLists.txt1
-rw-r--r--tests/auto/corelib/thread/qreadlocker/CMakeLists.txt1
-rw-r--r--tests/auto/corelib/thread/qreadwritelock/CMakeLists.txt1
-rw-r--r--tests/auto/corelib/thread/qresultstore/CMakeLists.txt1
-rw-r--r--tests/auto/corelib/thread/qsemaphore/CMakeLists.txt1
-rw-r--r--tests/auto/corelib/thread/qthreadpool/CMakeLists.txt1
-rw-r--r--tests/auto/corelib/thread/qwaitcondition/CMakeLists.txt1
-rw-r--r--tests/auto/corelib/thread/qwritelocker/CMakeLists.txt1
-rw-r--r--tests/auto/corelib/tools/CMakeLists.txt47
-rw-r--r--tests/auto/corelib/tools/qalgorithms/CMakeLists.txt1
-rw-r--r--tests/auto/corelib/tools/qarraydata/CMakeLists.txt4
-rw-r--r--tests/auto/corelib/tools/qbitarray/CMakeLists.txt1
-rw-r--r--tests/auto/corelib/tools/qbytearraylist/CMakeLists.txt1
-rw-r--r--tests/auto/corelib/tools/qbytedatabuffer/CMakeLists.txt1
-rw-r--r--tests/auto/corelib/tools/qcache/CMakeLists.txt1
-rw-r--r--tests/auto/corelib/tools/qcommandlineparser/CMakeLists.txt1
-rw-r--r--tests/auto/corelib/tools/qcontiguouscache/CMakeLists.txt1
-rw-r--r--tests/auto/corelib/tools/qdate/CMakeLists.txt1
-rw-r--r--tests/auto/corelib/tools/qeasingcurve/CMakeLists.txt1
-rw-r--r--tests/auto/corelib/tools/qexplicitlyshareddatapointer/CMakeLists.txt1
-rw-r--r--tests/auto/corelib/tools/qhash/CMakeLists.txt1
-rw-r--r--tests/auto/corelib/tools/qhashfunctions/CMakeLists.txt1
-rw-r--r--tests/auto/corelib/tools/qlinkedlist/CMakeLists.txt1
-rw-r--r--tests/auto/corelib/tools/qlist/CMakeLists.txt1
-rw-r--r--tests/auto/corelib/tools/qmakearray/CMakeLists.txt1
-rw-r--r--tests/auto/corelib/tools/qmap/CMakeLists.txt1
-rw-r--r--tests/auto/corelib/tools/qmargins/CMakeLists.txt1
-rw-r--r--tests/auto/corelib/tools/qmessageauthenticationcode/CMakeLists.txt1
-rw-r--r--tests/auto/corelib/tools/qpair/CMakeLists.txt1
-rw-r--r--tests/auto/corelib/tools/qpoint/CMakeLists.txt1
-rw-r--r--tests/auto/corelib/tools/qpointf/CMakeLists.txt1
-rw-r--r--tests/auto/corelib/tools/qqueue/CMakeLists.txt1
-rw-r--r--tests/auto/corelib/tools/qrect/CMakeLists.txt1
-rw-r--r--tests/auto/corelib/tools/qregexp/CMakeLists.txt1
-rw-r--r--tests/auto/corelib/tools/qregularexpression/CMakeLists.txt1
-rw-r--r--tests/auto/corelib/tools/qringbuffer/CMakeLists.txt1
-rw-r--r--tests/auto/corelib/tools/qscopedpointer/CMakeLists.txt1
-rw-r--r--tests/auto/corelib/tools/qscopedvaluerollback/CMakeLists.txt1
-rw-r--r--tests/auto/corelib/tools/qscopeguard/CMakeLists.txt1
-rw-r--r--tests/auto/corelib/tools/qset/CMakeLists.txt1
-rw-r--r--tests/auto/corelib/tools/qsize/CMakeLists.txt1
-rw-r--r--tests/auto/corelib/tools/qsizef/CMakeLists.txt1
-rw-r--r--tests/auto/corelib/tools/qstl/CMakeLists.txt1
-rw-r--r--tests/auto/corelib/tools/qstring_no_cast_from_bytearray/CMakeLists.txt1
-rw-r--r--tests/auto/corelib/tools/qstringbuilder/qstringbuilder1/CMakeLists.txt1
-rw-r--r--tests/auto/corelib/tools/qstringbuilder/qstringbuilder2/CMakeLists.txt1
-rw-r--r--tests/auto/corelib/tools/qstringbuilder/qstringbuilder3/CMakeLists.txt1
-rw-r--r--tests/auto/corelib/tools/qstringbuilder/qstringbuilder4/CMakeLists.txt1
-rw-r--r--tests/auto/corelib/tools/qstringiterator/CMakeLists.txt1
-rw-r--r--tests/auto/corelib/tools/qstringlist/CMakeLists.txt1
-rw-r--r--tests/auto/corelib/tools/qstringmatcher/CMakeLists.txt1
-rw-r--r--tests/auto/corelib/tools/qstringref/CMakeLists.txt1
-rw-r--r--tests/auto/corelib/tools/qtime/CMakeLists.txt1
-rw-r--r--tests/auto/corelib/tools/qtimeline/CMakeLists.txt1
-rw-r--r--tests/auto/corelib/tools/qvarlengtharray/CMakeLists.txt1
-rw-r--r--tests/auto/dbus/CMakeLists.txt33
-rw-r--r--tests/auto/dbus/qdbusabstractadaptor/CMakeLists.txt4
-rw-r--r--tests/auto/dbus/qdbusabstractadaptor/qdbusabstractadaptor/CMakeLists.txt14
-rw-r--r--tests/auto/dbus/qdbusabstractadaptor/qmyserver/CMakeLists.txt13
-rw-r--r--tests/auto/dbus/qdbusabstractinterface/CMakeLists.txt4
-rw-r--r--tests/auto/dbus/qdbusabstractinterface/qdbusabstractinterface/CMakeLists.txt13
-rw-r--r--tests/auto/dbus/qdbusabstractinterface/qpinger/CMakeLists.txt13
-rw-r--r--tests/auto/dbus/qdbusconnection/CMakeLists.txt12
-rw-r--r--tests/auto/dbus/qdbusconnection_delayed/CMakeLists.txt14
-rw-r--r--tests/auto/dbus/qdbusconnection_no_app/CMakeLists.txt16
-rw-r--r--tests/auto/dbus/qdbusconnection_no_bus/CMakeLists.txt12
-rw-r--r--tests/auto/dbus/qdbusconnection_no_libdbus/CMakeLists.txt15
-rw-r--r--tests/auto/dbus/qdbusconnection_no_libdbus/tst_qdbusconnection_no_libdbus.cpp73
-rw-r--r--tests/auto/dbus/qdbusconnection_spyhook/CMakeLists.txt17
-rw-r--r--tests/auto/dbus/qdbuscontext/CMakeLists.txt12
-rw-r--r--tests/auto/dbus/qdbusinterface/CMakeLists.txt4
-rw-r--r--tests/auto/dbus/qdbusinterface/qdbusinterface/CMakeLists.txt28
-rw-r--r--tests/auto/dbus/qdbusinterface/qmyserver/CMakeLists.txt13
-rw-r--r--tests/auto/dbus/qdbuslocalcalls/CMakeLists.txt12
-rw-r--r--tests/auto/dbus/qdbusmarshall/CMakeLists.txt4
-rw-r--r--tests/auto/dbus/qdbusmarshall/qdbusmarshall/CMakeLists.txt26
-rw-r--r--tests/auto/dbus/qdbusmarshall/qpong/CMakeLists.txt12
-rw-r--r--tests/auto/dbus/qdbusmetaobject/CMakeLists.txt12
-rw-r--r--tests/auto/dbus/qdbusmetatype/CMakeLists.txt12
-rw-r--r--tests/auto/dbus/qdbuspendingcall/CMakeLists.txt12
-rw-r--r--tests/auto/dbus/qdbuspendingreply/CMakeLists.txt12
-rw-r--r--tests/auto/dbus/qdbusreply/CMakeLists.txt12
-rw-r--r--tests/auto/dbus/qdbusservicewatcher/CMakeLists.txt12
-rw-r--r--tests/auto/dbus/qdbusthreading/CMakeLists.txt12
-rw-r--r--tests/auto/dbus/qdbustype/CMakeLists.txt26
-rw-r--r--tests/auto/dbus/qdbusxmlparser/CMakeLists.txt14
-rw-r--r--tests/auto/gui/CMakeLists.txt19
-rw-r--r--tests/auto/gui/image/CMakeLists.txt15
-rw-r--r--tests/auto/gui/image/qimageiohandler/CMakeLists.txt1
-rw-r--r--tests/auto/gui/image/qpicture/CMakeLists.txt1
-rw-r--r--tests/auto/gui/itemmodels/CMakeLists.txt4
-rw-r--r--tests/auto/gui/itemmodels/qstandarditem/CMakeLists.txt1
-rw-r--r--tests/auto/gui/kernel/CMakeLists.txt38
-rw-r--r--tests/auto/gui/kernel/qcursor/CMakeLists.txt1
-rw-r--r--tests/auto/gui/kernel/qevent/CMakeLists.txt1
-rw-r--r--tests/auto/gui/kernel/qfileopenevent/CMakeLists.txt2
-rw-r--r--tests/auto/gui/kernel/qfileopenevent/qfileopeneventexternal/CMakeLists.txt1
-rw-r--r--tests/auto/gui/kernel/qfileopenevent/test/CMakeLists.txt1
-rw-r--r--tests/auto/gui/kernel/qguivariant/CMakeLists.txt2
-rw-r--r--tests/auto/gui/kernel/qguivariant/no_application/CMakeLists.txt1
-rw-r--r--tests/auto/gui/kernel/qmouseevent/CMakeLists.txt1
-rw-r--r--tests/auto/gui/kernel/qpalette/CMakeLists.txt1
-rw-r--r--tests/auto/gui/math3d/CMakeLists.txt3
-rw-r--r--tests/auto/gui/math3d/qmatrixnxn/CMakeLists.txt5
-rw-r--r--tests/auto/gui/math3d/qquaternion/CMakeLists.txt1
-rw-r--r--tests/auto/gui/math3d/qvectornd/CMakeLists.txt1
-rw-r--r--tests/auto/gui/painting/CMakeLists.txt19
-rw-r--r--tests/auto/gui/painting/qpagesize/CMakeLists.txt1
-rw-r--r--tests/auto/gui/painting/qpaintengine/CMakeLists.txt1
-rw-r--r--tests/auto/gui/painting/qpainterpath/CMakeLists.txt1
-rw-r--r--tests/auto/gui/painting/qpainterpathstroker/CMakeLists.txt1
-rw-r--r--tests/auto/gui/painting/qpen/CMakeLists.txt1
-rw-r--r--tests/auto/gui/util/CMakeLists.txt13
-rw-r--r--tests/auto/gui/util/qdoublevalidator/CMakeLists.txt1
-rw-r--r--tests/auto/gui/util/qintvalidator/CMakeLists.txt1
-rw-r--r--tests/auto/gui/util/qregexpvalidator/CMakeLists.txt1
-rw-r--r--tests/auto/gui/util/qregularexpressionvalidator/CMakeLists.txt1
-rw-r--r--tests/auto/opengl/CMakeLists.txt6
-rw-r--r--tests/auto/opengl/qgl/CMakeLists.txt7
-rw-r--r--tests/auto/opengl/qglbuffer/CMakeLists.txt1
-rw-r--r--tests/auto/opengl/qglfunctions/CMakeLists.txt1
-rw-r--r--tests/auto/opengl/qglthreads/CMakeLists.txt7
-rw-r--r--tests/auto/other/qtokenautomaton/CMakeLists.txt15
-rw-r--r--tests/auto/other/toolsupport/CMakeLists.txt1
-rw-r--r--tests/auto/testlib/CMakeLists.txt4
-rw-r--r--tests/auto/testlib/qabstractitemmodeltester/CMakeLists.txt8
-rw-r--r--tests/auto/testlib/qsignalspy/CMakeLists.txt1
-rw-r--r--tests/auto/testlib/selftests/CMakeLists.txt42
-rw-r--r--tests/auto/testlib/selftests/alive/CMakeLists.txt1
-rw-r--r--tests/auto/testlib/selftests/assert/CMakeLists.txt1
-rw-r--r--tests/auto/testlib/selftests/badxml/CMakeLists.txt1
-rw-r--r--tests/auto/testlib/selftests/benchlibcallgrind/CMakeLists.txt1
-rw-r--r--tests/auto/testlib/selftests/benchlibcounting/CMakeLists.txt1
-rw-r--r--tests/auto/testlib/selftests/benchlibeventcounter/CMakeLists.txt1
-rw-r--r--tests/auto/testlib/selftests/benchliboptions/CMakeLists.txt1
-rw-r--r--tests/auto/testlib/selftests/benchlibwalltime/CMakeLists.txt1
-rw-r--r--tests/auto/testlib/selftests/commandlinedata/CMakeLists.txt1
-rw-r--r--tests/auto/testlib/selftests/counting/CMakeLists.txt1
-rw-r--r--tests/auto/testlib/selftests/crashes/CMakeLists.txt1
-rw-r--r--tests/auto/testlib/selftests/datatable/CMakeLists.txt1
-rw-r--r--tests/auto/testlib/selftests/datetime/CMakeLists.txt1
-rw-r--r--tests/auto/testlib/selftests/deleteLater/CMakeLists.txt1
-rw-r--r--tests/auto/testlib/selftests/deleteLater_noApp/CMakeLists.txt1
-rw-r--r--tests/auto/testlib/selftests/differentexec/CMakeLists.txt1
-rw-r--r--tests/auto/testlib/selftests/expectfail/CMakeLists.txt1
-rw-r--r--tests/auto/testlib/selftests/failcleanup/CMakeLists.txt1
-rw-r--r--tests/auto/testlib/selftests/failinit/CMakeLists.txt1
-rw-r--r--tests/auto/testlib/selftests/failinitdata/CMakeLists.txt1
-rw-r--r--tests/auto/testlib/selftests/fetchbogus/CMakeLists.txt1
-rw-r--r--tests/auto/testlib/selftests/float/CMakeLists.txt1
-rw-r--r--tests/auto/testlib/selftests/globaldata/CMakeLists.txt1
-rw-r--r--tests/auto/testlib/selftests/longstring/CMakeLists.txt1
-rw-r--r--tests/auto/testlib/selftests/maxwarnings/CMakeLists.txt1
-rw-r--r--tests/auto/testlib/selftests/multiexec/CMakeLists.txt1
-rw-r--r--tests/auto/testlib/selftests/pairdiagnostics/CMakeLists.txt1
-rw-r--r--tests/auto/testlib/selftests/printdatatags/CMakeLists.txt1
-rw-r--r--tests/auto/testlib/selftests/printdatatagswithglobaltags/CMakeLists.txt1
-rw-r--r--tests/auto/testlib/selftests/qexecstringlist/CMakeLists.txt1
-rw-r--r--tests/auto/testlib/selftests/singleskip/CMakeLists.txt1
-rw-r--r--tests/auto/testlib/selftests/skip/CMakeLists.txt1
-rw-r--r--tests/auto/testlib/selftests/skipcleanup/CMakeLists.txt1
-rw-r--r--tests/auto/testlib/selftests/skipinit/CMakeLists.txt1
-rw-r--r--tests/auto/testlib/selftests/skipinitdata/CMakeLists.txt1
-rw-r--r--tests/auto/testlib/selftests/sleep/CMakeLists.txt1
-rw-r--r--tests/auto/testlib/selftests/strcmp/CMakeLists.txt1
-rw-r--r--tests/auto/testlib/selftests/subtest/CMakeLists.txt1
-rw-r--r--tests/auto/testlib/selftests/tuplediagnostics/CMakeLists.txt1
-rw-r--r--tests/auto/testlib/selftests/warnings/CMakeLists.txt1
-rw-r--r--tests/auto/testlib/selftests/xunit/CMakeLists.txt1
-rw-r--r--tests/auto/tools/qdbusxml2cpp/CMakeLists.txt1
-rw-r--r--tests/auto/tools/uic/CMakeLists.txt1
-rw-r--r--tests/auto/widgets/CMakeLists.txt10
-rw-r--r--tests/auto/widgets/dialogs/CMakeLists.txt19
-rw-r--r--tests/auto/widgets/dialogs/qcolordialog/CMakeLists.txt1
-rw-r--r--tests/auto/widgets/dialogs/qdialog/CMakeLists.txt8
-rw-r--r--tests/auto/widgets/dialogs/qerrormessage/CMakeLists.txt1
-rw-r--r--tests/auto/widgets/dialogs/qfiledialog/CMakeLists.txt9
-rw-r--r--tests/auto/widgets/dialogs/qfiledialog2/CMakeLists.txt10
-rw-r--r--tests/auto/widgets/dialogs/qfilesystemmodel/CMakeLists.txt5
-rw-r--r--tests/auto/widgets/dialogs/qfontdialog/CMakeLists.txt9
-rw-r--r--tests/auto/widgets/dialogs/qinputdialog/CMakeLists.txt1
-rw-r--r--tests/auto/widgets/dialogs/qmessagebox/CMakeLists.txt6
-rw-r--r--tests/auto/widgets/dialogs/qprogressdialog/CMakeLists.txt1
-rw-r--r--tests/auto/widgets/dialogs/qsidebar/CMakeLists.txt5
-rw-r--r--tests/auto/widgets/dialogs/qwizard/CMakeLists.txt8
-rw-r--r--tests/auto/widgets/effects/CMakeLists.txt2
-rw-r--r--tests/auto/widgets/effects/qgraphicseffect/CMakeLists.txt6
-rw-r--r--tests/auto/widgets/effects/qpixmapfilter/CMakeLists.txt5
-rw-r--r--tests/auto/widgets/graphicsview/CMakeLists.txt25
-rw-r--r--tests/auto/widgets/graphicsview/qgraphicsanchorlayout/CMakeLists.txt6
-rw-r--r--tests/auto/widgets/graphicsview/qgraphicsanchorlayout1/CMakeLists.txt6
-rw-r--r--tests/auto/widgets/graphicsview/qgraphicseffectsource/CMakeLists.txt6
-rw-r--r--tests/auto/widgets/graphicsview/qgraphicsgridlayout/CMakeLists.txt1
-rw-r--r--tests/auto/widgets/graphicsview/qgraphicsitem/CMakeLists.txt11
-rw-r--r--tests/auto/widgets/graphicsview/qgraphicsitemanimation/CMakeLists.txt6
-rw-r--r--tests/auto/widgets/graphicsview/qgraphicslayout/CMakeLists.txt6
-rw-r--r--tests/auto/widgets/graphicsview/qgraphicslayoutitem/CMakeLists.txt1
-rw-r--r--tests/auto/widgets/graphicsview/qgraphicslinearlayout/CMakeLists.txt1
-rw-r--r--tests/auto/widgets/graphicsview/qgraphicsobject/CMakeLists.txt1
-rw-r--r--tests/auto/widgets/graphicsview/qgraphicspixmapitem/CMakeLists.txt1
-rw-r--r--tests/auto/widgets/graphicsview/qgraphicspolygonitem/CMakeLists.txt1
-rw-r--r--tests/auto/widgets/graphicsview/qgraphicsproxywidget/CMakeLists.txt10
-rw-r--r--tests/auto/widgets/graphicsview/qgraphicsscene/CMakeLists.txt15
-rw-r--r--tests/auto/widgets/graphicsview/qgraphicssceneindex/CMakeLists.txt6
-rw-r--r--tests/auto/widgets/graphicsview/qgraphicstransform/CMakeLists.txt1
-rw-r--r--tests/auto/widgets/graphicsview/qgraphicsview/CMakeLists.txt12
-rw-r--r--tests/auto/widgets/graphicsview/qgraphicswidget/CMakeLists.txt6
-rw-r--r--tests/auto/widgets/itemviews/CMakeLists.txt21
-rw-r--r--tests/auto/widgets/itemviews/qabstractitemview/CMakeLists.txt5
-rw-r--r--tests/auto/widgets/itemviews/qcolumnview/CMakeLists.txt11
-rw-r--r--tests/auto/widgets/itemviews/qdatawidgetmapper/CMakeLists.txt1
-rw-r--r--tests/auto/widgets/itemviews/qdirmodel/CMakeLists.txt19
-rw-r--r--tests/auto/widgets/itemviews/qfileiconprovider/CMakeLists.txt1
-rw-r--r--tests/auto/widgets/itemviews/qheaderview/CMakeLists.txt6
-rw-r--r--tests/auto/widgets/itemviews/qitemdelegate/CMakeLists.txt3
-rw-r--r--tests/auto/widgets/itemviews/qitemeditorfactory/CMakeLists.txt1
-rw-r--r--tests/auto/widgets/itemviews/qitemview/CMakeLists.txt1
-rw-r--r--tests/auto/widgets/itemviews/qlistview/CMakeLists.txt13
-rw-r--r--tests/auto/widgets/itemviews/qlistwidget/CMakeLists.txt8
-rw-r--r--tests/auto/widgets/itemviews/qtableview/CMakeLists.txt7
-rw-r--r--tests/auto/widgets/itemviews/qtablewidget/CMakeLists.txt1
-rw-r--r--tests/auto/widgets/itemviews/qtreeview/CMakeLists.txt11
-rw-r--r--tests/auto/widgets/itemviews/qtreewidget/CMakeLists.txt1
-rw-r--r--tests/auto/widgets/itemviews/qtreewidgetitemiterator/CMakeLists.txt1
-rw-r--r--tests/auto/widgets/kernel/CMakeLists.txt27
-rw-r--r--tests/auto/widgets/kernel/kernel.pro2
-rw-r--r--tests/auto/widgets/kernel/qaction/CMakeLists.txt6
-rw-r--r--tests/auto/widgets/kernel/qactiongroup/CMakeLists.txt1
-rw-r--r--tests/auto/widgets/kernel/qboxlayout/CMakeLists.txt1
-rw-r--r--tests/auto/widgets/kernel/qdesktopwidget/CMakeLists.txt1
-rw-r--r--tests/auto/widgets/kernel/qformlayout/CMakeLists.txt1
-rw-r--r--tests/auto/widgets/kernel/qgesturerecognizer/CMakeLists.txt6
-rw-r--r--tests/auto/widgets/kernel/qgridlayout/CMakeLists.txt10
-rw-r--r--tests/auto/widgets/kernel/qlayout/CMakeLists.txt3
-rw-r--r--tests/auto/widgets/kernel/qshortcut/CMakeLists.txt1
-rw-r--r--tests/auto/widgets/kernel/qsizepolicy/CMakeLists.txt1
-rw-r--r--tests/auto/widgets/kernel/qstackedlayout/CMakeLists.txt1
-rw-r--r--tests/auto/widgets/kernel/qtooltip/CMakeLists.txt1
-rw-r--r--tests/auto/widgets/kernel/qwidget/CMakeLists.txt16
-rw-r--r--tests/auto/widgets/kernel/qwidget_window/CMakeLists.txt7
-rw-r--r--tests/auto/widgets/kernel/qwidgetaction/CMakeLists.txt1
-rw-r--r--tests/auto/widgets/kernel/qwidgetmetatype/CMakeLists.txt1
-rw-r--r--tests/auto/widgets/kernel/qwidgetsvariant/CMakeLists.txt8
-rw-r--r--tests/auto/widgets/kernel/qwindowcontainer/CMakeLists.txt1
-rw-r--r--tests/auto/widgets/styles/CMakeLists.txt12
-rw-r--r--tests/auto/widgets/styles/qmacstyle/CMakeLists.txt1
-rw-r--r--tests/auto/widgets/styles/qstyle/CMakeLists.txt3
-rw-r--r--tests/auto/widgets/styles/qstyleoption/CMakeLists.txt1
-rw-r--r--tests/auto/widgets/styles/qstylesheetstyle/CMakeLists.txt9
-rw-r--r--tests/auto/widgets/util/CMakeLists.txt7
-rw-r--r--tests/auto/widgets/util/qcompleter/CMakeLists.txt1
-rw-r--r--tests/auto/widgets/util/qscroller/CMakeLists.txt1
-rw-r--r--tests/auto/widgets/util/qsystemtrayicon/CMakeLists.txt1
-rw-r--r--tests/auto/widgets/util/qundogroup/CMakeLists.txt1
-rw-r--r--tests/auto/widgets/util/qundostack/CMakeLists.txt1
-rw-r--r--tests/auto/widgets/widgets/CMakeLists.txt55
-rw-r--r--tests/auto/widgets/widgets/qabstractbutton/CMakeLists.txt1
-rw-r--r--tests/auto/widgets/widgets/qabstractscrollarea/CMakeLists.txt1
-rw-r--r--tests/auto/widgets/widgets/qabstractslider/CMakeLists.txt1
-rw-r--r--tests/auto/widgets/widgets/qabstractspinbox/CMakeLists.txt7
-rw-r--r--tests/auto/widgets/widgets/qbuttongroup/CMakeLists.txt1
-rw-r--r--tests/auto/widgets/widgets/qcalendarwidget/CMakeLists.txt1
-rw-r--r--tests/auto/widgets/widgets/qcheckbox/CMakeLists.txt1
-rw-r--r--tests/auto/widgets/widgets/qcombobox/CMakeLists.txt8
-rw-r--r--tests/auto/widgets/widgets/qcommandlinkbutton/CMakeLists.txt1
-rw-r--r--tests/auto/widgets/widgets/qdatetimeedit/CMakeLists.txt6
-rw-r--r--tests/auto/widgets/widgets/qdial/CMakeLists.txt1
-rw-r--r--tests/auto/widgets/widgets/qdialogbuttonbox/CMakeLists.txt1
-rw-r--r--tests/auto/widgets/widgets/qdockwidget/CMakeLists.txt6
-rw-r--r--tests/auto/widgets/widgets/qdoublespinbox/CMakeLists.txt1
-rw-r--r--tests/auto/widgets/widgets/qfocusframe/CMakeLists.txt1
-rw-r--r--tests/auto/widgets/widgets/qfontcombobox/CMakeLists.txt1
-rw-r--r--tests/auto/widgets/widgets/qframe/CMakeLists.txt1
-rw-r--r--tests/auto/widgets/widgets/qgroupbox/CMakeLists.txt1
-rw-r--r--tests/auto/widgets/widgets/qkeysequenceedit/CMakeLists.txt1
-rw-r--r--tests/auto/widgets/widgets/qlabel/CMakeLists.txt6
-rw-r--r--tests/auto/widgets/widgets/qlcdnumber/CMakeLists.txt1
-rw-r--r--tests/auto/widgets/widgets/qlineedit/CMakeLists.txt9
-rw-r--r--tests/auto/widgets/widgets/qmainwindow/CMakeLists.txt1
-rw-r--r--tests/auto/widgets/widgets/qmdiarea/CMakeLists.txt14
-rw-r--r--tests/auto/widgets/widgets/qmdisubwindow/CMakeLists.txt7
-rw-r--r--tests/auto/widgets/widgets/qmenu/CMakeLists.txt13
-rw-r--r--tests/auto/widgets/widgets/qmenubar/CMakeLists.txt6
-rw-r--r--tests/auto/widgets/widgets/qopenglwidget/CMakeLists.txt6
-rw-r--r--tests/auto/widgets/widgets/qplaintextedit/CMakeLists.txt7
-rw-r--r--tests/auto/widgets/widgets/qprogressbar/CMakeLists.txt1
-rw-r--r--tests/auto/widgets/widgets/qpushbutton/CMakeLists.txt1
-rw-r--r--tests/auto/widgets/widgets/qradiobutton/CMakeLists.txt1
-rw-r--r--tests/auto/widgets/widgets/qscrollarea/CMakeLists.txt1
-rw-r--r--tests/auto/widgets/widgets/qscrollbar/CMakeLists.txt1
-rw-r--r--tests/auto/widgets/widgets/qsizegrip/CMakeLists.txt1
-rw-r--r--tests/auto/widgets/widgets/qslider/CMakeLists.txt1
-rw-r--r--tests/auto/widgets/widgets/qspinbox/CMakeLists.txt1
-rw-r--r--tests/auto/widgets/widgets/qsplashscreen/CMakeLists.txt1
-rw-r--r--tests/auto/widgets/widgets/qsplitter/CMakeLists.txt1
-rw-r--r--tests/auto/widgets/widgets/qstackedwidget/CMakeLists.txt1
-rw-r--r--tests/auto/widgets/widgets/qstatusbar/CMakeLists.txt1
-rw-r--r--tests/auto/widgets/widgets/qtabbar/CMakeLists.txt1
-rw-r--r--tests/auto/widgets/widgets/qtabwidget/CMakeLists.txt3
-rw-r--r--tests/auto/widgets/widgets/qtextbrowser/CMakeLists.txt3
-rw-r--r--tests/auto/widgets/widgets/qtextedit/CMakeLists.txt8
-rw-r--r--tests/auto/widgets/widgets/qtoolbar/CMakeLists.txt1
-rw-r--r--tests/auto/widgets/widgets/qtoolbox/CMakeLists.txt1
-rw-r--r--tests/auto/widgets/widgets/qtoolbutton/CMakeLists.txt1
-rw-r--r--tests/benchmarks/corelib/io/qdir/10000/CMakeLists.txt1
-rw-r--r--tests/benchmarks/corelib/io/qprocess/test/CMakeLists.txt5
-rw-r--r--tests/benchmarks/corelib/kernel/events/CMakeLists.txt1
-rw-r--r--tests/benchmarks/corelib/kernel/qcoreapplication/CMakeLists.txt1
-rw-r--r--tests/benchmarks/corelib/kernel/qmetatype/CMakeLists.txt1
-rw-r--r--tests/benchmarks/corelib/mimetypes/qmimedatabase/CMakeLists.txt1
-rw-r--r--tests/benchmarks/corelib/plugin/quuid/CMakeLists.txt1
-rw-r--r--tests/benchmarks/corelib/thread/qmutex/CMakeLists.txt1
-rw-r--r--tests/benchmarks/corelib/thread/qthreadpool/CMakeLists.txt1
-rw-r--r--tests/benchmarks/corelib/thread/qthreadstorage/CMakeLists.txt1
-rw-r--r--tests/benchmarks/corelib/thread/qwaitcondition/CMakeLists.txt1
-rw-r--r--tests/benchmarks/corelib/tools/containers-associative/CMakeLists.txt1
-rw-r--r--tests/benchmarks/corelib/tools/containers-sequential/CMakeLists.txt1
-rw-r--r--tests/benchmarks/corelib/tools/qalgorithms/CMakeLists.txt1
-rw-r--r--tests/benchmarks/corelib/tools/qchar/CMakeLists.txt1
-rw-r--r--tests/benchmarks/corelib/tools/qdatetime/CMakeLists.txt1
-rw-r--r--tests/benchmarks/corelib/tools/qlist/CMakeLists.txt1
-rw-r--r--tests/benchmarks/corelib/tools/qlocale/CMakeLists.txt1
-rw-r--r--tests/benchmarks/corelib/tools/qstring/CMakeLists.txt1
-rw-r--r--tests/benchmarks/corelib/tools/qtimezone/CMakeLists.txt1
-rw-r--r--tests/benchmarks/gui/image/blendbench/CMakeLists.txt3
-rw-r--r--tests/benchmarks/gui/image/qimagescale/CMakeLists.txt3
-rw-r--r--tests/benchmarks/gui/image/qpixmapcache/CMakeLists.txt3
-rw-r--r--tests/benchmarks/gui/kernel/qguimetatype/CMakeLists.txt3
-rw-r--r--tests/benchmarks/gui/kernel/qguivariant/CMakeLists.txt3
-rw-r--r--tests/benchmarks/gui/math3d/qmatrix4x4/CMakeLists.txt3
-rw-r--r--tests/benchmarks/gui/math3d/qquaternion/CMakeLists.txt3
-rw-r--r--tests/benchmarks/gui/painting/qtransform/CMakeLists.txt3
-rw-r--r--tests/benchmarks/gui/text/qfontmetrics/CMakeLists.txt3
-rw-r--r--tests/manual/CMakeLists.txt92
-rw-r--r--tests/manual/qcursor/childwindow/CMakeLists.txt5
-rw-r--r--tests/manual/qmetatype/CMakeLists.txt5
-rw-r--r--tests/manual/qopenglwindow/multiwindow/CMakeLists.txt3
-rw-r--r--util/cmake/Pipfile14
-rwxr-xr-xutil/cmake/cmakeconversionrate.py127
-rwxr-xr-xutil/cmake/configurejson2cmake.py860
-rwxr-xr-xutil/cmake/generate_module_map.sh38
-rw-r--r--util/cmake/helper.py206
-rwxr-xr-xutil/cmake/pro2cmake.py736
-rwxr-xr-xutil/cmake/run_pro2cmake.py44
-rw-r--r--util/cmake/tests/__init__.py0
-rw-r--r--util/cmake/tests/data/complex_values.pro22
-rw-r--r--util/cmake/tests/data/definetest.pro6
-rw-r--r--util/cmake/tests/data/else.pro6
-rw-r--r--util/cmake/tests/data/else2.pro4
-rw-r--r--util/cmake/tests/data/else3.pro7
-rw-r--r--util/cmake/tests/data/else4.pro6
-rw-r--r--util/cmake/tests/data/else5.pro10
-rw-r--r--util/cmake/tests/data/else6.pro11
-rw-r--r--util/cmake/tests/data/else7.pro2
-rw-r--r--util/cmake/tests/data/else8.pro5
-rw-r--r--util/cmake/tests/data/function_if.pro4
-rw-r--r--util/cmake/tests/data/include.pro3
-rw-r--r--util/cmake/tests/data/load.pro3
-rw-r--r--util/cmake/tests/data/quoted.pro5
-rw-r--r--util/cmake/tests/data/unset.pro2
-rwxr-xr-xutil/cmake/tests/test_parsing.py162
525 files changed, 15211 insertions, 61 deletions
diff --git a/.gitignore b/.gitignore
index f133a2124e..9461e0bb7b 100644
--- a/.gitignore
+++ b/.gitignore
@@ -36,6 +36,8 @@
qt*-config.h
qt*-config_p.h
qt*-config.pri
+*.pyc
+.mypy_cache
/include/
diff --git a/CMakeLists.txt b/CMakeLists.txt
new file mode 100644
index 0000000000..0030bc5662
--- /dev/null
+++ b/CMakeLists.txt
@@ -0,0 +1,43 @@
+cmake_minimum_required(VERSION 3.12.0)
+
+project(QtBase
+ VERSION 5.12.0
+ DESCRIPTION "Qt Base Libraries"
+ HOMEPAGE_URL "https://qt.io/"
+ LANGUAGES CXX C
+)
+
+## Add some paths to check for cmake modules:
+list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake;${CMAKE_CURRENT_SOURCE_DIR}/cmake/3rdparty/extra-cmake-modules/find-modules;${CMAKE_CURRENT_SOURCE_DIR}/cmake/3rdparty/kwin")
+
+## Qt specific setup common for all modules:
+include(QtSetup)
+
+## Enable feature summary at the end of the configure run:
+include(FeatureSummary)
+
+## QtBase specific configure tests:
+include(QtBaseConfigureTests)
+
+## Targets for global features, etc.:
+include(QtBaseGlobalTargets)
+
+## Should this Qt be static or dynamically linked?
+option(BUILD_SHARED_LIBS "Build Qt statically or dynamically" ON)
+set(QT_BUILD_SHARED_LIBS ${BUILD_SHARED_LIBS})
+
+## Visit all the directories:
+add_subdirectory(src)
+
+if (BUILD_TESTING)
+ add_subdirectory(tests)
+endif()
+
+add_subdirectory(qmake)
+add_subdirectory(examples)
+
+## Delayed actions on some of the Qt targets:
+include(QtPostProcess)
+
+## Print a feature summary:
+feature_summary(WHAT PACKAGES_FOUND PACKAGES_NOT_FOUND FATAL_ON_MISSING_REQUIRED_PACKAGES)
diff --git a/cmake/3rdparty/extra-cmake-modules/COPYING-CMAKE-SCRIPTS b/cmake/3rdparty/extra-cmake-modules/COPYING-CMAKE-SCRIPTS
new file mode 100644
index 0000000000..4b417765f3
--- /dev/null
+++ b/cmake/3rdparty/extra-cmake-modules/COPYING-CMAKE-SCRIPTS
@@ -0,0 +1,22 @@
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+
+1. Redistributions of source code must retain the copyright
+ notice, this list of conditions and the following disclaimer.
+2. Redistributions in binary form must reproduce the copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+3. The name of the author may not be used to endorse or promote products
+ derived from this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
+INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
diff --git a/cmake/3rdparty/extra-cmake-modules/find-modules/ECMFindModuleHelpersStub.cmake b/cmake/3rdparty/extra-cmake-modules/find-modules/ECMFindModuleHelpersStub.cmake
new file mode 100644
index 0000000000..bb8c9a62fc
--- /dev/null
+++ b/cmake/3rdparty/extra-cmake-modules/find-modules/ECMFindModuleHelpersStub.cmake
@@ -0,0 +1 @@
+include(${CMAKE_CURRENT_LIST_DIR}/../modules/ECMFindModuleHelpers.cmake)
diff --git a/cmake/3rdparty/extra-cmake-modules/find-modules/FindWayland.cmake b/cmake/3rdparty/extra-cmake-modules/find-modules/FindWayland.cmake
new file mode 100644
index 0000000000..233cc88d02
--- /dev/null
+++ b/cmake/3rdparty/extra-cmake-modules/find-modules/FindWayland.cmake
@@ -0,0 +1,143 @@
+#.rst:
+# FindWayland
+# -----------
+#
+# Try to find Wayland.
+#
+# This is a component-based find module, which makes use of the COMPONENTS
+# and OPTIONAL_COMPONENTS arguments to find_module. The following components
+# are available::
+#
+# Client Server Cursor Egl
+#
+# If no components are specified, this module will act as though all components
+# were passed to OPTIONAL_COMPONENTS.
+#
+# This module will define the following variables, independently of the
+# components searched for or found:
+#
+# ``Wayland_FOUND``
+# TRUE if (the requested version of) Wayland is available
+# ``Wayland_VERSION``
+# Found Wayland version
+# ``Wayland_TARGETS``
+# A list of all targets imported by this module (note that there may be more
+# than the components that were requested)
+# ``Wayland_LIBRARIES``
+# This can be passed to target_link_libraries() instead of the imported
+# targets
+# ``Wayland_INCLUDE_DIRS``
+# This should be passed to target_include_directories() if the targets are
+# not used for linking
+# ``Wayland_DEFINITIONS``
+# This should be passed to target_compile_options() if the targets are not
+# used for linking
+#
+# For each searched-for components, ``Wayland_<component>_FOUND`` will be set to
+# TRUE if the corresponding Wayland library was found, and FALSE otherwise. If
+# ``Wayland_<component>_FOUND`` is TRUE, the imported target
+# ``Wayland::<component>`` will be defined. This module will also attempt to
+# determine ``Wayland_*_VERSION`` variables for each imported target, although
+# ``Wayland_VERSION`` should normally be sufficient.
+#
+# In general we recommend using the imported targets, as they are easier to use
+# and provide more control. Bear in mind, however, that if any target is in the
+# link interface of an exported library, it must be made available by the
+# package config file.
+#
+# Since pre-1.0.0.
+
+#=============================================================================
+# Copyright 2014 Alex Merry <alex.merry@kde.org>
+# Copyright 2014 Martin Gräßlin <mgraesslin@kde.org>
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+#
+# 1. Redistributions of source code must retain the copyright
+# notice, this list of conditions and the following disclaimer.
+# 2. Redistributions in binary form must reproduce the copyright
+# notice, this list of conditions and the following disclaimer in the
+# documentation and/or other materials provided with the distribution.
+# 3. The name of the author may not be used to endorse or promote products
+# derived from this software without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+# IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
+# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+#=============================================================================
+
+include(${CMAKE_CURRENT_LIST_DIR}/ECMFindModuleHelpersStub.cmake)
+
+ecm_find_package_version_check(Wayland)
+
+set(Wayland_known_components
+ Client
+ Server
+ Cursor
+ Egl
+)
+foreach(_comp ${Wayland_known_components})
+ string(TOLOWER "${_comp}" _lc_comp)
+ set(Wayland_${_comp}_component_deps)
+ set(Wayland_${_comp}_pkg_config "wayland-${_lc_comp}")
+ set(Wayland_${_comp}_lib "wayland-${_lc_comp}")
+ set(Wayland_${_comp}_header "wayland-${_lc_comp}.h")
+endforeach()
+set(Wayland_Egl_component_deps Client)
+
+ecm_find_package_parse_components(Wayland
+ RESULT_VAR Wayland_components
+ KNOWN_COMPONENTS ${Wayland_known_components}
+)
+ecm_find_package_handle_library_components(Wayland
+ COMPONENTS ${Wayland_components}
+)
+
+# If pkg-config didn't provide us with version information,
+# try to extract it from wayland-version.h
+# (Note that the version from wayland-egl.pc will probably be
+# the Mesa version, rather than the Wayland version, but that
+# version will be ignored as we always find wayland-client.pc
+# first).
+if(NOT Wayland_VERSION)
+ find_file(Wayland_VERSION_HEADER
+ NAMES wayland-version.h
+ HINTS ${Wayland_INCLUDE_DIRS}
+ )
+ mark_as_advanced(Wayland_VERSION_HEADER)
+ if(Wayland_VERSION_HEADER)
+ file(READ ${Wayland_VERSION_HEADER} _wayland_version_header_contents)
+ string(REGEX REPLACE
+ "^.*[ \t]+WAYLAND_VERSION[ \t]+\"([0-9.]*)\".*$"
+ "\\1"
+ Wayland_VERSION
+ "${_wayland_version_header_contents}"
+ )
+ unset(_wayland_version_header_contents)
+ endif()
+endif()
+
+find_package_handle_standard_args(Wayland
+ FOUND_VAR
+ Wayland_FOUND
+ REQUIRED_VARS
+ Wayland_LIBRARIES
+ VERSION_VAR
+ Wayland_VERSION
+ HANDLE_COMPONENTS
+)
+
+include(FeatureSummary)
+set_package_properties(Wayland PROPERTIES
+ URL "http://wayland.freedesktop.org"
+ DESCRIPTION "C library implementation of the Wayland protocol: a protocol for a compositor to talk to its clients"
+)
diff --git a/cmake/3rdparty/extra-cmake-modules/find-modules/FindX11_XCB.cmake b/cmake/3rdparty/extra-cmake-modules/find-modules/FindX11_XCB.cmake
new file mode 100644
index 0000000000..dd55fd7b30
--- /dev/null
+++ b/cmake/3rdparty/extra-cmake-modules/find-modules/FindX11_XCB.cmake
@@ -0,0 +1,118 @@
+#.rst:
+# FindX11_XCB
+# -----------
+#
+# Try to find the X11 XCB compatibility library.
+#
+# This will define the following variables:
+#
+# ``X11_XCB_FOUND``
+# True if (the requested version of) libX11-xcb is available
+# ``X11_XCB_VERSION``
+# The version of libX11-xcb (this is not guaranteed to be set even when
+# X11_XCB_FOUND is true)
+# ``X11_XCB_LIBRARIES``
+# This can be passed to target_link_libraries() instead of the ``EGL::EGL``
+# target
+# ``X11_XCB_INCLUDE_DIR``
+# This should be passed to target_include_directories() if the target is not
+# used for linking
+# ``X11_XCB_DEFINITIONS``
+# This should be passed to target_compile_options() if the target is not
+# used for linking
+#
+# If ``X11_XCB_FOUND`` is TRUE, it will also define the following imported
+# target:
+#
+# ``X11::XCB``
+# The X11 XCB compatibility library
+#
+# In general we recommend using the imported target, as it is easier to use.
+# Bear in mind, however, that if the target is in the link interface of an
+# exported library, it must be made available by the package config file.
+#
+# Since pre-1.0.0.
+
+#=============================================================================
+# Copyright 2014 Alex Merry <alex.merry@kde.org>
+# Copyright 2011 Fredrik Höglund <fredrik@kde.org>
+# Copyright 2008 Helio Chissini de Castro <helio@kde.org>
+# Copyright 2007 Matthias Kretz <kretz@kde.org>
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+#
+# 1. Redistributions of source code must retain the copyright
+# notice, this list of conditions and the following disclaimer.
+# 2. Redistributions in binary form must reproduce the copyright
+# notice, this list of conditions and the following disclaimer in the
+# documentation and/or other materials provided with the distribution.
+# 3. The name of the author may not be used to endorse or promote products
+# derived from this software without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+# IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
+# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+#=============================================================================
+
+include(${CMAKE_CURRENT_LIST_DIR}/ECMFindModuleHelpersStub.cmake)
+
+ecm_find_package_version_check(X11_XCB)
+
+# use pkg-config to get the directories and then use these values
+# in the FIND_PATH() and FIND_LIBRARY() calls
+find_package(PkgConfig)
+pkg_check_modules(PKG_X11_XCB QUIET x11-xcb)
+
+set(X11_XCB_DEFINITIONS ${PKG_X11_XCB_CFLAGS_OTHER})
+set(X11_XCB_VERSION ${PKG_X11_XCB_VERSION})
+
+find_path(X11_XCB_INCLUDE_DIR
+ NAMES X11/Xlib-xcb.h
+ HINTS ${PKG_X11_XCB_INCLUDE_DIRS}
+)
+find_library(X11_XCB_LIBRARY
+ NAMES X11-xcb
+ HINTS ${PKG_X11_XCB_LIBRARY_DIRS}
+)
+
+include(FindPackageHandleStandardArgs)
+find_package_handle_standard_args(X11_XCB
+ FOUND_VAR
+ X11_XCB_FOUND
+ REQUIRED_VARS
+ X11_XCB_LIBRARY
+ X11_XCB_INCLUDE_DIR
+ VERSION_VAR
+ X11_XCB_VERSION
+)
+
+if(X11_XCB_FOUND AND NOT TARGET X11::XCB)
+ add_library(X11::XCB UNKNOWN IMPORTED)
+ set_target_properties(X11::XCB PROPERTIES
+ IMPORTED_LOCATION "${X11_XCB_LIBRARY}"
+ INTERFACE_COMPILE_OPTIONS "${X11_XCB_DEFINITIONS}"
+ INTERFACE_INCLUDE_DIRECTORIES "${X11_XCB_INCLUDE_DIR}"
+ )
+endif()
+
+mark_as_advanced(X11_XCB_INCLUDE_DIR X11_XCB_LIBRARY)
+
+# compatibility variables
+set(X11_XCB_LIBRARIES ${X11_XCB_LIBRARY})
+set(X11_XCB_INCLUDE_DIRS ${X11_XCB_INCLUDE_DIR})
+set(X11_XCB_VERSION_STRING ${X11_XCB_VERSION})
+
+include(FeatureSummary)
+set_package_properties(X11_XCB PROPERTIES
+ URL "http://xorg.freedesktop.org/"
+ DESCRIPTION "A compatibility library for code that translates Xlib API calls into XCB calls"
+)
diff --git a/cmake/3rdparty/extra-cmake-modules/find-modules/FindXCB.cmake b/cmake/3rdparty/extra-cmake-modules/find-modules/FindXCB.cmake
new file mode 100644
index 0000000000..d530d2d7f4
--- /dev/null
+++ b/cmake/3rdparty/extra-cmake-modules/find-modules/FindXCB.cmake
@@ -0,0 +1,201 @@
+#.rst:
+# FindXCB
+# -------
+#
+# Try to find XCB.
+#
+# This is a component-based find module, which makes use of the COMPONENTS and
+# OPTIONAL_COMPONENTS arguments to find_module. The following components are
+# available::
+#
+# XCB
+# ATOM AUX COMPOSITE CURSOR DAMAGE
+# DPMS DRI2 DRI3 EVENT EWMH
+# GLX ICCCM IMAGE KEYSYMS PRESENT
+# RANDR RECORD RENDER RENDERUTIL RES
+# SCREENSAVER SHAPE SHM SYNC UTIL
+# XEVIE XF86DRI XFIXES XINERAMA XINPUT
+# XKB XPRINT XTEST XV XVMC
+#
+# If no components are specified, this module will act as though all components
+# except XINPUT (which is considered unstable) were passed to
+# OPTIONAL_COMPONENTS.
+#
+# This module will define the following variables, independently of the
+# components searched for or found:
+#
+# ``XCB_FOUND``
+# True if (the requestion version of) xcb is available
+# ``XCB_VERSION``
+# Found xcb version
+# ``XCB_TARGETS``
+# A list of all targets imported by this module (note that there may be more
+# than the components that were requested)
+# ``XCB_LIBRARIES``
+# This can be passed to target_link_libraries() instead of the imported
+# targets
+# ``XCB_INCLUDE_DIRS``
+# This should be passed to target_include_directories() if the targets are
+# not used for linking
+# ``XCB_DEFINITIONS``
+# This should be passed to target_compile_options() if the targets are not
+# used for linking
+#
+# For each searched-for components, ``XCB_<component>_FOUND`` will be set to
+# true if the corresponding xcb library was found, and false otherwise. If
+# ``XCB_<component>_FOUND`` is true, the imported target ``XCB::<component>``
+# will be defined. This module will also attempt to determine
+# ``XCB_*_VERSION`` variables for each imported target, although
+# ``XCB_VERSION`` should normally be sufficient.
+#
+# In general we recommend using the imported targets, as they are easier to use
+# and provide more control. Bear in mind, however, that if any target is in the
+# link interface of an exported library, it must be made available by the
+# package config file.
+#
+# Since pre-1.0.0.
+
+#=============================================================================
+# Copyright 2011 Fredrik Höglund <fredrik@kde.org>
+# Copyright 2013 Martin Gräßlin <mgraesslin@kde.org>
+# Copyright 2014-2015 Alex Merry <alex.merry@kde.org>
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+#
+# 1. Redistributions of source code must retain the copyright
+# notice, this list of conditions and the following disclaimer.
+# 2. Redistributions in binary form must reproduce the copyright
+# notice, this list of conditions and the following disclaimer in the
+# documentation and/or other materials provided with the distribution.
+# 3. The name of the author may not be used to endorse or promote products
+# derived from this software without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+# IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
+# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+#=============================================================================
+
+include(${CMAKE_CURRENT_LIST_DIR}/ECMFindModuleHelpersStub.cmake)
+
+ecm_find_package_version_check(XCB)
+
+# Note that this list needs to be ordered such that any component
+# appears after its dependencies
+set(XCB_known_components
+ XCB
+ RENDER
+ SHAPE
+ XFIXES
+ SHM
+ ATOM
+ AUX
+ COMPOSITE
+ CURSOR
+ DAMAGE
+ DPMS
+ DRI2
+ DRI3
+ EVENT
+ EWMH
+ GLX
+ ICCCM
+ IMAGE
+ KEYSYMS
+ PRESENT
+ RANDR
+ RECORD
+ RENDERUTIL
+ RES
+ SCREENSAVER
+ SYNC
+ UTIL
+ XEVIE
+ XF86DRI
+ XINERAMA
+ XINPUT
+ XKB
+ XPRINT
+ XTEST
+ XV
+ XVMC
+)
+
+# XINPUT is unstable; do not include it by default
+set(XCB_default_components ${XCB_known_components})
+list(REMOVE_ITEM XCB_default_components "XINPUT")
+
+# default component info: xcb components have fairly predictable
+# header files, library names and pkg-config names
+foreach(_comp ${XCB_known_components})
+ string(TOLOWER "${_comp}" _lc_comp)
+ set(XCB_${_comp}_component_deps XCB)
+ set(XCB_${_comp}_pkg_config "xcb-${_lc_comp}")
+ set(XCB_${_comp}_lib "xcb-${_lc_comp}")
+ set(XCB_${_comp}_header "xcb/${_lc_comp}.h")
+endforeach()
+# exceptions
+set(XCB_XCB_component_deps)
+set(XCB_COMPOSITE_component_deps XCB XFIXES)
+set(XCB_DAMAGE_component_deps XCB XFIXES)
+set(XCB_IMAGE_component_deps XCB SHM)
+set(XCB_RENDERUTIL_component_deps XCB RENDER)
+set(XCB_XFIXES_component_deps XCB RENDER SHAPE)
+set(XCB_XVMC_component_deps XCB XV)
+set(XCB_XV_component_deps XCB SHM)
+set(XCB_XCB_pkg_config "xcb")
+set(XCB_XCB_lib "xcb")
+set(XCB_ATOM_header "xcb/xcb_atom.h")
+set(XCB_ATOM_lib "xcb-util")
+set(XCB_AUX_header "xcb/xcb_aux.h")
+set(XCB_AUX_lib "xcb-util")
+set(XCB_CURSOR_header "xcb/xcb_cursor.h")
+set(XCB_EVENT_header "xcb/xcb_event.h")
+set(XCB_EVENT_lib "xcb-util")
+set(XCB_EWMH_header "xcb/xcb_ewmh.h")
+set(XCB_ICCCM_header "xcb/xcb_icccm.h")
+set(XCB_IMAGE_header "xcb/xcb_image.h")
+set(XCB_KEYSYMS_header "xcb/xcb_keysyms.h")
+set(XCB_PIXEL_header "xcb/xcb_pixel.h")
+set(XCB_RENDERUTIL_header "xcb/xcb_renderutil.h")
+set(XCB_RENDERUTIL_lib "xcb-render-util")
+set(XCB_UTIL_header "xcb/xcb_util.h")
+
+ecm_find_package_parse_components(XCB
+ RESULT_VAR XCB_components
+ KNOWN_COMPONENTS ${XCB_known_components}
+ DEFAULT_COMPONENTS ${XCB_default_components}
+)
+
+list(FIND XCB_components "XINPUT" _XCB_XINPUT_index)
+if (NOT _XCB_XINPUT_index EQUAL -1)
+ message(AUTHOR_WARNING "XINPUT from XCB was requested: this is EXPERIMENTAL and is likely to unavailable on many systems!")
+endif()
+
+ecm_find_package_handle_library_components(XCB
+ COMPONENTS ${XCB_components}
+)
+
+find_package_handle_standard_args(XCB
+ FOUND_VAR
+ XCB_FOUND
+ REQUIRED_VARS
+ XCB_LIBRARIES
+ VERSION_VAR
+ XCB_VERSION
+ HANDLE_COMPONENTS
+)
+
+include(FeatureSummary)
+set_package_properties(XCB PROPERTIES
+ URL "http://xcb.freedesktop.org"
+ DESCRIPTION "X protocol C-language Binding"
+)
diff --git a/cmake/3rdparty/extra-cmake-modules/modules/ECMEnableSanitizers.cmake b/cmake/3rdparty/extra-cmake-modules/modules/ECMEnableSanitizers.cmake
new file mode 100644
index 0000000000..06cc0b66d8
--- /dev/null
+++ b/cmake/3rdparty/extra-cmake-modules/modules/ECMEnableSanitizers.cmake
@@ -0,0 +1,173 @@
+#.rst:
+# ECMEnableSanitizers
+# -------------------
+#
+# Enable compiler sanitizer flags.
+#
+# The following sanitizers are supported:
+#
+# - Address Sanitizer
+# - Memory Sanitizer
+# - Thread Sanitizer
+# - Leak Sanitizer
+# - Undefined Behaviour Sanitizer
+#
+# All of them are implemented in Clang, depending on your version, and
+# there is an work in progress in GCC, where some of them are currently
+# implemented.
+#
+# This module will check your current compiler version to see if it
+# supports the sanitizers that you want to enable
+#
+# Usage
+# =====
+#
+# Simply add::
+#
+# include(ECMEnableSanitizers)
+#
+# to your ``CMakeLists.txt``. Note that this module is included in
+# KDECompilerSettings, so projects using that module do not need to also
+# include this one.
+#
+# The sanitizers are not enabled by default. Instead, you must set
+# ``ECM_ENABLE_SANITIZERS`` (either in your ``CMakeLists.txt`` or on the
+# command line) to a semicolon-separated list of sanitizers you wish to enable.
+# The options are:
+#
+# - address
+# - memory
+# - thread
+# - leak
+# - undefined
+#
+# The sanitizers "address", "memory" and "thread" are mutually exclusive. You
+# cannot enable two of them in the same build.
+#
+# "leak" requires the "address" sanitizer.
+#
+# .. note::
+#
+# To reduce the overhead induced by the instrumentation of the sanitizers, it
+# is advised to enable compiler optimizations (``-O1`` or higher).
+#
+# Example
+# =======
+#
+# This is an example of usage::
+#
+# mkdir build
+# cd build
+# cmake -DECM_ENABLE_SANITIZERS='address;leak;undefined' ..
+#
+# .. note::
+#
+# Most of the sanitizers will require Clang. To enable it, use::
+#
+# -DCMAKE_CXX_COMPILER=clang++
+#
+# Since 1.3.0.
+
+#=============================================================================
+# Copyright 2014 Mathieu Tarral <mathieu.tarral@gmail.com>
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+#
+# 1. Redistributions of source code must retain the copyright
+# notice, this list of conditions and the following disclaimer.
+# 2. Redistributions in binary form must reproduce the copyright
+# notice, this list of conditions and the following disclaimer in the
+# documentation and/or other materials provided with the distribution.
+# 3. The name of the author may not be used to endorse or promote products
+# derived from this software without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+# IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
+# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+# MACRO check_compiler_version
+#-----------------------------
+macro (check_compiler_version gcc_required_version clang_required_version)
+ if (
+ (
+ CMAKE_CXX_COMPILER_ID MATCHES "GNU"
+ AND
+ CMAKE_CXX_COMPILER_VERSION VERSION_LESS ${gcc_required_version}
+ )
+ OR
+ (
+ CMAKE_CXX_COMPILER_ID MATCHES "Clang"
+ AND
+ CMAKE_CXX_COMPILER_VERSION VERSION_LESS ${clang_required_version}
+ )
+ )
+ # error !
+ message(FATAL_ERROR "You ask to enable the sanitizer ${CUR_SANITIZER},
+ but your compiler ${CMAKE_CXX_COMPILER_ID} version ${CMAKE_CXX_COMPILER_VERSION}
+ does not support it !
+ You should use at least GCC ${gcc_required_version} or Clang ${clang_required_version}
+ (99.99 means not implemented yet)")
+ endif ()
+endmacro ()
+
+# MACRO check_compiler_support
+#------------------------------
+macro (enable_sanitizer_flags sanitize_option)
+ if (${sanitize_option} MATCHES "address")
+ check_compiler_version("4.8" "3.1")
+ set(XSAN_COMPILE_FLAGS "-fsanitize=address -fno-omit-frame-pointer -fno-optimize-sibling-calls")
+ set(XSAN_LINKER_FLAGS "asan")
+ elseif (${sanitize_option} MATCHES "thread")
+ check_compiler_version("4.8" "3.1")
+ set(XSAN_COMPILE_FLAGS "-fsanitize=thread")
+ set(XSAN_LINKER_FLAGS "tsan")
+ elseif (${sanitize_option} MATCHES "memory")
+ check_compiler_version("99.99" "3.1")
+ set(XSAN_COMPILE_FLAGS "-fsanitize=memory")
+ elseif (${sanitize_option} MATCHES "leak")
+ check_compiler_version("4.9" "3.4")
+ set(XSAN_COMPILE_FLAGS "-fsanitize=leak")
+ set(XSAN_LINKER_FLAGS "lsan")
+ elseif (${sanitize_option} MATCHES "undefined")
+ check_compiler_version("4.9" "3.1")
+ set(XSAN_COMPILE_FLAGS "-fsanitize=undefined -fno-omit-frame-pointer -fno-optimize-sibling-calls")
+ else ()
+ message(FATAL_ERROR "Compiler sanitizer option \"${sanitize_option}\" not supported.")
+ endif ()
+endmacro ()
+
+if (ECM_ENABLE_SANITIZERS)
+ if (CMAKE_CXX_COMPILER_ID MATCHES "GNU" OR CMAKE_CXX_COMPILER_ID MATCHES "Clang")
+ # for each element of the ECM_ENABLE_SANITIZERS list
+ foreach ( CUR_SANITIZER ${ECM_ENABLE_SANITIZERS} )
+ # lowercase filter
+ string(TOLOWER ${CUR_SANITIZER} CUR_SANITIZER)
+ # check option and enable appropriate flags
+ enable_sanitizer_flags ( ${CUR_SANITIZER} )
+ # TODO: GCC will not link pthread library if enabled ASan
+ if(CMAKE_C_COMPILER_ID MATCHES "Clang")
+ set( CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${XSAN_COMPILE_FLAGS}" )
+ endif()
+ set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${XSAN_COMPILE_FLAGS}" )
+ if(CMAKE_CXX_COMPILER_ID MATCHES "GNU")
+ link_libraries(${XSAN_LINKER_FLAGS})
+ endif()
+ if (CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
+ string(REPLACE "-Wl,--no-undefined" "" CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS}")
+ string(REPLACE "-Wl,--no-undefined" "" CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS}")
+ endif ()
+ endforeach()
+ else()
+ message(STATUS "Tried to enable sanitizers (-DECM_ENABLE_SANITIZERS=${ECM_ENABLE_SANITIZERS}), \
+but compiler (${CMAKE_CXX_COMPILER_ID}) does not have sanitizer support")
+ endif()
+endif()
diff --git a/cmake/3rdparty/extra-cmake-modules/modules/ECMFindModuleHelpers.cmake b/cmake/3rdparty/extra-cmake-modules/modules/ECMFindModuleHelpers.cmake
new file mode 100644
index 0000000000..f2e32f959e
--- /dev/null
+++ b/cmake/3rdparty/extra-cmake-modules/modules/ECMFindModuleHelpers.cmake
@@ -0,0 +1,297 @@
+#.rst:
+# ECMFindModuleHelpers
+# --------------------
+#
+# Helper macros for find modules: ecm_find_package_version_check(),
+# ecm_find_package_parse_components() and
+# ecm_find_package_handle_library_components().
+#
+# ::
+#
+# ecm_find_package_version_check(<name>)
+#
+# Prints warnings if the CMake version or the project's required CMake version
+# is older than that required by extra-cmake-modules.
+#
+# ::
+#
+# ecm_find_package_parse_components(<name>
+# RESULT_VAR <variable>
+# KNOWN_COMPONENTS <component1> [<component2> [...]]
+# [SKIP_DEPENDENCY_HANDLING])
+#
+# This macro will populate <variable> with a list of components found in
+# <name>_FIND_COMPONENTS, after checking that all those components are in the
+# list of KNOWN_COMPONENTS; if there are any unknown components, it will print
+# an error or warning (depending on the value of <name>_FIND_REQUIRED) and call
+# return().
+#
+# The order of components in <variable> is guaranteed to match the order they
+# are listed in the KNOWN_COMPONENTS argument.
+#
+# If SKIP_DEPENDENCY_HANDLING is not set, for each component the variable
+# <name>_<component>_component_deps will be checked for dependent components.
+# If <component> is listed in <name>_FIND_COMPONENTS, then all its (transitive)
+# dependencies will also be added to <variable>.
+#
+# ::
+#
+# ecm_find_package_handle_library_components(<name>
+# COMPONENTS <component> [<component> [...]]
+# [SKIP_DEPENDENCY_HANDLING])
+# [SKIP_PKG_CONFIG])
+#
+# Creates an imported library target for each component. The operation of this
+# macro depends on the presence of a number of CMake variables.
+#
+# The <name>_<component>_lib variable should contain the name of this library,
+# and <name>_<component>_header variable should contain the name of a header
+# file associated with it (whatever relative path is normally passed to
+# '#include'). <name>_<component>_header_subdir variable can be used to specify
+# which subdirectory of the include path the headers will be found in.
+# ecm_find_package_components() will then search for the library
+# and include directory (creating appropriate cache variables) and create an
+# imported library target named <name>::<component>.
+#
+# Additional variables can be used to provide additional information:
+#
+# If SKIP_PKG_CONFIG, the <name>_<component>_pkg_config variable is set, and
+# pkg-config is found, the pkg-config module given by
+# <name>_<component>_pkg_config will be searched for and used to help locate the
+# library and header file. It will also be used to set
+# <name>_<component>_VERSION.
+#
+# Note that if version information is found via pkg-config,
+# <name>_<component>_FIND_VERSION can be set to require a particular version
+# for each component.
+#
+# If SKIP_DEPENDENCY_HANDLING is not set, the INTERFACE_LINK_LIBRARIES property
+# of the imported target for <component> will be set to contain the imported
+# targets for the components listed in <name>_<component>_component_deps.
+# <component>_FOUND will also be set to false if any of the compoments in
+# <name>_<component>_component_deps are not found. This requires the components
+# in <name>_<component>_component_deps to be listed before <component> in the
+# COMPONENTS argument.
+#
+# The following variables will be set:
+#
+# ``<name>_TARGETS``
+# the imported targets
+# ``<name>_LIBRARIES``
+# the found libraries
+# ``<name>_INCLUDE_DIRS``
+# the combined required include directories for the components
+# ``<name>_DEFINITIONS``
+# the "other" CFLAGS provided by pkg-config, if any
+# ``<name>_VERSION``
+# the value of ``<name>_<component>_VERSION`` for the first component that
+# has this variable set (note that components are searched for in the order
+# they are passed to the macro), although if it is already set, it will not
+# be altered
+#
+# Note that these variables are never cleared, so if
+# ecm_find_package_handle_library_components() is called multiple times with
+# different components (typically because of multiple find_package() calls) then
+# ``<name>_TARGETS``, for example, will contain all the targets found in any
+# call (although no duplicates).
+#
+# Since pre-1.0.0.
+
+#=============================================================================
+# Copyright 2014 Alex Merry <alex.merry@kde.org>
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+#
+# 1. Redistributions of source code must retain the copyright
+# notice, this list of conditions and the following disclaimer.
+# 2. Redistributions in binary form must reproduce the copyright
+# notice, this list of conditions and the following disclaimer in the
+# documentation and/or other materials provided with the distribution.
+# 3. The name of the author may not be used to endorse or promote products
+# derived from this software without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+# IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
+# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+include(CMakeParseArguments)
+
+macro(ecm_find_package_version_check module_name)
+ if(CMAKE_VERSION VERSION_LESS 2.8.12)
+ message(FATAL_ERROR "CMake 2.8.12 is required by Find${module_name}.cmake")
+ endif()
+ if(CMAKE_MINIMUM_REQUIRED_VERSION VERSION_LESS 2.8.12)
+ message(AUTHOR_WARNING "Your project should require at least CMake 2.8.12 to use Find${module_name}.cmake")
+ endif()
+endmacro()
+
+macro(ecm_find_package_parse_components module_name)
+ set(ecm_fppc_options SKIP_DEPENDENCY_HANDLING)
+ set(ecm_fppc_oneValueArgs RESULT_VAR)
+ set(ecm_fppc_multiValueArgs KNOWN_COMPONENTS DEFAULT_COMPONENTS)
+ cmake_parse_arguments(ECM_FPPC "${ecm_fppc_options}" "${ecm_fppc_oneValueArgs}" "${ecm_fppc_multiValueArgs}" ${ARGN})
+
+ if(ECM_FPPC_UNPARSED_ARGUMENTS)
+ message(FATAL_ERROR "Unexpected arguments to ecm_find_package_parse_components: ${ECM_FPPC_UNPARSED_ARGUMENTS}")
+ endif()
+ if(NOT ECM_FPPC_RESULT_VAR)
+ message(FATAL_ERROR "Missing RESULT_VAR argument to ecm_find_package_parse_components")
+ endif()
+ if(NOT ECM_FPPC_KNOWN_COMPONENTS)
+ message(FATAL_ERROR "Missing KNOWN_COMPONENTS argument to ecm_find_package_parse_components")
+ endif()
+ if(NOT ECM_FPPC_DEFAULT_COMPONENTS)
+ set(ECM_FPPC_DEFAULT_COMPONENTS ${ECM_FPPC_KNOWN_COMPONENTS})
+ endif()
+
+ if(${module_name}_FIND_COMPONENTS)
+ set(ecm_fppc_requestedComps ${${module_name}_FIND_COMPONENTS})
+
+ if(NOT ECM_FPPC_SKIP_DEPENDENCY_HANDLING)
+ # Make sure deps are included
+ foreach(ecm_fppc_comp ${ecm_fppc_requestedComps})
+ foreach(ecm_fppc_dep_comp ${${module_name}_${ecm_fppc_comp}_component_deps})
+ list(FIND ecm_fppc_requestedComps "${ecm_fppc_dep_comp}" ecm_fppc_index)
+ if("${ecm_fppc_index}" STREQUAL "-1")
+ if(NOT ${module_name}_FIND_QUIETLY)
+ message(STATUS "${module_name}: ${ecm_fppc_comp} requires ${${module_name}_${ecm_fppc_comp}_component_deps}")
+ endif()
+ list(APPEND ecm_fppc_requestedComps "${ecm_fppc_dep_comp}")
+ endif()
+ endforeach()
+ endforeach()
+ else()
+ message(STATUS "Skipping dependency handling for ${module_name}")
+ endif()
+ list(REMOVE_DUPLICATES ecm_fppc_requestedComps)
+
+ # This makes sure components are listed in the same order as
+ # KNOWN_COMPONENTS (potentially important for inter-dependencies)
+ set(${ECM_FPPC_RESULT_VAR})
+ foreach(ecm_fppc_comp ${ECM_FPPC_KNOWN_COMPONENTS})
+ list(FIND ecm_fppc_requestedComps "${ecm_fppc_comp}" ecm_fppc_index)
+ if(NOT "${ecm_fppc_index}" STREQUAL "-1")
+ list(APPEND ${ECM_FPPC_RESULT_VAR} "${ecm_fppc_comp}")
+ list(REMOVE_AT ecm_fppc_requestedComps ${ecm_fppc_index})
+ endif()
+ endforeach()
+ # if there are any left, they are unknown components
+ if(ecm_fppc_requestedComps)
+ set(ecm_fppc_msgType STATUS)
+ if(${module_name}_FIND_REQUIRED)
+ set(ecm_fppc_msgType FATAL_ERROR)
+ endif()
+ if(NOT ${module_name}_FIND_QUIETLY)
+ message(${ecm_fppc_msgType} "${module_name}: requested unknown components ${ecm_fppc_requestedComps}")
+ endif()
+ return()
+ endif()
+ else()
+ set(${ECM_FPPC_RESULT_VAR} ${ECM_FPPC_DEFAULT_COMPONENTS})
+ endif()
+endmacro()
+
+macro(ecm_find_package_handle_library_components module_name)
+ set(ecm_fpwc_options SKIP_PKG_CONFIG SKIP_DEPENDENCY_HANDLING)
+ set(ecm_fpwc_oneValueArgs)
+ set(ecm_fpwc_multiValueArgs COMPONENTS)
+ cmake_parse_arguments(ECM_FPWC "${ecm_fpwc_options}" "${ecm_fpwc_oneValueArgs}" "${ecm_fpwc_multiValueArgs}" ${ARGN})
+
+ if(ECM_FPWC_UNPARSED_ARGUMENTS)
+ message(FATAL_ERROR "Unexpected arguments to ecm_find_package_handle_components: ${ECM_FPWC_UNPARSED_ARGUMENTS}")
+ endif()
+ if(NOT ECM_FPWC_COMPONENTS)
+ message(FATAL_ERROR "Missing COMPONENTS argument to ecm_find_package_handle_components")
+ endif()
+
+ include(FindPackageHandleStandardArgs)
+ find_package(PkgConfig)
+ foreach(ecm_fpwc_comp ${ECM_FPWC_COMPONENTS})
+ set(ecm_fpwc_dep_vars)
+ set(ecm_fpwc_dep_targets)
+ if(NOT SKIP_DEPENDENCY_HANDLING)
+ foreach(ecm_fpwc_dep ${${module_name}_${ecm_fpwc_comp}_component_deps})
+ list(APPEND ecm_fpwc_dep_vars "${module_name}_${ecm_fpwc_dep}_FOUND")
+ list(APPEND ecm_fpwc_dep_targets "${module_name}::${ecm_fpwc_dep}")
+ endforeach()
+ endif()
+
+ if(NOT ECM_FPWC_SKIP_PKG_CONFIG AND ${module_name}_${ecm_fpwc_comp}_pkg_config)
+ pkg_check_modules(PKG_${module_name}_${ecm_fpwc_comp} QUIET
+ ${${module_name}_${ecm_fpwc_comp}_pkg_config})
+ endif()
+
+ find_path(${module_name}_${ecm_fpwc_comp}_INCLUDE_DIR
+ NAMES ${${module_name}_${ecm_fpwc_comp}_header}
+ HINTS ${PKG_${module_name}_${ecm_fpwc_comp}_INCLUDE_DIRS}
+ PATH_SUFFIXES ${${module_name}_${ecm_fpwc_comp}_header_subdir}
+ )
+ find_library(${module_name}_${ecm_fpwc_comp}_LIBRARY
+ NAMES ${${module_name}_${ecm_fpwc_comp}_lib}
+ HINTS ${PKG_${module_name}_${ecm_fpwc_comp}_LIBRARY_DIRS}
+ )
+
+ set(${module_name}_${ecm_fpwc_comp}_VERSION "${PKG_${module_name}_${ecm_fpwc_comp}_VERSION}")
+ if(NOT ${module_name}_VERSION)
+ set(${module_name}_VERSION ${${module_name}_${ecm_fpwc_comp}_VERSION})
+ endif()
+
+ find_package_handle_standard_args(${module_name}_${ecm_fpwc_comp}
+ FOUND_VAR
+ ${module_name}_${ecm_fpwc_comp}_FOUND
+ REQUIRED_VARS
+ ${module_name}_${ecm_fpwc_comp}_LIBRARY
+ ${module_name}_${ecm_fpwc_comp}_INCLUDE_DIR
+ ${ecm_fpwc_dep_vars}
+ VERSION_VAR
+ ${module_name}_${ecm_fpwc_comp}_VERSION
+ )
+
+ mark_as_advanced(
+ ${module_name}_${ecm_fpwc_comp}_LIBRARY
+ ${module_name}_${ecm_fpwc_comp}_INCLUDE_DIR
+ )
+
+ if(${module_name}_${ecm_fpwc_comp}_FOUND)
+ list(APPEND ${module_name}_LIBRARIES
+ "${${module_name}_${ecm_fpwc_comp}_LIBRARY}")
+ list(APPEND ${module_name}_INCLUDE_DIRS
+ "${${module_name}_${ecm_fpwc_comp}_INCLUDE_DIR}")
+ set(${module_name}_DEFINITIONS
+ ${${module_name}_DEFINITIONS}
+ ${PKG_${module_name}_${ecm_fpwc_comp}_DEFINITIONS})
+ if(NOT TARGET ${module_name}::${ecm_fpwc_comp})
+ add_library(${module_name}::${ecm_fpwc_comp} UNKNOWN IMPORTED)
+ set_target_properties(${module_name}::${ecm_fpwc_comp} PROPERTIES
+ IMPORTED_LOCATION "${${module_name}_${ecm_fpwc_comp}_LIBRARY}"
+ INTERFACE_COMPILE_OPTIONS "${PKG_${module_name}_${ecm_fpwc_comp}_DEFINITIONS}"
+ INTERFACE_INCLUDE_DIRECTORIES "${${module_name}_${ecm_fpwc_comp}_INCLUDE_DIR}"
+ INTERFACE_LINK_LIBRARIES "${ecm_fpwc_dep_targets}"
+ )
+ endif()
+ list(APPEND ${module_name}_TARGETS
+ "${module_name}::${ecm_fpwc_comp}")
+ endif()
+ endforeach()
+ if(${module_name}_LIBRARIES)
+ list(REMOVE_DUPLICATES ${module_name}_LIBRARIES)
+ endif()
+ if(${module_name}_INCLUDE_DIRS)
+ list(REMOVE_DUPLICATES ${module_name}_INCLUDE_DIRS)
+ endif()
+ if(${module_name}_DEFINITIONS)
+ list(REMOVE_DUPLICATES ${module_name}_DEFINITIONS)
+ endif()
+ if(${module_name}_TARGETS)
+ list(REMOVE_DUPLICATES ${module_name}_TARGETS)
+ endif()
+endmacro()
diff --git a/cmake/3rdparty/extra-cmake-modules/qt_attribution.json b/cmake/3rdparty/extra-cmake-modules/qt_attribution.json
new file mode 100644
index 0000000000..cebebf82eb
--- /dev/null
+++ b/cmake/3rdparty/extra-cmake-modules/qt_attribution.json
@@ -0,0 +1,15 @@
+{
+ "Id": "extra-cmake-modules",
+ "Name": "extra-cmake-modules",
+ "QDocModule": "qtcore",
+ "QtUsage": "Used as part of the build system.",
+
+ "Description": "Additional CMake modules.",
+ "Homepage": "https://api.kde.org/ecm/",
+ "Version": "5.50.0",
+
+ "License": "BSD-3-Clause",
+ "LicenseId": "BSD 3-Clause License",
+ "LicenseFile": "COPYING-CMAKE-SCRIPTS",
+ "Copyright": "Copyright © 2011-2018 The KDE community"
+}
diff --git a/cmake/3rdparty/kwin/COPYING-CMAKE-SCRIPTS b/cmake/3rdparty/kwin/COPYING-CMAKE-SCRIPTS
new file mode 100644
index 0000000000..4b417765f3
--- /dev/null
+++ b/cmake/3rdparty/kwin/COPYING-CMAKE-SCRIPTS
@@ -0,0 +1,22 @@
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+
+1. Redistributions of source code must retain the copyright
+ notice, this list of conditions and the following disclaimer.
+2. Redistributions in binary form must reproduce the copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+3. The name of the author may not be used to endorse or promote products
+ derived from this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
+INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
diff --git a/cmake/3rdparty/kwin/FindFontconfig.cmake b/cmake/3rdparty/kwin/FindFontconfig.cmake
new file mode 100644
index 0000000000..d95e46b484
--- /dev/null
+++ b/cmake/3rdparty/kwin/FindFontconfig.cmake
@@ -0,0 +1,50 @@
+# - Try to find the Fontconfig
+# Once done this will define
+#
+# FONTCONFIG_FOUND - system has Fontconfig
+# FONTCONFIG_INCLUDE_DIR - The include directory to use for the fontconfig headers
+# FONTCONFIG_LIBRARIES - Link these to use FONTCONFIG
+# FONTCONFIG_DEFINITIONS - Compiler switches required for using FONTCONFIG
+
+# Copyright (c) 2006,2007 Laurent Montel, <montel@kde.org>
+#
+# Redistribution and use is allowed according to the terms of the BSD license.
+# For details see the accompanying COPYING-CMAKE-SCRIPTS file.
+
+
+if (FONTCONFIG_LIBRARIES AND FONTCONFIG_INCLUDE_DIR)
+
+ # in cache already
+ set(FONTCONFIG_FOUND TRUE)
+
+else (FONTCONFIG_LIBRARIES AND FONTCONFIG_INCLUDE_DIR)
+
+ if (NOT WIN32)
+ # use pkg-config to get the directories and then use these values
+ # in the FIND_PATH() and FIND_LIBRARY() calls
+ find_package(PkgConfig)
+ pkg_check_modules(PC_FONTCONFIG QUIET fontconfig)
+
+ set(FONTCONFIG_DEFINITIONS ${PC_FONTCONFIG_CFLAGS_OTHER})
+ endif (NOT WIN32)
+
+ find_path(FONTCONFIG_INCLUDE_DIR fontconfig/fontconfig.h
+ PATHS
+ ${PC_FONTCONFIG_INCLUDEDIR}
+ ${PC_FONTCONFIG_INCLUDE_DIRS}
+ /usr/X11/include
+ )
+
+ find_library(FONTCONFIG_LIBRARIES NAMES fontconfig
+ PATHS
+ ${PC_FONTCONFIG_LIBDIR}
+ ${PC_FONTCONFIG_LIBRARY_DIRS}
+ )
+
+ include(FindPackageHandleStandardArgs)
+ find_package_handle_standard_args(Fontconfig DEFAULT_MSG FONTCONFIG_LIBRARIES FONTCONFIG_INCLUDE_DIR )
+
+ mark_as_advanced(FONTCONFIG_LIBRARIES FONTCONFIG_INCLUDE_DIR)
+
+endif (FONTCONFIG_LIBRARIES AND FONTCONFIG_INCLUDE_DIR)
+
diff --git a/cmake/3rdparty/kwin/FindLibdrm.cmake b/cmake/3rdparty/kwin/FindLibdrm.cmake
new file mode 100644
index 0000000000..9936e07eee
--- /dev/null
+++ b/cmake/3rdparty/kwin/FindLibdrm.cmake
@@ -0,0 +1,126 @@
+#.rst:
+# FindLibdrm
+# -------
+#
+# Try to find libdrm on a Unix system.
+#
+# This will define the following variables:
+#
+# ``Libdrm_FOUND``
+# True if (the requested version of) libdrm is available
+# ``Libdrm_VERSION``
+# The version of libdrm
+# ``Libdrm_LIBRARIES``
+# This can be passed to target_link_libraries() instead of the ``Libdrm::Libdrm``
+# target
+# ``Libdrm_INCLUDE_DIRS``
+# This should be passed to target_include_directories() if the target is not
+# used for linking
+# ``Libdrm_DEFINITIONS``
+# This should be passed to target_compile_options() if the target is not
+# used for linking
+#
+# If ``Libdrm_FOUND`` is TRUE, it will also define the following imported target:
+#
+# ``Libdrm::Libdrm``
+# The libdrm library
+#
+# In general we recommend using the imported target, as it is easier to use.
+# Bear in mind, however, that if the target is in the link interface of an
+# exported library, it must be made available by the package config file.
+
+#=============================================================================
+# Copyright 2014 Alex Merry <alex.merry@kde.org>
+# Copyright 2014 Martin Gräßlin <mgraesslin@kde.org>
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+#
+# 1. Redistributions of source code must retain the copyright
+# notice, this list of conditions and the following disclaimer.
+# 2. Redistributions in binary form must reproduce the copyright
+# notice, this list of conditions and the following disclaimer in the
+# documentation and/or other materials provided with the distribution.
+# 3. The name of the author may not be used to endorse or promote products
+# derived from this software without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+# IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
+# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+#=============================================================================
+
+if(CMAKE_VERSION VERSION_LESS 2.8.12)
+ message(FATAL_ERROR "CMake 2.8.12 is required by FindLibdrm.cmake")
+endif()
+if(CMAKE_MINIMUM_REQUIRED_VERSION VERSION_LESS 2.8.12)
+ message(AUTHOR_WARNING "Your project should require at least CMake 2.8.12 to use FindLibdrm.cmake")
+endif()
+
+if(NOT WIN32)
+ # Use pkg-config to get the directories and then use these values
+ # in the FIND_PATH() and FIND_LIBRARY() calls
+ find_package(PkgConfig)
+ pkg_check_modules(PKG_Libdrm QUIET libdrm)
+
+ set(Libdrm_DEFINITIONS ${PKG_Libdrm_CFLAGS_OTHER})
+ set(Libdrm_VERSION ${PKG_Libdrm_VERSION})
+
+ find_path(Libdrm_INCLUDE_DIR
+ NAMES
+ xf86drm.h
+ HINTS
+ ${PKG_Libdrm_INCLUDE_DIRS}
+ )
+ find_library(Libdrm_LIBRARY
+ NAMES
+ drm
+ HINTS
+ ${PKG_Libdrm_LIBRARY_DIRS}
+ )
+
+ include(FindPackageHandleStandardArgs)
+ find_package_handle_standard_args(Libdrm
+ FOUND_VAR
+ Libdrm_FOUND
+ REQUIRED_VARS
+ Libdrm_LIBRARY
+ Libdrm_INCLUDE_DIR
+ VERSION_VAR
+ Libdrm_VERSION
+ )
+
+ if(Libdrm_FOUND AND NOT TARGET Libdrm::Libdrm)
+ add_library(Libdrm::Libdrm UNKNOWN IMPORTED)
+ set_target_properties(Libdrm::Libdrm PROPERTIES
+ IMPORTED_LOCATION "${Libdrm_LIBRARY}"
+ INTERFACE_COMPILE_OPTIONS "${Libdrm_DEFINITIONS}"
+ INTERFACE_INCLUDE_DIRECTORIES "${Libdrm_INCLUDE_DIR}"
+ INTERFACE_INCLUDE_DIRECTORIES "${Libdrm_INCLUDE_DIR}/libdrm"
+ )
+ endif()
+
+ mark_as_advanced(Libdrm_LIBRARY Libdrm_INCLUDE_DIR)
+
+ # compatibility variables
+ set(Libdrm_LIBRARIES ${Libdrm_LIBRARY})
+ set(Libdrm_INCLUDE_DIRS ${Libdrm_INCLUDE_DIR} "${Libdrm_INCLUDE_DIR}/libdrm")
+ set(Libdrm_VERSION_STRING ${Libdrm_VERSION})
+
+else()
+ message(STATUS "FindLibdrm.cmake cannot find libdrm on Windows systems.")
+ set(Libdrm_FOUND FALSE)
+endif()
+
+include(FeatureSummary)
+set_package_properties(Libdrm PROPERTIES
+ URL "https://wiki.freedesktop.org/dri/"
+ DESCRIPTION "Userspace interface to kernel DRM services."
+)
diff --git a/cmake/3rdparty/kwin/FindLibinput.cmake b/cmake/3rdparty/kwin/FindLibinput.cmake
new file mode 100644
index 0000000000..b856e0bbcb
--- /dev/null
+++ b/cmake/3rdparty/kwin/FindLibinput.cmake
@@ -0,0 +1,125 @@
+#.rst:
+# FindLibinput
+# -------
+#
+# Try to find libinput on a Unix system.
+#
+# This will define the following variables:
+#
+# ``Libinput_FOUND``
+# True if (the requested version of) libinput is available
+# ``Libinput_VERSION``
+# The version of libinput
+# ``Libinput_LIBRARIES``
+# This can be passed to target_link_libraries() instead of the ``Libinput::Libinput``
+# target
+# ``Libinput_INCLUDE_DIRS``
+# This should be passed to target_include_directories() if the target is not
+# used for linking
+# ``Libinput_DEFINITIONS``
+# This should be passed to target_compile_options() if the target is not
+# used for linking
+#
+# If ``Libinput_FOUND`` is TRUE, it will also define the following imported target:
+#
+# ``Libinput::Libinput``
+# The libinput library
+#
+# In general we recommend using the imported target, as it is easier to use.
+# Bear in mind, however, that if the target is in the link interface of an
+# exported library, it must be made available by the package config file.
+
+#=============================================================================
+# Copyright 2014 Alex Merry <alex.merry@kde.org>
+# Copyright 2014 Martin Gräßlin <mgraesslin@kde.org>
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+#
+# 1. Redistributions of source code must retain the copyright
+# notice, this list of conditions and the following disclaimer.
+# 2. Redistributions in binary form must reproduce the copyright
+# notice, this list of conditions and the following disclaimer in the
+# documentation and/or other materials provided with the distribution.
+# 3. The name of the author may not be used to endorse or promote products
+# derived from this software without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+# IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
+# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+#=============================================================================
+
+if(CMAKE_VERSION VERSION_LESS 2.8.12)
+ message(FATAL_ERROR "CMake 2.8.12 is required by FindLibinput.cmake")
+endif()
+if(CMAKE_MINIMUM_REQUIRED_VERSION VERSION_LESS 2.8.12)
+ message(AUTHOR_WARNING "Your project should require at least CMake 2.8.12 to use FindLibinput.cmake")
+endif()
+
+if(NOT WIN32)
+ # Use pkg-config to get the directories and then use these values
+ # in the FIND_PATH() and FIND_LIBRARY() calls
+ find_package(PkgConfig)
+ pkg_check_modules(PKG_Libinput QUIET libinput)
+
+ set(Libinput_DEFINITIONS ${PKG_Libinput_CFLAGS_OTHER})
+ set(Libinput_VERSION ${PKG_Libinput_VERSION})
+
+ find_path(Libinput_INCLUDE_DIR
+ NAMES
+ libinput.h
+ HINTS
+ ${PKG_Libinput_INCLUDE_DIRS}
+ )
+ find_library(Libinput_LIBRARY
+ NAMES
+ input
+ HINTS
+ ${PKG_Libinput_LIBRARY_DIRS}
+ )
+
+ include(FindPackageHandleStandardArgs)
+ find_package_handle_standard_args(Libinput
+ FOUND_VAR
+ Libinput_FOUND
+ REQUIRED_VARS
+ Libinput_LIBRARY
+ Libinput_INCLUDE_DIR
+ VERSION_VAR
+ Libinput_VERSION
+ )
+
+ if(Libinput_FOUND AND NOT TARGET Libinput::Libinput)
+ add_library(Libinput::Libinput UNKNOWN IMPORTED)
+ set_target_properties(Libinput::Libinput PROPERTIES
+ IMPORTED_LOCATION "${Libinput_LIBRARY}"
+ INTERFACE_COMPILE_OPTIONS "${Libinput_DEFINITIONS}"
+ INTERFACE_INCLUDE_DIRECTORIES "${Libinput_INCLUDE_DIR}"
+ )
+ endif()
+
+ mark_as_advanced(Libinput_LIBRARY Libinput_INCLUDE_DIR)
+
+ # compatibility variables
+ set(Libinput_LIBRARIES ${Libinput_LIBRARY})
+ set(Libinput_INCLUDE_DIRS ${Libinput_INCLUDE_DIR})
+ set(Libinput_VERSION_STRING ${Libinput_VERSION})
+
+else()
+ message(STATUS "FindLibinput.cmake cannot find libinput on Windows systems.")
+ set(Libinput_FOUND FALSE)
+endif()
+
+include(FeatureSummary)
+set_package_properties(Libinput PROPERTIES
+ URL "http://www.freedesktop.org/wiki/Software/libinput/"
+ DESCRIPTION "Library to handle input devices in Wayland compositors and to provide a generic X.Org input driver."
+)
diff --git a/cmake/3rdparty/kwin/FindXKB.cmake b/cmake/3rdparty/kwin/FindXKB.cmake
new file mode 100644
index 0000000000..0d599df0fd
--- /dev/null
+++ b/cmake/3rdparty/kwin/FindXKB.cmake
@@ -0,0 +1,101 @@
+# Try to find xkbcommon on a Unix system
+#
+# This will define:
+#
+# XKB_FOUND - True if XKB is available
+# XKB_LIBRARIES - Link these to use XKB
+# XKB_INCLUDE_DIRS - Include directory for XKB
+# XKB_DEFINITIONS - Compiler flags for using XKB
+#
+# Additionally, the following imported targets will be defined:
+#
+# XKB::XKB
+#
+# Copyright (c) 2014 Martin Gräßlin <mgraesslin@kde.org>
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+# 1. Redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+# 2. Redistributions in binary form must reproduce the above copyright
+# notice, this list of conditions and the following disclaimer in the
+# documentation and/or other materials provided with the distribution.
+# 3. Neither the name of the University nor the names of its contributors
+# may be used to endorse or promote products derived from this software
+# without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+# ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+# SUCH DAMAGE.
+
+if(CMAKE_VERSION VERSION_LESS 2.8.12)
+ message(FATAL_ERROR "CMake 2.8.12 is required by FindXKB.cmake")
+endif()
+if(CMAKE_MINIMUM_REQUIRED_VERSION VERSION_LESS 2.8.12)
+ message(AUTHOR_WARNING "Your project should require at least CMake 2.8.12 to use FindXKB.cmake")
+endif()
+
+if(NOT WIN32)
+ # Use pkg-config to get the directories and then use these values
+ # in the FIND_PATH() and FIND_LIBRARY() calls
+ find_package(PkgConfig)
+ pkg_check_modules(PKG_XKB QUIET xkbcommon)
+
+ set(XKB_DEFINITIONS ${PKG_XKB_CFLAGS_OTHER})
+
+ find_path(XKB_INCLUDE_DIR
+ NAMES
+ xkbcommon/xkbcommon.h
+ HINTS
+ ${PKG_XKB_INCLUDE_DIRS}
+ )
+ find_library(XKB_LIBRARY
+ NAMES
+ xkbcommon
+ HINTS
+ ${PKG_XKB_LIBRARY_DIRS}
+ )
+
+ set(XKB_LIBRARIES ${XKB_LIBRARY})
+ set(XKB_INCLUDE_DIRS ${XKB_INCLUDE_DIR})
+ set(XKB_VERSION ${PKG_XKB_VERSION})
+
+ include(FindPackageHandleStandardArgs)
+ find_package_handle_standard_args(XKB
+ FOUND_VAR
+ XKB_FOUND
+ REQUIRED_VARS
+ XKB_LIBRARY
+ XKB_INCLUDE_DIR
+ VERSION_VAR
+ XKB_VERSION
+ )
+
+ if(XKB_FOUND AND NOT TARGET XKB::XKB)
+ add_library(XKB::XKB UNKNOWN IMPORTED)
+ set_target_properties(XKB::XKB PROPERTIES
+ IMPORTED_LOCATION "${XKB_LIBRARY}"
+ INTERFACE_COMPILE_OPTIONS "${XKB_DEFINITIONS}"
+ INTERFACE_INCLUDE_DIRECTORIES "${XKB_INCLUDE_DIR}"
+ )
+ endif()
+
+else()
+ message(STATUS "FindXKB.cmake cannot find XKB on Windows systems.")
+ set(XKB_FOUND FALSE)
+endif()
+
+include(FeatureSummary)
+set_package_properties(XKB PROPERTIES
+ URL "http://xkbcommon.org"
+ DESCRIPTION "XKB API common to servers and clients."
+)
diff --git a/cmake/3rdparty/kwin/Findgbm.cmake b/cmake/3rdparty/kwin/Findgbm.cmake
new file mode 100644
index 0000000000..6dfc895daa
--- /dev/null
+++ b/cmake/3rdparty/kwin/Findgbm.cmake
@@ -0,0 +1,125 @@
+#.rst:
+# Findgbm
+# -------
+#
+# Try to find gbm on a Unix system.
+#
+# This will define the following variables:
+#
+# ``gbm_FOUND``
+# True if (the requested version of) gbm is available
+# ``gbm_VERSION``
+# The version of gbm
+# ``gbm_LIBRARIES``
+# This can be passed to target_link_libraries() instead of the ``gbm::gbm``
+# target
+# ``gbm_INCLUDE_DIRS``
+# This should be passed to target_include_directories() if the target is not
+# used for linking
+# ``gbm_DEFINITIONS``
+# This should be passed to target_compile_options() if the target is not
+# used for linking
+#
+# If ``gbm_FOUND`` is TRUE, it will also define the following imported target:
+#
+# ``gbm::gbm``
+# The gbm library
+#
+# In general we recommend using the imported target, as it is easier to use.
+# Bear in mind, however, that if the target is in the link interface of an
+# exported library, it must be made available by the package config file.
+
+#=============================================================================
+# Copyright 2014 Alex Merry <alex.merry@kde.org>
+# Copyright 2014 Martin Gräßlin <mgraesslin@kde.org>
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+#
+# 1. Redistributions of source code must retain the copyright
+# notice, this list of conditions and the following disclaimer.
+# 2. Redistributions in binary form must reproduce the copyright
+# notice, this list of conditions and the following disclaimer in the
+# documentation and/or other materials provided with the distribution.
+# 3. The name of the author may not be used to endorse or promote products
+# derived from this software without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+# IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
+# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+#=============================================================================
+
+if(CMAKE_VERSION VERSION_LESS 2.8.12)
+ message(FATAL_ERROR "CMake 2.8.12 is required by Findgbm.cmake")
+endif()
+if(CMAKE_MINIMUM_REQUIRED_VERSION VERSION_LESS 2.8.12)
+ message(AUTHOR_WARNING "Your project should require at least CMake 2.8.12 to use Findgbm.cmake")
+endif()
+
+if(NOT WIN32)
+ # Use pkg-config to get the directories and then use these values
+ # in the FIND_PATH() and FIND_LIBRARY() calls
+ find_package(PkgConfig)
+ pkg_check_modules(PKG_gbm QUIET gbm)
+
+ set(gbm_DEFINITIONS ${PKG_gbm_CFLAGS_OTHER})
+ set(gbm_VERSION ${PKG_gbm_VERSION})
+
+ find_path(gbm_INCLUDE_DIR
+ NAMES
+ gbm.h
+ HINTS
+ ${PKG_gbm_INCLUDE_DIRS}
+ )
+ find_library(gbm_LIBRARY
+ NAMES
+ gbm
+ HINTS
+ ${PKG_gbm_LIBRARY_DIRS}
+ )
+
+ include(FindPackageHandleStandardArgs)
+ find_package_handle_standard_args(gbm
+ FOUND_VAR
+ gbm_FOUND
+ REQUIRED_VARS
+ gbm_LIBRARY
+ gbm_INCLUDE_DIR
+ VERSION_VAR
+ gbm_VERSION
+ )
+
+ if(gbm_FOUND AND NOT TARGET gbm::gbm)
+ add_library(gbm::gbm UNKNOWN IMPORTED)
+ set_target_properties(gbm::gbm PROPERTIES
+ IMPORTED_LOCATION "${gbm_LIBRARY}"
+ INTERFACE_COMPILE_OPTIONS "${gbm_DEFINITIONS}"
+ INTERFACE_INCLUDE_DIRECTORIES "${gbm_INCLUDE_DIR}"
+ )
+ endif()
+
+ mark_as_advanced(gbm_LIBRARY gbm_INCLUDE_DIR)
+
+ # compatibility variables
+ set(gbm_LIBRARIES ${gbm_LIBRARY})
+ set(gbm_INCLUDE_DIRS ${gbm_INCLUDE_DIR})
+ set(gbm_VERSION_STRING ${gbm_VERSION})
+
+else()
+ message(STATUS "Findgbm.cmake cannot find gbm on Windows systems.")
+ set(gbm_FOUND FALSE)
+endif()
+
+include(FeatureSummary)
+set_package_properties(gbm PROPERTIES
+ URL "http://www.mesa3d.org"
+ DESCRIPTION "Mesa gbm library."
+)
diff --git a/cmake/3rdparty/kwin/qt_attribution.json b/cmake/3rdparty/kwin/qt_attribution.json
new file mode 100644
index 0000000000..5c22641132
--- /dev/null
+++ b/cmake/3rdparty/kwin/qt_attribution.json
@@ -0,0 +1,17 @@
+{
+ "Id": "kwin",
+ "Name": "KWin",
+ "QDocModule": "qtcore",
+ "QtUsage": "Used as part of the build system.",
+
+ "Description": "Additional CMake modules for graphics system dependencies.",
+ "Homepage": "https://www.kde.org/",
+ "Version": "5.13.4",
+
+ "License": "BSD-3-Clause",
+ "LicenseId": "BSD 3-Clause License",
+ "LicenseFile": "COPYING-CMAKE-SCRIPTS",
+ "Copyright": "Copyright 2014 Alex Merry <alex.merry@kde.org>
+Copyright 2014 Martin Gräßlin <mgraesslin@kde.org>,
+Copyright (c) 2006,2007 Laurent Montel, <montel@kde.org>"
+}
diff --git a/cmake/FindAtomic.cmake b/cmake/FindAtomic.cmake
new file mode 100644
index 0000000000..6676378686
--- /dev/null
+++ b/cmake/FindAtomic.cmake
@@ -0,0 +1,37 @@
+include(CheckCXXSourceCompiles)
+
+set (atomic_test_sources "#include <atomic>
+#include <cstdint>
+
+void test(volatile std::atomic<std::int64_t> &a)
+{
+ std::int64_t v = a.load(std::memory_order_acquire);
+ while (!a.compare_exchange_strong(v, v + 1,
+ std::memory_order_acq_rel,
+ std::memory_order_acquire)) {
+ v = a.exchange(v - 1);
+ }
+ a.store(v + 1, std::memory_order_release);
+}
+
+int main(int, char **)
+{
+ void *ptr = (void*)0xffffffc0; // any random pointer
+ test(*reinterpret_cast<std::atomic<std::int64_t> *>(ptr));
+ return 0;
+}")
+
+check_cxx_source_compiles("${atomic_test_sources}" HAVE_STDATOMIC)
+if(NOT HAVE_STDATOMIC)
+ set(_req_libraries "${CMAKE_REQUIRE_LIBRARIES}")
+ set(CMAKE_REQUIRE_LIBRARIES "atomic")
+ check_cxx_source_compiles("${atomic_test_sources}" HAVE_STDATOMIC_WITH_LIB)
+ set(CMAKE_REQUIRE_LIBRARIES "${_req_libraries}")
+endif()
+
+add_library(Atomic INTERFACE)
+if(HAVE_STDATOMIC_WITH_LIB)
+ target_link_libraries(Atomic INTERFACE atomic)
+endif()
+
+set(Atomic_FOUND 1)
diff --git a/cmake/FindGLib.cmake b/cmake/FindGLib.cmake
new file mode 100644
index 0000000000..461564122a
--- /dev/null
+++ b/cmake/FindGLib.cmake
@@ -0,0 +1,3 @@
+find_package(PkgConfig)
+
+pkg_check_modules(GLib glib-2.0 IMPORTED_TARGET)
diff --git a/cmake/FindLibsystemd.cmake b/cmake/FindLibsystemd.cmake
new file mode 100644
index 0000000000..9c0082fd39
--- /dev/null
+++ b/cmake/FindLibsystemd.cmake
@@ -0,0 +1,3 @@
+find_package(PkgConfig)
+
+pkg_check_modules(Libsystemd systemd IMPORTED_TARGET)
diff --git a/cmake/FindLibudev.cmake b/cmake/FindLibudev.cmake
new file mode 100644
index 0000000000..a36c81ff4a
--- /dev/null
+++ b/cmake/FindLibudev.cmake
@@ -0,0 +1,3 @@
+find_package(PkgConfig)
+
+pkg_check_modules(Libudev udev IMPORTED_TARGET)
diff --git a/cmake/FindPCRE2.cmake b/cmake/FindPCRE2.cmake
new file mode 100644
index 0000000000..7e45c963d7
--- /dev/null
+++ b/cmake/FindPCRE2.cmake
@@ -0,0 +1,13 @@
+
+find_library(PCRE2_LIBRARIES NAMES pcre2-16)
+find_path(PCRE2_INCLUDE_DIRS pcre2.h)
+
+if (PCRE2_LIBRARIES STREQUAL "PCRE2_LIBRARIES-NOTFOUND" OR PCRE2_INCLUDE_DIRS STREQUAL "PCRE2_INCLUDE_DIRS-NOTFOUND")
+ set(PCRE2_FOUND 0)
+else()
+ add_library(PCRE2 INTERFACE)
+ target_link_libraries(PCRE2 INTERFACE ${PCRE2_LIBRARIES})
+ target_include_directories(PCRE2 INTERFACE ${PCRE2_INCLUDE_DIRS})
+ set(PCRE2_FOUND 1)
+endif()
+
diff --git a/cmake/FindWrapDoubleConversion.cmake b/cmake/FindWrapDoubleConversion.cmake
new file mode 100644
index 0000000000..c93525af23
--- /dev/null
+++ b/cmake/FindWrapDoubleConversion.cmake
@@ -0,0 +1,36 @@
+include(CheckCXXSourceCompiles)
+
+check_cxx_source_compiles("
+#include <stdio.h>
+#include <locale.h>
+
+int main(int argc, char *argv[]) {
+ _locale_t invalidLocale = NULL;
+ double a = 3.14;
+ const char *format = \"invalid format\";
+ _sscanf_l(argv[0], invalidLocale, format, &a, &argc);
+ _snprintf_l(argv[0], 1, invalidLocale, format, a);
+}" HAVE__SPRINTF_L)
+
+check_cxx_source_compiles("
+#include <stdio.h>
+#include <xlocale.h>
+
+int main(int argc, char *argv[]) {
+ locale_t invalidLocale = NULL;
+ double a = 3.14;
+ const char *format = \"invalid format\";
+ snprintf_l(argv[0], 1, invalidLocale, format, a);
+ sscanf_l(argv[0], invalidLocale, format, &a, &argc);
+ return 0;
+}" HAVE_SPRINTF_L)
+
+add_library(WrapDoubleConversion INTERFACE)
+if (NOT HAVE__SPRINTF_L AND NOT HAVE_SPRINTF_L)
+ find_package(double-conversion)
+ set_package_properties(double-conversion PROPERTIES TYPE REQUIRED)
+ target_link_libraries(WrapDoubleConversion INTERFACE double-conversion::double-conversion)
+endif()
+
+set(WrapDoubleConversion_FOUND 1)
+
diff --git a/cmake/Finddouble-conversion.cmake b/cmake/Finddouble-conversion.cmake
new file mode 100644
index 0000000000..77785696b9
--- /dev/null
+++ b/cmake/Finddouble-conversion.cmake
@@ -0,0 +1,30 @@
+# Fallback find module for double-conversion
+# if double-conversion is built with CMake it'll install a config module, which we prefer
+# if it's built with Scons (their default), we search ourselves
+
+find_package(double-conversion CONFIG)
+if (double-conversion_FOUND)
+ return()
+endif()
+
+find_path(DOUBLE_CONVERSION_INCLUDE_DIR
+ NAMES
+ double-conversion.h
+ PATH_SUFFIXES
+ double-conversion
+)
+find_library(DOUBLE_CONVERSION_LIBRARY NAMES double-conversion)
+
+include(FindPackageHandleStandardArgs)
+FIND_PACKAGE_HANDLE_STANDARD_ARGS(
+ double-conversion DEFAULT_MSG
+ DOUBLE_CONVERSION_LIBRARY DOUBLE_CONVERSION_INCLUDE_DIR)
+
+if(double-conversion_FOUND AND NOT TARGET double-conversion::double-conversion)
+ add_library(double-conversion::double-conversion UNKNOWN IMPORTED)
+ set_target_properties(double-conversion::double-conversion PROPERTIES
+ IMPORTED_LOCATION "${DOUBLE_CONVERSION_LIBRARY}"
+ INTERFACE_INCLUDE_DIRECTORIES "${DOUBLE_CONVERSION_INCLUDE_DIR}")
+endif()
+
+mark_as_advanced(DOUBLE_CONVERSION_INCLUDE_DIR DOUBLE_CONVERSION_LIBRARY)
diff --git a/cmake/QtBaseConfigureTests.cmake b/cmake/QtBaseConfigureTests.cmake
new file mode 100644
index 0000000000..d7f9788fc5
--- /dev/null
+++ b/cmake/QtBaseConfigureTests.cmake
@@ -0,0 +1,139 @@
+include(CheckCXXSourceCompiles)
+
+function(run_config_test_architecture)
+ # Test architecture
+ set(_arch_file "${CMAKE_CURRENT_BINARY_DIR}/architecture_test")
+ try_compile(_arch_result "${CMAKE_CURRENT_BINARY_DIR}"
+ "${CMAKE_CURRENT_SOURCE_DIR}/config.tests/arch/arch.cpp"
+ COPY_FILE "${_arch_file}")
+ if (NOT _arch_result)
+ message(FATAL_ERROR "Failed to compile architecture detection file.")
+ endif()
+
+ file(STRINGS "${_arch_file}" _arch_lines LENGTH_MINIMUM 16 LENGTH_MAXIMUM 1024 ENCODING UTF-8)
+
+ foreach (_line ${_arch_lines})
+ string(FIND "${_line}" "==Qt=magic=Qt== Architecture:" _pos)
+ if (_pos GREATER -1)
+ math(EXPR _pos "${_pos}+29")
+ string(SUBSTRING "${_line}" ${_pos} -1 _architecture)
+ endif()
+ string(FIND "${_line}" "==Qt=magic=Qt== Sub-architecture:" _pos)
+ if (_pos GREATER -1)
+ math(EXPR _pos "${_pos}+34")
+ string(SUBSTRING "${_line}" ${_pos} -1 _sub_architecture)
+ string(REPLACE " " ";" _sub_architecture "${_sub_architecture}")
+ endif()
+ string(FIND "${_line}" "==Qt=magic=Qt== Build-ABI:" _pos)
+ if (_pos GREATER -1)
+ math(EXPR _pos "${_pos}+26")
+ string(SUBSTRING "${_line}" ${_pos} -1 _build_abi)
+ endif()
+ endforeach()
+
+ if (NOT _architecture OR NOT _sub_architecture OR NOT _build_abi)
+ message(FATAL_ERROR "Failed to extract architecture data from file.")
+ endif()
+
+ set(TEST_architecture 1 CACHE INTERNAL "Ran the architecture test")
+ set(TEST_architecture_arch "${_architecture}" CACHE INTERNAL "Target machine architecture")
+ set(TEST_subarch 1 CACHE INTERNAL "Ran machine subArchitecture test")
+ foreach(it ${_sub_architecture})
+ set(TEST_subarch_${it} 1 CACHE INTERNAL "Target sub architecture result")
+ endforeach()
+ set(TEST_buildAbi "${_build_abi}" CACHE INTERNAL "Target machine buildAbi")
+endfunction()
+
+
+function(run_config_test_posix_iconv)
+ set(source "#include <iconv.h>
+
+int main(int, char **)
+{
+ iconv_t x = iconv_open(\"\", \"\");
+
+ char *inp;
+ char *outp;
+ size_t inbytes, outbytes;
+ iconv(x, &inp, &inbytes, &outp, &outbytes);
+
+ iconv_close(x);
+
+ return 0;
+}")
+ check_cxx_source_compiles("${source}" HAVE_POSIX_ICONV)
+
+ if(NOT HAVE_POSIX_ICONV)
+ set(_req_libraries "${CMAKE_REQUIRE_LIBRARIES}")
+ set(CMAKE_REQUIRE_LIBRARIES "iconv")
+ check_cxx_source_compiles("${source}" HAVE_POSIX_ICONV)
+ set(CMAKE_REQUIRE_LIBRARIES "${_req_libraries}")
+ if(HAVE_POSIX_ICONV)
+ set(TEST_iconv_needlib 1 CACHE INTERNAL "Need to link against libiconv")
+ endif()
+ endif()
+
+ set(TEST_posix_iconv "${HAVE_POSIX_ICONV}" CACHE INTERNAL "POSIX iconv")
+endfunction()
+
+
+function(run_config_test_sun_iconv)
+ set(source "#include <iconv.h>
+
+int main(int, char **)
+{
+ iconv_t x = iconv_open(\"\", \"\");
+
+ const char *inp;
+ char *outp;
+ size_t inbytes, outbytes;
+ iconv(x, &inp, &inbytes, &outp, &outbytes);
+
+ iconv_close(x);
+
+ return 0;
+}")
+ if(DARWIN)
+ # as per !config.darwin in configure.json
+ set(HAVE_SUN_ICONV OFF)
+ else()
+ check_cxx_source_compiles("${source}" HAVE_SUN_ICONV)
+ endif()
+
+ set(TEST_sun_iconv "${HAVE_SUN_ICONV}" CACHE INTERNAL "SUN libiconv")
+endfunction()
+
+function(run_linker_version_script_support)
+ file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/version_flag.map" "VERS_1 { global: sym; };
+VERS_2 { global: sym; }
+VERS_1;
+")
+ if(DEFINED CMAKE_REQUIRED_FLAGS)
+ set(CMAKE_REQUIRED_FLAGS_SAVE ${CMAKE_REQUIRED_FLAGS})
+ else()
+ set(CMAKE_REQUIRED_FLAGS "")
+ endif()
+ set(CMAKE_REQUIRED_FLAGS ${CMAKE_REQUIRED_FLAGS} "-Wl,--version-script=\"${CMAKE_CURRENT_BINARY_DIR}/version_flag.map\"")
+ check_cxx_source_compiles("int main(void){return 0;}" HAVE_LD_VERSION_SCRIPT)
+ if(DEFINED CMAKE_REQUIRED_FLAGS_SAVE)
+ set(CMAKE_REQUIRED_FLAGS ${CMAKE_REQUIRED_FLAGS_SAVE})
+ endif()
+ file(REMOVE "${CMAKE_CURRENT_BINARY_DIR}/conftest.map")
+
+ set(TEST_ld_version_script "${HAVE_LD_VERSION_SCRIPT}" CACHE INTERNAL "linker version script support")
+endfunction()
+
+function(run_config_tests)
+ run_config_test_posix_iconv()
+
+ add_library(Iconv INTERFACE)
+ if(TEST_iconv_needlib)
+ target_link_libraries(Iconv PUBLIC iconv)
+ endif()
+
+ run_config_test_sun_iconv()
+ run_config_test_architecture()
+ run_linker_version_script_support()
+endfunction()
+
+run_config_tests()
diff --git a/cmake/QtBaseGlobalTargets.cmake b/cmake/QtBaseGlobalTargets.cmake
new file mode 100644
index 0000000000..5b2b746ef1
--- /dev/null
+++ b/cmake/QtBaseGlobalTargets.cmake
@@ -0,0 +1,58 @@
+# Where QtBuild.cmake can find QtModuleConfig.cmake.in
+set(Qt${PROJECT_VERSION_MAJOR}_DIR "${PROJECT_SOURCE_DIR}/cmake")
+
+
+## QtPlatform Target:
+set(name "Qt")
+add_library("${name}" INTERFACE)
+add_library("Qt::Platform" ALIAS "${name}")
+target_include_directories("${name}"
+ INTERFACE
+ $<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}/${QT_PLATFORM_DEFINITION_DIR}>
+ $<BUILD_INTERFACE:${PROJECT_BINARY_DIR}/include>
+ $<INSTALL_INTERFACE:${INSTALL_DATADIR}/${QT_PLATFORM_DEFINITION_DIR}>
+ $<INSTALL_INTERFACE:${INSTALL_INCLUDEDIR}>
+ )
+target_compile_definitions("${name}" INTERFACE ${QT_PLATFORM_DEFINITIONS})
+set(config_install_dir "${INSTALL_LIBDIR}/cmake/${name}${PROJECT_VERSION_MAJOR}")
+install(TARGETS "${name}" EXPORT "${name}${PROJECT_VERSION_MAJOR}Targets")
+install(EXPORT "${name}${PROJECT_VERSION_MAJOR}Targets" NAMESPACE Qt:: DESTINATION "${config_install_dir}")
+
+configure_package_config_file(
+ "${PROJECT_SOURCE_DIR}/cmake/QtConfig.cmake.in"
+ "${CMAKE_CURRENT_BINARY_DIR}/Qt${PROJECT_VERSION_MAJOR}Config.cmake"
+ INSTALL_DESTINATION "${config_install_dir}"
+)
+write_basic_package_version_file(
+ ${CMAKE_CURRENT_BINARY_DIR}/Qt${PROJECT_VERSION_MAJOR}ConfigVersion.cmake
+ VERSION ${PROJECT_VERSION}
+ COMPATIBILITY AnyNewerVersion
+)
+install(FILES
+ "${CMAKE_CURRENT_BINARY_DIR}/Qt${PROJECT_VERSION_MAJOR}Config.cmake"
+ "${CMAKE_CURRENT_BINARY_DIR}/Qt${PROJECT_VERSION_MAJOR}ConfigVersion.cmake"
+ DESTINATION "${config_install_dir}"
+ COMPONENT Devel
+)
+
+
+## Library to hold global features:
+add_library(Qt_global_Config INTERFACE)
+
+qt_feature_module_begin(LIBRARY QtCore
+ PUBLIC_FILE src/corelib/global/qconfig.h
+ PRIVATE_FILE src/corelib/global/qconfig_p.h
+)
+include("${CMAKE_CURRENT_SOURCE_DIR}/configure.cmake")
+qt_feature_module_end(Qt_global_Config)
+
+
+## Install some QtBase specific CMake files:
+install(FILES
+ cmake/QtBuild.cmake
+ cmake/QtFeature.cmake
+ cmake/QtPostProcess.cmake
+ cmake/QtSetup.cmake
+ cmake/QtModuleConfig.cmake.in
+ DESTINATION "${config_install_dir}"
+)
diff --git a/cmake/QtBuild.cmake b/cmake/QtBuild.cmake
new file mode 100644
index 0000000000..cf16be6126
--- /dev/null
+++ b/cmake/QtBuild.cmake
@@ -0,0 +1,1080 @@
+include(CMakePackageConfigHelpers)
+
+# Install locations:
+set(INSTALL_BINDIR "bin" CACHE PATH "Executables [PREFIX/bin]")
+set(INSTALL_INCLUDEDIR "include" CACHE PATH "Header files [PREFIX/include]")
+set(INSTALL_LIBDIR "lib" CACHE PATH "Libraries [PREFIX/lib]")
+set(INSTALL_ARCHDATADIR "." CACHE PATH "Arch-dependent data [PREFIX]")
+set(INSTALL_PLUGINSDIR "${INSTALL_ARCHDATADIR}/plugins" CACHE PATH
+ "Plugins [ARCHDATADIR/plugins]")
+
+set(INSTALL_TARGETS_DEFAULT_ARGS
+ RUNTIME DESTINATION "${INSTALL_BINDIR}"
+ LIBRARY DESTINATION "${INSTALL_LIBDIR}"
+ ARCHIVE DESTINATION "${INSTALL_LIBDIR}" COMPONENT Devel
+ INCLUDES DESTINATION "${INSTALL_INCLUDEDIR}"
+)
+
+if (WIN32)
+ set(_default_libexec "${INSTALL_ARCHDATADIR}/bin")
+else()
+ set(_default_libexec "${INSTALL_ARCHDATADIR}/libexec")
+endif()
+
+set(INSTALL_LIBEXECDIR "${_default_libexec}" CACHE PATH
+ "Helper programs [ARCHDATADIR/bin on Windows, ARCHDATADIR/libexec otherwise]")
+set(INSTALL_IMPORTDIR "${INSTALL_ARCHDATADIR}/imports" CACHE PATH
+ "QML1 imports [ARCHDATADIR/imports]")
+set(INSTALL_QMLDIR "${INSTALL_ARCHDATADIR}/qml" CACHE PATH
+ "QML2 imports [ARCHDATADIR/qml]")
+set(INSTALL_DATADIR "." CACHE PATH "Arch-independent data [PREFIX]")
+set(INSTALL_DOCDIR "${INSTALL_DATADIR}/doc" CACHE PATH "Documentation [DATADIR/doc]")
+set(INSTALL_TRANSLATIONSDIR "${INSTALL_DATADIR}/translations" CACHE PATH
+ "Translations [DATADIR/translations]")
+set(INSTALL_SYSCONFDIR "etc/xdg" CACHE PATH
+ "Settings used by Qt programs [PREFIX/etc/xdg]")
+set(INSTALL_EXAMPLESDIR "examples" CACHE PATH "Examples [PREFIX/examples]")
+set(INSTALL_TESTSDIR "tests" CACHE PATH "Tests [PREFIX/tests]")
+
+# Platform define path, etc.
+if(WIN32)
+ set(QT_DEFAULT_PLATFORM_DEFINITIONS UNICODE _UNICODE WIN32 _ENABLE_EXTENDED_ALIGNED_STORAGE)
+ if(CMAKE_SIZEOF_VOID_P EQUAL 8)
+ list(APPEND QT_DEFAULT_PLATFORM_DEFINITIONS WIN64 _WIN64)
+ endif()
+ if(MSVC)
+ set(QT_DEFAULT_PLATFORM_DEFINITION_DIR mkspecs/win32-msvc)
+ elseif(CLANG)
+ set(QT_DEFAULT_PLATFORM_DEFINITION_DIR mkspecs/win32-clang)
+ endif()
+elseif(LINUX)
+ if(GCC)
+ set(QT_DEFAULT_PLATFORM_DEFINITION_DIR mkspecs/linux-g++)
+ elseif(CLANG)
+ set(QT_DEFAULT_PLATFORM_DEFINITION_DIR mkspecs/linux-clang)
+ endif()
+elseif(APPLE)
+ set(QT_DEFAULT_PLATFORM_DEFINITION_DIR mkspecs/macx-clang)
+endif()
+
+if(NOT DEFINED QT_DEFAULT_PLATFORM_DEFINITIONS)
+ set(QT_DEFAULT_PLATFORM_DEFINITIONS "")
+endif()
+
+set(QT_PLATFORM_DEFINITIONS ${QT_DEFAULT_PLATFORM_DEFINITIONS}
+ CACHE STRING "Qt platform specific pre-processor defines")
+set(QT_PLATFORM_DEFINITION_DIR ${QT_DEFAULT_PLATFORM_DEFINITION_DIR}
+ CACHE PATH "Path to directory that contains qplatformdefs.h")
+set(QT_NAMESPACE "" CACHE STRING "Qt Namespace")
+
+# Reset:
+set(KNOWN_QT_MODULES "" CACHE INTERNAL "Known Qt modules" FORCE)
+
+
+# For adjusting variables when running tests, we need to know what
+# the correct variable is for separating entries in PATH-alike
+# variables.
+if(CMAKE_HOST_SYSTEM_NAME STREQUAL "Windows")
+ set(QT_PATH_SEPARATOR "\\;")
+else()
+ set(QT_PATH_SEPARATOR ":")
+endif()
+
+
+# Functions and macros:
+
+# Print all variables defined in the current scope.
+macro(qt_debug_print_variables)
+ cmake_parse_arguments(__arg "DEDUP" "" "MATCH;IGNORE" ${ARGN})
+ message("Known Variables:")
+ get_cmake_property(__variableNames VARIABLES)
+ list (SORT __variableNames)
+ if (__arg_DEDUP)
+ list(REMOVE_DUPLICATES __variableNames)
+ endif()
+
+ foreach(__var ${__variableNames})
+ set(__ignore OFF)
+ foreach(__i ${__arg_IGNORE})
+ if(__var MATCHES "${__i}")
+ set(__ignore ON)
+ break()
+ endif()
+ endforeach()
+
+ if (__ignore)
+ continue()
+ endif()
+
+ set(__show OFF)
+ foreach(__i ${__arg_MATCH})
+ if(__var MATCHES "${__i}")
+ set(__show ON)
+ break()
+ endif()
+ endforeach()
+
+ if (__show)
+ message(" ${__var}=${${__var}}.")
+ endif()
+ endforeach()
+endmacro()
+
+
+macro(assert)
+ if (${ARGN})
+ else()
+ message(FATAL_ERROR "ASSERT: ${ARGN}.")
+ endif()
+endmacro()
+
+
+function(qt_ensure_perl)
+ if(DEFINED HOST_PERL)
+ return()
+ endif()
+ find_program(HOST_PERL "perl" DOC "Perl binary")
+ if (NOT HOST_PERL)
+ message(FATAL_ERROR "Perl needs to be available to build Qt.")
+ endif()
+endfunction()
+
+
+# A version of cmake_parse_arguments that makes sure all arguments are processed and errors out
+# with a message about ${type} having received unknown arguments.
+macro(qt_parse_all_arguments result type flags options multiopts)
+ cmake_parse_arguments(${result} "${flags}" "${options}" "${multiopts}" ${ARGN})
+ if(DEFINED ${result}_UNPARSED_ARGUMENTS)
+ message(FATAL_ERROR "Unknown arguments were passed to ${type} (${${result}_UNPARSED_ARGUMENTS}).")
+ endif()
+endmacro()
+
+
+# Determines the directory where the generated class-style header files for
+# the specified module are located and stores the result in the given result
+# variable.
+function(qt_internal_module_include_dir result module)
+ set(${result} "${PROJECT_BINARY_DIR}/include/${module}" PARENT_SCOPE)
+endfunction()
+
+function(qt_internal_add_link_flags target to_add)
+ get_target_property(_flags "${target}" LINK_FLAGS)
+ if ("${_flags}" STREQUAL "_flags-NOTFOUND")
+ set(_flags "")
+ endif()
+ string(APPEND _flags " ${to_add}")
+ set_target_properties("${target}" PROPERTIES LINK_FLAGS "${_flags}")
+endfunction()
+
+function(qt_internal_add_linker_version_script target)
+ qt_parse_all_arguments(_arg "qt_internal_add_linker" "INTERNAL" "" "PRIVATE_HEADERS" ${ARGN})
+
+ if (TEST_ld_version_script)
+ if (_arg_INTERNAL)
+ set(contents "Qt_${PROJECT_VERSION_MAJOR}_PRIVATE_API { *; };")
+ else()
+ set(contents "Qt_${PROJECT_VERSION_MAJOR}_PRIVATE_API {\n qt_private_api_tag*;\n")
+ foreach(ph ${_arg_PRIVATE_HEADERS})
+ string(APPEND contents " @FILE:${ph}@\n")
+ endforeach()
+ string(APPEND contents "};\n")
+ set(current "Qt_${PROJECT_VERSION_MAJOR}")
+ if (QT_NAMESPACE STREQUAL "")
+ set(tag_symbol "qt_version_tag")
+ else()
+ set(tag_symbol "qt_version_tag_${QT_NAMESPACE}")
+ endif()
+ string(APPEND contents "${current} { *; };\n")
+
+ foreach(minor_version RANGE ${PROJECT_VERSION_MINOR})
+ set(previous "${current}")
+ set(current "Qt_${PROJECT_VERSION_MAJOR}.${minor_version}")
+ if (minor_version EQUAL ${PROJECT_VERSION_MINOR})
+ string(APPEND contents "${current} { ${tag_symbol}; } ${previous};\n")
+ else()
+ string(APPEND contents "${current} {} ${previous};\n")
+ endif()
+ endforeach()
+
+ set(infile "${CMAKE_CURRENT_BINARY_DIR}/${target}.version.in")
+ set(outfile "${CMAKE_CURRENT_BINARY_DIR}/${target}.version")
+
+ file(GENERATE OUTPUT "${infile}" CONTENT "${contents}")
+
+ qt_ensure_perl()
+
+ add_custom_command(TARGET "${target}" PRE_LINK
+ COMMAND "${HOST_PERL}" "${PROJECT_SOURCE_DIR}/mkspecs/features/data/unix/findclasslist.pl" < "${infile}" > "${outfile}"
+ BYPRODUCTS "${outfile}" DEPENDS "${infile}"
+ WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}"
+ COMMENT "Generating version linker script"
+ )
+ qt_internal_add_link_flags("${target}" "-Wl,--version-script,${outfile}")
+ endif()
+ endif()
+endfunction()
+
+# Generates the necessary rules to run moc on the sources specified after the MOC parameter.
+# The resulting moc files are returned in the variable specified by the result parameter.
+function(qt_internal_wrap_cpp result)
+ # get include dirs
+ qt_get_moc_flags(moc_flags)
+ qt_parse_all_arguments(_arg "qt_internal_wrap_cpp" "" "TARGET;HEADER_FILE_ONLY" "OPTIONS;DEPENDS;MOC" ${ARGN})
+
+ set(moc_files ${_arg_MOC})
+ set(moc_options ${_arg_OPTIONS})
+ set(moc_target ${_arg_TARGET})
+ set(moc_depends ${_arg_DEPENDS})
+ set(wrapped_files "")
+
+ foreach(it ${moc_files})
+ get_filename_component(it ${it} ABSOLUTE)
+ get_filename_component(moc_file_extension ${it} EXT)
+
+ if(${moc_file_extension} STREQUAL ".h")
+ set(file_prefix "moc_")
+ set(file_extension "cpp")
+ else()
+ set(file_prefix "")
+ set(file_extension "moc")
+ endif()
+
+ qt_make_output_file("${it}" "${file_prefix}" "${file_extension}" outfile)
+ qt_create_moc_command("${it}" "${outfile}" "${moc_flags}" "${moc_options}" "${moc_target}" "${moc_depends}")
+ set_source_files_properties(${outfile} PROPERTIES HEADER_FILE_ONLY ${_arg_HEADER_FILE_ONLY})
+ list(APPEND wrapped_files "${outfile}")
+ endforeach()
+ set("${result}" ${wrapped_files} PARENT_SCOPE)
+endfunction()
+
+function(_qt_module_name name result)
+ set("${result}" "Qt${name}" PARENT_SCOPE)
+endfunction()
+
+
+# This function takes a target as a parameter, followed by a list of sources.
+# The sources are scanned for Q_OBJECT/Q_GADGET use as well as the inclusion of
+# moc_*.cpp/*.moc. Rules are created to call moc accordingly at build time and
+# add the generated sources to the target, if the generated code is not
+# directly included otherwise.
+function(qt_internal_automoc target)
+ if ("x${ARGN}" STREQUAL "x")
+ return()
+ endif()
+
+ if(NOT DEFINED QT_MOCSCANNER)
+ get_target_property(mocPath "Qt::moc" LOCATION)
+ get_filename_component(binDirectory "${mocPath}" DIRECTORY)
+ set(QT_MOCSCANNER "${binDirectory}/qmocscanner${CMAKE_EXECUTABLE_SUFFIX}")
+ endif()
+
+ string(REPLACE ";" "\n" sources "${ARGN}")
+ file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/moc_sources_and_headers.txt" ${sources})
+ execute_process(COMMAND "${QT_MOCSCANNER}"
+ "${CMAKE_CURRENT_BINARY_DIR}/moc_sources_and_headers.txt"
+ "${CMAKE_CURRENT_BINARY_DIR}/moc_files_included.txt"
+ "${CMAKE_CURRENT_BINARY_DIR}/moc_files_to_build.txt"
+ WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}"
+ )
+
+ file(STRINGS "${CMAKE_CURRENT_BINARY_DIR}/moc_files_included.txt" moc_files_included)
+ file(STRINGS "${CMAKE_CURRENT_BINARY_DIR}/moc_files_to_build.txt" moc_files_to_build)
+
+ file(REMOVE "${CMAKE_CURRENT_BINARY_DIR}/moc_sources_and_headers.txt")
+ file(REMOVE "${CMAKE_CURRENT_BINARY_DIR}/moc_files_included.txt")
+ file(REMOVE "${CMAKE_CURRENT_BINARY_DIR}/moc_files_to_build.txt")
+
+ qt_internal_wrap_cpp(included_mocs TARGET "${target}" MOC ${moc_files_included} HEADER_FILE_ONLY ON)
+ qt_internal_wrap_cpp(moc_and_build_sources TARGET "${target}" MOC ${moc_files_to_build} HEADER_FILE_ONLY OFF)
+
+ target_sources("${target}" PRIVATE ${moc_and_build_sources} ${included_mocs})
+
+ foreach(generated_source ${included_mocs})
+ get_filename_component(directory "${generated_source}" DIRECTORY)
+ target_include_directories("${target}" PRIVATE "${directory}")
+ endforeach()
+endfunction()
+
+
+# This function takes a target as a parameter, followed by a list of sources.
+# Any sources with the .ui extension are passed on to uic and the generated output
+# is added to the target sources.
+function(qt_internal_autouic target)
+ if ("x${ARGN}" STREQUAL "x")
+ return()
+ endif()
+
+ set(_ui_files "")
+
+ foreach(s ${ARGN})
+ get_filename_component(ext "${s}" EXT)
+ if("${ext}" STREQUAL ".ui")
+ qt_create_uic_command("${s}" _ui_file)
+ list(APPEND _ui_files "${_ui_file}")
+ endif()
+ endforeach()
+ target_sources("${target}" PRIVATE "${_ui_files}")
+endfunction()
+
+
+# This function attempts to (poorly) parse the given resourceFile (.qrc) and
+# determine the dependencies, i.e. which files are intended for inclusion into
+# the Qt resource.
+function(qt_extract_qrc_dependencies resourceFile _out_depends _rc_depends)
+ get_filename_component(rc_path ${resourceFile} PATH)
+
+ if(EXISTS "${infile}")
+ # parse file for dependencies
+ # all files are absolute paths or relative to the location of the qrc file
+ file(READ "${infile}" RC_FILE_CONTENTS)
+ string(REGEX MATCHALL "<file[^<]+" RC_FILES "${RC_FILE_CONTENTS}")
+ set(RC_DEPENDS "")
+ foreach(RC_FILE ${RC_FILES})
+ string(REGEX REPLACE "^<file[^>]*>" "" RC_FILE "${RC_FILE}")
+ if(NOT IS_ABSOLUTE "${RC_FILE}")
+ set(RC_FILE "${rc_path}/${RC_FILE}")
+ endif()
+ set(RC_DEPENDS ${RC_DEPENDS} "${RC_FILE}")
+ endforeach()
+ # Since this cmake function is doing the dependency scanning for these files,
+ # let's make a configured file and add it as a dependency so cmake is run
+ # again when dependencies need to be recomputed.
+ qt_make_output_file("${infile}" "" "qrc.depends" out_depends)
+ configure_file("${infile}" "${out_depends}" COPYONLY)
+ else()
+ # The .qrc file does not exist (yet). Let's add a dependency and hope
+ # that it will be generated later
+ set(out_depends)
+ endif()
+
+ set(${_out_depends} ${out_depends} PARENT_SCOPE)
+ set(${_rc_depends} ${RC_DEPENDS} PARENT_SCOPE)
+endfunction()
+
+
+# This function creates the necessary rule to call rcc on the given
+# resource file and stores the name of the to-be generated C++ source
+# file (created by rcc) in the outCppFile variable.
+function(qt_create_rcc_command resourceFile outCppFile)
+ get_filename_component(outfilename "${resourceFile}" NAME_WE)
+ get_filename_component(infile "${resourceFile}" ABSOLUTE)
+ set(generatedCppFile "${CMAKE_CURRENT_BINARY_DIR}/qrc_${outfilename}.cpp")
+
+ qt_extract_qrc_dependencies("${infile}" _out_depends _rc_depends)
+ set_source_files_properties("${infile}" PROPERTIES SKIP_AUTORCC ON)
+
+ add_custom_command(OUTPUT "${generatedCppFile}"
+ COMMAND "Qt::rcc" --name "${outfilename}" --output "${generatedCppFile}" "${infile}"
+ MAIN_DEPENDENCY "${infile}"
+ DEPENDS "${_rc_depends}" "${_out_depends}" VERBATIM)
+ set_source_files_properties("${generatedCppFile}" PROPERTIES SKIP_AUTOMOC ON)
+ set_source_files_properties("${generatedCppFile}" PROPERTIES SKIP_AUTOUIC ON)
+ set("${outCppFile}" "${generatedCppFile}" PARENT_SCOPE)
+endfunction()
+
+
+# This function takes a target as a parameter, followed by a list of sources.
+# Any sources ending with the .qrc extension are treated as Qt resources and rules
+# to call rcc are generated. The source files rcc generates are added to the target.
+function(qt_internal_autorcc target)
+ if ("x${ARGN}" STREQUAL "x")
+ return()
+ endif()
+
+ set(_qrc_cpp_files "")
+
+ foreach(s ${ARGN})
+ get_filename_component(ext "${s}" EXT)
+ if("${ext}" STREQUAL ".qrc")
+ qt_create_rcc_command("${s}" _qrc_cpp_file)
+ list(APPEND _qrc_cpp_files "${_qrc_cpp_file}")
+ endif()
+ endforeach()
+ target_sources("${target}" PRIVATE "${_qrc_cpp_files}")
+endfunction()
+
+
+# This function takes a target as a parameter, followed by a list of sources.
+# The sources are scanned for .ui and .qrc as well as Q_OBJECT/Q_GADGET use
+# and rules to call uic/rcc/moc are created. Any generated sources are added
+# as private sources to the specified target.
+function(qt_internal_process_automatic_sources target)
+ qt_internal_automoc("${target}" ${ARGN})
+ qt_internal_autouic("${target}" ${ARGN})
+ qt_internal_autorcc("${target}" ${ARGN})
+endfunction()
+
+
+set(__default_private_args "SOURCES;LIBRARIES;INCLUDE_DIRECTORIES;DEFINES")
+set(__default_public_args "PUBLIC_LIBRARIES;PUBLIC_INCLUDE_DIRECTORIES;PUBLIC_DEFINES")
+
+
+# This function can be used to add sources/libraries/etc. to the specified CMake target
+# if the provided CONDITION evaluates to true.
+function(extend_target target)
+ if (NOT TARGET "${target}")
+ message(FATAL_ERROR "Trying to extend non-existing target \"${target}\".")
+ endif()
+ qt_parse_all_arguments(_arg "extend_target" "" ""
+ "CONDITION;${__default_public_args};${__default_private_args};COMPILE_FLAGS" ${ARGN})
+ if ("x${_arg_CONDITION}" STREQUAL x)
+ set(_arg_CONDITION ON)
+ endif()
+
+ qt_evaluate_config_expression(result ${_arg_CONDITION})
+ if (${result})
+ qt_internal_process_automatic_sources("${target}" ${_arg_SOURCES})
+
+ foreach(dep ${_arg_LIBRARIES} ${_arg_PUBLIC_LIBRARIES})
+ if("${dep}" MATCHES "Qt::(.+)(Private?)")
+ set(depTarget ${CMAKE_MATCH_1})
+
+ # Fetch features from dependencies and make them available to the
+ # caller as well as to the local scope for configure.cmake evaluation.
+
+ if("x${CMAKE_MATCH_2}" STREQUAL "xPrivate")
+ qt_push_features_into_parent_scope(PRIVATE_FEATURES ${depTarget})
+ qt_pull_features_into_current_scope(PRIVATE_FEATURES ${depTarget})
+ endif()
+ qt_push_features_into_parent_scope(PUBLIC_FEATURES ${depTarget})
+ qt_pull_features_into_current_scope(PUBLIC_FEATURES ${depTarget})
+ if(TARGET "${dep}")
+ continue()
+ endif()
+ find_package(Qt${PROJECT_VERSION_MAJOR}${depTarget} REQUIRED)
+ endif()
+ endforeach()
+
+ target_sources("${target}" PRIVATE ${_arg_SOURCES})
+ if (_arg_COMPILE_FLAGS)
+ set_source_files_properties(${_arg_SOURCES} PROPERTIES COMPILE_FLAGS "${_arg_COMPILE_FLAGS}")
+ endif()
+ target_include_directories("${target}" PUBLIC ${_arg_PUBLIC_INCLUDE_DIRECTORIES} PRIVATE ${_arg_INCLUDE_DIRECTORIES})
+ target_compile_definitions("${target}" PUBLIC ${_arg_PUBLIC_DEFINES} PRIVATE ${_arg_DEFINES})
+ target_link_libraries("${target}" PUBLIC ${_arg_PUBLIC_LIBRARIES} PRIVATE ${_arg_LIBRARIES})
+ endif()
+endfunction()
+
+
+function(qt_internal_library_deprecation_level result)
+ if(WIN32)
+ # On Windows, due to the way DLLs work, we need to export all functions,
+ # including the inlines
+ set("${result}" "QT_DISABLE_DEPRECATED_BEFORE=0x040800" PARENT_SCOPE)
+ else()
+ # On other platforms, Qt's own compilation goes needs to compile the Qt 5.0 API
+ set("${result}" "QT_DISABLE_DEPRECATED_BEFORE=0x050000" PARENT_SCOPE)
+ endif()
+endfunction()
+
+
+function(qt_read_headers_pri module resultVarPrefix)
+ qt_internal_module_include_dir(include_dir "${module}")
+ file(STRINGS "${include_dir}/headers.pri" headers_pri_contents)
+ foreach(line ${headers_pri_contents})
+ if("${line}" MATCHES "SYNCQT.HEADER_FILES = (.*)")
+ set(public_module_headers "${CMAKE_MATCH_1}")
+ separate_arguments(public_module_headers UNIX_COMMAND "${public_module_headers}")
+ elseif("${line}" MATCHES "SYNCQT.PRIVATE_HEADER_FILES = (.*)")
+ set(private_module_headers "${CMAKE_MATCH_1}")
+ separate_arguments(private_module_headers UNIX_COMMAND "${private_module_headers}")
+ elseif("${line}" MATCHES "SYNCQT.GENERATED_HEADER_FILES = (.*)")
+ set(generated_module_headers "${CMAKE_MATCH_1}")
+ separate_arguments(generated_module_headers UNIX_COMMAND "${generated_module_headers}")
+ foreach(generated_header ${generated_module_headers})
+ list(APPEND public_module_headers "${include_dir}/${generated_header}")
+ endforeach()
+ # Ignore INJECTIONS!
+ elseif("${line}" MATCHES "SYNCQT.([A-Z_]+)_HEADER_FILES = (.+)")
+ set(prefix "${CMAKE_MATCH_1}")
+ string(TOLOWER "${prefix}" prefix)
+ set(entries "${CMAKE_MATCH_2}")
+ separate_arguments(entries UNIX_COMMAND "${entries}")
+ set("${resultVarPrefix}_${prefix}" "${entries}" PARENT_SCOPE)
+ endif()
+ endforeach()
+ set(${resultVarPrefix}_public "${public_module_headers}" PARENT_SCOPE)
+ set(${resultVarPrefix}_private "${private_module_headers}" PARENT_SCOPE)
+endfunction()
+
+
+# This is the main entry function for creating a Qt module, that typically
+# consists of a library, public header files, private header files and configurable
+# features.
+#
+# A CMake target with the specified name parameter is created. If the current source
+# directory has a configure.cmake file, then that is also processed for feature definition
+# and testing. Any features defined as well as any features coming from dependencies to
+# this module are imported into the scope of the calling feature.
+function(add_qt_module name)
+ qt_parse_all_arguments(_arg "add_qt_module" "NO_MODULE_HEADERS;STATIC" "CONFIG_MODULE_NAME"
+ "${__default_private_args};${__default_public_args};FEATURE_DEPENDENCIES" ${ARGN})
+
+ _qt_module_name("${name}" module)
+ set(versioned_module_name "Qt${PROJECT_VERSION_MAJOR}${name}")
+ set(target "${name}")
+ string(TOUPPER "${name}" name_upper)
+ string(TOLOWER "${name}" name_lower)
+
+ set(known_modules "${KNOWN_QT_MODULES}" "${target}")
+ set(KNOWN_QT_MODULES ${known_modules} CACHE INTERNAL "Modules that are built." FORCE)
+
+ ### Define Targets:
+ if(${_arg_STATIC})
+ add_library("${target}" STATIC)
+ elseif(${QT_BUILD_SHARED_LIBS})
+ add_library("${target}" SHARED)
+ else()
+ add_library("${target}" STATIC)
+ endif()
+ add_library("Qt::${target}" ALIAS "${target}")
+
+ # Add _private target to link against the private headers:
+ set(target_private "${target}Private")
+ add_library("${target_private}" INTERFACE)
+ add_library("Qt::${target_private}" ALIAS ${target_private})
+
+ if(NOT DEFINED _arg_CONFIG_MODULE_NAME)
+ set(_arg_CONFIG_MODULE_NAME "${name_lower}")
+ endif()
+
+ # Import global features
+ if(NOT "${target}" STREQUAL "Core")
+ qt_push_features_into_parent_scope(PUBLIC_FEATURES PRIVATE_FEATURES FEATURE_PROPERTY_INFIX "GLOBAL_" Qt::Core)
+ endif()
+
+ # Fetch features from dependencies and make them available to the
+ # caller as well as to the local scope for configure.cmake evaluation.
+ foreach(dep ${_arg_LIBRARIES} ${_arg_PUBLIC_LIBRARIES})
+ if("${dep}" MATCHES "(Qt::.+)Private")
+ set(publicDep ${CMAKE_MATCH_1})
+ qt_push_features_into_parent_scope(PRIVATE_FEATURES ${publicDep})
+ qt_pull_features_into_current_scope(PRIVATE_FEATURES ${publicDep})
+ else()
+ set(publicDep ${dep})
+ endif()
+ qt_push_features_into_parent_scope(PUBLIC_FEATURES ${publicDep})
+ qt_pull_features_into_current_scope(PUBLIC_FEATURES ${publicDep})
+ endforeach()
+
+ if(NOT ${_arg_NO_MODULE_HEADERS})
+ qt_ensure_perl()
+ if(NOT DEFINED QT_SYNCQT)
+ get_target_property(mocPath "Qt::moc" LOCATION)
+ get_filename_component(binDirectory "${mocPath}" DIRECTORY)
+ # We could put this into the cache, but on the other hand there's no real need to
+ # pollute the app's cache with this. For the first qtbase build, the variable is
+ # set in global scope.
+ set(QT_SYNCQT "${binDirectory}/syncqt.pl")
+ endif()
+ execute_process(COMMAND "${HOST_PERL}" -w "${QT_SYNCQT}" -quiet -module "${module}" -version "${PROJECT_VERSION}" -outdir "${PROJECT_BINARY_DIR}" "${PROJECT_SOURCE_DIR}")
+ endif()
+
+ if(NOT ${_arg_NO_MODULE_HEADERS})
+ set_target_properties("${target}" PROPERTIES MODULE_HAS_HEADERS ON)
+ else()
+ set_target_properties("${target}" PROPERTIES MODULE_HAS_HEADERS OFF)
+ endif()
+
+ set_target_properties("${target}" PROPERTIES LIBRARY_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/${INSTALL_LIBDIR}")
+ set_target_properties("${target}" PROPERTIES RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/${INSTALL_BINDIR}")
+ set_target_properties("${target}" PROPERTIES OUTPUT_NAME "${versioned_module_name}")
+
+ qt_internal_module_include_dir(include_dir "${module}")
+
+ set(configureFile "${CMAKE_CURRENT_SOURCE_DIR}/configure.cmake")
+ if(EXISTS "${configureFile}")
+ qt_feature_module_begin(
+ LIBRARY "${module}"
+ PUBLIC_FILE "qt${_arg_CONFIG_MODULE_NAME}-config.h"
+ PRIVATE_FILE "qt${_arg_CONFIG_MODULE_NAME}-config_p.h"
+ PUBLIC_DEPENDENCIES ${_arg_FEATURE_DEPENDENCIES}
+ PRIVATE_DEPENDENCIES ${_arg_FEATURE_DEPENDENCIES}
+ )
+ include(${configureFile})
+ qt_feature_module_end("${target}")
+ qt_push_features_into_parent_scope(PUBLIC_FEATURES PRIVATE_FEATURES "${target}")
+
+ set_property(TARGET "${target}" APPEND PROPERTY PUBLIC_HEADER "${CMAKE_CURRENT_BINARY_DIR}/qt${_arg_CONFIG_MODULE_NAME}-config.h")
+ set_property(TARGET "${target}" APPEND PROPERTY PRIVATE_HEADER "${CMAKE_CURRENT_BINARY_DIR}/qt${_arg_CONFIG_MODULE_NAME}-config_p.h")
+
+ if("${target}" STREQUAL "Core")
+ set_property(TARGET "${target}" APPEND PROPERTY PUBLIC_HEADER "${CMAKE_CURRENT_BINARY_DIR}/global/qconfig.h")
+ set_property(TARGET "${target}" APPEND PROPERTY PRIVATE_HEADER "${CMAKE_CURRENT_BINARY_DIR}/global/qconfig_p.h")
+ endif()
+ endif()
+
+ qt_internal_library_deprecation_level(deprecation_define)
+
+ extend_target("${target}"
+ SOURCES ${_arg_SOURCES}
+ PUBLIC_INCLUDE_DIRECTORIES
+ $<BUILD_INTERFACE:${include_dir}>
+ $<INSTALL_INTERFACE:include/${module}>
+ ${_arg_PUBLIC_INCLUDE_DIRECTORIES}
+ INCLUDE_DIRECTORIES
+ "${CMAKE_CURRENT_SOURCE_DIR}"
+ "${CMAKE_CURRENT_BINARY_DIR}"
+ $<BUILD_INTERFACE:${PROJECT_BINARY_DIR}/include>
+ "${include_dir}/${PROJECT_VERSION}"
+ "${include_dir}/${PROJECT_VERSION}/${module}"
+ ${_arg_INCLUDE_DIRECTORIES}
+ PUBLIC_DEFINES
+ ${_arg_PUBLIC_DEFINES}
+ QT_${name_upper}_LIB
+ DEFINES
+ ${_arg_DEFINES}
+ QT_NO_CAST_TO_ASCII QT_ASCII_CAST_WARNINGS
+ QT_MOC_COMPAT #we don't need warnings from calling moc code in our generated code
+ QT_USE_QSTRINGBUILDER
+ QT_DEPRECATED_WARNINGS
+ QT_BUILDING_QT
+ QT_BUILD_${name_upper}_LIB ### FIXME: use QT_BUILD_ADDON for Add-ons or remove if we don't have add-ons anymore
+ "${deprecation_define}"
+ PUBLIC_LIBRARIES
+ ${_arg_PUBLIC_LIBRARIES}
+ LIBRARIES
+ ${_arg_LIBRARIES}
+ )
+
+ ### FIXME: Can we replace headers.pri?
+ qt_internal_module_include_dir(include_dir "${module}")
+ if(NOT ${_arg_NO_MODULE_HEADERS})
+ qt_read_headers_pri("${module}" "module_headers")
+ set_property(TARGET "${target}" APPEND PROPERTY PUBLIC_HEADER "${module_headers_public}")
+ set_property(TARGET "${target}" APPEND PROPERTY PRIVATE_HEADER "${module_headers_private}")
+ set_property(TARGET "${target}" APPEND PROPERTY PUBLIC_HEADER "${include_dir}/${module}Depends")
+ endif()
+
+ if(DEFINED module_headers_private)
+ qt_internal_add_linker_version_script("${target}" PRIVATE_HEADERS ${module_headers_private})
+ else()
+ qt_internal_add_linker_version_script("${target}")
+ endif()
+
+ qt_push_features_into_parent_scope(PUBLIC_FEATURES PRIVATE_FEATURES ${_arg_FEATURE_DEPENDENCIES})
+
+ install(TARGETS "${target}" "${target_private}" EXPORT "${versioned_module_name}Targets"
+ LIBRARY DESTINATION ${INSTALL_LIBDIR}
+ ARCHIVE DESTINATION ${INSTALL_LIBDIR}
+ PUBLIC_HEADER DESTINATION ${INSTALL_INCLUDEDIR}/${module}
+ PRIVATE_HEADER DESTINATION ${INSTALL_INCLUDEDIR}/${module}/${PROJECT_VERSION}/${module}/private
+ )
+
+ set(config_install_dir "${INSTALL_LIBDIR}/cmake/${versioned_module_name}")
+ install(EXPORT "${versioned_module_name}Targets" NAMESPACE Qt:: DESTINATION ${config_install_dir})
+
+ configure_package_config_file(
+ "${Qt${PROJECT_VERSION_MAJOR}_DIR}/QtModuleConfig.cmake.in"
+ "${CMAKE_CURRENT_BINARY_DIR}/${versioned_module_name}Config.cmake"
+ INSTALL_DESTINATION "${config_install_dir}"
+ )
+ write_basic_package_version_file(
+ ${CMAKE_CURRENT_BINARY_DIR}/${versioned_module_name}ConfigVersion.cmake
+ VERSION ${PROJECT_VERSION}
+ COMPATIBILITY AnyNewerVersion
+ )
+
+ set(extra_cmake_files)
+ if (EXISTS "${CMAKE_CURRENT_LIST_DIR}/${versioned_module_name}Macros.cmake")
+ list(APPEND extra_cmake_files "${CMAKE_CURRENT_LIST_DIR}/${versioned_module_name}Macros.cmake")
+ endif()
+
+ install(FILES
+ "${CMAKE_CURRENT_BINARY_DIR}/${versioned_module_name}Config.cmake"
+ "${CMAKE_CURRENT_BINARY_DIR}/${versioned_module_name}ConfigVersion.cmake"
+ ${extra_cmake_files}
+ DESTINATION "${config_install_dir}"
+ COMPONENT Devel
+ )
+
+ ### fixme: cmake is missing a built-in variable for this. We want to apply it only to modules and plugins
+ # that belong to Qt.
+ if (GCC)
+ qt_internal_add_link_flags("${target}" "-Wl,--no-undefined")
+ endif()
+
+ # When a public module depends on private, also make its private depend on the other's private
+ set(_qt_libs_private "")
+ foreach(it ${KNOWN_QT_MODULES})
+ list(FIND _arg_LIBRARIES "Qt::${it}Private" _pos)
+ if(_pos GREATER -1)
+ list(APPEND _qt_libs_private "Qt::${it}Private")
+ endif()
+ endforeach()
+
+ target_link_libraries("${target_private}" INTERFACE "${target}" "${_qt_libs_private}")
+
+ qt_internal_module_include_dir(include_dir "${module}")
+ target_include_directories("${target_private}" INTERFACE
+ $<BUILD_INTERFACE:${CMAKE_CURRENT_BINARY_DIR}>
+ $<BUILD_INTERFACE:${include_dir}/${PROJECT_VERSION}>
+ $<BUILD_INTERFACE:${include_dir}/${PROJECT_VERSION}/${module}>
+ $<INSTALL_INTERFACE:include/${module}/${PROJECT_VERSION}>
+ $<INSTALL_INTERFACE:include/${module}/${PROJECT_VERSION}/${module}>
+ )
+endfunction()
+
+
+# This is the main entry point for defining Qt plugins.
+# A CMake target is created with the given name. The TYPE parameter is needed to place the
+# plugin into the correct plugins/ sub-directory.
+function(add_qt_plugin name)
+ # This is a copy paste of add_qt_module with minor changes and some commented out stuff.
+ # FIXME !!!
+ set(module "${name}")
+ string(TOUPPER "${name}" name_upper)
+
+ qt_parse_all_arguments(_arg "add_qt_plugin" "" "TYPE" "${__default_private_args};${__default_public_args}" ${ARGN})
+ if (NOT DEFINED _arg_TYPE)
+ message(FATAL_ERROR "add_qt_plugin called without setting a TYPE.")
+ endif()
+
+ add_library("${module}")
+ set_target_properties("${module}" PROPERTIES LIBRARY_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/${INSTALL_PLUGINSDIR}/${_arg_TYPE}")
+ set_target_properties("${module}" PROPERTIES RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/${INSTALL_BINDIR}")
+
+ # Import global features
+ qt_push_features_into_parent_scope(PUBLIC_FEATURES PRIVATE_FEATURES FEATURE_PROPERTY_INFIX "GLOBAL_" Qt::Core)
+
+ # Fetch features from dependencies and make them available to the
+ # caller as well as to the local scope for configure.cmake evaluation.
+ foreach(dep ${_arg_LIBRARIES} ${_arg_PUBLIC_LIBRARIES})
+ if("${dep}" MATCHES "(Qt::.+)Private")
+ set(publicDep ${CMAKE_MATCH_1})
+ qt_push_features_into_parent_scope(PRIVATE_FEATURES ${publicDep})
+ qt_pull_features_into_current_scope(PRIVATE_FEATURES ${publicDep})
+ else()
+ set(publicDep ${dep})
+ endif()
+ qt_push_features_into_parent_scope(PUBLIC_FEATURES ${publicDep})
+ qt_pull_features_into_current_scope(PUBLIC_FEATURES ${publicDep})
+ endforeach()
+
+ qt_internal_library_deprecation_level(deprecation_define)
+
+ extend_target("${module}"
+ SOURCES ${_arg_SOURCES}
+ INCLUDE_DIRECTORIES
+ "${CMAKE_CURRENT_SOURCE_DIR}"
+ "${CMAKE_CURRENT_BINARY_DIR}"
+ ${_arg_INCLUDE_DIRECTORIES}
+ PUBLIC_INCLUDE_DIRECTORIES ${_arg_PUBLIC_INCLUDE_DIRECTORIES}
+ LIBRARIES ${_arg_LIBRARIES}
+ PUBLIC_LIBRARIES ${_arg_PUBLIC_LIBRARIES}
+ DEFINES
+ ${_arg_DEFINES}
+ QT_NO_CAST_TO_ASCII QT_ASCII_CAST_WARNINGS
+ QT_MOC_COMPAT #we don't need warnings from calling moc code in our generated code
+ QT_USE_QSTRINGBUILDER
+ QT_DEPRECATED_WARNINGS
+ QT_BUILDING_QT
+ QT_BUILD_${name_upper}_LIB ### FIXME: use QT_BUILD_ADDON for Add-ons or remove if we don't have add-ons anymore
+ "${deprecation_define}"
+ PUBLIC_DEFINES
+ QT_${name_upper}_LIB
+ ${_arg_PUBLIC_DEFINES}
+ )
+
+ install(TARGETS "${module}" EXPORT "${module}Targets"
+ LIBRARY DESTINATION ${INSTALL_PLUGINSDIR}/${_arg_TYPE}
+ ARCHIVE DESTINATION ${INSTALL_LIBDIR}/${_arg_TYPE}
+ )
+ install(EXPORT "${module}Targets" NAMESPACE Qt:: DESTINATION ${INSTALL_LIBDIR}/cmake)
+
+ ### fixme: cmake is missing a built-in variable for this. We want to apply it only to modules and plugins
+ # that belong to Qt.
+ if (GCC)
+ qt_internal_add_link_flags("${module}" "-Wl,--no-undefined")
+ endif()
+
+ qt_internal_add_linker_version_script(${module})
+endfunction()
+
+
+# This function creates a CMake target for a generic console or GUI binary.
+# Please consider to use a more specific version target like the one created
+# by add_qt_test or add_qt_tool below.
+function(add_qt_executable name)
+ qt_parse_all_arguments(_arg "add_qt_executable" "GUI" "OUTPUT_DIRECTORY" "EXE_FLAGS;${__default_private_args}" ${ARGN})
+
+ if ("x${_arg_OUTPUT_DIRECTORY}" STREQUAL "x")
+ set(_arg_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/${INSTALL_BINDIR}")
+ endif()
+
+ add_executable("${name}" ${_arg_EXE_FLAGS})
+ extend_target("${name}"
+ SOURCES ${_arg_SOURCES}
+ INCLUDE_DIRECTORIES
+ "${CMAKE_CURRENT_SOURCE_DIR}"
+ "${CMAKE_CURRENT_BINARY_DIR}"
+ ${_arg_INCLUDE_DIRECTORIES}
+ DEFINES ${_arg_DEFINES}
+ LIBRARIES ${_arg_LIBRARIES}
+ )
+ set_target_properties("${name}" PROPERTIES
+ RUNTIME_OUTPUT_DIRECTORY "${_arg_OUTPUT_DIRECTORY}"
+ WIN32_EXECUTABLE "${_arg_GUI}"
+ MACOSX_BUNDLE "${_arg_GUI}"
+ )
+endfunction()
+
+
+# This function creates a CMake test target with the specified name for use with CTest.
+function(add_qt_test name)
+ qt_parse_all_arguments(_arg "add_qt_test" "RUN_SERIAL" "" "${__default_private_args}" ${ARGN})
+ set(_path "${CMAKE_CURRENT_BINARY_DIR}")
+
+ add_qt_executable("${name}"
+ OUTPUT_DIRECTORY "${_path}"
+ SOURCES "${_arg_SOURCES}"
+ INCLUDE_DIRECTORIES
+ "${CMAKE_CURRENT_SOURCE_DIR}"
+ "${CMAKE_CURRENT_BINARY_DIR}"
+ "${_arg_INCLUDE_DIRECTORIES}"
+ DEFINES "${_arg_DEFINES}"
+ LIBRARIES "Qt::Core;Qt::Test;${_arg_LIBRARIES}"
+ )
+
+ add_test(NAME "${name}" COMMAND "${name}" WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}")
+
+ set_tests_properties("${name}" PROPERTIES RUN_SERIAL "${_arg_RUN_SERIAL}")
+ set_property(TEST "${name}" APPEND PROPERTY ENVIRONMENT "PATH=${_path}${QT_PATH_SEPARATOR}${CMAKE_CURRENT_BINARY_DIR}${QT_PATH_SEPARATOR}$ENV{PATH}")
+ set_property(TEST "${name}" APPEND PROPERTY ENVIRONMENT "QT_PLUGIN_PATH=${PROJECT_BINARY_DIR}/${INSTALL_PLUGINSDIR}")
+endfunction()
+
+
+# This function creates an executable for use as helper program with tests. Some
+# tests launch separate programs to test certainly input/output behavior.
+function(add_qt_test_helper name)
+ add_qt_executable("${name}" OUTPUT_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}" ${ARGN})
+endfunction()
+
+
+# This function is used to define a "Qt tool", such as moc, uic or rcc.
+# The BOOTSTRAP option allows building it as standalone program, otherwise
+# it will be linked against QtCore.
+function(add_qt_tool name)
+ qt_parse_all_arguments(_arg "add_qt_tool" "BOOTSTRAP" "" "${__default_private_args}" ${ARGN})
+
+ if (_arg_BOOTSTRAP)
+ set(corelib Qt::Bootstrap)
+ else()
+ set(corelib Qt::Core)
+ endif()
+
+ add_qt_executable("${name}" OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/${INSTALL_BINDIR}"
+ # Do not pass sources here: They may not get processed when BOOTSTRAP is set!
+ INCLUDE_DIRECTORIES
+ ${_arg_INCLUDE_DIRECTORIES}
+ DEFINES ${_arg_DEFINES}
+ LIBRARIES ${corelib} ${_arg_LIBRARIES}
+ )
+ target_sources("${name}" PRIVATE "${_arg_SOURCES}")
+ add_executable("Qt::${name}" ALIAS "${name}")
+
+ if (NOT _arg_BOOTSTRAP)
+ qt_internal_process_automatic_sources("${name}" ${_arg_SOURCES})
+ endif()
+
+ install(TARGETS "${name}" EXPORT "Qt${PROJECT_VERSION_MAJOR}ToolsTargets" DESTINATION ${INSTALL_TARGETS_DEFAULT_ARGS})
+endfunction()
+
+
+
+function(qt_create_tracepoints name tracePointsFile)
+ #### TODO
+ string(TOLOWER "${name}" name)
+
+ file(GENERATE OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/qt${name}_tracepoints_p.h" CONTENT
+ "#include <private/qtrace_p.h>")
+endfunction()
+
+
+
+function(add_qt_resource target resourceName)
+ qt_parse_all_arguments(rcc "add_qt_resource" "" "PREFIX;BASE" "FILES" ${ARGN})
+
+ set(qrcContents "<RCC>")
+ if (${rcc_PREFIX})
+ string(APPEND qrcContents " <qresource>\n")
+ else()
+ string(APPEND qrcContents " <qresource prefix=\"${rcc_PREFIX}\">\n")
+ endif()
+
+ foreach(file ${rcc_FILES})
+ get_property(alias SOURCE ${file} PROPERTY alias)
+ if (NOT alias)
+ set(alias "${file}")
+ endif()
+ ### FIXME: escape file paths to be XML conform
+ string(APPEND qrcContents " <file alias=\"${alias}\">${CMAKE_CURRENT_SOURCE_DIR}/${file}</file>\n")
+ endforeach()
+
+ string(APPEND qrcContents " </qresource>\n</RCC>\n")
+ set(generatedResourceFile "${CMAKE_CURRENT_BINARY_DIR}/${resourceName}.qrc")
+ file(GENERATE OUTPUT "${generatedResourceFile}" CONTENT "${qrcContents}")
+
+ set(generatedSourceCode "${CMAKE_CURRENT_BINARY_DIR}/qrc_${resourceName}.cpp")
+ add_custom_command(OUTPUT "${generatedSourceCode}"
+ COMMAND "Qt::rcc"
+ ARGS --name "${resourceName}"
+ --output "${generatedSourceCode}" "${generatedResourceFile}"
+ DEPENDS ${files}
+ COMMENT "RCC ${resourceName}"
+ VERBATIM)
+ target_sources(${target} PRIVATE "${generatedSourceCode}")
+endfunction()
+
+# From Qt5CoreMacros
+# Function used to create the names of output files preserving relative dirs
+function(qt_make_output_file infile prefix ext result)
+ string(LENGTH ${CMAKE_CURRENT_BINARY_DIR} _binlength)
+ string(LENGTH ${infile} _infileLength)
+ set(_checkinfile ${CMAKE_CURRENT_SOURCE_DIR})
+ if(_infileLength GREATER _binlength)
+ string(SUBSTRING "${infile}" 0 ${_binlength} _checkinfile)
+ if(_checkinfile STREQUAL "${CMAKE_CURRENT_BINARY_DIR}")
+ file(RELATIVE_PATH rel ${CMAKE_CURRENT_BINARY_DIR} ${infile})
+ else()
+ file(RELATIVE_PATH rel ${CMAKE_CURRENT_SOURCE_DIR} ${infile})
+ endif()
+ else()
+ file(RELATIVE_PATH rel ${CMAKE_CURRENT_SOURCE_DIR} ${infile})
+ endif()
+ if(WIN32 AND rel MATCHES "^([a-zA-Z]):(.*)$") # absolute path
+ set(rel "${CMAKE_MATCH_1}_${CMAKE_MATCH_2}")
+ endif()
+ set(_outfile "${CMAKE_CURRENT_BINARY_DIR}/${rel}")
+ string(REPLACE ".." "__" _outfile "${_outfile}")
+ get_filename_component(outpath "${_outfile}" PATH)
+ get_filename_component(_outfile "${_outfile}" NAME_WE)
+ file(MAKE_DIRECTORY "${outpath}")
+ set(full_outfile "${outpath}/${prefix}${_outfile}.${ext}")
+ set("${result}" "${full_outfile}" PARENT_SCOPE)
+endfunction()
+
+macro(qt_get_moc_flags _moc_flags)
+ set(${_moc_flags})
+ get_directory_property(_inc_DIRS INCLUDE_DIRECTORIES)
+
+ if(CMAKE_INCLUDE_CURRENT_DIR)
+ list(APPEND _inc_DIRS ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR})
+ endif()
+
+ foreach(_current ${_inc_DIRS})
+ if("${_current}" MATCHES "\\.framework/?$")
+ string(REGEX REPLACE "/[^/]+\\.framework" "" framework_path "${_current}")
+ set(${_moc_flags} ${${_moc_flags}} "-F${framework_path}")
+ else()
+ set(${_moc_flags} ${${_moc_flags}} "-I${_current}")
+ endif()
+ endforeach()
+
+ get_directory_property(_defines COMPILE_DEFINITIONS)
+ foreach(_current ${_defines})
+ set(${_moc_flags} ${${_moc_flags}} "-D${_current}")
+ endforeach()
+
+ if(WIN32)
+ set(${_moc_flags} ${${_moc_flags}} -DWIN32)
+ endif()
+ if (MSVC)
+ set(${_moc_flags} ${${_moc_flags}} --compiler-flavor=msvc)
+ endif()
+endmacro()
+
+
+# helper to set up a moc rule
+function(qt_create_moc_command infile outfile moc_flags moc_options moc_target moc_depends)
+ # Pass the parameters in a file. Set the working directory to
+ # be that containing the parameters file and reference it by
+ # just the file name. This is necessary because the moc tool on
+ # MinGW builds does not seem to handle spaces in the path to the
+ # file given with the @ syntax.
+ get_filename_component(_moc_outfile_name "${outfile}" NAME)
+ get_filename_component(_moc_outfile_dir "${outfile}" PATH)
+ if(_moc_outfile_dir)
+ set(_moc_working_dir WORKING_DIRECTORY "${_moc_outfile_dir}")
+ endif()
+ set (_moc_parameters_file "${outfile}_parameters")
+ set (_moc_parameters ${moc_flags} ${moc_options} -o "${outfile}" "${infile}")
+ string (REPLACE ";" "\n" _moc_parameters "${_moc_parameters}")
+
+ if(moc_target)
+ set(_moc_parameters_file "${_moc_parameters_file}$<$<BOOL:$<CONFIGURATION>>:_$<CONFIGURATION>>")
+ set(targetincludes "$<TARGET_PROPERTY:${moc_target},INCLUDE_DIRECTORIES>")
+ set(targetdefines "$<TARGET_PROPERTY:${moc_target},COMPILE_DEFINITIONS>")
+
+ set(targetincludes "$<$<BOOL:${targetincludes}>:-I$<JOIN:${targetincludes},\n-I>\n>")
+ set(targetdefines "$<$<BOOL:${targetdefines}>:-D$<JOIN:${targetdefines},\n-D>\n>")
+
+ file (GENERATE
+ OUTPUT "${_moc_parameters_file}"
+ CONTENT "${targetdefines}${targetincludes}${_moc_parameters}\n"
+ )
+
+ set(targetincludes)
+ set(targetdefines)
+ else()
+ file(WRITE ${_moc_parameters_file} "${_moc_parameters}\n")
+ endif()
+
+ set(_moc_extra_parameters_file @${_moc_parameters_file})
+ add_custom_command(OUTPUT "${outfile}"
+ COMMAND "Qt::moc" "${_moc_extra_parameters_file}"
+ DEPENDS "${infile}" ${moc_depends}
+ ${_moc_working_dir}
+ VERBATIM)
+endfunction()
+
+
+# helper to set up a uic rule
+function(qt_create_uic_command infile _result)
+ # Pass the parameters in a file. Set the working directory to
+ # be that containing the parameters file and reference it by
+ # just the file name. This is necessary because the moc tool on
+ # MinGW builds does not seem to handle spaces in the path to the
+ # file given with the @ syntax.
+ get_filename_component(_uic_basename "${infile}" NAME_WE)
+ set(outfile "ui_${_uic_basename}.h")
+ add_custom_command(OUTPUT "${outfile}"
+ COMMAND "Qt::uic" "${CMAKE_CURRENT_SOURCE_DIR}/${infile}" -o "${CMAKE_CURRENT_BINARY_DIR}/${outfile}"
+ DEPENDS "${infile}"
+ COMMENT "Running UIC on ${infile}."
+ VERBATIM)
+ set(${_result} "${CMAKE_CURRENT_BINARY_DIR}/${outfile}" PARENT_SCOPE)
+endfunction()
+
+
+function(qt_generate_forwarding_headers module)
+ qt_parse_all_arguments(_arg "qt_generate_forwarding_headers"
+ "PRIVATE" "SOURCE;DESTINATION" "CLASSES" ${ARGN})
+ qt_internal_module_include_dir(include_dir "${module}")
+
+ if (NOT _arg_DESTINATION)
+ get_filename_component(_arg_DESTINATION "${_arg_SOURCE}" NAME)
+ endif()
+
+ if (_arg_PRIVATE)
+ set(main_fwd "${include_dir}/${PROJECT_VERSION}/${module}/private/${_arg_DESTINATION}")
+ else()
+ set(main_fwd "${include_dir}/${_arg_DESTINATION}")
+ endif()
+
+ get_filename_component(main_fwd_dir "${main_fwd}" DIRECTORY)
+ file(RELATIVE_PATH relpath "${main_fwd_dir}" "${CMAKE_CURRENT_BINARY_DIR}/${_arg_SOURCE}")
+ set(main_contents "#include \"${relpath}\"")
+ file(GENERATE OUTPUT "${main_fwd}" CONTENT "${main_contents}")
+
+ foreach(class_fwd ${_arg_CLASSES})
+ set(class_fwd_contents "#include \"${fwd_hdr}\"")
+ message("Generating forwarding header: ${class_fwd} -> ${relpath}.")
+ file(GENERATE OUTPUT "${include_dir}/${class_fwd}" CONTENT "${class_fwd_contents}")
+ endforeach()
+endfunction()
+
+
+function(add_qt_docs qdocFile)
+ # TODO
+endfunction()
diff --git a/cmake/QtCompilerOptimization.cmake b/cmake/QtCompilerOptimization.cmake
new file mode 100644
index 0000000000..151d06925b
--- /dev/null
+++ b/cmake/QtCompilerOptimization.cmake
@@ -0,0 +1,106 @@
+if (QCC)
+ set(QT_CFLAGS_SSE2 "-msse2")
+ set(QT_CFLAGS_SSE3 "-msse3")
+ set(QT_CFLAGS_SSSE3 "-mssse3")
+ set(QT_CFLAGS_SSE4_1 "-msse4.1")
+ set(QT_CFLAGS_SSE4_2 "-msse4.2")
+ set(QT_CFLAGS_AVX "-mavx")
+ set(QT_CFLAGS_AVX2 "-mavx2")
+ set(QT_CFLAGS_AESNI "-maes")
+ set(QT_CFLAGS_SHANI "-msha")
+endif()
+
+if (MSVC)
+ if (QT_64BIT)
+ # SSE2 is mandatory on 64-bit mode, so skip the option. It triggers:
+ # cl : Command line warning D9002 : ignoring unknown option '-arch:SSE2'
+ set(QT_CFLAGS_SSE2 "")
+ else()
+ set(QT_CFLAGS_SSE2 "-arch:SSE2")
+ endif()
+ set(QT_CFLAGS_SSE3 "${QT_CFLAGS_SSE2}")
+ set(QT_CFLAGS_SSSE3 "${QT_CFLAGS_SSE2}")
+ set(QT_CFLAGS_SSE4_1 "${QT_CFLAGS_SSE2}")
+ set(QT_CFLAGS_SSE4_2 "${QT_CFLAGS_SSE2}")
+ set(QT_CFLAGS_AESNI "${QT_CFLAGS_SSE2}")
+ set(QT_CFLAGS_SHANI "${QT_CFLAGS_SSE2}")
+endif()
+
+if(GCC OR CLANG)
+ set(QT_CFLAGS_SSE2 "-msse2")
+ set(QT_CFLAGS_SSE3 "-msse3")
+ set(QT_CFLAGS_SSSE3 "-mssse3")
+ set(QT_CFLAGS_SSE4_1 "-msse4.1")
+ set(QT_CFLAGS_SSE4_2 "-msse4.2")
+ set(QT_CFLAGS_F16C "-mf16c")
+ set(QT_CFLAGS_RDRND "-mrdrnd")
+ set(QT_CFLAGS_AVX "-mavx")
+ set(QT_CFLAGS_AVX2 "-mavx2")
+ set(QT_CFLAGS_AVX512F "-mavx512f")
+ set(QT_CFLAGS_AVX512ER "-mavx512er")
+ set(QT_CFLAGS_AVX512CD "-mavx512cd")
+ set(QT_CFLAGS_AVX512PF "-mavx512pf")
+ set(QT_CFLAGS_AVX512DQ "-mavx512dq")
+ set(QT_CFLAGS_AVX512BW "-mavx512bw")
+ set(QT_CFLAGS_AVX512VL "-mavx512vl")
+ set(QT_CFLAGS_AVX512IFMA "-mavx512ifma")
+ set(QT_CFLAGS_AVX512VBMI "-mavx512vbmi")
+ set(QT_CFLAGS_AESNI "-maes")
+ set(QT_CFLAGS_SHANI "-msha")
+ set(QT_CFLAGS_NEON "-mfpu=neon")
+ set(QT_CFLAGS_MIPS_DSP "-mdsp")
+ set(QT_CFLAGS_MIPS_DSPR2 "-mdspr2")
+endif()
+
+if (winrt) # FIXME: Correct variable
+ set(QT_CFLAGS_SSE2 "-arch:SSE2")
+ set(QT_CFLAGS_SSE3 "-arch:SSE2")
+ set(QT_CFLAGS_SSSE3 "-arch:SSE2")
+ set(QT_CFLAGS_SSE4_1 "-arch:SSE2")
+ set(QT_CFLAGS_SSE4_2 "-arch:SSE2")
+ set(QT_CFLAGS_AVX "-arch:AVX")
+ set(QT_CFLAGS_AVX2 "-arch:AVX")
+ set(QT_CFLAGS_AESNI "-arch:SSE2")
+ set(QT_CFLAGS_SHANI "-arch:SSE2")
+endif()
+
+if (ICC)
+ if (MSVC)
+ set(QT_CFLAGS_SSE2 "-QxSSE2")
+ set(QT_CFLAGS_SSE3 "-QxSSE3")
+ set(QT_CFLAGS_SSSE3 "-QxSSSE3")
+ set(QT_CFLAGS_SSE4_1 "-QxSSE4.1")
+ set(QT_CFLAGS_SSE4_2 "-QxSSE4.2")
+ set(QT_CFLAGS_AVX "-QxAVX")
+ set(QT_CFLAGS_AVX2 "-QxCORE-AVX2")
+ set(QT_CFLAGS_AVX512F "-QxCOMMON-AVX512")
+ set(QT_CFLAGS_AVX512CD "-QxCOMMON-AVX512")
+ set(QT_CFLAGS_AVX512ER "-QxMIC-AVX512")
+ set(QT_CFLAGS_AVX512PF "-QxMIC-AVX512")
+ set(QT_CFLAGS_AVX512DQ "-QxCORE-AVX512")
+ set(QT_CFLAGS_AVX512BW "-QxCORE-AVX512")
+ set(QT_CFLAGS_AVX512VL "-QxCORE-AVX512")
+ set(QT_CFLAGS_F16C "${QT_CFLAGS_AVX2}")
+ set(QT_CFLAGS_AESNI "-QxSSE2")
+ set(QT_CFLAGS_SHANI "-QxSSE4.2")
+ else()
+ set(QT_CFLAGS_SSE2 "-msse2")
+ set(QT_CFLAGS_SSE3 "-msse3")
+ set(QT_CFLAGS_SSSE3 "-mssse3")
+ set(QT_CFLAGS_SSE4_1 "-msse4.1")
+ set(QT_CFLAGS_SSE4_2 "-msse4.2")
+ set(QT_CFLAGS_AVX "-march=core-avx")
+ set(QT_CFLAGS_AVX2 "-march=core-avx2")
+ set(QT_CFLAGS_AVX512F "-march=broadwell -xCOMMON-AVX512")
+ set(QT_CFLAGS_AVX512CD "-march=broadwell -xCOMMON-AVX512")
+ set(QT_CFLAGS_AVX512ER "-march=knl")
+ set(QT_CFLAGS_AVX512PF "-march=knl")
+ set(QT_CFLAGS_AVX512DQ "-march=skylake-avx512")
+ set(QT_CFLAGS_AVX512BW "-march=skylake-avx512")
+ set(QT_CFLAGS_AVX512VL "-march=skylake-avx512")
+ set(QT_CFLAGS_AESNI "-maes")
+ set(QT_CFLAGS_F16C "${QT_CFLAGS_AVX2}")
+ set(QT_CFLAGS_RDRND "-mrdrnd")
+ set(QT_CFLAGS_SHANI "-msha")
+ endif()
+endif()
diff --git a/cmake/QtConfig.cmake.in b/cmake/QtConfig.cmake.in
new file mode 100644
index 0000000000..ad618b7acc
--- /dev/null
+++ b/cmake/QtConfig.cmake.in
@@ -0,0 +1,43 @@
+@PACKAGE_INIT@
+
+# Slightly amended version of ./src/corelib/Qt5Config.cmake.in
+if (CMAKE_VERSION VERSION_LESS 3.1.0)
+ message(FATAL_ERROR "Qt requires at least CMake version 3.1.0")
+endif()
+
+get_filename_component(_qt5_install_prefix "${CMAKE_CURRENT_LIST_DIR}/.." ABSOLUTE)
+
+include("${CMAKE_CURRENT_LIST_DIR}/Qt5Targets.cmake")
+include("${CMAKE_CURRENT_LIST_DIR}/Qt5ToolsTargets.cmake")
+
+# if (NOT Qt_FIND_COMPONENTS)
+# set(Qt_NOT_FOUND_MESSAGE "The Qt package requires at least one component")
+# set(Qt_FOUND False)
+# return()
+# endif()
+
+foreach(module ${Qt_FIND_COMPONENTS})
+ find_package(Qt${module}
+ ${_Qt_FIND_PARTS_QUIET}
+ ${_Qt_FIND_PARTS_REQUIRED}
+ PATHS ${_qt_install_prefix} NO_DEFAULT_PATH
+ )
+ if (NOT Qt${module}_FOUND)
+ string(CONFIGURE ${_qt5_module_location_template} _expected_module_location @ONLY)
+
+ if (Qt_FIND_REQUIRED_${module})
+ set(_Qt_NOTFOUND_MESSAGE "${_Qt_NOTFOUND_MESSAGE}Failed to find Qt component \"${module}\" config file at \"${_expected_module_location}\"\n")
+ elseif(NOT Qt_FIND_QUIETLY)
+ message(WARNING "Failed to find Qt component \"${module}\" config file at \"${_expected_module_location}\"")
+ endif()
+
+ unset(_expected_module_location)
+ endif()
+endforeach()
+
+set(QT_BUILD_SHARED_LIBS @BUILD_SHARED_LIBS@)
+
+if (_Qt_NOTFOUND_MESSAGE)
+ set(Qt_NOT_FOUND_MESSAGE "${_Qt_NOTFOUND_MESSAGE}")
+ set(Qt_FOUND False)
+endif()
diff --git a/cmake/QtFeature.cmake b/cmake/QtFeature.cmake
new file mode 100644
index 0000000000..a4d9421935
--- /dev/null
+++ b/cmake/QtFeature.cmake
@@ -0,0 +1,435 @@
+function(qt_feature_module_begin)
+ qt_parse_all_arguments(_arg "qt_feature_module_begin"
+ "" "LIBRARY;PRIVATE_FILE;PUBLIC_FILE" "PUBLIC_DEPENDENCIES;PRIVATE_DEPENDENCIES" ${ARGN})
+
+ if ("${_arg_LIBRARY}" STREQUAL "")
+ message(FATAL_ERROR "qt_feature_begin_module needs a LIBRARY name!")
+ endif()
+ if ("${_arg_PUBLIC_FILE}" STREQUAL "")
+ message(FATAL_ERROR "qt_feature_begin_module needs a PUBLIC_FILE name!")
+ endif()
+ if ("${_arg_PRIVATE_FILE}" STREQUAL "")
+ message(FATAL_ERROR "qt_feature_begin_module needs a PRIVATE_FILE name!")
+ endif()
+
+ set(__QtFeature_library "${_arg_LIBRARY}" PARENT_SCOPE)
+ set(__QtFeature_private_features "" PARENT_SCOPE)
+ set(__QtFeature_public_features "" PARENT_SCOPE)
+
+ set(__QtFeature_private_file "${_arg_PRIVATE_FILE}" PARENT_SCOPE)
+ set(__QtFeature_public_file "${_arg_PUBLIC_FILE}" PARENT_SCOPE)
+
+ set(__QtFeature_private_extra "" PARENT_SCOPE)
+ set(__QtFeature_public_extra "" PARENT_SCOPE)
+
+ qt_push_features_into_parent_scope(PUBLIC_FEATURES ${_arg_PUBLIC_DEPENDENCIES})
+ qt_push_features_into_parent_scope(PRIVATE_FEATURES ${_arg_PRIVATE_DEPENDENCIES})
+endfunction()
+
+function(qt_feature _feature)
+ set(QT_FEATURE_DEFINITION_${_feature} ${ARGN} PARENT_SCOPE)
+ qt_parse_all_arguments(_arg "qt_feature"
+ "PRIVATE;PUBLIC"
+ "LABEL;PURPOSE;SECTION;" "AUTODETECT;CONDITION;ENABLE;DISABLE;EMIT_IF" ${ARGN})
+
+ if("${_arg_EMIT_IF}" STREQUAL "")
+ set(_arg_EMIT_IF 1)
+ endif()
+
+ if (${_arg_EMIT_IF})
+ set(QT_FEATURE_${_feature} "UNSET" CACHE STRING "${_arg_LABEL}")
+ set_property(CACHE QT_FEATURE_${_feature} PROPERTY STRINGS UNSET ON OFF)
+
+ # Register feature for future use:
+ if (_arg_PUBLIC)
+ list(APPEND __QtFeature_public_features "${_feature}")
+ endif()
+ if (_arg_PRIVATE)
+ list(APPEND __QtFeature_private_features "${_feature}")
+ endif()
+ endif()
+ set(__QtFeature_public_features ${__QtFeature_public_features} PARENT_SCOPE)
+ set(__QtFeature_private_features ${__QtFeature_private_features} PARENT_SCOPE)
+endfunction()
+
+function(qt_evaluate_to_boolean expressionVar)
+ if(${${expressionVar}})
+ set(${expressionVar} ON PARENT_SCOPE)
+ else()
+ set(${expressionVar} OFF PARENT_SCOPE)
+ endif()
+endfunction()
+
+function(qt_evaluate_config_expression resultVar)
+ set(result "")
+ set(nestingLevel 0)
+ set(skipNext OFF)
+ set(expression "${ARGN}")
+ list(LENGTH expression length)
+
+ math(EXPR length "${length}-1")
+ foreach(memberIdx RANGE ${length})
+ if(${skipNext})
+ set(skipNext OFF)
+ continue()
+ endif()
+
+ list(GET expression ${memberIdx} member)
+
+ if("${member}" STREQUAL "(")
+ if(${nestingLevel} GREATER 0)
+ list(APPEND result ${member})
+ endif()
+ math(EXPR nestingLevel "${nestingLevel} + 1")
+ continue()
+ elseif("${member}" STREQUAL ")")
+ math(EXPR nestingLevel "${nestingLevel} - 1")
+ if(nestingLevel LESS 0)
+ break()
+ endif()
+ if(${nestingLevel} EQUAL 0)
+ qt_evaluate_config_expression(result ${result})
+ else()
+ list(APPEND result ${member})
+ endif()
+ continue()
+ elseif(${nestingLevel} GREATER 0)
+ list(APPEND result ${member})
+ continue()
+ elseif("${member}" STREQUAL "NOT")
+ list(APPEND result ${member})
+ continue()
+ elseif("${member}" STREQUAL "AND")
+ qt_evaluate_to_boolean(result)
+ if(NOT ${result})
+ break()
+ endif()
+ set(result "")
+ elseif("${member}" STREQUAL "OR")
+ qt_evaluate_to_boolean(result)
+ if(${result})
+ break()
+ endif()
+ set(result "")
+ elseif("${member}" STREQUAL "STREQUAL" AND memberIdx LESS ${length})
+ # Unfortunately the semantics for STREQUAL in if() are broken when the
+ # RHS is an empty string and the parameters to if are coming through a variable.
+ # So we expect people two write the empty string with single quotes and then we
+ # do the comparison manually here.
+ list(LENGTH result lhsIndex)
+ math(EXPR lhsIndex "${lhsIndex}-1")
+ list(GET result ${lhsIndex} lhs)
+ list(REMOVE_AT result ${lhsIndex})
+ set(lhs "${${lhs}}")
+
+ math(EXPR rhsIndex "${memberIdx}+1")
+ set(skipNext ON)
+
+ list(GET expression ${rhsIndex} rhs)
+ # We can't pass through an empty string with double quotes through various
+ # stages of substitution, so instead it is represented using single quotes
+ # and resolve here.
+ string(REGEX REPLACE "'(.*)'" "\\1" rhs "${rhs}")
+
+ string(COMPARE EQUAL "${lhs}" "${rhs}" stringCompareResult)
+ list(APPEND result ${stringCompareResult})
+ else()
+ string(FIND "${member}" "QT_FEATURE_" idx)
+ if(idx EQUAL 0)
+ # Remove the QT_FEATURE_ prefix
+ string(SUBSTRING "${member}" 11 -1 feature)
+ qt_evaluate_feature(${feature})
+ endif()
+
+ list(APPEND result ${member})
+ endif()
+ endforeach()
+
+ if("${result}" STREQUAL "")
+ set(result ON)
+ else()
+ qt_evaluate_to_boolean(result)
+ endif()
+
+ set(${resultVar} ${result} PARENT_SCOPE)
+endfunction()
+
+function(qt_evaluate_feature _feature)
+ # If the feature was set explicitly by the user to be on or off, in the cache, then
+ # there's nothing for us to do.
+ if(NOT QT_FEATURE_${_feature} STREQUAL UNSET)
+ return()
+ endif()
+
+ if(NOT DEFINED QT_FEATURE_DEFINITION_${_feature})
+ message(FATAL_ERROR "Attempting to evaluate feature ${_feature} but its definition is missing. Either the feature does not exist or a dependency to the module that defines it is missing")
+ endif()
+
+ cmake_parse_arguments(_arg
+ "PRIVATE;PUBLIC"
+ "LABEL;PURPOSE;SECTION;" "AUTODETECT;CONDITION;ENABLE;DISABLE;EMIT_IF" ${QT_FEATURE_DEFINITION_${_feature}})
+
+ if(DEFINED QT_FEATURE_COMPUTED_VALUE_${_feature})
+ set(QT_FEATURE_${_feature} ${QT_FEATURE_COMPUTED_VALUE_${_feature}} PARENT_SCOPE)
+ return()
+ endif()
+
+ if("${_arg_ENABLE}" STREQUAL "")
+ set(_arg_ENABLE OFF)
+ endif()
+
+ if("${_arg_DISABLE}" STREQUAL "")
+ set(_arg_DISABLE OFF)
+ endif()
+
+ if("${_arg_AUTODETECT}" STREQUAL "")
+ set(_arg_AUTODETECT ON)
+ endif()
+
+ if("${_arg_CONDITION}" STREQUAL "")
+ set(_arg_CONDITION ON)
+ endif()
+
+ if(${_arg_DISABLE})
+ set(result OFF)
+ elseif((${_arg_ENABLE}) OR (${_arg_AUTODETECT}))
+ qt_evaluate_config_expression(result ${_arg_CONDITION})
+ else()
+ # feature not auto-detected and not explicitly enabled
+ set(result OFF)
+ endif()
+
+ set(QT_FEATURE_COMPUTED_VALUE_${_feature} "${result}" CACHE INTERNAL "${_arg_LABEL}")
+ set(QT_FEATURE_${_feature} "${result}" PARENT_SCOPE)
+endfunction()
+
+function(qt_feature_definition _feature _name)
+ qt_parse_all_arguments(_arg "qt_feature_definition" "NEGATE" "VALUE" "" ${ARGN})
+
+ # Generate code:
+ set(_expected 1)
+ if (_arg_NEGATE)
+ set(_expected -1)
+ endif()
+ set(_msg "\n#if defined(QT_FEATURE_${_feature}) && QT_FEATURE_${_feature} == ${_expected}\n")
+ if (_arg_VALUE)
+ string(APPEND _msg "# define ${_name} ${_arg_VALUE}\n")
+ else()
+ string(APPEND _msg "# define ${_name}\n")
+ endif()
+ string(APPEND _msg "#endif\n")
+
+ # Store for later use:
+ list(FIND __QtFeature_public_features "${_feature}" _public_index)
+ if (_public_index GREATER -1)
+ string(APPEND __QtFeature_public_extra "${_msg}")
+ endif()
+ list(FIND __QtFeature_private_features "${_feature}" _private_index)
+ if (_private_index GREATER -1)
+ string(APPEND __QtFeature_private_extra "${_msg}")
+ endif()
+
+ set(__QtFeature_public_extra ${__QtFeature_public_extra} PARENT_SCOPE)
+ set(__QtFeature_private_extra ${__QtFeature_private_extra} PARENT_SCOPE)
+endfunction()
+
+function(qt_extra_definition _name _value)
+ qt_parse_all_arguments(_arg "qt_extra_definition" "PUBLIC;PRIVATE" "" "" ${ARGN})
+
+ if (_arg_PUBLIC)
+ string(APPEND __QtFeature_public_extra "\n#define ${_name} ${_value}\n")
+ elseif(_arg_PRIVATE)
+ string(APPEND __QtFeature_private_extra "\n#define ${_name} ${_value}\n")
+ endif()
+
+ set(__QtFeature_public_extra ${__QtFeature_public_extra} PARENT_SCOPE)
+ set(__QtFeature_private_extra ${__QtFeature_private_extra} PARENT_SCOPE)
+endfunction()
+
+function(_qt_generate_feature_line _line _feature)
+ set(_line "")
+ if (QT_FEATURE_${_feature} STREQUAL "ON")
+ set(_line "#define QT_FEATURE_${_feature} 1\n\n" PARENT_SCOPE)
+ elseif(QT_FEATURE_${_feature} STREQUAL "OFF")
+ set(_line "#define QT_FEATURE_${_feature} -1\n\n" PARENT_SCOPE)
+ elseif(QT_FEATURE_${_feature} STREQUAL "UNSET")
+ set(_line "#define QT_FEATURE_${_feature} 0\n\n" PARENT_SCOPE)
+ else()
+ message(FATAL_ERROR "${_feature} has unexpected value \"${QT_FEATURE_${_feature}}\"!")
+ endif()
+endfunction()
+
+function(_qt_feature_write_file _file _features _extra)
+ message("Generating file ${_file}.")
+ set(_contents "")
+ foreach(_it ${_features})
+ _qt_generate_feature_line(_line "${_it}")
+ string(APPEND _contents "${_line}")
+ endforeach()
+ string(APPEND _contents "${_extra}")
+
+ file(GENERATE OUTPUT "${_file}" CONTENT "${_contents}")
+endfunction()
+
+function(qt_feature_module_end target)
+ set(all_features ${__QtFeature_public_features} ${__QtFeature_private_features})
+ list(REMOVE_DUPLICATES all_features)
+
+ foreach(feature ${all_features})
+ unset(QT_FEATURE_COMPUTED_VALUE_${feature} CACHE)
+ endforeach()
+
+ foreach(feature ${all_features})
+ qt_evaluate_feature(${feature})
+
+ set(QT_FEATURE_${feature} ${QT_FEATURE_${feature}} PARENT_SCOPE)
+ endforeach()
+
+ set(enabled_public_features "")
+ set(disabled_public_features "")
+ set(enabled_private_features "")
+ set(disabled_private_features "")
+
+ foreach(feature ${__QtFeature_public_features})
+ if(QT_FEATURE_${feature})
+ list(APPEND enabled_public_features ${feature})
+ else()
+ list(APPEND disabled_public_features ${feature})
+ endif()
+ endforeach()
+
+ foreach(feature ${__QtFeature_private_features})
+ if(QT_FEATURE_${feature})
+ list(APPEND enabled_private_features ${feature})
+ else()
+ list(APPEND disabled_private_features ${feature})
+ endif()
+ endforeach()
+
+ foreach(feature ${all_features})
+ unset(QT_FEATURE_COMPUTED_VALUE_${feature} CACHE)
+ unset(QT_FEATURE_DEFINITION_${feature} CACHE)
+ endforeach()
+
+ _qt_feature_write_file("${CMAKE_CURRENT_BINARY_DIR}/${__QtFeature_private_file}"
+ "${__QtFeature_private_features}" "${__QtFeature_private_extra}"
+ )
+ qt_generate_forwarding_headers("${__QtFeature_library}" SOURCE "${__QtFeature_private_file}" PRIVATE)
+
+ _qt_feature_write_file("${CMAKE_CURRENT_BINARY_DIR}/${__QtFeature_public_file}"
+ "${__QtFeature_public_features}" "${__QtFeature_public_extra}"
+ )
+ qt_generate_forwarding_headers("${__QtFeature_library}" SOURCE "${__QtFeature_public_file}")
+
+ get_target_property(targetType "${target}" TYPE)
+ if("${targetType}" STREQUAL "INTERFACE_LIBRARY")
+ set(propertyPrefix "INTERFACE_")
+ else()
+ set(propertyPrefix "")
+ set_target_properties("${target}" PROPERTIES EXPORT_PROPERTIES "QT_ENABLED_PUBLIC_FEATURES;QT_DISABLED_PUBLIC_FEATURES;QT_ENABLED_PRIVATE_FEATURES;QT_DISABLED_PRIVATE_FEATURES")
+ endif()
+ foreach(visibility public private)
+ string(TOUPPER "${visibility}" capitalVisibility)
+ foreach(state enabled disabled)
+ string(TOUPPER "${state}" capitalState)
+
+ set_property(TARGET "${target}" PROPERTY ${propertyPrefix}QT_${capitalState}_${capitalVisibility}_FEATURES "${${state}_${visibility}_features}")
+ endforeach()
+ endforeach()
+
+ unset(__QtFeature_library PARENT_SCOPE)
+ unset(__QtFeature_private_features PARENT_SCOPE)
+ unset(__QtFeature_public_features PARENT_SCOPE)
+
+ unset(__QtFeature_private_file PARENT_SCOPE)
+ unset(__QtFeature_public_file PARENT_SCOPE)
+
+ unset(__QtFeature_private_extra PARENT_SCOPE)
+ unset(__QtFeature_public_extra PARENT_SCOPE)
+endfunction()
+
+function(qt_config_compile_test name)
+ cmake_parse_arguments(_arg "" "LABEL" "" ${ARGN})
+
+ check_cxx_source_compiles("${_arg_UNPARSED_ARGUMENTS}" HAVE_${name})
+ set(TEST_${name} "${HAVE_${name}}" CACHE INTERNAL "${_arg_LABEL}")
+endfunction()
+
+function(qt_config_compile_test_x86simd extension label)
+ string(TOUPPER ${extension} extension_uppercase)
+ try_compile(TEST_X86SIMD_${extension} "${CMAKE_CURRENT_BINARY_DIR}"
+ "${CMAKE_CURRENT_SOURCE_DIR}/config.tests/x86_simd/main.cpp"
+ COMPILE_DEFINITIONS -DQT_COMPILER_SUPPORTS_${extension_uppercase}
+ OUTPUT_VARIABLE foo
+ )
+ set(TEST_subarch_${extension} "${TEST_X86SIMD_${extension}}" CACHE INTERNAL "${label}" )
+endfunction()
+
+function(qt_pull_features_into_current_scope)
+ cmake_parse_arguments(__arg "PUBLIC_FEATURES;PRIVATE_FEATURES" "FEATURE_PROPERTY_INFIX" "" ${ARGN})
+ foreach(__target IN ITEMS ${__arg_UNPARSED_ARGUMENTS})
+ if(NOT TARGET ${__target})
+ continue()
+ endif()
+ get_target_property(__target_type "${__target}" TYPE)
+ if("${__target_type}" STREQUAL "INTERFACE_LIBRARY")
+ set(__property_prefix "INTERFACE_")
+ else()
+ set(__property_prefix "")
+ endif()
+ foreach(__visibility PUBLIC PRIVATE)
+ set(__value ON)
+ foreach(__state ENABLED DISABLED)
+ if(NOT ${__arg_${__visibility}_FEATURES})
+ continue()
+ endif()
+ get_target_property(__features "${__target}" ${__property_prefix}QT_${__arg_FEATURE_PROPERTY_INFIX}${__state}_${__visibility}_FEATURES)
+ if("${__features}" STREQUAL "__features-NOTFOUND")
+ continue()
+ endif()
+ foreach(__feature ${__features})
+ set(QT_FEATURE_${__feature} ${__value} PARENT_SCOPE)
+ endforeach()
+ set(__value OFF)
+ endforeach()
+ endforeach()
+ endforeach()
+endfunction()
+
+macro(qt_push_features_into_parent_scope)
+ cmake_parse_arguments(__arg "PUBLIC_FEATURES;PRIVATE_FEATURES" "FEATURE_PROPERTY_INFIX" "" ${ARGN})
+ foreach(__target IN ITEMS ${__arg_UNPARSED_ARGUMENTS})
+ if(NOT TARGET ${__target})
+ continue()
+ endif()
+ get_target_property(__target_type "${__target}" TYPE)
+ if("${__target_type}" STREQUAL "INTERFACE_LIBRARY")
+ set(__property_prefix "INTERFACE_")
+ else()
+ set(__property_prefix "")
+ endif()
+ foreach(__visibility PUBLIC PRIVATE)
+ set(__value ON)
+ foreach(__state ENABLED DISABLED)
+ if(NOT ${__arg_${__visibility}_FEATURES})
+ continue()
+ endif()
+ get_target_property(__features "${__target}" ${__property_prefix}QT_${__arg_FEATURE_PROPERTY_INFIX}${__state}_${__visibility}_FEATURES)
+ if("${__features}" STREQUAL "__features-NOTFOUND")
+ continue()
+ endif()
+ foreach(__feature ${__features})
+ set(QT_FEATURE_${__feature} ${__value} PARENT_SCOPE)
+ endforeach()
+ set(__value OFF)
+ endforeach()
+ endforeach()
+ endforeach()
+endmacro()
+
+macro(qt_load_global_features)
+ if(NOT TARGET Qt::Core)
+ find_package(Qt${PROJECT_VERSION_MAJOR}Core QUIET)
+ endif()
+ qt_pull_features_into_current_scope(PUBLIC_FEATURES PRIVATE_FEATURES FEATURE_PROPERTY_INFIX "GLOBAL_" Qt::Core)
+endmacro()
diff --git a/cmake/QtModuleConfig.cmake.in b/cmake/QtModuleConfig.cmake.in
new file mode 100644
index 0000000000..32f30fed7e
--- /dev/null
+++ b/cmake/QtModuleConfig.cmake.in
@@ -0,0 +1,9 @@
+@PACKAGE_INIT@
+
+find_package(Qt@PROJECT_VERSION_MAJOR@ QUIET)
+
+include("${CMAKE_CURRENT_LIST_DIR}/@versioned_module_name@Targets.cmake")
+
+if (EXISTS "${CMAKE_CURRENT_LIST_DIR}/@versioned_module_name@Macros.cmake")
+ include("${CMAKE_CURRENT_LIST_DIR}/@versioned_module_name@Macros.cmake")
+endif()
diff --git a/cmake/QtPlatformSupport.cmake b/cmake/QtPlatformSupport.cmake
new file mode 100644
index 0000000000..4f3103e304
--- /dev/null
+++ b/cmake/QtPlatformSupport.cmake
@@ -0,0 +1,41 @@
+function(set01 result)
+ if (${ARGN})
+ set("${result}" 1 PARENT_SCOPE)
+ else()
+ set("${result}" 0 PARENT_SCOPE)
+ endif()
+endfunction()
+
+set01(LINUX CMAKE_SYSTEM_NAME STREQUAL "Linux")
+set01(HPUX CMAKE_SYSTEM_NAME STREQUAL "HPUX")
+set01(ANDROID CMAKE_SYSTEM_NAME STREQUAL "Android") # FIXME: How to identify this?
+set01(NACL CMAKE_SYSTEM_NAME STREQUAL "NaCl") # FIXME: How to identify this?
+set01(INTEGRITY CMAKE_SYSTEM_NAME STREQUAL "Integrity") # FIXME: How to identify this?
+set01(VXWORKS CMAKE_SYSTEM_NAME STREQUAL "VxWorks") # FIXME: How to identify this?
+set01(QNX CMAKE_SYSTEM_NAME STREQUAL "QNX") # FIXME: How to identify this?
+set01(OPENBSD CMAKE_SYSTEM_NAME STREQUAL "OpenBSD") # FIXME: How to identify this?
+set01(FREEBSD CMAKE_SYSTEM_NAME STREQUAL "FreeBSD") # FIXME: How to identify this?
+set01(NETBSD CMAKE_SYSTEM_NAME STREQUAL "NetBSD") # FIXME: How to identify this?
+set01(WASM CMAKE_SYSTEM_NAME STREQUAL "Webassembly") # FIXME: How to identify this?
+
+set01(BSD APPLE OR OPENBSD OR FREEBSD OR NETBSD)
+
+set01(WINRT WIN32 AND CMAKE_VS_PLATFORM_TOOSLET STREQUAL "winrt") # FIXME: How to identify this?
+
+set01(APPLE_OSX APPLE) # FIXME: How to identify this? For now assume that always building for macOS.
+set01(APPLE_UIKIT APPLE AND CMAKE_XCODE_PLATFORM_TOOLSET STREQUAL "uikit") # FIXME: How to identify this?
+set01(APPLE_IOS APPLE AND CMAKE_XCODE_PLATFORM_TOOLSET STREQUAL "ios") # FIXME: How to identify this?
+set01(APPLE_TVOS APPLE AND CMAKE_XCODE_PLATFORM_TOOLSET STREQUAL "tvos") # FIXME: How to identify this?
+set01(APPLE_WATCHOS APPLE AND CMAKE_XCODE_PLATFORM_TOOLSET STREQUAL "watchos") # FIXME: How to identify this?
+
+set01(ANDROID_EMBEDDED ANDROID) # FIXME: How to identify this?
+
+set01(GCC CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
+set01(CLANG CMAKE_CXX_COMPILER_ID MATCHES "Clang")
+set01(ICC CMAKE_C_COMPILER MATCHES "icc|icl")
+
+if(CMAKE_SIZEOF_VOID_P EQUAL 8)
+ set(QT_64BIT TRUE)
+elseif(CMAKE_SIZEOF_VOID_P EQUAL 4)
+ set(QT_32BIT TRUE)
+endif()
diff --git a/cmake/QtPostProcess.cmake b/cmake/QtPostProcess.cmake
new file mode 100644
index 0000000000..5e563d4c91
--- /dev/null
+++ b/cmake/QtPostProcess.cmake
@@ -0,0 +1,32 @@
+function(qt_internal_write_depends_file target)
+ set(module Qt${target})
+ set(outfile "${PROJECT_BINARY_DIR}/include/${module}/${module}Depends")
+ message("Generate ${outfile}...")
+ set(contents "/* This file was generated by cmake with the info from ${module} target. */\n")
+ string(APPEND contents "#ifdef __cplusplus /* create empty PCH in C mode */\n")
+ foreach (m ${ARGN})
+ string(APPEND contents "# include <Qt${m}/Qt${m}>\n")
+ endforeach()
+ string(APPEND contents "#endif\n")
+
+ file(GENERATE OUTPUT ${outfile} CONTENT ${contents})
+endfunction()
+
+function(qt_internal_create_depends_files)
+ message("Generating depends files for ${KNOWN_QT_MODULES}...")
+ foreach (target ${KNOWN_QT_MODULES})
+ get_target_property(depends "${target}" LINK_LIBRARIES)
+ foreach (dep ${depends})
+ list(FIND KNOWN_QT_MODULES "${dep}" _pos)
+ if (_pos GREATER -1)
+ list(APPEND qtdeps "${dep}")
+ endif()
+ endforeach()
+ get_target_property(hasModuleHeaders "${target}" MODULE_HAS_HEADERS)
+ if (${hasModuleHeaders})
+ qt_internal_write_depends_file("${target}" ${qtdeps})
+ endif()
+ endforeach()
+endfunction()
+
+qt_internal_create_depends_files()
diff --git a/cmake/QtSetup.cmake b/cmake/QtSetup.cmake
new file mode 100644
index 0000000000..11ccc129b4
--- /dev/null
+++ b/cmake/QtSetup.cmake
@@ -0,0 +1,47 @@
+## Force C++ standard, do not fall back, do not use compiler extensions
+set(CMAKE_CXX_STANDARD 14)
+set(CMAKE_CXX_STANDARD_REQUIRED ON)
+set(CMAKE_CXX_EXTENSIONS OFF)
+
+## Position independent code:
+set(CMAKE_POSITION_INDEPENDENT_CODE ON)
+
+# Do not relink dependent libraries when no header has changed:
+set(CMAKE_LINK_DEPENDS_NO_SHARED ON)
+
+# Default to hidden visibility for symbols:
+set(CMAKE_C_VISIBILITY_PRESET hidden)
+set(CMAKE_CXX_VISIBILITY_PRESET hidden)
+set(CMAKE_VISIBILITY_INLINES_HIDDEN 1)
+
+## Enable testing:
+include(CTest)
+enable_testing()
+
+## Define some constants to check for certain platforms, etc:
+include(QtPlatformSupport)
+
+## add_qt_module and co.:
+include(QtBuild)
+
+## Qt Feature support:
+include(QtFeature)
+
+## Compiler optimization flags:
+include(QtCompilerOptimization)
+
+## Find host tools (if non native):
+set(HOST_QT_TOOLS_DIRECTORY "" CACHE PATH "Directory with Qt host tools.")
+
+if (CMAKE_CROSSCOMPILING AND "x${HOST_QT_TOOLS_DIRECTORY}" STREQUAL "x")
+ message(FATAL_ERROR "You need to set HOST_QT_TOOLS_DIRECTORY for a cross-complile.")
+endif()
+
+## Find syncqt in HOST TOOLS or locally:
+if("x${HOST_QT_TOOLS_DIRECTORY}" STREQUAL "x")
+ set(QT_SYNCQT "${PROJECT_SOURCE_DIR}/bin/syncqt.pl")
+ install(PROGRAMS "${QT_SYNCQT}" DESTINATION "${INSTALL_BINDIR}")
+endif()
+
+## Enable support for sanitizers:
+include(${CMAKE_CURRENT_LIST_DIR}/3rdparty/extra-cmake-modules/modules/ECMEnableSanitizers.cmake)
diff --git a/cmake/README.md b/cmake/README.md
new file mode 100644
index 0000000000..6ae8162d80
--- /dev/null
+++ b/cmake/README.md
@@ -0,0 +1,103 @@
+# Status
+
+Initial port is on-going. Some modules of QtBase are ported, incl. some of the platform modules. Most are missing still.
+
+Basic functionality is there (moc, uic, etc.), but documentation, translations, qdbusxml2cpp, etc. are missing.
+
+
+# Intro
+
+The CMake update offers an opportunity to revisit some topics that came up during the last few years.
+
+* The Qt build system does not support building host tools during a cross-compilation run. You need to build a Qt for your host machine first and then use the platform tools from that version. The decision to do this was reached independent of cmake: This does save resources on build machines as the host tools will only get built once.
+
+* 3rd-party dependencies are no longer built as part of Qt. zlib, libpng, etc. from src/3rdparty need
+to be supplied from the outside to the build now. You may find apt-get/brew/etc. useful for this. Otherwise you may consider using vcpkg as in the next section. The decision to remove 3rd party dependencies from Qt repositories was reached independent of the decision to use cmake, we just use the opportunity to implement this decision.
+
+* There is less need for bootstrapping. Only moc and rcc (plus the lesser known tracegen and qfloat16-tables) are linking against the bootstrap Qt library. Everything else can link against the full QtCore. This will include qmake, which is currently missing from a cmake build. This will change: Qmake is supported as a build system for applications *using* Qt going forward and will not go away anytime soon.
+
+* For the time being we try to keep qmake working so that we do not interfere too much with ongoing development.
+
+
+# Building against VCPKG
+
+You may use vcpkg to install dependencies needed to build QtBase.
+
+ * ```git clone -b qt https://github.com/tronical/vcpkg```
+ * Run ```bootstrap-vcpkg.bat``` or ```bootstrap-vcpkg.sh```
+ * Set the ``VCPKG_DEFAULT_TRIPLET`` environment variable to
+ * Linux: ``x64-linux``
+ * Windows: ``qt-x86-windows-static``
+ * Build Qt dependencies: ``vcpkg install zlib pcre2 double-conversion harfbuzz``
+ * When running cmake in qtbase, pass ``-DCMAKE_PREFIX_PATH=/path/to/your/vcpkg/installed/$VCPKG_DEFAULT_TRIPLET`` or ``-DCMAKE_PREFIX_PATH=/path/to/your/vcpkg/installed/%VCPKG_DEFAULT_TRIPLET%`` on Windows.
+
+
+# Building
+
+The basic way of building with cmake is as follows:
+
+```
+ cd {build directory}
+ cmake {path to source directory}
+ cmake --build .
+```
+
+``cmake --build`` is just a simple wrapper around the basic build tool that CMake generated a build system for. It works with any supported build backend supported by cmake, but you can also use the backend build tool directly, e.g. by running ``make`` in this case.
+
+CMake has a ninja backend that works quite well and is noticeably faster than make, so you may want to use that:
+
+```
+ cd {build directory}
+ cmake -GNinja {path to source directory}
+ cmake --build . # ... or ninja ;-)
+```
+
+You can look into the generated ``build.ninja`` file if you're curious and you can also build targets directory such as ``ninja lib/libQt5Core.so``.
+
+When you're done with the build, you may want to install it, using ``ninja install`` or ``make install``. The installation prefix is chosen when running cmake though:
+
+```
+ cd {build directory}
+ cmake -GNinja -DCMAKE_INSTALL_PREFIX=/path/where/to/install {path to source directory}
+ ninja
+ ninja install
+```
+
+You can use ``cmake-gui {path to build directory}`` or ``ccmake {path to build directory}`` to configure the values of individual cmake variables or Qt features. After changing a value, you need to choose the *configure* step (usually several times:-/), followed by the *generate* step (to generate makefiles/ninja files).
+
+# Debugging CMake files
+
+CMake allows specifying the ``--trace`` and ``--trace-expand`` options, which work like ``qmake -d -d``: As the cmake code is evaluated, the values of parameters and variables is shown. This can be a lot of output, so you may want to redirect it to a file.
+
+# Porting Help
+
+We have some python scripts to help with the conversion from qmake to cmake. These scripts can be found in ``utils/cmake``.
+
+## configurejson2cmake.py
+
+This script converts all ``configure.json`` in the Qt repository to ``configure.cmake`` files for use with CMake. We want to generate configure.cmake files for the foreseeable future, so if you need to tweak the generated configure.cmake files, please tweak the generation script instead.
+
+``configurejson2cmake.py`` is run like this: ``util/cmake/configurejson2cmake.py .`` in the top-level source directory of a Qt repository.
+
+
+## pro2cmake.py
+
+``pro2cmake.py`` generates a skeleton CMakeLists.txt file from a .pro-file. You will need to polish the resulting CMakeLists.txt file, but e.g. the list of files, etc. should be extracted for you.
+
+``pro2cmake.py`` is run like this: ``/path/to/pro2cmake.py some.pro``.
+
+
+## run_pro2cmake.py
+
+`` A small helper script to run pro2cmake.py on all .pro-files in a directory. Very useful to e.g. convert all the unit tests for a Qt module over to cmake;-)
+
+``run_pro2cmake.py`` is run like this: ``/path/to/run_pro2cmake.py some_dir``.
+
+
+## How to convert certain constructs
+
+| qmake | CMake |
+| ------ | ------ |
+| ``qtHaveModule(foo)`` | ``if(TARGET Qt::foo)`` |
+| ``qtConfig(foo)`` | ``if (QT_FEATURE_foo)`` |
+
diff --git a/cmake/tests/features/CMakeLists.txt b/cmake/tests/features/CMakeLists.txt
new file mode 100644
index 0000000000..0208e3d890
--- /dev/null
+++ b/cmake/tests/features/CMakeLists.txt
@@ -0,0 +1,42 @@
+cmake_minimum_required(VERSION 3.12.0)
+
+project(FeaturesTest
+ VERSION 1.0.0
+ DESCRIPTION "QtFeature test"
+ HOMEPAGE_URL "https://qt.io/"
+ LANGUAGES CXX C
+)
+
+## Add some paths to check for cmake modules:
+list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/../../;${CMAKE_CURRENT_SOURCE_DIR}/../../3rdparty/extra-cmake-modules/find-modules;${CMAKE_CURRENT_SOURCE_DIR}/../../3rdparty/kwin")
+
+## Qt specific setup common for all modules:
+include(QtSetup)
+
+## Library to hold global features:
+add_library(Qt_global_Config INTERFACE)
+
+qt_feature_module_begin(LIBRARY QtCore
+ PUBLIC_FILE src/corelib/global/qconfig.h
+ PRIVATE_FILE src/corelib/global/qconfig_p.h
+)
+include("${CMAKE_CURRENT_SOURCE_DIR}/configure.cmake")
+qt_feature_module_end(Qt_global_Config)
+
+assert(QT_FEATURE_top_a STREQUAL "ON")
+assert(QT_FEATURE_top_b STREQUAL "OFF")
+assert(QT_FEATURE_top_enabled STREQUAL "ON")
+assert(QT_FEATURE_top_disabled STREQUAL "OFF")
+assert(QT_FEATURE_top_disabled_enabled STREQUAL "OFF")
+assert(NOT DEFINED QT_FEATURE_top_not_emitted)
+
+## Enable feature summary at the end of the configure run:
+include(FeatureSummary)
+
+add_subdirectory(src)
+
+## Delayed actions on some of the Qt targets:
+include(QtPostProcess)
+
+## Print a feature summary:
+feature_summary(WHAT PACKAGES_FOUND PACKAGES_NOT_FOUND FATAL_ON_MISSING_REQUIRED_PACKAGES)
diff --git a/cmake/tests/features/configure.cmake b/cmake/tests/features/configure.cmake
new file mode 100644
index 0000000000..ace2b62450
--- /dev/null
+++ b/cmake/tests/features/configure.cmake
@@ -0,0 +1,35 @@
+#### Features
+
+# This belongs into gui, but the license check needs it here already.
+qt_feature("top_a" PRIVATE
+ LABEL "top_a"
+ CONDITION ON
+)
+qt_feature("top_b" PUBLIC PRIVATE
+ LABEL "top_b"
+ AUTODETECT OFF
+)
+qt_feature_definition("top_a" "top_defa")
+
+qt_feature("top_enabled" PRIVATE
+ LABEL "top_enabled"
+ ENABLE ON
+)
+
+qt_feature("top_disabled" PRIVATE
+ LABEL "top_enabled"
+ DISABLE ON
+)
+
+qt_feature("top_disabled_enabled" PRIVATE
+ LABEL "top_enabled_enabled"
+ DISABLE ON
+ ENABLE ON
+)
+
+qt_feature("top_not_emitted" PRIVATE
+ LABEL "top_not_emitted"
+ EMIT_IF OFF
+)
+
+qt_extra_definition("top_extra" "PUBLIC_FOO" PUBLIC)
diff --git a/cmake/tests/features/src/CMakeLists.txt b/cmake/tests/features/src/CMakeLists.txt
new file mode 100644
index 0000000000..1a31dbc8c5
--- /dev/null
+++ b/cmake/tests/features/src/CMakeLists.txt
@@ -0,0 +1,7 @@
+## Features from parent scope were inherited:
+assert(QT_FEATURE_top_a STREQUAL "ON")
+assert(QT_FEATURE_top_b STREQUAL "OFF")
+assert(QT_FEATURE_top_enabled STREQUAL "ON")
+assert(QT_FEATURE_top_disabled STREQUAL "OFF")
+assert(QT_FEATURE_top_disabled_enabled STREQUAL "OFF")
+assert(NOT DEFINED QT_FEATURE_top_not_emitted)
diff --git a/configure.cmake b/configure.cmake
new file mode 100644
index 0000000000..0fe4129962
--- /dev/null
+++ b/configure.cmake
@@ -0,0 +1,421 @@
+
+
+#### Inputs
+
+
+
+#### Libraries
+
+find_package(ZLIB)
+set_package_properties(ZLIB PROPERTIES TYPE OPTIONAL)
+find_package(Libudev)
+set_package_properties(Libudev PROPERTIES TYPE OPTIONAL)
+
+
+#### Tests
+
+# reduce_relocations
+qt_config_compile_test(reduce_relocations
+ LABEL "-Bsymbolic-functions support"
+"#if !(defined(__i386) || defined(__i386__) || defined(__x86_64) || defined(__x86_64__) || defined(__amd64))
+# error Symbolic function binding on this architecture may be broken, disabling it (see QTBUG-36129).
+#endif
+
+
+int main(int argc, char **argv)
+{
+ (void)argc; (void)argv;
+ /* BEGIN TEST: */
+
+ /* END TEST: */
+ return 0;
+}
+"# FIXME: qmake: ['TEMPLATE = lib', 'CONFIG += dll bsymbolic_functions', 'isEmpty(QMAKE_LFLAGS_BSYMBOLIC_FUNC): error("Nope")']
+)
+
+# sse2
+qt_config_compile_test_x86simd(sse2 "SSE2 instructions")
+
+# sse3
+qt_config_compile_test_x86simd(sse3 "SSE3 instructions")
+
+# ssse3
+qt_config_compile_test_x86simd(ssse3 "SSSE3 instructions")
+
+# sse4_1
+qt_config_compile_test_x86simd(sse4_1 "SSE4.1 instructions")
+
+# sse4_2
+qt_config_compile_test_x86simd(sse4_2 "SSE4.2 instructions")
+
+# aesni
+qt_config_compile_test_x86simd(aesni "AES new instructions")
+
+# f16c
+qt_config_compile_test_x86simd(f16c "F16C instructions")
+
+# rdrnd
+qt_config_compile_test_x86simd(rdrnd "RDRAND instruction")
+
+# shani
+qt_config_compile_test_x86simd(shani "SHA new instructions")
+
+# avx
+qt_config_compile_test_x86simd(avx "AVX instructions")
+
+# avx2
+qt_config_compile_test_x86simd(avx2 "AVX2 instructions")
+
+# avx512f
+qt_config_compile_test_x86simd(avx512f "AVX512 F instructions")
+
+# avx512er
+qt_config_compile_test_x86simd(avx512er "AVX512 ER instructions")
+
+# avx512cd
+qt_config_compile_test_x86simd(avx512cd "AVX512 CD instructions")
+
+# avx512pf
+qt_config_compile_test_x86simd(avx512pf "AVX512 PF instructions")
+
+# avx512dq
+qt_config_compile_test_x86simd(avx512dq "AVX512 DQ instructions")
+
+# avx512bw
+qt_config_compile_test_x86simd(avx512bw "AVX512 BW instructions")
+
+# avx512vl
+qt_config_compile_test_x86simd(avx512vl "AVX512 VL instructions")
+
+# avx512ifma
+qt_config_compile_test_x86simd(avx512ifma "AVX512 IFMA instructions")
+
+# avx512vbmi
+qt_config_compile_test_x86simd(avx512vbmi "AVX512 VBMI instructions")
+
+# posix_fallocate
+qt_config_compile_test(posix_fallocate
+ LABEL "POSIX fallocate()"
+"
+#include <fcntl.h>
+#include <unistd.h>
+
+int main(int argc, char **argv)
+{
+ (void)argc; (void)argv;
+ /* BEGIN TEST: */
+(void) posix_fallocate(0, 0, 0);
+ /* END TEST: */
+ return 0;
+}
+")
+
+# alloca_stdlib_h
+qt_config_compile_test(alloca_stdlib_h
+ LABEL "alloca() in stdlib.h"
+"
+#include <stdlib.h>
+
+int main(int argc, char **argv)
+{
+ (void)argc; (void)argv;
+ /* BEGIN TEST: */
+alloca(1);
+ /* END TEST: */
+ return 0;
+}
+")
+
+# alloca_h
+qt_config_compile_test(alloca_h
+ LABEL "alloca() in alloca.h"
+"
+#include <alloca.h>
+#ifdef __QNXNTO__
+// extra include needed in QNX7 to define NULL for the alloca() macro
+# include <stddef.h>
+#endif
+int main(int argc, char **argv)
+{
+ (void)argc; (void)argv;
+ /* BEGIN TEST: */
+alloca(1);
+ /* END TEST: */
+ return 0;
+}
+")
+
+# alloca_malloc_h
+qt_config_compile_test(alloca_malloc_h
+ LABEL "alloca() in malloc.h"
+"
+#include <malloc.h>
+
+int main(int argc, char **argv)
+{
+ (void)argc; (void)argv;
+ /* BEGIN TEST: */
+alloca(1);
+ /* END TEST: */
+ return 0;
+}
+")
+
+# stack_protector
+qt_config_compile_test(stack_protector
+ LABEL "stack protection"
+"#ifdef __QNXNTO__
+# include <sys/neutrino.h>
+# if _NTO_VERSION < 700
+# error stack-protector not used (by default) before QNX 7.0.0.
+# endif
+#endif
+
+
+int main(int argc, char **argv)
+{
+ (void)argc; (void)argv;
+ /* BEGIN TEST: */
+
+ /* END TEST: */
+ return 0;
+}
+"# FIXME: qmake: QMAKE_CXXFLAGS += -fstack-protector-strong
+)
+
+
+
+#### Features
+
+# This belongs into gui, but the license check needs it here already.
+qt_feature("android_style_assets" PRIVATE
+ LABEL "Android Style Assets"
+ CONDITION ANDROID
+)
+qt_feature("developer_build" PUBLIC PRIVATE
+ LABEL "Developer build"
+ AUTODETECT OFF
+)
+qt_feature_definition("developer_build" "QT_BUILD_INTERNAL")
+qt_feature("appstore_compliant" PUBLIC
+ LABEL "App store compliance"
+ PURPOSE "Disables code that is not allowed in platform app stores"
+ AUTODETECT APPLE_UIKIT OR ANDROID OR WINRT
+)
+qt_feature("simulator_and_device" PUBLIC
+ LABEL "Build for both simulator and device"
+ CONDITION APPLE_UIKIT AND INPUT_sdk STREQUAL ''
+)
+qt_feature("force_asserts" PUBLIC
+ LABEL "Force assertions"
+ AUTODETECT OFF
+)
+qt_feature("framework" PUBLIC
+ LABEL "Build Apple Frameworks"
+ CONDITION APPLE AND QT_FEATURE_shared
+)
+qt_feature_definition("framework" "QT_MAC_FRAMEWORK_BUILD")
+qt_feature("largefile" PUBLIC
+ LABEL "Large file support"
+ CONDITION NOT ANDROID AND NOT INTEGRITY AND NOT WINRT
+)
+qt_feature_definition("largefile" "QT_LARGEFILE_SUPPORT" VALUE "64")
+qt_feature("reduce_exports" PUBLIC PRIVATE
+ LABEL "Reduce amount of exported symbols"
+ CONDITION NOT WIN32 AND CMAKE_CXX_COMPILE_OPTIONS_VISIBILITY
+)
+qt_feature_definition("reduce_exports" "QT_VISIBILITY_AVAILABLE")
+qt_feature("sse2" PUBLIC PRIVATE
+ LABEL "SSE2"
+ CONDITION ( ( TEST_architecture_arch STREQUAL i386 ) OR ( TEST_architecture_arch STREQUAL x86_64 ) ) AND TEST_subarch_sse2
+)
+qt_feature_definition("sse2" "QT_COMPILER_SUPPORTS_SSE2" VALUE "1")
+qt_feature("sse3" PUBLIC
+ LABEL "SSE3"
+ CONDITION QT_FEATURE_sse2 AND TEST_subarch_sse3
+)
+qt_feature_definition("sse3" "QT_COMPILER_SUPPORTS_SSE3" VALUE "1")
+qt_feature("ssse3" PUBLIC
+ LABEL "SSSE3"
+ CONDITION QT_FEATURE_sse3 AND TEST_subarch_ssse3
+)
+qt_feature_definition("ssse3" "QT_COMPILER_SUPPORTS_SSSE3" VALUE "1")
+qt_feature("sse4_1" PUBLIC
+ LABEL "SSE4.1"
+ CONDITION QT_FEATURE_ssse3 AND TEST_subarch_sse4_1
+)
+qt_feature_definition("sse4_1" "QT_COMPILER_SUPPORTS_SSE4_1" VALUE "1")
+qt_feature("sse4_2" PUBLIC
+ LABEL "SSE4.2"
+ CONDITION QT_FEATURE_sse4_1 AND TEST_subarch_sse4_2
+)
+qt_feature_definition("sse4_2" "QT_COMPILER_SUPPORTS_SSE4_2" VALUE "1")
+qt_feature("avx" PUBLIC
+ LABEL "AVX"
+ CONDITION QT_FEATURE_sse4_2 AND TEST_subarch_avx
+)
+qt_feature_definition("avx" "QT_COMPILER_SUPPORTS_AVX" VALUE "1")
+qt_feature("f16c" PUBLIC
+ LABEL "F16C"
+ CONDITION QT_FEATURE_avx AND TEST_subarch_c16c
+)
+qt_feature_definition("f16c" "QT_COMPILER_SUPPORTS_F16C" VALUE "1")
+qt_feature("avx2" PUBLIC PRIVATE
+ LABEL "AVX2"
+ CONDITION QT_FEATURE_avx AND TEST_subarch_avx2
+)
+qt_feature_definition("avx2" "QT_COMPILER_SUPPORTS_AVX2" VALUE "1")
+qt_feature("avx512f" PUBLIC
+ LABEL "F"
+ CONDITION QT_FEATURE_avx2 AND TEST_subarch_avx512f
+)
+qt_feature_definition("avx512f" "QT_COMPILER_SUPPORTS_AVX512F" VALUE "1")
+qt_feature("avx512er" PUBLIC
+ LABEL "ER"
+ CONDITION QT_FEATURE_avx512f AND TEST_subarch_avx512er
+)
+qt_feature_definition("avx512er" "QT_COMPILER_SUPPORTS_AVX512ER" VALUE "1")
+qt_feature("avx512cd" PUBLIC
+ LABEL "CD"
+ CONDITION QT_FEATURE_avx512f AND TEST_subarch_avx512cd
+)
+qt_feature_definition("avx512cd" "QT_COMPILER_SUPPORTS_AVX512CD" VALUE "1")
+qt_feature("avx512pf" PUBLIC
+ LABEL "PF"
+ CONDITION QT_FEATURE_avx512f AND TEST_subarch_avx512pf
+)
+qt_feature_definition("avx512pf" "QT_COMPILER_SUPPORTS_AVX512PF" VALUE "1")
+qt_feature("avx512dq" PUBLIC
+ LABEL "DQ"
+ CONDITION QT_FEATURE_avx512f AND TEST_subarch_avx512dq
+)
+qt_feature_definition("avx512dq" "QT_COMPILER_SUPPORTS_AVX512DQ" VALUE "1")
+qt_feature("avx512bw" PUBLIC
+ LABEL "BW"
+ CONDITION QT_FEATURE_avx512f AND TEST_subarch_avx512bw
+)
+qt_feature_definition("avx512bw" "QT_COMPILER_SUPPORTS_AVX512BW" VALUE "1")
+qt_feature("avx512vl" PUBLIC
+ LABEL "VL"
+ CONDITION QT_FEATURE_avx512f AND TEST_subarch_avx512vl
+)
+qt_feature_definition("avx512vl" "QT_COMPILER_SUPPORTS_AVX512VL" VALUE "1")
+qt_feature("avx512ifma" PUBLIC
+ LABEL "IFMA"
+ CONDITION QT_FEATURE_avx512f AND TEST_subarch_avx512ifma
+)
+qt_feature_definition("avx512ifma" "QT_COMPILER_SUPPORTS_AVX512IFMA" VALUE "1")
+qt_feature("avx512vbmi" PUBLIC
+ LABEL "VBMI"
+ CONDITION QT_FEATURE_avx512f AND TEST_subarch_avx512vbmi
+)
+qt_feature_definition("avx512vbmi" "QT_COMPILER_SUPPORTS_AVX512VBMI" VALUE "1")
+qt_feature("aesni" PUBLIC
+ LABEL "AES"
+ CONDITION QT_FEATURE_sse2 AND TEST_subarch_aes
+)
+qt_feature_definition("aesni" "QT_COMPILER_SUPPORTS_AES" VALUE "1")
+qt_feature("rdrnd" PUBLIC
+ LABEL "RDRAND"
+ CONDITION TEST_subarch_rdseed
+)
+qt_feature_definition("rdrnd" "QT_COMPILER_SUPPORTS_RDRND" VALUE "1")
+qt_feature("shani" PUBLIC
+ LABEL "SHA"
+ CONDITION QT_FEATURE_sse2 AND TEST_subarch_sha
+)
+qt_feature_definition("shani" "QT_COMPILER_SUPPORTS_SHA" VALUE "1")
+qt_feature("x86SimdAlways" PUBLIC
+ LABEL "Intrinsics without -mXXX option"
+ CONDITION ( ( TEST_architecture_arch STREQUAL i386 ) OR ( TEST_architecture_arch STREQUAL x86_64 ) ) AND ON
+)
+qt_feature_definition("x86SimdAlways" "QT_COMPILER_SUPPORTS_SIMD_ALWAYS" VALUE "1")
+qt_feature("mips_dsp" PUBLIC
+ LABEL "DSP"
+ CONDITION ( TEST_architecture_arch STREQUAL mips ) AND TEST_subarch_dsp
+)
+qt_feature_definition("mips_dsp" "QT_COMPILER_SUPPORTS_MIPS_DSP" VALUE "1")
+qt_feature("mips_dspr2" PUBLIC
+ LABEL "DSPr2"
+ CONDITION ( TEST_architecture_arch STREQUAL mips ) AND TEST_subarch_dspr2
+)
+qt_feature_definition("mips_dspr2" "QT_COMPILER_SUPPORTS_MIPS_DSPR2" VALUE "1")
+qt_feature("neon" PUBLIC
+ LABEL "NEON"
+ CONDITION ( ( TEST_architecture_arch STREQUAL arm ) OR ( TEST_architecture_arch STREQUAL arm64 ) ) AND TEST_subarch_neon
+)
+qt_feature_definition("neon" "QT_COMPILER_SUPPORTS_NEON" VALUE "1")
+qt_feature("alloca_h" PRIVATE
+ LABEL "alloca.h"
+ CONDITION TEST_alloca_h
+)
+qt_feature("alloca_malloc_h" PRIVATE
+ LABEL "alloca() in malloc.h"
+ CONDITION NOT QT_FEATURE_alloca_h AND TEST_alloca_malloc_h
+)
+qt_feature("alloca" PRIVATE
+ LABEL "alloca()"
+ CONDITION QT_FEATURE_alloca_h OR QT_FEATURE_alloca_malloc_h OR TEST_alloca_stdlib_h
+)
+qt_feature("thread" PUBLIC
+ SECTION "Kernel"
+ LABEL "Thread support"
+ PURPOSE "Provides QThread and related classes."
+)
+qt_feature("future" PUBLIC
+ SECTION "Kernel"
+ LABEL "QFuture"
+ PURPOSE "Provides QFuture and related classes."
+ CONDITION QT_FEATURE_thread
+)
+qt_feature("concurrent" PUBLIC
+ SECTION "Kernel"
+ LABEL "Qt Concurrent"
+ PURPOSE "Provides a high-level multi-threading API."
+ CONDITION QT_FEATURE_future
+)
+qt_feature_definition("concurrent" "QT_NO_CONCURRENT" NEGATE VALUE "1")
+qt_feature("dbus" PUBLIC PRIVATE
+ LABEL "Qt D-Bus"
+ AUTODETECT NOT APPLE_UIKIT AND NOT ANDROID AND NOT WINRT
+ CONDITION QT_FEATURE_thread
+)
+qt_feature_definition("dbus" "QT_NO_DBUS" NEGATE VALUE "1")
+qt_feature("dbus_linked" PRIVATE
+ LABEL "Qt D-Bus directly linked to libdbus"
+ CONDITION QT_FEATURE_dbus AND libs.dbus OR FIXME
+ ENABLE INPUT_dbus STREQUAL 'linked'
+ DISABLE INPUT_dbus STREQUAL 'runtime'
+)
+qt_feature("gui" PRIVATE
+ LABEL "Qt Gui"
+)
+qt_feature("network" PRIVATE
+ LABEL "Qt Network"
+ CONDITION QT_FEATURE_thread
+)
+qt_feature("sql" PRIVATE
+ LABEL "Qt Sql"
+ CONDITION QT_FEATURE_thread
+)
+qt_feature("testlib" PRIVATE
+ LABEL "Qt Testlib"
+)
+qt_feature("widgets" PUBLIC PRIVATE
+ LABEL "Qt Widgets"
+ AUTODETECT NOT APPLE_TVOS AND NOT APPLE_WATCHOS
+ CONDITION QT_FEATURE_gui
+)
+qt_feature_definition("widgets" "QT_NO_WIDGETS" NEGATE)
+qt_feature("xml" PRIVATE
+ LABEL "Qt Xml"
+)
+qt_feature("libudev" PRIVATE
+ LABEL "udev"
+ CONDITION Libudev_FOUND
+)
+
+qt_extra_definition("QT_VERSION_STR" "\"${PROJECT_VERSION}\"" PUBLIC)
+qt_extra_definition("QT_VERSION_MAJOR" ${PROJECT_VERSION_MAJOR} PUBLIC)
+qt_extra_definition("QT_VERSION_MINOR" ${PROJECT_VERSION_MINOR} PUBLIC)
+qt_extra_definition("QT_VERSION_PATCH" ${PROJECT_VERSION_PATCH} PUBLIC)
diff --git a/configure.json b/configure.json
index 3702c24f63..5201fd5ce9 100644
--- a/configure.json
+++ b/configure.json
@@ -1249,9 +1249,7 @@
{
"type": "warning",
"condition": "input.debug_and_release == 'yes' && !config.darwin && !config.win32",
- "message": "-debug-and-release is only supported on Darwin and Windows platforms.
-Qt can be built in release mode with separate debug information, so
--debug-and-release is no longer necessary."
+ "message": "-debug-and-release is only supported on Darwin and Windows platforms. Qt can be built in release mode with separate debug information, so -debug-and-release is no longer necessary."
},
{
"type": "error",
@@ -1274,9 +1272,7 @@ Qt can be built in release mode with separate debug information, so
{
"type": "note",
"condition": "!features.shared",
- "message": "Using static linking will disable the use of dynamically
-loaded plugins. Make sure to import all needed static plugins,
-or compile needed modules into the library."
+ "message": "Using static linking will disable the use of dynamically loaded plugins. Make sure to import all needed static plugins, or compile needed modules into the library."
},
{
"type": "note",
@@ -1286,8 +1282,7 @@ or compile needed modules into the library."
{
"type": "note",
"condition": "input.qreal == 'double' && arch.arm",
- "message": "Qt is using double for qreal on this system. This is binary-incompatible against Qt 5.1.
-Configure with '-qreal float' to create a build that is binary-compatible with 5.1."
+ "message": "Qt is using double for qreal on this system. This is binary-incompatible against Qt 5.1. Configure with '-qreal float' to create a build that is binary-compatible with 5.1."
},
{
"type": "error",
diff --git a/examples/CMakeLists.txt b/examples/CMakeLists.txt
new file mode 100644
index 0000000000..4eaab5064f
--- /dev/null
+++ b/examples/CMakeLists.txt
@@ -0,0 +1,3 @@
+if(QT_FEATURE_gui)
+ add_subdirectory(gui)
+endif()
diff --git a/examples/gui/CMakeLists.txt b/examples/gui/CMakeLists.txt
new file mode 100644
index 0000000000..ac96b7351c
--- /dev/null
+++ b/examples/gui/CMakeLists.txt
@@ -0,0 +1 @@
+add_subdirectory(rasterwindow)
diff --git a/examples/gui/rasterwindow/CMakeLists.txt b/examples/gui/rasterwindow/CMakeLists.txt
new file mode 100644
index 0000000000..13caffe5bb
--- /dev/null
+++ b/examples/gui/rasterwindow/CMakeLists.txt
@@ -0,0 +1,18 @@
+# Generated from rasterwindow.pro.
+
+#####################################################################
+## None Binary:
+#####################################################################
+
+set(sources main.cpp
+ rasterwindow.cpp rasterwindow.h)
+add_executable(rasterwindow
+ ${sources}
+)
+qt_internal_automoc(rasterwindow ${sources})
+target_include_directories(rasterwindow
+ PRIVATE
+ "${CMAKE_CURRENT_SOURCE_DIR}"
+ "${CMAKE_CURRENT_BINARY_DIR}"
+ )
+target_link_libraries(rasterwindow PRIVATE Qt::Core Qt::Test Qt::Gui)
diff --git a/qmake/CMakeLists.txt b/qmake/CMakeLists.txt
new file mode 100644
index 0000000000..0582613d82
--- /dev/null
+++ b/qmake/CMakeLists.txt
@@ -0,0 +1,2 @@
+## FIXME: Actually build something...
+install(DIRECTORY mkspecs DESTINATION ${INSTALL_DATADIR})
diff --git a/src/3rdparty/CMakeLists.txt b/src/3rdparty/CMakeLists.txt
new file mode 100644
index 0000000000..77c4970f49
--- /dev/null
+++ b/src/3rdparty/CMakeLists.txt
@@ -0,0 +1,2 @@
+add_subdirectory(tinycbor)
+add_subdirectory(harfbuzz)
diff --git a/src/3rdparty/harfbuzz/CMakeLists.txt b/src/3rdparty/harfbuzz/CMakeLists.txt
new file mode 100644
index 0000000000..25a3b75d2f
--- /dev/null
+++ b/src/3rdparty/harfbuzz/CMakeLists.txt
@@ -0,0 +1,11 @@
+add_library(QtHarfBuzz STATIC
+ src/harfbuzz-shaper-all.cpp
+ src/harfbuzz-buffer.c
+ src/harfbuzz-gdef.c
+ src/harfbuzz-gsub.c
+ src/harfbuzz-gpos.c
+ src/harfbuzz-impl.c
+ src/harfbuzz-open.c
+ src/harfbuzz-stream.c
+ )
+target_include_directories(QtHarfBuzz PUBLIC src)
diff --git a/src/3rdparty/tinycbor/CMakeLists.txt b/src/3rdparty/tinycbor/CMakeLists.txt
new file mode 100644
index 0000000000..3a1a760af9
--- /dev/null
+++ b/src/3rdparty/tinycbor/CMakeLists.txt
@@ -0,0 +1,2 @@
+add_library(tinycbor INTERFACE)
+target_include_directories(tinycbor INTERFACE "${CMAKE_CURRENT_SOURCE_DIR}/src")
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
new file mode 100644
index 0000000000..204d7f6797
--- /dev/null
+++ b/src/CMakeLists.txt
@@ -0,0 +1,65 @@
+add_subdirectory(3rdparty)
+
+function(find_or_build_bootstrap_names)
+ # Move these into their own folder and move this code in the CMakeLists.txt file there!
+ set01(_build_tools "x${HOST_QT_TOOLS_DIRECTORY}" STREQUAL "x")
+
+ function(find_or_build_bootstrap_tool name)
+ if (_build_tools)
+ add_subdirectory(tools/${name})
+ else()
+ message("Searching for ${name}.")
+ find_program("_PROG_${name}" "${name}" PATHS "${HOST_QT_TOOLS_DIRECTORY}" NO_DEFAULT_PATH)
+ if (_PROG_${name} STREQUAL "_PROG_${name}-NOTFOUND")
+ message(FATAL_ERROR "The name \"${name}\" was not found in the "
+ "HOST_QT_TOOLS_DIRECTORY (\"${HOST_QT_TOOLS_DIRECTORY}\").")
+ else()
+ message("${name} was found at ${_PROG_${name}}.")
+ add_executable("${name}" IMPORTED GLOBAL)
+ set_target_properties("${name}" PROPERTIES IMPORTED_LOCATION "${_PROG_${name}}")
+
+ add_executable("Qt::${name}" ALIAS "${name}")
+ endif()
+ endif()
+ endfunction()
+
+ find_or_build_bootstrap_tool(qmocscanner)
+ if (_build_tools)
+ add_subdirectory(tools/bootstrap) # bootstrap library
+ endif()
+ find_or_build_bootstrap_tool(moc)
+ find_or_build_bootstrap_tool(rcc)
+ find_or_build_bootstrap_tool(qfloat16-tables)
+ find_or_build_bootstrap_tool(tracegen)
+
+ # $<TARGET_FILE:Qt::qmocscanner> does not work during configure run, so export into a plain variable:
+ get_target_property(_mocscanner "Qt::qmocscanner" IMPORTED_LOCATION)
+ set(QT_MOCSCANNER "${_mocscanner}" CACHE INTERNAL "Qt moc scanner")
+
+ if (_build_tools)
+ install(EXPORT "Qt${PROJECT_VERSION_MAJOR}ToolsTargets" NAMESPACE "Qt::" DESTINATION "${INSTALL_LIBDIR}/cmake/Qt${PROJECT_VERSION_MAJOR}")
+ endif()
+endfunction()
+
+find_or_build_bootstrap_names()
+
+add_subdirectory(corelib)
+add_subdirectory(tools)
+add_subdirectory(network)
+add_subdirectory(xml)
+add_subdirectory(dbus)
+if(QT_FEATURE_gui)
+ add_subdirectory(gui)
+
+ qt_pull_features_into_current_scope(PUBLIC_FEATURES Qt::Gui)
+ if(QT_FEATURE_widgets)
+ add_subdirectory(widgets)
+ if(QT_FEATURE_opengl)
+ add_subdirectory(opengl)
+ endif()
+ endif()
+ add_subdirectory(platformsupport)
+ add_subdirectory(platformheaders)
+endif()
+add_subdirectory(testlib)
+add_subdirectory(plugins)
diff --git a/src/corelib/CMakeLists.txt b/src/corelib/CMakeLists.txt
new file mode 100644
index 0000000000..eaa2ab8654
--- /dev/null
+++ b/src/corelib/CMakeLists.txt
@@ -0,0 +1,781 @@
+
+find_package(Threads)
+find_package(WrapDoubleConversion REQUIRED)
+
+find_library(FWAppKit AppKit)
+find_library(FWApplicationServices ApplicationServices)
+find_library(FWCoreFoundation CoreFoundation)
+find_library(FWCoreServices CoreServices)
+find_library(FWDiskArbitration DiskArbitration)
+find_library(FWFoundation Foundation)
+find_library(FWIOKit IOKit)
+find_library(FWMobileCoreServices MobileCoreServices)
+find_library(FWSecurity Security)
+find_library(FWUIKit UIKit)
+find_library(FWWatchKit WatchKit)
+
+## Evaluation helper target:
+# FIXME: How does this work?
+add_library(Qt_Evaluation INTERFACE)
+target_sources(Qt_Evaluation INTERFACE "${CMAKE_CURRENT_SOURCE_DIR}/kernel/qtcore_eval.cpp")
+target_include_directories(Qt_Evaluation INTERFACE global)
+
+#####################################################################
+## Core Module:
+#####################################################################
+
+add_qt_module(Core
+ SOURCES
+ animation/qabstractanimation.cpp animation/qabstractanimation.h animation/qabstractanimation_p.h
+ animation/qanimationgroup.cpp animation/qanimationgroup.h animation/qanimationgroup_p.h
+ animation/qparallelanimationgroup.cpp animation/qparallelanimationgroup.h animation/qparallelanimationgroup_p.h
+ animation/qpauseanimation.cpp animation/qpauseanimation.h
+ animation/qpropertyanimation.cpp animation/qpropertyanimation.h animation/qpropertyanimation_p.h
+ animation/qsequentialanimationgroup.cpp animation/qsequentialanimationgroup.h animation/qsequentialanimationgroup_p.h
+ animation/qvariantanimation.cpp animation/qvariantanimation.h animation/qvariantanimation_p.h
+ codecs/qisciicodec.cpp codecs/qisciicodec_p.h
+ codecs/qlatincodec.cpp codecs/qlatincodec_p.h
+ codecs/qsimplecodec.cpp codecs/qsimplecodec_p.h
+ codecs/qtextcodec.cpp codecs/qtextcodec.h codecs/qtextcodec_p.h
+ codecs/qtsciicodec.cpp codecs/qtsciicodec_p.h
+ codecs/qutfcodec.cpp codecs/qutfcodec_p.h
+ global/archdetect.cpp
+ global/qcompilerdetection.h
+ global/qendian.cpp global/qendian.h global/qendian_p.h
+ global/qflags.h
+ global/qfloat16.cpp global/qfloat16.h global/qfloat16_p.h
+ global/qglobal.cpp global/qglobal.h
+ global/qglobalstatic.h
+ global/qhooks.cpp global/qhooks_p.h
+ global/qisenum.h
+ global/qlibraryinfo.cpp global/qlibraryinfo.h
+ global/qlogging.cpp global/qlogging.h
+ global/qmalloc.cpp
+ global/qnamespace.h
+ global/qnumeric.cpp global/qnumeric.h global/qnumeric_p.h
+ global/qoperatingsystemversion.cpp global/qoperatingsystemversion.h global/qoperatingsystemversion_p.h
+ global/qprocessordetection.h
+ global/qrandom.cpp global/qrandom.h global/qrandom_p.h
+ global/qsysinfo.h
+ global/qsystemdetection.h
+ global/qtypeinfo.h
+ global/qtypetraits.h
+ global/qversiontagging.cpp global/qversiontagging.h
+ io/qabstractfileengine.cpp io/qabstractfileengine_p.h
+ io/qbuffer.cpp io/qbuffer.h
+ io/qdataurl.cpp io/qdataurl_p.h
+ io/qdebug.cpp io/qdebug.h io/qdebug_p.h
+ io/qdir.cpp io/qdir.h io/qdir_p.h
+ io/qdiriterator.cpp io/qdiriterator.h
+ io/qfile.cpp io/qfile.h
+ io/qfiledevice.cpp io/qfiledevice.h io/qfiledevice_p.h
+ io/qfileinfo.cpp io/qfileinfo.h io/qfileinfo_p.h
+ io/qfileselector.cpp io/qfileselector.h io/qfileselector_p.h
+ io/qfilesystemengine.cpp io/qfilesystemengine_p.h
+ io/qfilesystementry.cpp io/qfilesystementry_p.h
+ io/qfilesystemiterator_p.h
+ io/qfilesystemmetadata_p.h
+ io/qfilesystemwatcher.cpp io/qfilesystemwatcher.h io/qfilesystemwatcher_p.h
+ io/qfilesystemwatcher_polling.cpp io/qfilesystemwatcher_polling_p.h
+ io/qfsfileengine.cpp io/qfsfileengine_p.h
+ io/qfsfileengine_iterator.cpp io/qfsfileengine_iterator_p.h
+ io/qiodevice.cpp io/qiodevice.h io/qiodevice_p.h
+ io/qipaddress.cpp io/qipaddress_p.h
+ io/qlockfile.cpp io/qlockfile.h io/qlockfile_p.h
+ io/qloggingcategory.cpp io/qloggingcategory.h
+ io/qloggingregistry.cpp io/qloggingregistry_p.h
+ io/qnoncontiguousbytedevice.cpp io/qnoncontiguousbytedevice_p.h
+ io/qresource.cpp io/qresource_p.h
+ io/qresource_iterator.cpp io/qresource_iterator_p.h
+ io/qsavefile.cpp io/qsavefile.h
+ io/qsettings.cpp io/qsettings.h io/qsettings_p.h
+ io/qstandardpaths.cpp io/qstandardpaths.h
+ io/qstorageinfo.cpp io/qstorageinfo.h io/qstorageinfo_p.h
+ io/qtemporarydir.cpp io/qtemporarydir.h
+ io/qtemporaryfile.cpp io/qtemporaryfile.h io/qtemporaryfile_p.h
+ io/qtldurl.cpp io/qtldurl_p.h
+ io/qurl.cpp io/qurl.h io/qurl_p.h
+ io/qurlidna.cpp
+ io/qurlquery.cpp io/qurlquery.h
+ io/qurlrecode.cpp
+ io/qurltlds_p.h
+ kernel/qabstracteventdispatcher.cpp kernel/qabstracteventdispatcher.h kernel/qabstracteventdispatcher_p.h
+ kernel/qabstractnativeeventfilter.cpp kernel/qabstractnativeeventfilter.h
+ kernel/qbasictimer.cpp kernel/qbasictimer.h
+ kernel/qcoreapplication.cpp kernel/qcoreapplication.h kernel/qcoreapplication_p.h
+ kernel/qcorecmdlineargs_p.h
+ kernel/qcoreevent.cpp kernel/qcoreevent.h
+ kernel/qcoreglobaldata.cpp kernel/qcoreglobaldata_p.h
+ kernel/qdeadlinetimer.cpp kernel/qdeadlinetimer.h kernel/qdeadlinetimer_p.h
+ kernel/qelapsedtimer.cpp kernel/qelapsedtimer.h
+ kernel/qeventloop.cpp kernel/qeventloop.h
+ kernel/qfunctions_p.h
+ kernel/qmath.cpp kernel/qmath.h
+ kernel/qmetaobject.cpp kernel/qmetaobject.h kernel/qmetaobject_p.h
+ kernel/qmetaobject_moc_p.h
+ kernel/qmetaobjectbuilder.cpp kernel/qmetaobjectbuilder_p.h
+ kernel/qmetatype.cpp kernel/qmetatype.h kernel/qmetatype_p.h
+ kernel/qmetatypeswitcher_p.h
+ kernel/qmimedata.cpp kernel/qmimedata.h
+ kernel/qobject.cpp kernel/qobject.h kernel/qobject_p.h
+ kernel/qobject_impl.h
+ kernel/qobjectcleanuphandler.cpp kernel/qobjectcleanuphandler.h
+ kernel/qobjectdefs.h
+ kernel/qobjectdefs_impl.h
+ kernel/qpointer.cpp kernel/qpointer.h
+ kernel/qsharedmemory.cpp kernel/qsharedmemory.h kernel/qsharedmemory_p.h
+ kernel/qsignalmapper.cpp kernel/qsignalmapper.h
+ kernel/qsocketnotifier.cpp kernel/qsocketnotifier.h
+ kernel/qsystemerror.cpp kernel/qsystemerror_p.h
+ kernel/qsystemsemaphore.cpp kernel/qsystemsemaphore.h kernel/qsystemsemaphore_p.h
+ kernel/qtestsupport_core.cpp kernel/qtestsupport_core.h
+ kernel/qtimer.cpp kernel/qtimer.h
+ kernel/qtranslator.cpp kernel/qtranslator.h kernel/qtranslator_p.h
+ kernel/qvariant.cpp kernel/qvariant.h kernel/qvariant_p.h
+ plugin/qfactoryinterface.cpp plugin/qfactoryinterface.h
+ plugin/qfactoryloader.cpp plugin/qfactoryloader_p.h
+ plugin/qplugin.h plugin/qplugin_p.h
+ plugin/qpluginloader.cpp plugin/qpluginloader.h
+ plugin/quuid.cpp plugin/quuid.h
+ serialization/qcborarray.h
+ serialization/qcborcommon.h
+ serialization/qcbordiagnostic.cpp
+ serialization/qcbormap.h
+ serialization/qcborstream.cpp serialization/qcborstream.h
+ serialization/qcborvalue.cpp serialization/qcborvalue.h serialization/qcborvalue_p.h
+ serialization/qdatastream.cpp serialization/qdatastream.h serialization/qdatastream_p.h
+ serialization/qjson.cpp serialization/qjson_p.h
+ serialization/qjsonarray.cpp serialization/qjsonarray.h
+ serialization/qjsoncbor.cpp
+ serialization/qjsondocument.cpp serialization/qjsondocument.h
+ serialization/qjsonobject.cpp serialization/qjsonobject.h
+ serialization/qjsonparser.cpp serialization/qjsonparser_p.h
+ serialization/qjsonvalue.cpp serialization/qjsonvalue.h
+ serialization/qjsonwriter.cpp serialization/qjsonwriter_p.h
+ serialization/qtextstream.cpp serialization/qtextstream.h serialization/qtextstream_p.h
+ serialization/qxmlstream.cpp serialization/qxmlstream.h serialization/qxmlstream_p.h
+ serialization/qxmlutils.cpp serialization/qxmlutils_p.h
+ thread/qmutex.h
+ thread/qreadwritelock.h
+ thread/qrunnable.cpp thread/qrunnable.h
+ thread/qthread.cpp thread/qthread.h
+ thread/qthreadstorage.h
+ thread/qwaitcondition.h
+ tools/qalgorithms.h
+ tools/qarraydata.cpp tools/qarraydata.h
+ tools/qarraydataops.h
+ tools/qarraydatapointer.h
+ tools/qbitarray.cpp tools/qbitarray.h
+ tools/qbytearray.cpp tools/qbytearray.h tools/qbytearray_p.h
+ tools/qbytearraylist.cpp tools/qbytearraylist.h
+ tools/qbytearraymatcher.cpp tools/qbytearraymatcher.h
+ tools/qbytedata_p.h
+ tools/qcache.h
+ tools/qchar.h
+ tools/qcollator.cpp tools/qcollator.h tools/qcollator_p.h
+ tools/qcontainerfwd.h
+ tools/qcontiguouscache.cpp tools/qcontiguouscache.h
+ tools/qcryptographichash.cpp tools/qcryptographichash.h
+ tools/qdatetime.cpp tools/qdatetime.h tools/qdatetime_p.h
+ tools/qdoublescanprint_p.h
+ tools/qeasingcurve.cpp tools/qeasingcurve.h
+ tools/qfreelist.cpp tools/qfreelist_p.h
+ tools/qharfbuzz.cpp
+ tools/qhash.cpp tools/qhash.h
+ tools/qhashfunctions.h
+ tools/qiterator.h
+ tools/qline.cpp tools/qline.h
+ tools/qlinkedlist.cpp tools/qlinkedlist.h
+ tools/qlist.cpp tools/qlist.h
+ tools/qlocale.cpp tools/qlocale.h tools/qlocale_p.h
+ tools/qlocale_data_p.h
+ tools/qlocale_tools.cpp tools/qlocale_tools_p.h
+ tools/qmakearray_p.h
+ tools/qmap.cpp tools/qmap.h
+ tools/qmargins.cpp tools/qmargins.h
+ tools/qmessageauthenticationcode.cpp tools/qmessageauthenticationcode.h
+ tools/qoffsetstringarray_p.h
+ tools/qpair.h
+ tools/qpoint.cpp tools/qpoint.h
+ tools/qqueue.h
+ tools/qrect.cpp tools/qrect.h
+ tools/qrefcount.cpp tools/qrefcount.h
+ tools/qregexp.cpp tools/qregexp.h
+ tools/qringbuffer.cpp tools/qringbuffer_p.h
+ tools/qscopedpointer.h tools/qscopedpointer_p.h
+ tools/qscopedvaluerollback.h
+ tools/qscopeguard.h
+ tools/qset.h
+ tools/qshareddata.cpp tools/qshareddata.h
+ tools/qsharedpointer.cpp tools/qsharedpointer.h
+ tools/qsharedpointer_impl.h
+ tools/qsimd.cpp tools/qsimd_p.h
+ tools/qsize.cpp tools/qsize.h
+ tools/qstack.h
+ tools/qstring.cpp tools/qstring.h
+ tools/qstringalgorithms.h tools/qstringalgorithms_p.h
+ tools/qstringbuilder.cpp tools/qstringbuilder.h
+ tools/qstringiterator_p.h
+ tools/qstringlist.cpp tools/qstringlist.h
+ tools/qstringliteral.h
+ tools/qstringmatcher.h
+ tools/qstringview.cpp tools/qstringview.h
+ tools/qtextboundaryfinder.cpp tools/qtextboundaryfinder.h
+ tools/qtimeline.cpp tools/qtimeline.h
+ tools/qtools_p.h
+ tools/qunicodetables_p.h
+ tools/qunicodetools.cpp tools/qunicodetools_p.h
+ tools/qvarlengtharray.h
+ tools/qvector.h
+ tools/qversionnumber.cpp tools/qversionnumber.h
+ tools/qvsnprintf.cpp
+ LIBRARIES
+ WrapDoubleConversion
+ tinycbor Threads::Threads ZLIB::ZLIB
+ QtHarfBuzz
+ PUBLIC_LIBRARIES Qt::Platform
+ DEFINES
+ QT_NO_USING_NAMESPACE
+ QT_NO_FOREACH
+)
+
+# As a special feature, the global features are attached to QtCore as
+# custom properties. That's symmetric to qconfig.cpp/h being part of
+# QtCore and not of a QtGlobal library.
+
+foreach(visibility PUBLIC PRIVATE)
+ foreach(state ENABLED DISABLED)
+ get_target_property(props Qt_global_Config INTERFACE_QT_${state}_${visibility}_FEATURES)
+ set(propertyName "QT_GLOBAL_${state}_${visibility}_FEATURES")
+ set_property(TARGET Core PROPERTY ${propertyName} "${props}")
+ set_property(TARGET Core APPEND PROPERTY EXPORT_PROPERTIES "${propertyName}")
+ endforeach()
+endforeach()
+
+configure_file(global/qconfig.cpp.in global/qconfig.cpp)
+
+# FIXME: tools still have a lot of special stuff that is not ported!
+
+# FIXME: qmake condition: (linux*|hurd*):!cross_compile:!static:!*-armcc*
+# FIXME: qmake gets the elf interpreter out of /bin/ls
+find_program(HOST_ELF_INTERPRETER NAMES ld-linux-x86-64.so.2 PATHS /lib /lib64 NO_DEFAULT_PATH)
+if (LINUX AND NOT CMAKE_CROSSCOMPILING AND HOST_ELF_INTERPRETER_FOUND)
+ qt_internal_add_link_flags(Core "-Wl,-e,qt_core_boilerplate")
+ target_compile_definitions(Core PRIVATE ELF_INTERPRETER="${HOST_ELF_INTERPRETER}")
+endif()
+
+
+### Platform support:
+#####################################################################
+
+# Windows
+
+### All Windows:
+extend_target(Core CONDITION WIN32
+ SOURCES
+ io/qfilesystemengine_win.cpp
+ io/qfilesystemwatcher_win.cpp io/qfilesystemwatcher_win_p.h
+ io/qfsfileengine_win.cpp
+ io/qlockfile_win.cpp
+ kernel/qcoreapplication_win.cpp
+ kernel/qelapsedtimer_win.cpp
+ kernel/qsharedmemory_win.cpp
+ kernel/qsystemsemaphore_win.cpp
+ kernel/qwineventnotifier.cpp
+ kernel/qwineventnotifier.h
+ kernel/qwineventnotifier_p.h
+ plugin/qsystemlibrary.cpp
+ plugin/qsystemlibrary_p.h
+ thread/qatomic_msvc.h
+ thread/qthread_win.cpp
+ tools/qlocale_win.cpp
+ global/qoperatingsystemversion_win.cpp
+ LIBRARIES kernel32 user32 shell32 uuid ole32 advapi32 winmm version ws2_32
+)
+
+### Classic windows:
+extend_target(Core CONDITION WIN32 AND NOT WINRT
+ SOURCES
+ io/qsettings_win.cpp
+ io/qstandardpaths_win.cpp
+ io/qstorageinfo_win.cpp
+ io/qwindowspipereader.cpp
+ io/qwindowspipereader_p.h
+ io/qwindowspipewriter.cpp
+ io/qwindowspipewriter_p.h
+ kernel/qeventdispatcher_win.cpp kernel/qeventdispatcher_win_p.h
+ LIBRARIES mpr netapi32 userenv
+)
+
+### WinRT
+extend_target(Core CONDITION WIN32 AND WINRT
+ SOURCES
+ io/qsettings_winrt.cpp
+ io/qstandardpaths_winrt.cpp
+ io/qstorageinfo_stub.cpp
+ kernel/qeventdispatcher_winrt.cpp kernel/qeventdispatcher_winrt_p.h
+ kernel/qfunctions_fake_env_p.h
+ kernel/qfunctions_winrt.cpp kernel/qfunctions_winrt.h
+)
+
+### All Apple:
+extend_target(Core CONDITION APPLE
+ SOURCES
+ io/qsettings_mac.cpp
+ io/qstandardpaths_mac.mm
+ io/qstorageinfo_mac.cpp
+ kernel/qcfsocketnotifier.cpp kernel/qcfsocketnotifier_p.h
+ kernel/qcoreapplication_mac.cpp
+ kernel/qcore_foundation.mm
+ kernel/qcore_mac_objc.mm
+ kernel/qcore_mac_objc.mm kernel/qcore_mac.cpp kernel/qcore_mac_p.h
+ kernel/qelapsedtimer_mac.cpp
+ kernel/qeventdispatcher_cf.mm kernel/qeventdispatcher_cf_p.h
+ global/qoperatingsystemversion_darwin.mm
+ LIBRARIES ${FWCoreFoundation} ${FWFoundation}
+)
+
+### Apple desktop machines:
+extend_target(Core CONDITION APPLE_OSX
+ SOURCES
+ io/qfilesystemwatcher_fsevents.mm io/qfilesystemwatcher_fsevents_p.h
+ tools/qlocale_mac.mm
+ LIBRARIES
+ ${FWCoreServices} ${FWAppKit} ${FWSecurity}
+ ${FWApplicationServices} ${FWDiskArbitration} ${FWIOKit}
+)
+
+### Apple mobile machines:
+extend_target(Core CONDITION APPLE AND NOT APPLE_OSX
+ LIBRARIES ${FWMobileCoreServices}
+)
+
+extend_target(Core CONDITION APPLE_WATCHOS LIBRARIES ${FWWatchKit})
+extend_target(Core CONDITION APPLE_TVOS LIBRARIES ${FWUIKit})
+
+extend_target(Core CONDITION INTEGRITY
+ SOURCES tools/qlocale_unix.cpp
+ LIBRARIES posix ivfs socket net shm_client
+)
+
+extend_target(Core CONDITION UNIX
+ SOURCES
+ io/qfilesystemengine_unix.cpp
+ io/qfsfileengine_unix.cpp
+ io/qlockfile_unix.cpp
+ thread/qthread_unix.cpp
+)
+
+extend_target(Core CONDITION UNIX AND NOT APPLE
+ SOURCES
+ tools/qlocale_unix.cpp
+)
+
+extend_target(Core CONDITION ANDROID
+ SOURCES
+ io/qstandardpaths_android.cpp
+ io/qstorageinfo_unix.cpp
+ kernel/qjni.cpp kernel/qjni_p.h
+ kernel/qjnihelpers.cpp kernel/qjnihelpers_p.h
+ kernel/qjnionload.cpp
+)
+
+extend_target(Core CONDITION HAIKU
+ SOURCES
+ io/qstandardpaths_haiku.cpp
+ io/qstorageinfo_unix.cpp
+ LIBRARIES be
+)
+
+extend_target(Core CONDITION BSD
+ SOURCES io/qfilesystemwatcher_kqueue.cpp io/qfilesystemwatcher_kqueue_p.h
+)
+
+extend_target(Core CONDITION VXWORKS
+ SOURCES kernel/qfunctions_vxworks.cpp kernel/qfunctions_vxworks.h
+)
+
+extend_target(Core CONDITION NACL
+ SOURCES kernel/qfunctions_nacl.cpp kernel/qfunctions_nacl.h
+)
+
+extend_target(Core CONDITION NOT WIN32 AND NOT APPLE AND NOT ANDROID AND NOT HAIKU
+ SOURCES
+ io/qstandardpaths_unix.cpp
+ io/qstorageinfo_unix.cpp
+)
+
+### standardpaths, storageinfo and settings:
+if (WIN32)
+ if (WINRT)
+ target_sources(Core PRIVATE
+ io/qsettings_winrt.cpp
+ io/qstandardpaths_winrt.cpp
+ io/qstorageinfo_stub.cpp
+ )
+ else()
+ target_sources(Core PRIVATE
+ io/qsettings_win.cpp
+ io/qstandardpaths_win.cpp
+ io/qstorageinfo_win.cpp
+ )
+ endif()
+elseif (UNIX)
+ if (NOT INTEGRITY AND NOT UIKIT)
+ target_sources(Core PRIVATE io/forkfd_qt.cpp)
+ target_include_directories(Core PRIVATE ../3rdparty/forkfd)
+ endif()
+ if (NOT NACL AND APPLE)
+ target_sources(Core PRIVATE io/qsettings_mac.cpp)
+ endif()
+ if (APPLE)
+ target_sources(Core PRIVATE
+ io/qstandardpaths_mac.mm
+ io/qstorageinfo_mac.cpp
+ )
+ elseif(ANDROID AND NOT ANDROID_EMBEDDED)
+ target_sources(Core PRIVATE
+ io/qstandardpaths_android.cpp
+ io/qstorageinfo_unix.cpp
+ )
+ elseif(HAIKU)
+ target_sources(Core PRIVATE
+ io/qstandardpaths_haiku.cpp
+ io/qstorageinfo_unix.cpp
+ )
+ else()
+ target_sources(Core PRIVATE
+ io/qstandardpaths_unix.cpp
+ io/qstorageinfo_unix.cpp
+ )
+ endif()
+endif()
+
+### kernel stuff:
+if (UNIX OR INTEGRITY)
+ extend_target(Core SOURCES
+ kernel/qcore_unix.cpp
+ kernel/qcore_unix_p.h
+ kernel/qeventdispatcher_unix.cpp
+ kernel/qeventdispatcher_unix_p.h
+ kernel/qpoll_p.h
+ kernel/qtimerinfo_unix.cpp
+ kernel/qtimerinfo_unix_p.h
+ )
+ if (NOT APPLE OR NACL)
+ target_sources(Core PRIVATE kernel/qelapsedtimer_unix.cpp)
+ endif()
+
+ if (ANDROID)
+ target_sources(Core PRIVATE
+ kernel/qsharedmemory_android.cpp
+ kernel/qsystemsemaphore_android.cpp
+ )
+ else()
+ target_sources(Core PRIVATE
+ kernel/qsharedmemory_posix.cpp
+ kernel/qsharedmemory_systemv.cpp
+ kernel/qsharedmemory_unix.cpp
+ kernel/qsystemsemaphore_posix.cpp
+ kernel/qsystemsemaphore_systemv.cpp
+ kernel/qsystemsemaphore_unix.cpp
+ )
+ endif()
+
+ # FIXME: Implement this!
+ # This is needed by QMetaType::typeName array implementation
+ #integrity: QMAKE_CXXFLAGS += --pending_instantiations=128
+elseif(NOT WIN32 AND NOT UNIX AND NOT APPLE)
+ target_sources(Core PRIVATE kernel/qelapsedtimer_generic.cpp)
+endif()
+
+
+
+### Feature support:
+#####################################################################
+
+## inotify:
+extend_target(Core CONDITION QT_FEATURE_inotify
+ SOURCES
+ io/qfilesystemwatcher_inotify.cpp io/qfilesystemwatcher_inotify_p.h
+)
+
+## qqnx_pps:
+extend_target(Core CONDITION QNX AND QT_FEATURE_qqnx_pps
+ SOURCES
+ kernel/qppsattribute.cpp kernel/qppsattribute_p.h
+ kernel/qppsattributeprivate_p.h
+ kernel/qppsobject.cpp kernel/qppsobject_p.h
+ kernel/qppsobjectprivate_p.h
+ LIBRARIES pps
+)
+
+## clock_gettime:
+extend_target(Core CONDITION UNIX AND QT_FEATURE_clock_gettime
+ LIBRARIES rt
+)
+
+## glib:
+extend_target(Core CONDITION QT_FEATURE_glib
+ SOURCES
+ kernel/qeventdispatcher_glib.cpp kernel/qeventdispatcher_glib_p.h
+ LIBRARIES PkgConfig::GLib
+)
+
+## poll_select:
+extend_target(Core CONDITION UNIX AND QT_FEATURE_poll_select
+ SOURCES kernel/qpoll.cpp
+)
+
+## thread:
+extend_target(Core CONDITION QT_FEATURE_thread
+ SOURCES
+ thread/qatomic_bootstrap.h
+ thread/qatomic.cpp thread/qatomic.h
+ thread/qatomic_cxx11.h
+ thread/qbasicatomic.h
+ thread/qfutex_p.h
+ thread/qgenericatomic.h
+ thread/qmutex.cpp thread/qmutex_p.h
+ thread/qmutexpool.cpp thread/qmutexpool_p.h
+ thread/qorderedmutexlocker_p.h
+ thread/qreadwritelock.cpp thread/qreadwritelock_p.h
+ thread/qsemaphore.cpp thread/qsemaphore.h
+ thread/qthread_p.h
+ thread/qthreadpool.cpp thread/qthreadpool.h thread/qthreadpool_p.h
+ thread/qthreadstorage.cpp
+)
+
+extend_target(Core CONDITION QT_FEATURE_thread AND WIN32
+ SOURCES
+ thread/qwaitcondition_win.cpp
+)
+
+extend_target(Core CONDITION QT_FEATURE_thread AND NOT WIN32
+ SOURCES thread/qwaitcondition_unix.cpp
+)
+
+## future:
+extend_target(Core CONDITION QT_FEATURE_future
+ SOURCES
+ thread/qexception.cpp thread/qexception.h
+ thread/qfuture.h
+ thread/qfutureinterface.cpp thread/qfutureinterface.h thread/qfutureinterface_p.h
+ thread/qfuturesynchronizer.h
+ thread/qfuturewatcher.cpp thread/qfuturewatcher.h thread/qfuturewatcher_p.h
+ thread/qresultstore.cpp thread/qresultstore.h
+)
+
+## ICU:
+extend_target(Core CONDITION QT_FEATURE_icu
+ SOURCES
+ codecs/qicucodec.cpp
+ tools/qcollator_icu.cpp
+ tools/qlocale_icu.cpp
+ LIBRARIES ICU::i18n ICU::uc ICU::data
+)
+
+extend_target(Core CONDITION NOT QT_FEATURE_icu AND WIN32
+ SOURCES tools/qcollator_win.cpp
+)
+
+extend_target(Core CONDITION NOT QT_FEATURE_icu AND APPLE
+ SOURCES tools/qcollator_macx.cpp
+)
+
+extend_target(Core CONDITION NOT QT_FEATURE_icu AND NOT WIN32 AND NOT APPLE
+ SOURCES tools/qcollator_posix.cpp
+)
+
+extend_target(Core CONDITION NOT QT_FEATURE_icu
+ SOURCES
+ codecs/qbig5codec.cpp codecs/qbig5codec_p.h
+ codecs/qeucjpcodec.cpp codecs/qeucjpcodec_p.h
+ codecs/qeuckrcodec.cpp codecs/qeuckrcodec_p.h
+ codecs/qgb18030codec.cpp codecs/qgb18030codec_p.h
+ codecs/qjiscodec.cpp codecs/qjiscodec_p.h
+ codecs/qjpunicode.cpp
+ codecs/qsjiscodec.cpp codecs/qsjiscodec_p.h
+)
+
+extend_target(Core CONDITION NOT QT_FEATURE_icu AND QT_FEATURE_iconv
+ SOURCES codecs/qiconvcodec.cpp codecs/qiconvcodec_p.h
+ LIBRARIES Iconv
+)
+
+extend_target(Core CONDITION NOT QT_FEATURE_icu AND WIN32
+ SOURCES codecs/qwindowscodec.cpp codecs/qwindowscodec_p.h
+)
+
+## timezone:
+extend_target(Core CONDITION QT_FEATURE_timezone
+ SOURCES
+ tools/qtimezone.cpp tools/qtimezone.h
+ tools/qtimezoneprivate.cpp tools/qtimezoneprivate_p.h
+ tools/qtimezoneprivate_data_p.h
+)
+
+extend_target(Core CONDITION QT_FEATURE_timezone AND WIN32
+ SOURCES tools/qtimezoneprivate_win.cpp
+)
+
+extend_target(Core CONDITION QT_FEATURE_timezone AND APPLE
+ SOURCES tools/qtimezoneprivate_mac.mm
+)
+
+extend_target(Core CONDITION QT_FEATURE_timezone AND ANDROID
+ SOURCES tools/qtimezoneprivate_android.cpp
+)
+
+extend_target(Core CONDITION QT_FEATURE_timezone AND UNIX AND NOT APPLE
+ SOURCES tools/qtimezoneprivate_tz.cpp
+)
+
+extend_target(Core CONDITION QT_FEATURE_timezone AND QT_FEATURE_icu AND NOT WIN32 AND NOT ANDROID AND NOT APPLE
+ SOURCES tools/qtimezoneprivate_icu.cpp
+)
+
+## datetimeparser:
+extend_target(Core CONDITION QT_FEATURE_datetimeparser
+ SOURCES tools/qdatetimeparser.cpp tools/qdatetimeparser_p.h
+)
+
+## regularexpression:
+extend_target(Core CONDITION QT_FEATURE_regularexpression
+ SOURCES tools/qregularexpression.cpp tools/qregularexpression.h
+ LIBRARIES PCRE2
+)
+
+## commandlineparser:
+extend_target(Core CONDITION QT_FEATURE_commandlineparser
+ SOURCES
+ tools/qcommandlineoption.cpp tools/qcommandlineoption.h
+ tools/qcommandlineparser.cpp tools/qcommandlineparser.h
+)
+
+## processenvironment:
+extend_target(Core CONDITION QT_FEATURE_processenvironment
+ SOURCES io/qprocess.cpp io/qprocess.h io/qprocess_p.h
+)
+
+extend_target(Core CONDITION QT_FEATURE_processenvironment AND WIN32 AND NOT WINRT
+ SOURCES io/qprocess_win.cpp
+)
+
+extend_target(Core CONDITION QT_FEATURE_processenvironment AND APPLE
+ SOURCES io/qprocess_darwin.mm
+)
+
+extend_target(Core CONDITION QT_FEATURE_processenvironment AND UNIX
+ SOURCES io/qprocess_unix.cpp
+)
+
+## filesystemiterator:
+extend_target(Core CONDITION QT_FEATURE_filesystemiterator AND WIN32
+ SOURCES io/qfilesystemiterator_win.cpp
+)
+
+extend_target(Core CONDITION QT_FEATURE_filesystemiterator AND UNIX
+ SOURCES io/qfilesystemiterator_unix.cpp
+)
+
+## itemmodel:
+extend_target(Core CONDITION QT_FEATURE_itemmodel
+ SOURCES
+ itemmodels/qabstractitemmodel.cpp itemmodels/qabstractitemmodel.h itemmodels/qabstractitemmodel_p.h
+ itemmodels/qitemselectionmodel.cpp itemmodels/qitemselectionmodel.h itemmodels/qitemselectionmodel_p.h
+)
+
+## proxymodel:
+extend_target(Core CONDITION QT_FEATURE_proxymodel
+ SOURCES itemmodels/qabstractproxymodel.cpp itemmodels/qabstractproxymodel.h itemmodels/qabstractproxymodel_p.h
+)
+
+## identityproxymodel:
+extend_target(Core CONDITION QT_FEATURE_identityproxymodel
+ SOURCES itemmodels/qidentityproxymodel.cpp itemmodels/qidentityproxymodel.h
+)
+
+## identityproxymodel:
+extend_target(Core CONDITION QT_FEATURE_sortfilterproxymodel
+ SOURCES itemmodels/qsortfilterproxymodel.cpp itemmodels/qsortfilterproxymodel.h
+)
+
+## stringlistmodel:
+extend_target(Core CONDITION QT_FEATURE_stringlistmodel
+ SOURCES itemmodels/qstringlistmodel.cpp itemmodels/qstringlistmodel.h
+)
+
+## library:
+extend_target(Core CONDITION QT_FEATURE_library
+ SOURCES
+ plugin/qelfparser_p.cpp plugin/qelfparser_p.h
+ plugin/qlibrary.cpp plugin/qlibrary.h plugin/qlibrary_p.h
+ plugin/qmachparser.cpp plugin/qmachparser_p.h
+ LIBRARIES ${CMAKE_DL_LIBS}
+)
+
+extend_target(Core CONDITION QT_FEATURE_library AND WIN32
+ SOURCES plugin/qlibrary_win.cpp
+)
+
+extend_target(Core CONDITION QT_FEATURE_library AND UNIX
+ SOURCES plugin/qlibrary_unix.cpp
+)
+
+## statemachine:
+extend_target(Core CONDITION QT_FEATURE_statemachine
+ SOURCES
+ statemachine/qabstractstate.cpp statemachine/qabstractstate.h statemachine/qabstractstate_p.h
+ statemachine/qabstracttransition.cpp statemachine/qabstracttransition.h statemachine/qabstracttransition_p.h
+ statemachine/qfinalstate.cpp statemachine/qfinalstate.h statemachine/qfinalstate_p.h
+ statemachine/qhistorystate.cpp statemachine/qhistorystate.h statemachine/qhistorystate_p.h
+ statemachine/qsignaleventgenerator_p.h
+ statemachine/qsignaltransition.cpp statemachine/qsignaltransition.h statemachine/qsignaltransition_p.h
+ statemachine/qstate.cpp statemachine/qstate.h statemachine/qstate_p.h
+ statemachine/qstatemachine.cpp statemachine/qstatemachine.h statemachine/qstatemachine_p.h
+)
+
+# qeventtransition:
+extend_target(Core CONDITION QT_FEATURE_qeventtransition
+ SOURCES statemachine/qeventtransition.cpp statemachine/qeventtransition.h statemachine/qeventtransition_p.h
+)
+
+# mimetype:
+extend_target(Core CONDITION QT_FEATURE_mimetype
+ SOURCES
+ mimetypes/mimetypes.qrc
+ mimetypes/qmimedatabase.cpp mimetypes/qmimedatabase.h mimetypes/qmimedatabase_p.h
+ mimetypes/qmimeglobpattern.cpp mimetypes/qmimeglobpattern_p.h
+ mimetypes/qmimemagicrule.cpp mimetypes/qmimemagicrule_p.h
+ mimetypes/qmimemagicrulematcher.cpp mimetypes/qmimemagicrulematcher_p.h
+ mimetypes/qmimeprovider.cpp mimetypes/qmimeprovider_p.h
+ mimetypes/qmimetype.cpp mimetypes/qmimetype.h mimetypes/qmimetype_p.h
+ mimetypes/qmimetypeparser.cpp mimetypes/qmimetypeparser_p.h
+)
+
+# Enable Evaluation based on QT_EVAL variable being set from the outside:
+extend_target(Core CONDITION QT_EVAL LIBRARIES Qt_Evaluation)
+
+### Extra stuff:
+#####################################################################
+
+
+add_custom_command(OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/global/qfloat16tables.cpp"
+ COMMAND qfloat16-tables
+ ARGS "${CMAKE_CURRENT_BINARY_DIR}/global/qfloat16tables.cpp"
+ DEPENDS global/qfloat16.h
+ COMMENT qfloat16-tables
+ VERBATIM)
+target_sources(Core PRIVATE "${CMAKE_CURRENT_BINARY_DIR}/global/qfloat16tables.cpp")
+
+qt_create_tracepoints(Core qtcore.tracepoints)
+
+# Remove QT_NO_CAST_TO_ASCII to ensure that the symbols are included in the library.
+if(WIN32)
+ get_target_property(defines Core COMPILE_DEFINITIONS)
+ list(REMOVE_ITEM defines QT_NO_CAST_TO_ASCII)
+ set_target_properties(Core PROPERTIES COMPILE_DEFINITIONS "${defines}")
+endif()
+
+add_qt_docs(./doc/qtcore.qdocconf)
diff --git a/src/corelib/configure.cmake b/src/corelib/configure.cmake
new file mode 100644
index 0000000000..21886b06aa
--- /dev/null
+++ b/src/corelib/configure.cmake
@@ -0,0 +1,712 @@
+
+
+#### Inputs
+
+# input iconv
+set(INPUT_iconv "undefined" CACHE STRING "")
+set_property(CACHE INPUT_iconv PROPERTY STRINGS undefined no yes posix sun gnu)
+
+
+
+#### Libraries
+
+find_package(GLib)
+set_package_properties(GLib PROPERTIES TYPE OPTIONAL)
+find_package(ICU COMPONENTS i18n uc data)
+set_package_properties(ICU PROPERTIES TYPE OPTIONAL)
+find_package(Libsystemd)
+set_package_properties(Libsystemd PROPERTIES TYPE OPTIONAL)
+find_package(Atomic)
+set_package_properties(Atomic PROPERTIES TYPE OPTIONAL)
+find_package(PCRE2)
+set_package_properties(PCRE2 PROPERTIES TYPE REQUIRED)
+
+
+#### Tests
+
+# atomicfptr
+qt_config_compile_test(atomicfptr
+ LABEL "working std::atomic for function pointers"
+"
+#include <atomic>
+typedef void (*fptr)(int);
+typedef std::atomic<fptr> atomicfptr;
+void testfunction(int) { }
+void test(volatile atomicfptr &a)
+{
+ fptr v = a.load(std::memory_order_acquire);
+ while (!a.compare_exchange_strong(v, &testfunction,
+ std::memory_order_acq_rel,
+ std::memory_order_acquire)) {
+ v = a.exchange(&testfunction);
+ }
+ a.store(&testfunction, std::memory_order_release);
+}
+int main(int argc, char **argv)
+{
+ (void)argc; (void)argv;
+ /* BEGIN TEST: */
+atomicfptr fptr(testfunction);
+test(fptr);
+ /* END TEST: */
+ return 0;
+}
+"# FIXME: qmake: CONFIG += c++11
+)
+
+# clock-monotonic
+qt_config_compile_test(clock_monotonic
+ LABEL "POSIX monotonic clock"
+"
+#include <unistd.h>
+#include <time.h>
+
+int main(int argc, char **argv)
+{
+ (void)argc; (void)argv;
+ /* BEGIN TEST: */
+#if defined(_POSIX_MONOTONIC_CLOCK) && (_POSIX_MONOTONIC_CLOCK-0 >= 0)
+timespec ts;
+clock_gettime(CLOCK_MONOTONIC, &ts);
+#else
+# error Feature _POSIX_MONOTONIC_CLOCK not available
+#endif
+ /* END TEST: */
+ return 0;
+}
+")
+
+# cloexec
+qt_config_compile_test(cloexec
+ LABEL "O_CLOEXEC"
+"#define _GNU_SOURCE 1
+#include <sys/types.h>
+#include <sys/socket.h>
+#include <fcntl.h>
+#include <unistd.h>
+
+int main(int argc, char **argv)
+{
+ (void)argc; (void)argv;
+ /* BEGIN TEST: */
+int pipes[2];
+(void) pipe2(pipes, O_CLOEXEC | O_NONBLOCK);
+(void) fcntl(0, F_DUPFD_CLOEXEC, 0);
+(void) dup3(0, 3, O_CLOEXEC);
+#if defined(__NetBSD__)
+(void) paccept(0, 0, 0, NULL, SOCK_CLOEXEC | SOCK_NONBLOCK);
+#else
+(void) accept4(0, 0, 0, SOCK_CLOEXEC | SOCK_NONBLOCK);
+#endif
+ /* END TEST: */
+ return 0;
+}
+")
+
+# cxx11_future
+qt_config_compile_test(cxx11_future
+ LABEL "C++11 <future>"
+"
+#include <future>
+
+int main(int argc, char **argv)
+{
+ (void)argc; (void)argv;
+ /* BEGIN TEST: */
+std::future<int> f = std::async([]() { return 42; });
+(void)f.get();
+ /* END TEST: */
+ return 0;
+}
+"# FIXME: qmake: unix:LIBS += -lpthread
+)
+
+# eventfd
+qt_config_compile_test(eventfd
+ LABEL "eventfd"
+"
+#include <sys/eventfd.h>
+
+int main(int argc, char **argv)
+{
+ (void)argc; (void)argv;
+ /* BEGIN TEST: */
+eventfd_t value;
+int fd = eventfd(0, EFD_CLOEXEC);
+eventfd_read(fd, &value);
+eventfd_write(fd, value);
+ /* END TEST: */
+ return 0;
+}
+")
+
+# inotify
+qt_config_compile_test(inotify
+ LABEL "inotify"
+"
+#include <sys/inotify.h>
+
+int main(int argc, char **argv)
+{
+ (void)argc; (void)argv;
+ /* BEGIN TEST: */
+inotify_init();
+inotify_add_watch(0, \"foobar\", IN_ACCESS);
+inotify_rm_watch(0, 1);
+ /* END TEST: */
+ return 0;
+}
+")
+
+# ipc_sysv
+qt_config_compile_test(ipc_sysv
+ LABEL "SysV IPC"
+"
+#include <sys/types.h>
+#include <sys/ipc.h>
+#include <sys/sem.h>
+#include <sys/shm.h>
+#include <fcntl.h>
+
+int main(int argc, char **argv)
+{
+ (void)argc; (void)argv;
+ /* BEGIN TEST: */
+key_t unix_key = ftok(\"test\", 'Q');
+semctl(semget(unix_key, 1, 0666 | IPC_CREAT | IPC_EXCL), 0, IPC_RMID, 0);
+shmget(unix_key, 0, 0666 | IPC_CREAT | IPC_EXCL);
+shmctl(0, 0, (struct shmid_ds *)(0));
+ /* END TEST: */
+ return 0;
+}
+")
+
+# ipc_posix
+qt_config_compile_test(ipc_posix
+ LABEL "POSIX IPC"
+"
+#include <sys/types.h>
+#include <sys/mman.h>
+#include <semaphore.h>
+#include <fcntl.h>
+
+int main(int argc, char **argv)
+{
+ (void)argc; (void)argv;
+ /* BEGIN TEST: */
+sem_close(sem_open(\"test\", O_CREAT | O_EXCL, 0666, 0));
+shm_open(\"test\", O_RDWR | O_CREAT | O_EXCL, 0666);
+shm_unlink(\"test\");
+ /* END TEST: */
+ return 0;
+}
+"# FIXME: qmake: linux: LIBS += -lpthread -lrt
+)
+
+# linkat
+qt_config_compile_test(linkat
+ LABEL "linkat()"
+"#define _ATFILE_SOURCE 1
+#include <fcntl.h>
+#include <unistd.h>
+
+int main(int argc, char **argv)
+{
+ (void)argc; (void)argv;
+ /* BEGIN TEST: */
+linkat(AT_FDCWD, \"foo\", AT_FDCWD, \"bar\", AT_SYMLINK_FOLLOW);
+ /* END TEST: */
+ return 0;
+}
+")
+
+# ppoll
+qt_config_compile_test(ppoll
+ LABEL "ppoll()"
+"
+#include <signal.h>
+#include <poll.h>
+
+int main(int argc, char **argv)
+{
+ (void)argc; (void)argv;
+ /* BEGIN TEST: */
+struct pollfd pfd;
+struct timespec ts;
+sigset_t sig;
+ppoll(&pfd, 1, &ts, &sig);
+ /* END TEST: */
+ return 0;
+}
+")
+
+# pollts
+qt_config_compile_test(pollts
+ LABEL "pollts()"
+"
+#include <poll.h>
+#include <signal.h>
+#include <time.h>
+
+int main(int argc, char **argv)
+{
+ (void)argc; (void)argv;
+ /* BEGIN TEST: */
+struct pollfd pfd;
+struct timespec ts;
+sigset_t sig;
+pollts(&pfd, 1, &ts, &sig);
+ /* END TEST: */
+ return 0;
+}
+")
+
+# poll
+qt_config_compile_test(poll
+ LABEL "poll()"
+"
+#include <poll.h>
+
+int main(int argc, char **argv)
+{
+ (void)argc; (void)argv;
+ /* BEGIN TEST: */
+struct pollfd pfd;
+poll(&pfd, 1, 0);
+ /* END TEST: */
+ return 0;
+}
+")
+
+# renameat2
+qt_config_compile_test(renameat2
+ LABEL "renameat2()"
+"#define _ATFILE_SOURCE 1
+#include <fcntl.h>
+#include <stdio.h>
+
+int main(int argc, char **argv)
+{
+ (void)argc; (void)argv;
+ /* BEGIN TEST: */
+renameat2(AT_FDCWD, argv[1], AT_FDCWD, argv[2], RENAME_NOREPLACE | RENAME_WHITEOUT);
+ /* END TEST: */
+ return 0;
+}
+")
+
+# statx
+qt_config_compile_test(statx
+ LABEL "statx() in libc"
+"#define _ATFILE_SOURCE 1
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <unistd.h>
+#include <fcntl.h>
+
+int main(int argc, char **argv)
+{
+ (void)argc; (void)argv;
+ /* BEGIN TEST: */
+struct statx statxbuf;
+unsigned int mask = STATX_BASIC_STATS;
+return statx(AT_FDCWD, \"\", AT_STATX_SYNC_AS_STAT, mask, &statxbuf);
+ /* END TEST: */
+ return 0;
+}
+")
+
+# syslog
+qt_config_compile_test(syslog
+ LABEL "syslog"
+"
+#include <syslog.h>
+
+int main(int argc, char **argv)
+{
+ (void)argc; (void)argv;
+ /* BEGIN TEST: */
+openlog(\"qt\", 0, LOG_USER);
+syslog(LOG_INFO, \"configure\");
+closelog();
+ /* END TEST: */
+ return 0;
+}
+")
+
+
+
+#### Features
+
+qt_feature("clock_gettime" PRIVATE
+ LABEL "clock_gettime()"
+ CONDITION UNIX AND libs.librt OR FIXME
+)
+qt_feature("clock_monotonic" PUBLIC
+ LABEL "POSIX monotonic clock"
+ CONDITION QT_FEATURE_clock_gettime AND TEST_clock_monotonic
+)
+qt_feature_definition("clock_monotonic" "QT_NO_CLOCK_MONOTONIC" NEGATE VALUE "1")
+qt_feature("cxx11_future" PUBLIC
+ LABEL "C++11 <future>"
+ CONDITION TEST_cxx11_future
+)
+qt_feature("eventfd" PUBLIC
+ LABEL "eventfd"
+ CONDITION NOT WASM AND TEST_eventfd
+)
+qt_feature_definition("eventfd" "QT_NO_EVENTFD" NEGATE VALUE "1")
+qt_feature("futimens" PRIVATE
+ LABEL "futimens()"
+ CONDITION NOT WIN32 AND TEST_futimens
+)
+qt_feature("futimes" PRIVATE
+ LABEL "futimes()"
+ CONDITION NOT WIN32 AND NOT QT_FEATURE_futimens AND TEST_futimes
+)
+qt_feature("getauxval" PRIVATE
+ LABEL "getauxval()"
+ CONDITION LINUX AND TEST_getauxval
+)
+qt_feature("getentropy" PRIVATE
+ LABEL "getentropy()"
+ CONDITION UNIX AND TEST_getentropy
+)
+qt_feature("glib" PUBLIC PRIVATE
+ LABEL "GLib"
+ AUTODETECT NOT WIN32
+ CONDITION GLib_FOUND
+)
+qt_feature_definition("glib" "QT_NO_GLIB" NEGATE VALUE "1")
+qt_feature("iconv" PUBLIC PRIVATE
+ SECTION "Internationalization"
+ LABEL "iconv"
+ PURPOSE "Provides internationalization on Unix."
+ CONDITION NOT QT_FEATURE_icu AND QT_FEATURE_textcodec AND ( QT_FEATURE_posix_libiconv OR TEST_sun_iconv OR QT_FEATURE_gnu_libiconv )
+)
+qt_feature_definition("iconv" "QT_NO_ICONV" NEGATE VALUE "1")
+qt_feature("posix_libiconv" PRIVATE
+ LABEL "POSIX iconv"
+ CONDITION NOT WIN32 AND NOT QNX AND NOT ANDROID AND NOT APPLE AND TEST_posix_iconv
+ ENABLE INPUT_iconv STREQUAL 'posix'
+ DISABLE INPUT_iconv STREQUAL 'sun' OR INPUT_iconv STREQUAL 'gnu' OR INPUT_iconv STREQUAL 'no'
+)
+qt_feature("gnu_libiconv" PRIVATE
+ LABEL "GNU iconv"
+ CONDITION NOT WIN32 AND NOT QNX AND NOT ANDROID AND NOT APPLE AND NOT QT_FEATURE_posix_libiconv AND NOT TEST_sun_iconv AND libs.gnu_iconv OR FIXME
+ ENABLE INPUT_iconv STREQUAL 'gnu'
+ DISABLE INPUT_iconv STREQUAL 'posix' OR INPUT_iconv STREQUAL 'sun' OR INPUT_iconv STREQUAL 'no'
+)
+qt_feature("icu" PRIVATE
+ LABEL "ICU"
+ AUTODETECT NOT WIN32
+ CONDITION ICU_FOUND
+)
+qt_feature("inotify" PUBLIC PRIVATE
+ LABEL "inotify"
+ CONDITION TEST_inotify
+)
+qt_feature_definition("inotify" "QT_NO_INOTIFY" NEGATE VALUE "1")
+qt_feature("ipc_posix" PUBLIC
+ LABEL "Using POSIX IPC"
+ AUTODETECT NOT WIN32
+ CONDITION NOT TEST_ipc_sysv AND TEST_ipc_posix
+)
+qt_feature_definition("ipc_posix" "QT_POSIX_IPC")
+qt_feature("journald" PRIVATE
+ LABEL "journald"
+ AUTODETECT OFF
+ CONDITION Libsystemd_FOUND
+)
+# Currently only used by QTemporaryFile; linkat() exists on Android, but hardlink creation fails due to security rules
+qt_feature("linkat" PRIVATE
+ LABEL "linkat()"
+ AUTODETECT LINUX AND NOT ANDROID
+ CONDITION TEST_linkat
+)
+qt_feature("std_atomic64" PUBLIC
+ LABEL "64 bit atomic operations"
+ CONDITION Atomic_FOUND
+)
+qt_feature("mimetype" PUBLIC
+ SECTION "Utilities"
+ LABEL "Mimetype handling"
+ PURPOSE "Provides MIME type handling."
+ CONDITION QT_FEATURE_textcodec
+)
+qt_feature_definition("mimetype" "QT_NO_MIMETYPE" NEGATE VALUE "1")
+qt_feature("poll_ppoll" PRIVATE
+ LABEL "Native ppoll()"
+ CONDITION NOT WASM AND TEST_ppoll
+ EMIT_IF NOT WIN32
+)
+qt_feature("poll_pollts" PRIVATE
+ LABEL "Native pollts()"
+ CONDITION NOT QT_FEATURE_poll_ppoll AND TEST_pollts
+ EMIT_IF NOT WIN32
+)
+qt_feature("poll_poll" PRIVATE
+ LABEL "Native poll()"
+ CONDITION NOT QT_FEATURE_poll_ppoll AND NOT QT_FEATURE_poll_pollts AND TEST_poll
+ EMIT_IF NOT WIN32
+)
+qt_feature("poll_select" PUBLIC PRIVATE
+ LABEL "Emulated poll()"
+ CONDITION NOT QT_FEATURE_poll_ppoll AND NOT QT_FEATURE_poll_pollts AND NOT QT_FEATURE_poll_poll
+ EMIT_IF NOT WIN32
+)
+qt_feature_definition("poll_select" "QT_NO_NATIVE_POLL")
+qt_feature("qqnx_pps" PRIVATE
+ LABEL "PPS"
+ CONDITION libs.pps OR FIXME
+ EMIT_IF QNX
+)
+qt_feature("renameat2" PRIVATE
+ LABEL "renameat2()"
+ CONDITION LINUX AND TEST_renameat2
+)
+qt_feature("slog2" PRIVATE
+ LABEL "slog2"
+ CONDITION libs.slog2 OR FIXME
+)
+qt_feature("statx" PRIVATE
+ LABEL "statx() in libc"
+ CONDITION LINUX AND TEST_statx
+)
+qt_feature("syslog" PRIVATE
+ LABEL "syslog"
+ AUTODETECT OFF
+ CONDITION TEST_syslog
+)
+qt_feature("threadsafe_cloexec" PUBLIC
+ LABEL "Threadsafe pipe creation"
+ CONDITION TEST_cloexec
+)
+qt_feature_definition("threadsafe_cloexec" "QT_THREADSAFE_CLOEXEC" VALUE "1")
+qt_feature("properties" PUBLIC
+ SECTION "Kernel"
+ LABEL "Properties"
+ PURPOSE "Supports scripting Qt-based applications."
+)
+qt_feature_definition("properties" "QT_NO_PROPERTIES" NEGATE VALUE "1")
+qt_feature("regularexpression" PUBLIC
+ SECTION "Kernel"
+ LABEL "QRegularExpression"
+ PURPOSE "Provides an API to Perl-compatible regular expressions."
+)
+qt_feature_definition("regularexpression" "QT_NO_REGULAREXPRESSION" NEGATE VALUE "1")
+qt_feature("sharedmemory" PUBLIC
+ SECTION "Kernel"
+ LABEL "QSharedMemory"
+ PURPOSE "Provides access to a shared memory segment."
+ CONDITION ( ANDROID OR WIN32 OR ( NOT VXWORKS AND ( TEST_ipc_sysv OR TEST_ipc_posix ) ) )
+)
+qt_feature_definition("sharedmemory" "QT_NO_SHAREDMEMORY" NEGATE VALUE "1")
+qt_feature("systemsemaphore" PUBLIC
+ SECTION "Kernel"
+ LABEL "QSystemSemaphore"
+ PURPOSE "Provides a general counting system semaphore."
+ CONDITION ( NOT INTEGRITY AND NOT VXWORKS ) AND ( ANDROID OR WIN32 OR TEST_ipc_sysv OR TEST_ipc_posix )
+)
+qt_feature_definition("systemsemaphore" "QT_NO_SYSTEMSEMAPHORE" NEGATE VALUE "1")
+qt_feature("xmlstream" PUBLIC
+ SECTION "Kernel"
+ LABEL "XML Streaming APIs"
+ PURPOSE "Provides a simple streaming API for XML."
+)
+qt_feature_definition("xmlstream" "QT_NO_XMLSTREAM" NEGATE VALUE "1")
+qt_feature("xmlstreamreader" PUBLIC
+ SECTION "Kernel"
+ LABEL "QXmlStreamReader"
+ PURPOSE "Provides a well-formed XML parser with a simple streaming API."
+ CONDITION QT_FEATURE_xmlstream
+)
+qt_feature_definition("xmlstreamreader" "QT_NO_XMLSTREAMREADER" NEGATE VALUE "1")
+qt_feature("xmlstreamwriter" PUBLIC
+ SECTION "Kernel"
+ LABEL "QXmlStreamWriter"
+ PURPOSE "Provides a XML writer with a simple streaming API."
+ CONDITION QT_FEATURE_xmlstream
+)
+qt_feature_definition("xmlstreamwriter" "QT_NO_XMLSTREAMWRITER" NEGATE VALUE "1")
+qt_feature("textdate" PUBLIC
+ SECTION "Data structures"
+ LABEL "Text Date"
+ PURPOSE "Supports month and day names in dates."
+)
+qt_feature_definition("textdate" "QT_NO_TEXTDATE" NEGATE VALUE "1")
+qt_feature("datestring" PUBLIC
+ SECTION "Data structures"
+ LABEL "QDate/QTime/QDateTime"
+ PURPOSE "Provides convertion between dates and strings."
+ CONDITION QT_FEATURE_textdate
+)
+qt_feature_definition("datestring" "QT_NO_DATESTRING" NEGATE VALUE "1")
+qt_feature("process" PUBLIC
+ SECTION "File I/O"
+ LABEL "QProcess"
+ PURPOSE "Supports external process invocation."
+ CONDITION QT_FEATURE_processenvironment AND NOT WINRT AND NOT APPLE_UIKIT AND NOT INTEGRITY AND NOT VXWORKS
+)
+qt_feature_definition("process" "QT_NO_PROCESS" NEGATE VALUE "1")
+qt_feature("processenvironment" PUBLIC
+ SECTION "File I/O"
+ LABEL "QProcessEnvironment"
+ PURPOSE "Provides a higher-level abstraction of environment variables."
+ CONDITION NOT WINRT AND NOT INTEGRITY
+)
+qt_feature("temporaryfile" PUBLIC
+ SECTION "File I/O"
+ LABEL "QTemporaryFile"
+ PURPOSE "Provides an I/O device that operates on temporary files."
+)
+qt_feature_definition("temporaryfile" "QT_NO_TEMPORARYFILE" NEGATE VALUE "1")
+qt_feature("library" PUBLIC
+ SECTION "File I/O"
+ LABEL "QLibrary"
+ PURPOSE "Provides a wrapper for dynamically loaded libraries."
+ CONDITION WIN32 OR HPUX OR ( NOT NACL AND UNIX )
+)
+qt_feature_definition("library" "QT_NO_LIBRARY" NEGATE VALUE "1")
+qt_feature("settings" PUBLIC
+ SECTION "File I/O"
+ LABEL "QSettings"
+ PURPOSE "Provides persistent application settings."
+)
+qt_feature_definition("settings" "QT_NO_SETTINGS" NEGATE VALUE "1")
+qt_feature("filesystemwatcher" PUBLIC
+ SECTION "File I/O"
+ LABEL "QFileSystemWatcher"
+ PURPOSE "Provides an interface for monitoring files and directories for modifications."
+ CONDITION NOT WINRT
+)
+qt_feature_definition("filesystemwatcher" "QT_NO_FILESYSTEMWATCHER" NEGATE VALUE "1")
+qt_feature("filesystemiterator" PUBLIC
+ SECTION "File I/O"
+ LABEL "QFileSystemIterator"
+ PURPOSE "Provides fast file system iteration."
+)
+qt_feature_definition("filesystemiterator" "QT_NO_FILESYSTEMITERATOR" NEGATE VALUE "1")
+qt_feature("itemmodel" PUBLIC
+ SECTION "ItemViews"
+ LABEL "Qt Item Model"
+ PURPOSE "Provides the item model for item views"
+)
+qt_feature_definition("itemmodel" "QT_NO_ITEMMODEL" NEGATE VALUE "1")
+qt_feature("proxymodel" PUBLIC
+ SECTION "ItemViews"
+ LABEL "QAbstractProxyModel"
+ PURPOSE "Supports processing of data passed between another model and a view."
+ CONDITION QT_FEATURE_itemmodel
+)
+qt_feature_definition("proxymodel" "QT_NO_PROXYMODEL" NEGATE VALUE "1")
+qt_feature("sortfilterproxymodel" PUBLIC
+ SECTION "ItemViews"
+ LABEL "QSortFilterProxyModel"
+ PURPOSE "Supports sorting and filtering of data passed between another model and a view."
+ CONDITION QT_FEATURE_proxymodel
+)
+qt_feature_definition("sortfilterproxymodel" "QT_NO_SORTFILTERPROXYMODEL" NEGATE VALUE "1")
+qt_feature("identityproxymodel" PUBLIC
+ SECTION "ItemViews"
+ LABEL "QIdentityProxyModel"
+ PURPOSE "Supports proxying a source model unmodified."
+ CONDITION QT_FEATURE_proxymodel
+)
+qt_feature_definition("identityproxymodel" "QT_NO_IDENTITYPROXYMODEL" NEGATE VALUE "1")
+qt_feature("stringlistmodel" PUBLIC
+ SECTION "ItemViews"
+ LABEL "QStringListModel"
+ PURPOSE "Provides a model that supplies strings to views."
+ CONDITION QT_FEATURE_itemmodel
+)
+qt_feature_definition("stringlistmodel" "QT_NO_STRINGLISTMODEL" NEGATE VALUE "1")
+qt_feature("translation" PUBLIC
+ SECTION "Internationalization"
+ LABEL "Translation"
+ PURPOSE "Supports translations using QObject::tr()."
+)
+qt_feature_definition("translation" "QT_NO_TRANSLATION" NEGATE VALUE "1")
+qt_feature("textcodec" PUBLIC
+ SECTION "Internationalization"
+ LABEL "QTextCodec"
+ PURPOSE "Supports conversions between text encodings."
+)
+qt_feature_definition("textcodec" "QT_NO_TEXTCODEC" NEGATE VALUE "1")
+qt_feature("codecs" PUBLIC
+ SECTION "Internationalization"
+ LABEL "Codecs"
+ PURPOSE "Supports non-unicode text conversions."
+ CONDITION QT_FEATURE_textcodec
+)
+qt_feature_definition("codecs" "QT_NO_CODECS" NEGATE VALUE "1")
+qt_feature("big_codecs" PUBLIC
+ SECTION "Internationalization"
+ LABEL "Big Codecs"
+ PURPOSE "Supports big codecs, e.g. CJK."
+ CONDITION QT_FEATURE_textcodec
+)
+qt_feature_definition("big_codecs" "QT_NO_BIG_CODECS" NEGATE VALUE "1")
+qt_feature("animation" PUBLIC
+ SECTION "Utilities"
+ LABEL "Animation"
+ PURPOSE "Provides a framework for animations."
+ CONDITION QT_FEATURE_properties
+)
+qt_feature_definition("animation" "QT_NO_ANIMATION" NEGATE VALUE "1")
+qt_feature("statemachine" PUBLIC
+ SECTION "Utilities"
+ LABEL "State machine"
+ PURPOSE "Provides hierarchical finite state machines."
+ CONDITION QT_FEATURE_properties
+)
+qt_feature_definition("statemachine" "QT_NO_STATEMACHINE" NEGATE VALUE "1")
+qt_feature("qeventtransition" PUBLIC
+ LABEL "QEventTransition class"
+ CONDITION QT_FEATURE_statemachine
+)
+qt_feature("gestures" PUBLIC
+ SECTION "Utilities"
+ LABEL "Gesture"
+ PURPOSE "Provides a framework for gestures."
+)
+qt_feature_definition("gestures" "QT_NO_GESTURES" NEGATE VALUE "1")
+qt_feature("sha3_fast" PRIVATE
+ SECTION "Utilities"
+ LABEL "Speed optimized SHA3"
+ PURPOSE "Optimizes SHA3 for speed instead of size."
+)
+qt_feature("timezone" PUBLIC
+ SECTION "Utilities"
+ LABEL "QTimeZone"
+ PURPOSE "Provides support for time-zone handling."
+)
+qt_feature("datetimeparser" PRIVATE
+ SECTION "Utilities"
+ LABEL "QDateTimeParser"
+ PURPOSE "Provides support for parsing date-time texts."
+)
+qt_feature("commandlineparser" PUBLIC
+ SECTION "Utilities"
+ LABEL "QCommandlineParser"
+ PURPOSE "Provides support for command line parsing."
+)
+qt_feature("lttng" PRIVATE
+ LABEL "LTTNG"
+ AUTODETECT OFF
+ CONDITION LINUX AND libs.lttng-ust OR FIXME
+ ENABLE INPUT_trace STREQUAL 'lttng' OR ( INPUT_trace STREQUAL 'yes' AND LINUX )
+ DISABLE INPUT_trace STREQUAL 'etw' OR INPUT_trace STREQUAL 'no'
+)
+qt_feature("etw" PRIVATE
+ LABEL "ETW"
+ AUTODETECT OFF
+ CONDITION WIN32
+ ENABLE INPUT_trace STREQUAL 'etw' OR ( INPUT_trace STREQUAL 'yes' AND WIN32 )
+ DISABLE INPUT_trace STREQUAL 'lttng' OR INPUT_trace STREQUAL 'no'
+)
+qt_feature("topleveldomain" PUBLIC
+ SECTION "Utilities"
+ LABEL "QUrl::topLevelDomain()"
+ PURPOSE "Provides support for extracting the top level domain from URLs. If enabled, a binary dump of the Public Suffix List (http://www.publicsuffix.org, Mozilla License) is included. The data is then also used in QNetworkCookieJar::validateCookie."
+)
diff --git a/src/corelib/configure.json b/src/corelib/configure.json
index f09ef6c1dd..a3a4d8359a 100644
--- a/src/corelib/configure.json
+++ b/src/corelib/configure.json
@@ -622,11 +622,6 @@
"condition": "libs.pps",
"output": [ "privateFeature" ]
},
- "qeventtransition": {
- "label": "QEventTransition class",
- "condition": "features.statemachine",
- "output": [ "publicFeature" ]
- },
"renameat2": {
"label": "renameat2()",
"condition": "config.linux && tests.renameat2",
@@ -847,6 +842,11 @@
"condition": "features.properties",
"output": [ "publicFeature", "feature" ]
},
+ "qeventtransition": {
+ "label": "QEventTransition class",
+ "condition": "features.statemachine",
+ "output": [ "publicFeature" ]
+ },
"gestures": {
"label": "Gesture",
"purpose": "Provides a framework for gestures.",
@@ -895,10 +895,7 @@
},
"topleveldomain": {
"label": "QUrl::topLevelDomain()",
- "purpose": "Provides support for extracting the top level domain from URLs.
-
-If enabled, a binary dump of the Public Suffix List (http://www.publicsuffix.org,
-Mozilla License) is included. The data is then also used in QNetworkCookieJar::validateCookie.",
+ "purpose": "Provides support for extracting the top level domain from URLs. If enabled, a binary dump of the Public Suffix List (http://www.publicsuffix.org, Mozilla License) is included. The data is then also used in QNetworkCookieJar::validateCookie.",
"section": "Utilities",
"output": [ "publicFeature" ]
}
@@ -908,10 +905,7 @@ Mozilla License) is included. The data is then also used in QNetworkCookieJar::v
{
"type": "note",
"condition": "features.journald || features.syslog || (config.qnx && features.slog2)",
- "message": "journald, syslog or slog2 integration is enabled.
-If your users intend to develop applications against this build,
-ensure that the IDEs they use either set QT_FORCE_STDERR_LOGGING to 1
-or are able to read the logged output from journald, syslog or slog2."
+ "message": "journald, syslog or slog2 integration is enabled. If your users intend to develop applications against this build, ensure that the IDEs they use either set QT_FORCE_STDERR_LOGGING to 1 or are able to read the logged output from journald, syslog or slog2."
},
{
"type": "error",
@@ -921,15 +915,12 @@ or are able to read the logged output from journald, syslog or slog2."
{
"type": "error",
"condition": "input.doubleconversion == 'no' && !tests.xlocalescanprint",
- "message": "Your C library does not provide sscanf_l or snprintf_l.
-You need to use libdouble-conversion for double/string conversion."
+ "message": "Your C library does not provide sscanf_l or snprintf_l. You need to use libdouble-conversion for double/string conversion."
},
{
"type": "error",
"condition": "!tests.atomicfptr",
- "message": "detected a std::atomic implementation that fails for function pointers.
-Please apply the patch corresponding to your Standard Library vendor, found in
- qtbase/config.tests/atomicfptr"
+ "message": "detected a std::atomic implementation that fails for function pointers. Please apply the patch corresponding to your Standard Library vendor, found in qtbase/config.tests/atomicfptr"
}
],
diff --git a/src/corelib/global/qconfig.cpp.in b/src/corelib/global/qconfig.cpp.in
new file mode 100644
index 0000000000..6f589b3771
--- /dev/null
+++ b/src/corelib/global/qconfig.cpp.in
@@ -0,0 +1,65 @@
+/* Installation date */
+static const char qt_configure_installation [12+11] = "qt_instdate=2012-12-20";
+/* Installation Info */
+static const char qt_configure_prefix_path_str [12+256] = "qt_prfxpath=@CMAKE_INSTALL_PREFIX@";
+#ifdef QT_BUILD_QMAKE
+static const char qt_configure_ext_prefix_path_str [12+256] = "qt_epfxpath=@CMAKE_INSTALL_PREFIX@";
+static const char qt_configure_host_prefix_path_str [12+256] = "qt_hpfxpath=@CMAKE_INSTALL_PREFIX@";
+#endif
+static const short qt_configure_str_offsets[] = {
+ 0,
+ 4,
+ 12,
+ 16,
+ 24,
+ 28,
+ 36,
+ 44,
+ 48,
+ 50,
+ 52,
+ 65,
+ 74,
+#ifdef QT_BUILD_QMAKE
+ 80,
+ 81,
+ 87,
+ 91,
+ 95,
+ 97,
+ 107,
+#endif
+};
+static const char qt_configure_strs[] =
+ "doc\0"
+ "include\0"
+ "lib\0"
+ "libexec\0"
+ "bin\0"
+ "plugins\0"
+ "imports\0"
+ "qml\0"
+ ".\0"
+ ".\0"
+ "translations\0"
+ "examples\0"
+ "tests\0"
+#ifdef QT_BUILD_QMAKE
+ "\0"
+ "false\0"
+ "bin\0"
+ "lib\0"
+ ".\0"
+ "linux-g++\0"
+ "linux-g++\0"
+#endif
+;
+#define QT_CONFIGURE_SETTINGS_PATH "etc/xdg"
+#ifdef QT_BUILD_QMAKE
+# define QT_CONFIGURE_SYSROOTIFY_PREFIX false
+#endif
+#define QT_CONFIGURE_PREFIX_PATH qt_configure_prefix_path_str + 12
+#ifdef QT_BUILD_QMAKE
+# define QT_CONFIGURE_EXT_PREFIX_PATH qt_configure_ext_prefix_path_str + 12
+# define QT_CONFIGURE_HOST_PREFIX_PATH qt_configure_host_prefix_path_str + 12
+#endif
diff --git a/src/dbus/CMakeLists.txt b/src/dbus/CMakeLists.txt
new file mode 100644
index 0000000000..4150c1274a
--- /dev/null
+++ b/src/dbus/CMakeLists.txt
@@ -0,0 +1,58 @@
+# Generated from dbus.pro.
+
+#####################################################################
+## QtDBus Module:
+#####################################################################
+
+add_qt_module(DBus
+ SOURCES
+ dbus_minimal_p.h
+ qdbus_symbols.cpp qdbus_symbols_p.h
+ qdbusabstractadaptor.cpp qdbusabstractadaptor.h qdbusabstractadaptor_p.h
+ qdbusabstractinterface.cpp qdbusabstractinterface.h qdbusabstractinterface_p.h
+ qdbusargument.cpp qdbusargument.h qdbusargument_p.h
+ qdbusconnection.cpp qdbusconnection.h qdbusconnection_p.h
+ qdbusconnectioninterface.cpp qdbusconnectioninterface.h
+ qdbusconnectionmanager_p.h
+ qdbuscontext.cpp qdbuscontext.h qdbuscontext_p.h
+ qdbuserror.cpp qdbuserror.h
+ qdbusextratypes.cpp qdbusextratypes.h
+ qdbusintegrator.cpp qdbusintegrator_p.h
+ qdbusinterface.cpp qdbusinterface.h qdbusinterface_p.h
+ qdbusinternalfilters.cpp
+ qdbusintrospection.cpp qdbusintrospection_p.h
+# FIXME: this file is included in qdbusargument.cpp: qdbusmarshaller.cpp
+ qdbusmessage.cpp qdbusmessage.h qdbusmessage_p.h
+ qdbusmetaobject.cpp
+ qdbusmetatype.cpp qdbusmetatype.h
+ qdbusmisc.cpp
+ qdbuspendingcall.cpp qdbuspendingcall.h qdbuspendingcall_p.h
+ qdbuspendingreply.cpp qdbuspendingreply.h
+ qdbusreply.cpp qdbusreply.h
+ qdbusserver.cpp qdbusserver.h
+ qdbusservicewatcher.cpp qdbusservicewatcher.h
+ qdbusthreaddebug_p.h
+ qdbusunixfiledescriptor.cpp qdbusunixfiledescriptor.h
+ qdbusutil.cpp qdbusutil_p.h
+ qdbusvirtualobject.cpp qdbusvirtualobject.h
+ qdbusxmlgenerator.cpp
+ qdbusxmlparser.cpp qdbusxmlparser_p.h
+ qtdbusglobal.h qtdbusglobal_p.h
+ DEFINES
+ DBUS_API_SUBJECT_TO_CHANGE
+ QT_NO_FOREACH
+ LIBRARIES
+ Qt::Core
+ Qt::CorePrivate
+)
+
+## Scopes:
+#####################################################################
+
+extend_target(DBus CONDITION QT_FEATURE_dbus_linked
+ DEFINES QT_LINKED_LIBDBUS LIBRARIES dbus
+)
+
+extend_target(DBus CONDITION WIN32 LIBRARIES ws2_32 advapi32 netapi32 user32)
+
+add_qt_docs(./doc/qtdbus.qdocconf)
diff --git a/src/gui/CMakeLists.txt b/src/gui/CMakeLists.txt
new file mode 100644
index 0000000000..3af191a18a
--- /dev/null
+++ b/src/gui/CMakeLists.txt
@@ -0,0 +1,494 @@
+set(OpenGL_GL_PREFERENCE GLVND)
+
+find_library(FWCoreGraphics CoreGraphics)
+
+#####################################################################
+## Gui Module:
+#####################################################################
+
+qt_load_global_features()
+
+if (QT_FEATURE_gui)
+ if (WINRT)
+ set(_default_platform "winrt")
+ elseif(WIN32)
+ set(_default_platform "windows")
+ elseif(ANDROID)
+ set(_default_platform "android")
+ elseif(APPLE_OSX)
+ set(_default_platform "cocoa")
+ elseif(APPLE_TVOS OR APPLE_IOS)
+ set(_default_platform "ios")
+ elseif(APPLE_WATCHOS)
+ set(_default_platform "minimal")
+ elseif(QNX)
+ set(_default_platform "qnx")
+ elseif(INTEGRITY)
+ set(_default_platform "integrityfb")
+ elseif(HAIKU)
+ set(_default_platform "haiku")
+ elseif(WASM)
+ set(_default_platform "webassembly")
+ else()
+ set(_default_platform "xcb")
+ endif()
+
+ set(QT_QPA_DEFAULT_PLATFORM "${_default_platform}" CACHE STRING "QPA default platform")
+endif()
+
+add_qt_module(Gui
+ FEATURE_DEPENDENCIES
+ Qt::Network
+ SOURCES
+ animation/qguivariantanimation.cpp
+ image/qbitmap.cpp image/qbitmap.h
+ image/qbmphandler.cpp image/qbmphandler_p.h
+ image/qicon.cpp image/qicon.h image/qicon_p.h
+ image/qiconengine.cpp image/qiconengine.h
+ image/qiconengineplugin.cpp image/qiconengineplugin.h
+ image/qiconloader.cpp image/qiconloader_p.h
+ image/qimage.cpp image/qimage.h image/qimage_p.h
+ image/qimage_conversions.cpp
+ image/qimageiohandler.cpp image/qimageiohandler.h
+ image/qimagepixmapcleanuphooks.cpp image/qimagepixmapcleanuphooks_p.h
+ image/qimagereader.cpp image/qimagereader.h
+ image/qimagereaderwriterhelpers.cpp image/qimagereaderwriterhelpers_p.h
+ image/qimagewriter.cpp image/qimagewriter.h
+ image/qpaintengine_pic.cpp image/qpaintengine_pic_p.h
+ image/qpicture.cpp image/qpicture.h image/qpicture_p.h
+ image/qpictureformatplugin.cpp image/qpictureformatplugin.h
+ image/qpixmap.cpp image/qpixmap.h
+ image/qpixmap_blitter.cpp image/qpixmap_blitter_p.h
+ image/qpixmap_raster.cpp image/qpixmap_raster_p.h
+ image/qpixmapcache.cpp image/qpixmapcache.h image/qpixmapcache_p.h
+ image/qplatformpixmap.cpp image/qplatformpixmap.h
+ image/qppmhandler.cpp image/qppmhandler_p.h
+ image/qxbmhandler.cpp image/qxbmhandler_p.h
+ image/qxpmhandler.cpp image/qxpmhandler_p.h
+ kernel/qclipboard.cpp kernel/qclipboard.h
+ kernel/qcursor.cpp kernel/qcursor.h kernel/qcursor_p.h
+ kernel/qevent.cpp kernel/qevent.h kernel/qevent_p.h
+ kernel/qgenericplugin.cpp kernel/qgenericplugin.h
+ kernel/qgenericpluginfactory.cpp kernel/qgenericpluginfactory.h
+ kernel/qguiapplication.cpp kernel/qguiapplication.h kernel/qguiapplication_p.h
+ kernel/qguivariant.cpp
+ kernel/qhighdpiscaling.cpp kernel/qhighdpiscaling_p.h
+ kernel/qinputdevicemanager.cpp kernel/qinputdevicemanager_p.h
+ kernel/qinputdevicemanager_p_p.h
+ kernel/qinputmethod.cpp kernel/qinputmethod.h kernel/qinputmethod_p.h
+ kernel/qinternalmimedata.cpp kernel/qinternalmimedata_p.h
+ kernel/qkeymapper.cpp kernel/qkeymapper_p.h
+ kernel/qkeysequence.cpp kernel/qkeysequence.h kernel/qkeysequence_p.h
+ kernel/qoffscreensurface.cpp kernel/qoffscreensurface.h
+ kernel/qpaintdevicewindow.cpp kernel/qpaintdevicewindow.h kernel/qpaintdevicewindow_p.h
+ kernel/qpalette.cpp kernel/qpalette.h
+ kernel/qpixelformat.cpp kernel/qpixelformat.h
+ kernel/qplatformclipboard.cpp kernel/qplatformclipboard.h
+ kernel/qplatformcursor.cpp kernel/qplatformcursor.h
+ kernel/qplatformdialoghelper.cpp kernel/qplatformdialoghelper.h
+ kernel/qplatformgraphicsbuffer.cpp kernel/qplatformgraphicsbuffer.h
+ kernel/qplatformgraphicsbufferhelper.cpp kernel/qplatformgraphicsbufferhelper.h
+ kernel/qplatforminputcontext.cpp kernel/qplatforminputcontext.h kernel/qplatforminputcontext_p.h
+ kernel/qplatforminputcontextfactory.cpp kernel/qplatforminputcontextfactory_p.h
+ kernel/qplatforminputcontextplugin.cpp kernel/qplatforminputcontextplugin_p.h
+ kernel/qplatformintegration.cpp kernel/qplatformintegration.h
+ kernel/qplatformintegrationfactory.cpp kernel/qplatformintegrationfactory_p.h
+ kernel/qplatformintegrationplugin.cpp kernel/qplatformintegrationplugin.h
+ kernel/qplatformmenu.cpp kernel/qplatformmenu.h
+ kernel/qplatformnativeinterface.cpp kernel/qplatformnativeinterface.h
+ kernel/qplatformoffscreensurface.cpp kernel/qplatformoffscreensurface.h
+ kernel/qplatformscreen.cpp kernel/qplatformscreen.h kernel/qplatformscreen_p.h
+ kernel/qplatformservices.cpp kernel/qplatformservices.h
+ kernel/qplatformsessionmanager.cpp kernel/qplatformsessionmanager.h
+ kernel/qplatformsharedgraphicscache.cpp kernel/qplatformsharedgraphicscache.h
+ kernel/qplatformsurface.cpp kernel/qplatformsurface.h
+ kernel/qplatformsystemtrayicon.cpp kernel/qplatformsystemtrayicon.h
+ kernel/qplatformtheme.cpp kernel/qplatformtheme.h kernel/qplatformtheme_p.h
+ kernel/qplatformthemefactory.cpp kernel/qplatformthemefactory_p.h
+ kernel/qplatformthemeplugin.cpp kernel/qplatformthemeplugin.h
+ kernel/qplatformwindow.cpp kernel/qplatformwindow.h kernel/qplatformwindow_p.h
+ kernel/qrasterwindow.cpp kernel/qrasterwindow.h
+ kernel/qscreen.cpp kernel/qscreen.h kernel/qscreen_p.h
+ kernel/qsessionmanager.cpp kernel/qsessionmanager.h kernel/qsessionmanager_p.h
+ kernel/qshortcutmap.cpp kernel/qshortcutmap_p.h
+ kernel/qstylehints.cpp kernel/qstylehints.h
+ kernel/qsurface.cpp kernel/qsurface.h
+ kernel/qsurfaceformat.cpp kernel/qsurfaceformat.h
+ kernel/qtestsupport_gui.cpp kernel/qtestsupport_gui.h
+ kernel/qtguiglobal.h kernel/qtguiglobal_p.h
+ kernel/qtouchdevice.cpp kernel/qtouchdevice.h kernel/qtouchdevice_p.h
+ kernel/qwindow.cpp kernel/qwindow.h kernel/qwindow_p.h
+ kernel/qwindowdefs.h
+ kernel/qwindowsysteminterface.cpp kernel/qwindowsysteminterface.h kernel/qwindowsysteminterface_p.h
+ math3d/qgenericmatrix.cpp math3d/qgenericmatrix.h
+ math3d/qmatrix4x4.cpp math3d/qmatrix4x4.h
+ math3d/qquaternion.cpp math3d/qquaternion.h
+ math3d/qvector2d.cpp math3d/qvector2d.h
+ math3d/qvector3d.cpp math3d/qvector3d.h
+ math3d/qvector4d.cpp math3d/qvector4d.h
+ painting/qbackingstore.cpp painting/qbackingstore.h
+ painting/qbezier.cpp painting/qbezier_p.h
+ painting/qblendfunctions.cpp painting/qblendfunctions_p.h
+ painting/qblittable.cpp painting/qblittable_p.h
+ painting/qbrush.cpp painting/qbrush.h
+ painting/qcolor.cpp painting/qcolor.h painting/qcolor_p.h
+ painting/qcolorprofile.cpp painting/qcolorprofile_p.h
+ painting/qcompositionfunctions.cpp
+ painting/qcosmeticstroker.cpp painting/qcosmeticstroker_p.h
+ painting/qdatabuffer_p.h
+ painting/qdrawhelper.cpp painting/qdrawhelper_p.h
+ painting/qdrawhelper_x86_p.h
+ painting/qdrawingprimitive_sse2_p.h
+ painting/qemulationpaintengine.cpp painting/qemulationpaintengine_p.h
+ painting/qfixed_p.h
+ painting/qgrayraster.c painting/qgrayraster_p.h
+ painting/qimagescale.cpp
+ painting/qmatrix.cpp painting/qmatrix.h
+ painting/qmemrotate.cpp painting/qmemrotate_p.h
+ painting/qoutlinemapper.cpp painting/qoutlinemapper_p.h
+ painting/qpagedpaintdevice.cpp painting/qpagedpaintdevice.h painting/qpagedpaintdevice_p.h
+ painting/qpagelayout.cpp painting/qpagelayout.h
+ painting/qpagesize.cpp painting/qpagesize.h
+ painting/qpaintdevice.cpp painting/qpaintdevice.h
+ painting/qpaintengine.cpp painting/qpaintengine.h painting/qpaintengine_p.h
+ painting/qpaintengine_blitter.cpp painting/qpaintengine_blitter_p.h
+ painting/qpaintengine_raster.cpp painting/qpaintengine_raster_p.h
+ painting/qpaintengineex.cpp painting/qpaintengineex_p.h
+ painting/qpainter.cpp painting/qpainter.h painting/qpainter_p.h
+ painting/qpainterpath.cpp painting/qpainterpath.h painting/qpainterpath_p.h
+ painting/qpathclipper.cpp painting/qpathclipper_p.h
+ painting/qpathsimplifier.cpp painting/qpathsimplifier_p.h
+ painting/qpdf.cpp painting/qpdf_p.h painting/qpdf.qrc
+ painting/qpdfwriter.cpp painting/qpdfwriter.h
+ painting/qpen.cpp painting/qpen.h
+ painting/qplatformbackingstore.cpp painting/qplatformbackingstore.h
+ painting/qpolygon.cpp painting/qpolygon.h
+ painting/qpolygonclipper_p.h
+ painting/qrasterdefs_p.h
+ painting/qrasterizer.cpp painting/qrasterizer_p.h
+ painting/qrbtree_p.h
+ painting/qregion.cpp painting/qregion.h
+ painting/qrgb.h
+ painting/qrgba64.h painting/qrgba64_p.h
+ painting/qstroker.cpp painting/qstroker_p.h
+ painting/qtextureglyphcache.cpp painting/qtextureglyphcache_p.h
+ painting/qtransform.cpp painting/qtransform.h
+ painting/qtriangulatingstroker.cpp painting/qtriangulatingstroker_p.h
+ painting/qtriangulator.cpp painting/qtriangulator_p.h
+ painting/qvectorpath_p.h
+ text/qabstracttextdocumentlayout.cpp text/qabstracttextdocumentlayout.h text/qabstracttextdocumentlayout_p.h
+ text/qdistancefield.cpp text/qdistancefield_p.h
+ text/qfont.cpp text/qfont.h text/qfont_p.h
+ text/qfontdatabase.cpp text/qfontdatabase.h
+ text/qfontengine.cpp text/qfontengine_p.h
+ text/qfontengine_qpf2.cpp
+ text/qfontengineglyphcache.cpp text/qfontengineglyphcache_p.h
+ text/qfontinfo.h
+ text/qfontmetrics.cpp text/qfontmetrics.h
+ text/qfontsubset.cpp text/qfontsubset_p.h
+ text/qfragmentmap.cpp text/qfragmentmap_p.h
+ text/qglyphrun.cpp text/qglyphrun.h text/qglyphrun_p.h
+ text/qinputcontrol.cpp text/qinputcontrol_p.h
+ text/qplatformfontdatabase.cpp text/qplatformfontdatabase.h
+ text/qrawfont.cpp text/qrawfont.h text/qrawfont_p.h
+ text/qstatictext.cpp text/qstatictext.h text/qstatictext_p.h
+ text/qsyntaxhighlighter.cpp text/qsyntaxhighlighter.h
+ text/qtextcursor.cpp text/qtextcursor.h text/qtextcursor_p.h
+ text/qtextdocument.cpp text/qtextdocument.h text/qtextdocument_p.cpp text/qtextdocument_p.h
+ text/qtextdocumentfragment.cpp text/qtextdocumentfragment.h text/qtextdocumentfragment_p.h
+ text/qtextdocumentlayout.cpp text/qtextdocumentlayout_p.h
+ text/qtextdocumentwriter.cpp text/qtextdocumentwriter.h
+ text/qtextengine.cpp text/qtextengine_p.h
+ text/qtextformat.cpp text/qtextformat.h text/qtextformat_p.h
+ text/qtexthtmlparser.cpp text/qtexthtmlparser_p.h
+ text/qtextimagehandler.cpp text/qtextimagehandler_p.h
+ text/qtextlayout.cpp text/qtextlayout.h
+ text/qtextlist.cpp text/qtextlist.h
+ text/qtextobject.cpp text/qtextobject.h text/qtextobject_p.h
+ text/qtextoption.cpp text/qtextoption.h
+ text/qtexttable.cpp text/qtexttable.h text/qtexttable_p.h
+ util/qabstractlayoutstyleinfo.cpp util/qabstractlayoutstyleinfo_p.h
+ util/qdesktopservices.cpp util/qdesktopservices.h
+ util/qgridlayoutengine.cpp util/qgridlayoutengine_p.h
+ util/qhexstring_p.h
+ util/qktxhandler.cpp util/qktxhandler_p.h
+ util/qlayoutpolicy.cpp util/qlayoutpolicy_p.h
+ util/qpkmhandler.cpp util/qpkmhandler_p.h
+ util/qshaderformat.cpp util/qshaderformat_p.h
+ util/qshadergenerator.cpp util/qshadergenerator_p.h
+ util/qshadergraph.cpp util/qshadergraph_p.h
+ util/qshadergraphloader.cpp util/qshadergraphloader_p.h
+ util/qshaderlanguage.cpp util/qshaderlanguage_p.h
+ util/qshadernode.cpp util/qshadernode_p.h
+ util/qshadernodeport.cpp util/qshadernodeport_p.h
+ util/qshadernodesloader.cpp util/qshadernodesloader_p.h
+ util/qtexturefiledata.cpp util/qtexturefiledata_p.h
+ util/qtexturefilehandler_p.h
+ util/qtexturefilereader.cpp util/qtexturefilereader_p.h
+ util/qvalidator.cpp util/qvalidator.h
+ DEFINES
+ QT_NO_USING_NAMESPACE
+ QT_NO_FOREACH
+ LIBRARIES
+ Qt::CorePrivate
+ PUBLIC_LIBRARIES
+ Qt::Core
+)
+
+
+## Scopes:
+#####################################################################
+
+extend_target(Gui CONDITION APPLE_OSX LIBRARIES ${FWAppKit})
+extend_target(Gui CONDITION APPLE LIBRARIES ${FWCoreGraphics})
+
+extend_target(Gui CONDITION QT_FEATURE_accessibility
+ SOURCES
+ accessible/qaccessible.cpp accessible/qaccessible.h
+ accessible/qaccessiblebridge.cpp accessible/qaccessiblebridge.h
+ accessible/qaccessiblecache.cpp accessible/qaccessiblecache_p.h
+ accessible/qaccessibleobject.cpp accessible/qaccessibleobject.h
+ accessible/qaccessibleplugin.cpp accessible/qaccessibleplugin.h
+ accessible/qplatformaccessibility.cpp accessible/qplatformaccessibility.h
+)
+
+extend_target(Gui CONDITION QT_FEATURE_accessibility AND APPLE
+ SOURCES accessible/qaccessiblecache_mac.mm
+ LIBRARIES ${FWFoundation}
+)
+
+extend_target(Gui CONDITION QT_FEATURE_draganddrop
+ SOURCES
+ kernel/qdnd.cpp kernel/qdnd_p.h
+ kernel/qdrag.cpp kernel/qdrag.h
+ kernel/qplatformdrag.cpp kernel/qplatformdrag.h
+ kernel/qshapedpixmapdndwindow.cpp kernel/qshapedpixmapdndwindow_p.h
+ kernel/qsimpledrag.cpp kernel/qsimpledrag_p.h
+)
+
+extend_target(Gui CONDITION QT_FEATURE_opengl
+ SOURCES
+ kernel/qopenglcontext.cpp kernel/qopenglcontext.h kernel/qopenglcontext_p.h
+ kernel/qopenglwindow.cpp kernel/qopenglwindow.h
+ kernel/qplatformopenglcontext.cpp kernel/qplatformopenglcontext.h
+)
+
+extend_target(Gui CONDITION WIN32 SOURCES kernel/qwindowdefs_win.h)
+
+extend_target(Gui CONDITION QT_FEATURE_movie SOURCES image/qmovie.cpp image/qmovie.h)
+
+extend_target(Gui CONDITION WIN32 AND NOT WINRT SOURCES image/qpixmap_win.cpp)
+
+extend_target(Gui CONDITION APPLE SOURCES image/qimage_darwin.mm)
+
+extend_target(Gui CONDITION QT_FEATURE_png
+ SOURCES
+ image/qpnghandler.cpp image/qpnghandler_p.h
+ LIBRARIES PNG::PNG
+)
+
+extend_target(Gui CONDITION QT_FEATURE_harfbuzz
+ SOURCES
+ text/qharfbuzzng.cpp text/qharfbuzzng_p.h
+ LIBRARIES harfbuzz
+)
+
+extend_target(Gui CONDITION QT_FEATURE_textodfwriter
+ SOURCES
+ text/qtextodfwriter.cpp text/qtextodfwriter_p.h
+ text/qzip.cpp
+ text/qzipreader_p.h
+ text/qzipwriter_p.h
+)
+
+extend_target(Gui CONDITION QT_FEATURE_cssparser SOURCES text/qcssparser.cpp text/qcssparser_p.h)
+
+extend_target(Gui CONDITION QT_FEATURE_standarditemmodel
+ SOURCES itemmodels/qstandarditemmodel.cpp itemmodels/qstandarditemmodel.h itemmodels/qstandarditemmodel_p.h
+)
+
+# This name is fixed in the code:-/
+set_property(SOURCE painting/webgradients.binaryjson PROPERTY alias webgradients.binaryjson)
+add_qt_resource(Gui qmake_webgradients PREFIX "/qgradient"
+ FILES painting/webgradients.binaryjson
+)
+
+extend_target(Gui CONDITION APPLE SOURCES painting/qcoregraphics.mm painting/qcoregraphics_p.h)
+extend_target(Gui CONDITION QT_FEATURE_cssparser SOURCES painting/qcssutil.cpp)
+
+extend_target(Gui CONDITION TEST_architecture STREQUAL arm64 AND NOT APPLE_UIKIT AND NOT WIN32
+ DEFINES ENABLE_PIXMAN_DRAWHELPERS
+)
+
+extend_target(Gui CONDITION QT_FEATURE_opengl
+ SOURCES
+ opengl/qopengl.cpp opengl/qopengl.h opengl/qopengl_p.h
+ opengl/qopengl2pexvertexarray.cpp opengl/qopengl2pexvertexarray_p.h
+ opengl/qopenglbuffer.cpp opengl/qopenglbuffer.h
+ opengl/qopenglcustomshaderstage.cpp opengl/qopenglcustomshaderstage_p.h
+ opengl/qopengldebug.cpp opengl/qopengldebug.h
+ opengl/qopenglengineshadermanager.cpp opengl/qopenglengineshadermanager_p.h
+ opengl/qopenglengineshadersource_p.h
+ opengl/qopenglextensions_p.h
+ opengl/qopenglextrafunctions.h
+ opengl/qopenglframebufferobject.cpp opengl/qopenglframebufferobject.h opengl/qopenglframebufferobject_p.h
+ opengl/qopenglfunctions.cpp opengl/qopenglfunctions.h
+ opengl/qopenglgradientcache.cpp opengl/qopenglgradientcache_p.h
+ opengl/qopenglpaintdevice.cpp opengl/qopenglpaintdevice.h opengl/qopenglpaintdevice_p.h
+ opengl/qopenglpaintengine.cpp opengl/qopenglpaintengine_p.h
+ opengl/qopenglpixeltransferoptions.cpp opengl/qopenglpixeltransferoptions.h
+ opengl/qopenglprogrambinarycache.cpp opengl/qopenglprogrambinarycache_p.h
+ opengl/qopenglshadercache_p.h
+ opengl/qopenglshaderprogram.cpp opengl/qopenglshaderprogram.h
+ opengl/qopengltexture.cpp opengl/qopengltexture.h opengl/qopengltexture_p.h
+ opengl/qopengltextureblitter.cpp opengl/qopengltextureblitter.h
+ opengl/qopengltexturecache.cpp opengl/qopengltexturecache_p.h
+ opengl/qopengltextureglyphcache.cpp opengl/qopengltextureglyphcache_p.h
+ opengl/qopengltexturehelper.cpp opengl/qopengltexturehelper_p.h
+ opengl/qopengltextureuploader.cpp opengl/qopengltextureuploader_p.h
+ opengl/qopenglversionfunctions.cpp opengl/qopenglversionfunctions.h
+ opengl/qopenglversionfunctionsfactory.cpp opengl/qopenglversionfunctionsfactory_p.h
+ opengl/qopenglvertexarrayobject.cpp opengl/qopenglvertexarrayobject.h
+ LIBRARIES
+ OpenGL::GL
+)
+
+extend_target(Gui CONDITION (QT_FEATURE_opengl) AND (NOT QT_FEATURE_opengles2)
+ SOURCES
+ opengl/qopenglfunctions_1_0.cpp opengl/qopenglfunctions_1_0.h
+ opengl/qopenglfunctions_1_1.cpp opengl/qopenglfunctions_1_1.h
+ opengl/qopenglfunctions_1_2.cpp opengl/qopenglfunctions_1_2.h
+ opengl/qopenglfunctions_1_3.cpp opengl/qopenglfunctions_1_3.h
+ opengl/qopenglfunctions_1_4.cpp opengl/qopenglfunctions_1_4.h
+ opengl/qopenglfunctions_1_5.cpp opengl/qopenglfunctions_1_5.h
+ opengl/qopenglfunctions_2_0.cpp opengl/qopenglfunctions_2_0.h
+ opengl/qopenglfunctions_2_1.cpp opengl/qopenglfunctions_2_1.h
+ opengl/qopenglfunctions_3_0.cpp opengl/qopenglfunctions_3_0.h
+ opengl/qopenglfunctions_3_1.cpp opengl/qopenglfunctions_3_1.h
+ opengl/qopenglfunctions_3_2_compatibility.cpp opengl/qopenglfunctions_3_2_compatibility.h
+ opengl/qopenglfunctions_3_2_core.cpp opengl/qopenglfunctions_3_2_core.h
+ opengl/qopenglfunctions_3_3_compatibility.cpp opengl/qopenglfunctions_3_3_compatibility.h
+ opengl/qopenglfunctions_3_3_core.cpp opengl/qopenglfunctions_3_3_core.h
+ opengl/qopenglfunctions_4_0_compatibility.cpp opengl/qopenglfunctions_4_0_compatibility.h
+ opengl/qopenglfunctions_4_0_core.cpp opengl/qopenglfunctions_4_0_core.h
+ opengl/qopenglfunctions_4_1_compatibility.cpp opengl/qopenglfunctions_4_1_compatibility.h
+ opengl/qopenglfunctions_4_1_core.cpp opengl/qopenglfunctions_4_1_core.h
+ opengl/qopenglfunctions_4_2_compatibility.cpp opengl/qopenglfunctions_4_2_compatibility.h
+ opengl/qopenglfunctions_4_2_core.cpp opengl/qopenglfunctions_4_2_core.h
+ opengl/qopenglfunctions_4_3_compatibility.cpp opengl/qopenglfunctions_4_3_compatibility.h
+ opengl/qopenglfunctions_4_3_core.cpp opengl/qopenglfunctions_4_3_core.h
+ opengl/qopenglfunctions_4_4_compatibility.cpp opengl/qopenglfunctions_4_4_compatibility.h
+ opengl/qopenglfunctions_4_4_core.cpp opengl/qopenglfunctions_4_4_core.h
+ opengl/qopenglfunctions_4_5_compatibility.cpp opengl/qopenglfunctions_4_5_compatibility.h
+ opengl/qopenglfunctions_4_5_core.cpp opengl/qopenglfunctions_4_5_core.h
+ opengl/qopenglqueryhelper_p.h
+ opengl/qopengltimerquery.cpp opengl/qopengltimerquery.h
+)
+
+extend_target(Gui CONDITION (QT_FEATURE_opengl) AND (QT_FEATURE_opengles2)
+ SOURCES
+ opengl/qopenglfunctions_es2.cpp opengl/qopenglfunctions_es2.h
+)
+
+extend_target(Gui CONDITION QT_FEATURE_vulkan
+ SOURCES
+ vulkan/qplatformvulkaninstance.cpp vulkan/qplatformvulkaninstance.h
+ vulkan/qvulkanfunctions.cpp
+ vulkan/qvulkaninstance.cpp vulkan/qvulkaninstance.h
+ vulkan/qvulkanwindow.cpp vulkan/qvulkanwindow.h vulkan/qvulkanwindow_p.h
+)
+
+extend_target(Gui CONDITION QT_FEATURE_sse2
+ SOURCES painting/qdrawhelper_sse2.cpp
+ COMPILE_FLAGS ${QT_CFLAGS_SSE2}
+)
+
+extend_target(Gui CONDITION QT_FEATURE_ssse3
+ SOURCES
+ image/qimage_ssse3.cpp
+ painting/qdrawhelper_ssse3.cpp
+ COMPILE_FLAGS ${QT_CFLAGS_SSSE3}
+)
+
+extend_target(Gui CONDITION QT_FEATURE_sse4_1
+ SOURCES
+ painting/qdrawhelper_sse4.cpp
+ painting/qimagescale_sse4.cpp
+ COMPILE_FLAGS ${QT_CFLAGS_SSE4_1}
+)
+
+extend_target(Gui CONDITION QT_FEATURE_avx2
+ SOURCES painting/qdrawhelper_avx2.cpp
+ COMPILE_FLAGS ${QT_CFLAGS_AVX2}
+)
+
+extend_target(Gui CONDITION QT_FEATURE_neon
+ SOURCES
+ image/qimage_neon.cpp
+ painting/qdrawhelper_neon.cpp painting/qdrawhelper_neon_p.h
+ painting/qdrawhelper_mips_dspr2_asm.S
+ painting/qimagescale_neon.cpp painting/qimagescale_neon_asm.S
+ ../3rdparty/pixman/pixman-arm-neon-asm.S
+ COMPILE_FLAGS ${QT_CFLAGS_NEON}
+)
+
+extend_target(Gui CONDITION QT_FEATURE_mips_dsp
+ SOURCES
+ painting/qdrawhelper_mips_dsp.cpp painting/qdrawhelper_mips_dsp_p.h
+ painting/qt_mips_asm_dsp_p
+ painting/qdrawhelper_mips_dsp_asm.S
+ COMPILE_FLAGS ${QT_FLAGS_MIPS_DSP}
+)
+
+extend_target(Gui CONDITION QT_FEATURE_mips_dspr2
+ SOURCES
+ image/qimage_mips_dspr2.cpp image/qimage_mips_dspr2_asm.S
+ painting/qdrawhelper_mips_dspr2_asm.S
+ COMPILE_FLAGS ${QT_FLAGS_MIPS_DSPR2}
+)
+
+qt_create_tracepoints(Gui qtgui.tracepoints)
+
+if (QT_FEATURE_vulkan)
+ set(qvkgen_command "${HOST_QVKGEN}")
+ if (TARGET qvkgen)
+ set(qvkgen_command qvkgen)
+ endif()
+
+ set(vulkan_fun "qvulkanfunctions.h")
+ set(vulkan_fun_p "qvulkanfunctions_p.h")
+ set(vulkan_fun_p_cpp "qvulkanfunctions_p.cpp")
+
+ add_custom_command(
+ OUTPUT "${vulkan_fun}" "${vulkan_fun_p}" "${vulkan_fun_p_cpp}"
+ COMMAND "${qvkgen_command}"
+ "${CMAKE_CURRENT_SOURCE_DIR}/vulkan/vk.xml"
+ "${PROJECT_SOURCE_DIR}/header.LGPL"
+ "${CMAKE_CURRENT_BINARY_DIR}/qvulkanfunctions"
+ DEPENDS vulkan/vk.xml
+ WORKING_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}"
+ COMMENT "Generating vulkan data"
+ )
+
+ qt_generate_forwarding_headers("QtGui" SOURCE "${vulkan_fun}"
+ DESTINATION qvulkanfunctions.h
+ CLASSES QVulkanFunctions QVulkanDeviceFunctions
+ )
+ qt_generate_forwarding_headers("QtGui" SOURCE "${vulkan_fun_p}"
+ DESTINATION qvulkanfunctions_p.h PRIVATE
+ )
+
+ extend_target(Gui CONDITION QT_FEATURE_vulkan
+ SOURCES "${vulkan_fun}" "${vulkan_fun_p}" "${vulkan_fun_p_cpp}"
+ LIBRARIES Vulkan::Vulkan
+ )
+endif()
+
+# qpa headers are expected to be located right next to QtGui's private
+# headers. So a private QtGui header is #include <private/qfoo_p.h> and
+# a qpa header is #include <qpa/qplatformfoo.h>, both of them implying
+# linkage against Qt::GuiPrivate.
+qt_read_headers_pri("QtGui" "module_headers")
+install(FILES ${module_headers_qpa} DESTINATION ${INSTALL_INCLUDEDIR}/QtGui/${PROJECT_VERSION}/QtGui/qpa)
+
+add_qt_docs(./doc/qtgui.qdocconf)
diff --git a/src/gui/configure.cmake b/src/gui/configure.cmake
new file mode 100644
index 0000000000..be056b34e3
--- /dev/null
+++ b/src/gui/configure.cmake
@@ -0,0 +1,946 @@
+
+
+#### Inputs
+
+# input freetype
+set(INPUT_freetype "undefined" CACHE STRING "")
+set_property(CACHE INPUT_freetype PROPERTY STRINGS undefined no qt system)
+
+# input harfbuzz
+set(INPUT_harfbuzz "undefined" CACHE STRING "")
+set_property(CACHE INPUT_harfbuzz PROPERTY STRINGS undefined no qt system)
+
+# input libjpeg
+set(INPUT_libjpeg "undefined" CACHE STRING "")
+set_property(CACHE INPUT_libjpeg PROPERTY STRINGS undefined no qt system)
+
+# input libpng
+set(INPUT_libpng "undefined" CACHE STRING "")
+set_property(CACHE INPUT_libpng PROPERTY STRINGS undefined no qt system)
+
+# input xcb
+set(INPUT_xcb "undefined" CACHE STRING "")
+set_property(CACHE INPUT_xcb PROPERTY STRINGS undefined no yes qt system)
+
+# input xkbcommon
+set(INPUT_xkbcommon "undefined" CACHE STRING "")
+set_property(CACHE INPUT_xkbcommon PROPERTY STRINGS undefined no qt system)
+
+# input xkbcommon-x11
+set(INPUT_xkbcommon_x11 "undefined" CACHE STRING "")
+set_property(CACHE INPUT_xkbcommon_x11 PROPERTY STRINGS undefined no qt system)
+
+
+
+#### Libraries
+
+find_package(Libdrm)
+set_package_properties(Libdrm PROPERTIES TYPE OPTIONAL)
+find_package(OpenGL)
+set_package_properties(OpenGL PROPERTIES TYPE OPTIONAL)
+find_package(Freetype)
+set_package_properties(Freetype PROPERTIES TYPE OPTIONAL)
+find_package(Fontconfig)
+set_package_properties(Fontconfig PROPERTIES TYPE OPTIONAL)
+find_package(gbm)
+set_package_properties(gbm PROPERTIES TYPE OPTIONAL)
+find_package(harfbuzz)
+set_package_properties(harfbuzz PROPERTIES TYPE OPTIONAL)
+find_package(Libinput)
+set_package_properties(Libinput PROPERTIES TYPE OPTIONAL)
+find_package(JPEG)
+set_package_properties(JPEG PROPERTIES TYPE OPTIONAL)
+find_package(PNG)
+set_package_properties(PNG PROPERTIES TYPE OPTIONAL)
+find_package(Vulkan)
+set_package_properties(Vulkan PROPERTIES TYPE OPTIONAL)
+find_package(Wayland)
+set_package_properties(Wayland PROPERTIES TYPE OPTIONAL)
+find_package(X11)
+set_package_properties(X11 PROPERTIES TYPE OPTIONAL)
+find_package(XCB 1.9)
+set_package_properties(XCB PROPERTIES TYPE OPTIONAL)
+find_package(X11_XCB)
+set_package_properties(X11_XCB PROPERTIES TYPE OPTIONAL)
+find_package(XKB 0.4.1)
+set_package_properties(XKB PROPERTIES TYPE OPTIONAL)
+
+
+#### Tests
+
+# angle_d3d11_qdtd
+qt_config_compile_test(angle_d3d11_qdtd
+ LABEL "D3D11_QUERY_DATA_TIMESTAMP_DISJOINT"
+"
+#include <d3d11.h>
+
+int main(int argc, char **argv)
+{
+ (void)argc; (void)argv;
+ /* BEGIN TEST: */
+D3D11_QUERY_DATA_TIMESTAMP_DISJOINT qdtd;
+(void) qdtd;
+ /* END TEST: */
+ return 0;
+}
+")
+
+# directwrite2
+qt_config_compile_test(directwrite2
+ LABEL "DirectWrite 2"
+"
+#include <dwrite_2.h>
+#include <d2d1.h>
+
+int main(int argc, char **argv)
+{
+ (void)argc; (void)argv;
+ /* BEGIN TEST: */
+IUnknown *factory = 0;
+(void)(size_t(DWRITE_E_NOCOLOR) + sizeof(IDWriteFontFace2));
+DWriteCreateFactory(DWRITE_FACTORY_TYPE_SHARED, __uuidof(IDWriteFactory2),
+ &factory);
+ /* END TEST: */
+ return 0;
+}
+")
+
+# drm_atomic
+qt_config_compile_test(drm_atomic
+ LABEL "DRM Atomic API"
+"#include <stdlib.h>
+#include <stdint.h>
+extern \"C\" {
+#include <xf86drmMode.h>
+#include <xf86drm.h>
+}
+int main(int argc, char **argv)
+{
+ (void)argc; (void)argv;
+ /* BEGIN TEST: */
+drmModeAtomicReq *request;
+ /* END TEST: */
+ return 0;
+}
+")
+
+# egl-x11
+qt_config_compile_test(egl_x11
+ LABEL "EGL on X11"
+"// Check if EGL is compatible with X. Some EGL implementations, typically on
+// embedded devices, are not intended to be used together with X. EGL support
+// has to be disabled in plugins like xcb in this case since the native display,
+// window and pixmap types will be different than what an X-based platform
+// plugin would expect.
+#include <EGL/egl.h>
+#include <xcb/xcb.h>
+#include <X11/Xlib.h>
+#include <X11/Xlib-xcb.h>
+
+int main(int argc, char **argv)
+{
+ (void)argc; (void)argv;
+ /* BEGIN TEST: */
+Display *dpy = EGL_DEFAULT_DISPLAY;
+EGLNativeDisplayType egldpy = XOpenDisplay(\"\");
+dpy = egldpy;
+EGLNativeWindowType w = XCreateWindow(dpy, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
+XDestroyWindow(dpy, w);
+XCloseDisplay(dpy);
+ /* END TEST: */
+ return 0;
+}
+")
+
+# egl-brcm
+qt_config_compile_test(egl_brcm
+ LABEL "Broadcom EGL (Raspberry Pi)"
+"
+#include <EGL/egl.h>
+#include <bcm_host.h>
+
+int main(int argc, char **argv)
+{
+ (void)argc; (void)argv;
+ /* BEGIN TEST: */
+vc_dispmanx_display_open(0);
+ /* END TEST: */
+ return 0;
+}
+")
+
+# egl-egldevice
+qt_config_compile_test(egl_egldevice
+ LABEL "EGLDevice"
+"
+#include <EGL/egl.h>
+#include <EGL/eglext.h>
+
+int main(int argc, char **argv)
+{
+ (void)argc; (void)argv;
+ /* BEGIN TEST: */
+EGLDeviceEXT device = 0;
+EGLStreamKHR stream = 0;
+EGLOutputLayerEXT layer = 0;
+(void) EGL_DRM_CRTC_EXT;
+ /* END TEST: */
+ return 0;
+}
+")
+
+# egl-mali
+qt_config_compile_test(egl_mali
+ LABEL "Mali EGL"
+"
+#include <EGL/fbdev_window.h>
+#include <EGL/egl.h>
+#include <GLES2/gl2.h>
+
+int main(int argc, char **argv)
+{
+ (void)argc; (void)argv;
+ /* BEGIN TEST: */
+fbdev_window *w = 0;
+ /* END TEST: */
+ return 0;
+}
+")
+
+# egl-mali-2
+qt_config_compile_test(egl_mali_2
+ LABEL "Mali 2 EGL"
+"
+#include <EGL/egl.h>
+#include <GLES2/gl2.h>
+
+int main(int argc, char **argv)
+{
+ (void)argc; (void)argv;
+ /* BEGIN TEST: */
+mali_native_window *w = 0;
+ /* END TEST: */
+ return 0;
+}
+")
+
+# egl-viv
+qt_config_compile_test(egl_viv
+ LABEL "i.Mx6 EGL"
+"
+#include <EGL/egl.h>
+#include <EGL/eglvivante.h>
+
+int main(int argc, char **argv)
+{
+ (void)argc; (void)argv;
+ /* BEGIN TEST: */
+#ifdef __INTEGRITY
+fbGetDisplay();
+#else
+// Do not rely on fbGetDisplay(), since the signature has changed over time.
+// Stick to fbGetDisplayByIndex().
+fbGetDisplayByIndex(0);
+#endif
+ /* END TEST: */
+ return 0;
+}
+"# FIXME: qmake: ['DEFINES += EGL_API_FB=1', '!integrity: DEFINES += LINUX=1']
+)
+
+# egl-openwfd
+qt_config_compile_test(egl_openwfd
+ LABEL "OpenWFD EGL"
+"
+#include <wfd.h>
+
+int main(int argc, char **argv)
+{
+ (void)argc; (void)argv;
+ /* BEGIN TEST: */
+wfdEnumerateDevices(nullptr, 0, nullptr);
+ /* END TEST: */
+ return 0;
+}
+")
+
+# egl-rcar
+qt_config_compile_test(egl_rcar
+ LABEL "RCAR EGL"
+"
+#include <EGL/egl.h>
+extern \"C\" {
+extern unsigned long PVRGrfxServerInit(void);
+}
+int main(int argc, char **argv)
+{
+ (void)argc; (void)argv;
+ /* BEGIN TEST: */
+PVRGrfxServerInit();
+ /* END TEST: */
+ return 0;
+}
+")
+
+# evdev
+qt_config_compile_test(evdev
+ LABEL "evdev"
+"#if defined(__FreeBSD__)
+# include <dev/evdev/input.h>
+#else
+# include <linux/input.h>
+# include <linux/kd.h>
+#endif
+enum {
+ e1 = ABS_PRESSURE,
+ e2 = ABS_X,
+ e3 = REL_X,
+ e4 = SYN_REPORT,
+};
+
+
+int main(int argc, char **argv)
+{
+ (void)argc; (void)argv;
+ /* BEGIN TEST: */
+input_event buf[32];
+(void) buf;
+ /* END TEST: */
+ return 0;
+}
+")
+
+# integrityfb
+qt_config_compile_test(integrityfb
+ LABEL "INTEGRITY framebuffer"
+"
+#include <device/fbdriver.h>
+
+int main(int argc, char **argv)
+{
+ (void)argc; (void)argv;
+ /* BEGIN TEST: */
+FBDriver *driver = 0;
+ /* END TEST: */
+ return 0;
+}
+")
+
+# libinput_axis_api
+qt_config_compile_test(libinput_axis_api
+ LABEL "axis API in libinput"
+"
+#include <libinput.h>
+
+int main(int argc, char **argv)
+{
+ (void)argc; (void)argv;
+ /* BEGIN TEST: */
+libinput_event_pointer_has_axis(nullptr, LIBINPUT_POINTER_AXIS_SCROLL_VERTICAL);
+ /* END TEST: */
+ return 0;
+}
+")
+
+# linuxfb
+qt_config_compile_test(linuxfb
+ LABEL "LinuxFB"
+"
+#include <linux/fb.h>
+#include <sys/kd.h>
+#include <sys/ioctl.h>
+
+int main(int argc, char **argv)
+{
+ (void)argc; (void)argv;
+ /* BEGIN TEST: */
+fb_fix_screeninfo finfo;
+fb_var_screeninfo vinfo;
+int fd = 3;
+ioctl(fd, FBIOGET_FSCREENINFO, &finfo);
+ioctl(fd, FBIOGET_VSCREENINFO, &vinfo);
+ /* END TEST: */
+ return 0;
+}
+")
+
+# opengles3
+qt_config_compile_test(opengles3
+ LABEL "OpenGL ES 3.0"
+"#ifdef __APPLE__
+# include <OpenGLES/ES3/gl.h>
+#else
+# define GL_GLEXT_PROTOTYPES
+# include <GLES3/gl3.h>
+#endif
+
+
+int main(int argc, char **argv)
+{
+ (void)argc; (void)argv;
+ /* BEGIN TEST: */
+static GLfloat f[6];
+glGetStringi(GL_EXTENSIONS, 0);
+glReadBuffer(GL_COLOR_ATTACHMENT1);
+glUniformMatrix2x3fv(0, 0, GL_FALSE, f);
+glMapBufferRange(GL_ARRAY_BUFFER, 0, 0, GL_MAP_READ_BIT);
+ /* END TEST: */
+ return 0;
+}
+")
+
+# opengles31
+qt_config_compile_test(opengles31
+ LABEL "OpenGL ES 3.1"
+"
+#include <GLES3/gl31.h>
+
+int main(int argc, char **argv)
+{
+ (void)argc; (void)argv;
+ /* BEGIN TEST: */
+glDispatchCompute(1, 1, 1);
+glProgramUniform1i(0, 0, 0);
+ /* END TEST: */
+ return 0;
+}
+")
+
+# xlib
+qt_config_compile_test(xlib
+ LABEL "XLib"
+"
+#include <X11/Xlib.h>
+
+int main(int argc, char **argv)
+{
+ (void)argc; (void)argv;
+ /* BEGIN TEST: */
+Display *d = XOpenDisplay(NULL);
+XCloseDisplay(d);
+ /* END TEST: */
+ return 0;
+}
+"# FIXME: qmake: CONFIG += x11
+)
+
+
+
+#### Features
+
+qt_feature("accessibility_atspi_bridge" PUBLIC PRIVATE
+ LABEL "ATSPI Bridge"
+ CONDITION QT_FEATURE_accessibility AND QT_FEATURE_xcb AND QT_FEATURE_dbus AND libs.atspi OR FIXME
+)
+qt_feature_definition("accessibility_atspi_bridge" "QT_NO_ACCESSIBILITY_ATSPI_BRIDGE" NEGATE VALUE "1")
+qt_feature("angle" PUBLIC
+ LABEL "ANGLE"
+ AUTODETECT QT_FEATURE_opengles2 OR QT_FEATURE_opengl_dynamic
+ CONDITION WIN32 AND tests.directx OR FIXME
+)
+qt_feature_definition("angle" "QT_OPENGL_ES_2_ANGLE")
+qt_feature("angle_d3d11_qdtd" PRIVATE
+ LABEL "D3D11_QUERY_DATA_TIMESTAMP_DISJOINT"
+ CONDITION QT_FEATURE_angle AND TEST_angle_d3d11_qdtd
+)
+qt_feature("combined_angle_lib" PUBLIC
+ LABEL "Combined ANGLE Library"
+ AUTODETECT OFF
+ CONDITION QT_FEATURE_angle
+)
+qt_feature("directfb" PRIVATE
+ SECTION "Platform plugins"
+ LABEL "DirectFB"
+ AUTODETECT OFF
+ CONDITION libs.directfb OR FIXME
+)
+qt_feature("directwrite" PRIVATE
+ LABEL "DirectWrite"
+ CONDITION libs.directwrite OR FIXME
+ EMIT_IF WIN32
+)
+qt_feature("directwrite2" PRIVATE
+ LABEL "DirectWrite 2"
+ CONDITION QT_FEATURE_directwrite AND TEST_directwrite2
+ EMIT_IF WIN32
+)
+qt_feature("direct2d" PRIVATE
+ SECTION "Platform plugins"
+ LABEL "Direct 2D"
+ CONDITION WIN32 AND NOT WINRT AND libs.direct2d OR FIXME
+)
+qt_feature("evdev" PRIVATE
+ LABEL "evdev"
+ CONDITION QT_FEATURE_thread AND TEST_evdev
+)
+qt_feature("freetype" PUBLIC PRIVATE
+ SECTION "Fonts"
+ LABEL "FreeType"
+ PURPOSE "Supports the FreeType 2 font engine (and its supported font formats)."
+)
+qt_feature_definition("freetype" "QT_NO_FREETYPE" NEGATE VALUE "1")
+qt_feature("fontconfig" PUBLIC PRIVATE
+ LABEL "Fontconfig"
+ AUTODETECT NOT APPLE
+ CONDITION NOT WIN32 AND ON AND FONTCONFIG_FOUND
+)
+qt_feature_definition("fontconfig" "QT_NO_FONTCONFIG" NEGATE VALUE "1")
+qt_feature("harfbuzz" PUBLIC PRIVATE
+ LABEL "HarfBuzz"
+)
+qt_feature_definition("harfbuzz" "QT_NO_HARFBUZZ" NEGATE VALUE "1")
+qt_feature("system_harfbuzz" PRIVATE
+ LABEL " Using system HarfBuzz"
+ AUTODETECT NOT APPLE AND NOT WIN32
+ CONDITION QT_FEATURE_harfbuzz AND harfbuzz_FOUND
+ ENABLE INPUT_harfbuzz STREQUAL 'system'
+ DISABLE INPUT_harfbuzz STREQUAL 'qt'
+)
+qt_feature("qqnx_imf" PRIVATE
+ LABEL "IMF"
+ CONDITION libs.imf OR FIXME
+ EMIT_IF QNX
+)
+qt_feature("integrityfb" PRIVATE
+ SECTION "Platform plugins"
+ LABEL "INTEGRITY framebuffer"
+ CONDITION INTEGRITY AND TEST_integrityfb
+)
+qt_feature("kms" PRIVATE
+ LABEL "KMS"
+ CONDITION Libdrm_FOUND
+)
+qt_feature("drm_atomic" PRIVATE
+ LABEL "DRM Atomic API"
+ CONDITION Libdrm_FOUND AND TEST_drm_atomic
+)
+qt_feature("libinput" PRIVATE
+ LABEL "libinput"
+ CONDITION QT_FEATURE_libudev AND Libinput_FOUND
+)
+qt_feature("integrityhid" PRIVATE
+ LABEL "INTEGRITY HID"
+ CONDITION INTEGRITY AND libs.integrityhid OR FIXME
+)
+qt_feature("libinput_axis_api" PRIVATE
+ LABEL "axis API in libinput"
+ CONDITION QT_FEATURE_libinput AND TEST_libinput_axis_api
+)
+qt_feature("linuxfb" PRIVATE
+ SECTION "Platform plugins"
+ LABEL "LinuxFB"
+ CONDITION TEST_linuxfb AND QT_FEATURE_regularexpression
+)
+qt_feature("vsp2" PRIVATE
+ LABEL "VSP2"
+ AUTODETECT OFF
+ CONDITION libs.v4l2 OR FIXME
+)
+qt_feature("vnc" PRIVATE
+ SECTION "Platform plugins"
+ LABEL "VNC"
+ CONDITION ( UNIX AND NOT ANDROID AND NOT APPLE ) AND ( QT_FEATURE_regularexpression AND QT_FEATURE_network )
+)
+qt_feature("mirclient" PRIVATE
+ SECTION "Platform plugins"
+ LABEL "Mir client"
+ AUTODETECT OFF
+ CONDITION libs.mirclient OR FIXME
+)
+qt_feature("mtdev" PRIVATE
+ LABEL "mtdev"
+ CONDITION libs.mtdev OR FIXME
+)
+qt_feature("opengles2" PUBLIC
+ LABEL "OpenGL ES 2.0"
+ CONDITION WIN32 OR ( NOT APPLE_WATCHOS AND NOT QT_FEATURE_opengl_desktop AND libs.opengl_es2 ) OR FIXME
+ ENABLE INPUT_opengl STREQUAL 'es2'
+ DISABLE INPUT_opengl STREQUAL 'desktop' OR INPUT_opengl STREQUAL 'dynamic' OR INPUT_opengl STREQUAL 'no'
+)
+qt_feature_definition("opengles2" "QT_OPENGL_ES")
+qt_feature_definition("opengles2" "QT_OPENGL_ES_2")
+qt_feature("opengles3" PUBLIC
+ LABEL "OpenGL ES 3.0"
+ CONDITION QT_FEATURE_opengles2 AND NOT QT_FEATURE_angle AND TEST_opengles3 AND NOT WASM
+)
+qt_feature_definition("opengles3" "QT_OPENGL_ES_3")
+qt_feature("opengles31" PUBLIC
+ LABEL "OpenGL ES 3.1"
+ CONDITION QT_FEATURE_opengles3 AND TEST_opengles31
+)
+qt_feature_definition("opengles31" "QT_OPENGL_ES_3_1")
+qt_feature("opengles32" PUBLIC
+ LABEL "OpenGL ES 3.2"
+ CONDITION QT_FEATURE_opengles31 AND TEST_opengles32
+)
+qt_feature_definition("opengles32" "QT_OPENGL_ES_3_2")
+qt_feature("opengl_desktop"
+ LABEL "Desktop OpenGL"
+ CONDITION ( WIN32 AND NOT WINRT AND NOT QT_FEATURE_opengles2 AND ( MSVC OR OpenGL_OpenGL_FOUND ) ) OR ( NOT APPLE_WATCHOS AND NOT WIN32 AND NOT WASM AND OpenGL_OpenGL_FOUND )
+ ENABLE INPUT_opengl STREQUAL 'desktop'
+ DISABLE INPUT_opengl STREQUAL 'es2' OR INPUT_opengl STREQUAL 'dynamic' OR INPUT_opengl STREQUAL 'no'
+)
+qt_feature("opengl_dynamic" PUBLIC
+ LABEL "Dynamic OpenGL"
+ AUTODETECT OFF
+ CONDITION WIN32 AND NOT WINRT
+ ENABLE INPUT_opengl STREQUAL 'dynamic'
+)
+qt_feature_definition("opengl_dynamic" "QT_OPENGL_DYNAMIC")
+qt_feature("opengl" PUBLIC
+ LABEL "OpenGL"
+ CONDITION QT_FEATURE_opengl_desktop OR QT_FEATURE_opengl_dynamic OR QT_FEATURE_opengles2
+)
+qt_feature_definition("opengl" "QT_NO_OPENGL" NEGATE VALUE "1")
+qt_feature("vulkan" PUBLIC
+ LABEL "Vulkan"
+ CONDITION Vulkan_FOUND
+)
+qt_feature("openvg" PUBLIC
+ LABEL "OpenVG"
+ CONDITION libs.openvg OR FIXME
+)
+qt_feature("egl" PUBLIC PRIVATE
+ LABEL "EGL"
+ CONDITION ( QT_FEATURE_opengl OR QT_FEATURE_openvg ) AND ( QT_FEATURE_angle OR OpenGL_EGL_FOUND )
+)
+qt_feature_definition("egl" "QT_NO_EGL" NEGATE VALUE "1")
+qt_feature("egl_x11" PRIVATE
+ LABEL "EGL on X11"
+ CONDITION QT_FEATURE_thread AND QT_FEATURE_egl AND TEST_egl_x11
+)
+qt_feature("eglfs" PRIVATE
+ SECTION "Platform plugins"
+ LABEL "EGLFS"
+ CONDITION NOT ANDROID AND NOT APPLE AND NOT WIN32 AND QT_FEATURE_egl
+)
+qt_feature("eglfs_brcm" PRIVATE
+ LABEL "EGLFS Raspberry Pi"
+ CONDITION QT_FEATURE_eglfs AND TEST_egl_brcm
+)
+qt_feature("eglfs_egldevice" PRIVATE
+ LABEL "EGLFS EGLDevice"
+ CONDITION QT_FEATURE_eglfs AND TEST_egl_egldevice AND QT_FEATURE_kms
+)
+qt_feature("eglfs_gbm" PRIVATE
+ LABEL "EGLFS GBM"
+ CONDITION QT_FEATURE_eglfs AND gbm_FOUND AND QT_FEATURE_kms
+)
+qt_feature("eglfs_vsp2" PRIVATE
+ LABEL "EGLFS VSP2"
+ CONDITION QT_FEATURE_eglfs AND gbm_FOUND AND QT_FEATURE_kms AND QT_FEATURE_vsp2
+)
+qt_feature("eglfs_mali" PRIVATE
+ LABEL "EGLFS Mali"
+ CONDITION QT_FEATURE_eglfs AND ( TEST_egl_mali OR TEST_egl_mali_2 )
+)
+qt_feature("eglfs_viv" PRIVATE
+ LABEL "EGLFS i.Mx6"
+ CONDITION QT_FEATURE_eglfs AND TEST_egl_viv
+)
+qt_feature("eglfs_rcar" PRIVATE
+ LABEL "EGLFS RCAR"
+ CONDITION INTEGRITY AND QT_FEATURE_eglfs AND TEST_egl_rcar
+)
+qt_feature("eglfs_viv_wl" PRIVATE
+ LABEL "EGLFS i.Mx6 Wayland"
+ CONDITION QT_FEATURE_eglfs_viv AND Wayland_FOUND
+)
+qt_feature("eglfs_openwfd" PRIVATE
+ LABEL "EGLFS OpenWFD"
+ CONDITION INTEGRITY AND QT_FEATURE_eglfs AND TEST_egl_openwfd
+)
+qt_feature("gif" PUBLIC PRIVATE
+ LABEL "GIF"
+ CONDITION QT_FEATURE_imageformatplugin
+)
+qt_feature_definition("gif" "QT_NO_IMAGEFORMAT_GIF" NEGATE)
+qt_feature("ico" PUBLIC PRIVATE
+ LABEL "ICO"
+ CONDITION QT_FEATURE_imageformatplugin
+)
+qt_feature_definition("ico" "QT_NO_ICO" NEGATE VALUE "1")
+qt_feature("jpeg" PUBLIC PRIVATE
+ LABEL "JPEG"
+ CONDITION QT_FEATURE_imageformatplugin
+ DISABLE INPUT_libjpeg STREQUAL 'no'
+)
+qt_feature_definition("jpeg" "QT_NO_IMAGEFORMAT_JPEG" NEGATE)
+qt_feature("png" PUBLIC PRIVATE
+ LABEL "PNG"
+ DISABLE INPUT_libpng STREQUAL 'no'
+)
+qt_feature_definition("png" "QT_NO_IMAGEFORMAT_PNG" NEGATE)
+qt_feature("sessionmanager" PUBLIC
+ SECTION "Kernel"
+ LABEL "Session Management"
+ PURPOSE "Provides an interface to the windowing system's session management."
+)
+qt_feature_definition("sessionmanager" "QT_NO_SESSIONMANAGER" NEGATE VALUE "1")
+qt_feature("tslib" PRIVATE
+ LABEL "tslib"
+ CONDITION libs.tslib OR FIXME
+)
+qt_feature("tuiotouch" PRIVATE
+ LABEL "TuioTouch"
+ PURPOSE "Provides the TuioTouch input plugin."
+ CONDITION QT_FEATURE_network AND QT_FEATURE_udpsocket
+)
+qt_feature("xcb" PRIVATE
+ SECTION "Platform plugins"
+ LABEL "XCB"
+ AUTODETECT NOT APPLE
+ CONDITION QT_FEATURE_thread AND XCB_FOUND
+ ENABLE INPUT_xcb STREQUAL 'system' OR INPUT_xcb STREQUAL 'qt' OR INPUT_xcb STREQUAL 'yes'
+)
+qt_feature("xcb_glx" PRIVATE
+ LABEL "XCB GLX"
+ CONDITION XCB_GLX_FOUND
+ EMIT_IF QT_FEATURE_xcb
+)
+qt_feature("xcb_native_painting" PRIVATE
+ LABEL "Native painting (experimental)"
+ CONDITION QT_FEATURE_xcb_xlib AND QT_FEATURE_fontconfig AND XCB_RENDER_FOUND
+ EMIT_IF QT_FEATURE_xcb
+)
+qt_feature("xrender" PRIVATE
+ LABEL "XRender for native painting"
+ CONDITION QT_FEATURE_xcb_native_painting
+ EMIT_IF QT_FEATURE_xcb AND QT_FEATURE_xcb_native_painting
+)
+qt_feature("xcb_render" PRIVATE
+ LABEL "XCB render"
+ CONDITION NOT ON OR XCB_RENDER_FOUND
+ EMIT_IF QT_FEATURE_xcb
+)
+qt_feature("xkb" PRIVATE
+ LABEL "XCB XKB"
+ CONDITION NOT ON OR XCB_XKB_FOUND
+ EMIT_IF QT_FEATURE_xcb
+)
+qt_feature("xcb_xlib" PRIVATE
+ LABEL "XCB Xlib"
+ CONDITION QT_FEATURE_xlib AND X11_XCB_FOUND
+ EMIT_IF QT_FEATURE_xcb
+)
+qt_feature("xcb_sm" PRIVATE
+ LABEL "xcb-sm"
+ CONDITION QT_FEATURE_sessionmanager AND X11_SM_FOUND
+ EMIT_IF QT_FEATURE_xcb
+)
+qt_feature("xcb_xinput" PRIVATE
+ LABEL "XCB XInput"
+ CONDITION NOT ON OR XCB_XINPUT_FOUND
+ EMIT_IF QT_FEATURE_xcb
+)
+qt_feature("xkbcommon_evdev" PRIVATE
+ LABEL "xkbcommon-evdev"
+ CONDITION XKB_FOUND
+)
+qt_feature("xlib" PRIVATE
+ LABEL "XLib"
+ AUTODETECT NOT APPLE OR QT_FEATURE_xcb
+ CONDITION TEST_xlib
+)
+qt_feature("texthtmlparser" PUBLIC
+ SECTION "Kernel"
+ LABEL "HtmlParser"
+ PURPOSE "Provides a parser for HTML."
+)
+qt_feature_definition("texthtmlparser" "QT_NO_TEXTHTMLPARSER" NEGATE VALUE "1")
+qt_feature("textodfwriter" PUBLIC
+ SECTION "Kernel"
+ LABEL "OdfWriter"
+ PURPOSE "Provides an ODF writer."
+ CONDITION QT_FEATURE_xmlstreamwriter
+)
+qt_feature_definition("textodfwriter" "QT_NO_TEXTODFWRITER" NEGATE VALUE "1")
+qt_feature("cssparser" PUBLIC
+ SECTION "Kernel"
+ LABEL "CssParser"
+ PURPOSE "Provides a parser for Cascading Style Sheets."
+)
+qt_feature_definition("cssparser" "QT_NO_CSSPARSER" NEGATE VALUE "1")
+qt_feature("draganddrop" PUBLIC
+ SECTION "Kernel"
+ LABEL "Drag and Drop"
+ PURPOSE "Supports the drag and drop mechansim."
+ CONDITION QT_FEATURE_imageformat_xpm
+)
+qt_feature_definition("draganddrop" "QT_NO_DRAGANDDROP" NEGATE VALUE "1")
+qt_feature("shortcut" PUBLIC
+ SECTION "Kernel"
+ LABEL "QShortcut"
+ PURPOSE "Provides keyboard accelerators and shortcuts."
+)
+qt_feature_definition("shortcut" "QT_NO_SHORTCUT" NEGATE VALUE "1")
+qt_feature("action" PUBLIC
+ SECTION "Kernel"
+ LABEL "QAction"
+ PURPOSE "Provides widget actions."
+)
+qt_feature_definition("action" "QT_NO_ACTION" NEGATE VALUE "1")
+qt_feature("cursor" PUBLIC
+ SECTION "Kernel"
+ LABEL "QCursor"
+ PURPOSE "Provides mouse cursors."
+)
+qt_feature_definition("cursor" "QT_NO_CURSOR" NEGATE VALUE "1")
+qt_feature("clipboard" PUBLIC
+ SECTION "Kernel"
+ LABEL "QClipboard"
+ PURPOSE "Provides cut and paste operations."
+ CONDITION NOT INTEGRITY AND NOT QNX
+)
+qt_feature_definition("clipboard" "QT_NO_CLIPBOARD" NEGATE VALUE "1")
+qt_feature("wheelevent" PUBLIC
+ SECTION "Kernel"
+ LABEL "QWheelEvent"
+ PURPOSE "Supports wheel events."
+)
+qt_feature_definition("wheelevent" "QT_NO_WHEELEVENT" NEGATE VALUE "1")
+qt_feature("tabletevent" PUBLIC
+ SECTION "Kernel"
+ LABEL "QTabletEvent"
+ PURPOSE "Supports tablet events."
+)
+qt_feature_definition("tabletevent" "QT_NO_TABLETEVENT" NEGATE VALUE "1")
+qt_feature("im" PUBLIC
+ SECTION "Kernel"
+ LABEL "QInputContext"
+ PURPOSE "Provides complex input methods."
+ CONDITION QT_FEATURE_library
+)
+qt_feature_definition("im" "QT_NO_IM" NEGATE VALUE "1")
+qt_feature("highdpiscaling" PUBLIC
+ SECTION "Kernel"
+ LABEL "High DPI Scaling"
+ PURPOSE "Provides automatic scaling of DPI-unaware applications on high-DPI displays."
+)
+qt_feature_definition("highdpiscaling" "QT_NO_HIGHDPISCALING" NEGATE VALUE "1")
+qt_feature("validator" PUBLIC
+ SECTION "Widgets"
+ LABEL "QValidator"
+ PURPOSE "Supports validation of input text."
+)
+qt_feature_definition("validator" "QT_NO_VALIDATOR" NEGATE VALUE "1")
+qt_feature("standarditemmodel" PUBLIC
+ SECTION "ItemViews"
+ LABEL "QStandardItemModel"
+ PURPOSE "Provides a generic model for storing custom data."
+ CONDITION QT_FEATURE_itemmodel
+)
+qt_feature_definition("standarditemmodel" "QT_NO_STANDARDITEMMODEL" NEGATE VALUE "1")
+qt_feature("imageformatplugin" PUBLIC
+ SECTION "Images"
+ LABEL "QImageIOPlugin"
+ PURPOSE "Provides a base for writing a image format plugins."
+)
+qt_feature_definition("imageformatplugin" "QT_NO_IMAGEFORMATPLUGIN" NEGATE VALUE "1")
+qt_feature("movie" PUBLIC
+ SECTION "Images"
+ LABEL "QMovie"
+ PURPOSE "Supports animated images."
+)
+qt_feature_definition("movie" "QT_NO_MOVIE" NEGATE VALUE "1")
+qt_feature("imageformat_bmp" PUBLIC
+ SECTION "Images"
+ LABEL "BMP Image Format"
+ PURPOSE "Supports Microsoft's Bitmap image file format."
+)
+qt_feature_definition("imageformat_bmp" "QT_NO_IMAGEFORMAT_BMP" NEGATE VALUE "1")
+qt_feature("imageformat_ppm" PUBLIC
+ SECTION "Images"
+ LABEL "PPM Image Format"
+ PURPOSE "Supports the Portable Pixmap image file format."
+)
+qt_feature_definition("imageformat_ppm" "QT_NO_IMAGEFORMAT_PPM" NEGATE VALUE "1")
+qt_feature("imageformat_xbm" PUBLIC
+ SECTION "Images"
+ LABEL "XBM Image Format"
+ PURPOSE "Supports the X11 Bitmap image file format."
+)
+qt_feature_definition("imageformat_xbm" "QT_NO_IMAGEFORMAT_XBM" NEGATE VALUE "1")
+qt_feature("imageformat_xpm" PUBLIC
+ SECTION "Images"
+ LABEL "XPM Image Format"
+ PURPOSE "Supports the X11 Pixmap image file format."
+)
+qt_feature_definition("imageformat_xpm" "QT_NO_IMAGEFORMAT_XPM" NEGATE VALUE "1")
+qt_feature("imageformat_png" PUBLIC
+ SECTION "Images"
+ LABEL "PNG Image Format"
+ PURPOSE "Supports the Portable Network Graphics image file format."
+)
+qt_feature_definition("imageformat_png" "QT_NO_IMAGEFORMAT_PNG" NEGATE VALUE "1")
+qt_feature("imageformat_jpeg" PUBLIC
+ SECTION "Images"
+ LABEL "JPEG Image Format"
+ PURPOSE "Supports the Joint Photographic Experts Group image file format."
+)
+qt_feature_definition("imageformat_jpeg" "QT_NO_IMAGEFORMAT_JPEG" NEGATE VALUE "1")
+qt_feature("image_heuristic_mask" PUBLIC
+ SECTION "Images"
+ LABEL "QImage::createHeuristicMask()"
+ PURPOSE "Supports creating a 1-bpp heuristic mask for images."
+)
+qt_feature_definition("image_heuristic_mask" "QT_NO_IMAGE_HEURISTIC_MASK" NEGATE VALUE "1")
+qt_feature("image_text" PUBLIC
+ SECTION "Images"
+ LABEL "Image Text"
+ PURPOSE "Supports image file text strings."
+)
+qt_feature_definition("image_text" "QT_NO_IMAGE_TEXT" NEGATE VALUE "1")
+qt_feature("picture" PUBLIC
+ SECTION "Painting"
+ LABEL "QPicture"
+ PURPOSE "Supports recording and replaying QPainter commands."
+)
+qt_feature_definition("picture" "QT_NO_PICTURE" NEGATE VALUE "1")
+qt_feature("colornames" PUBLIC
+ SECTION "Painting"
+ LABEL "Color Names"
+ PURPOSE "Supports color names such as \"red\", used by QColor and by some HTML documents."
+)
+qt_feature_definition("colornames" "QT_NO_COLORNAMES" NEGATE VALUE "1")
+qt_feature("pdf" PUBLIC
+ SECTION "Painting"
+ LABEL "QPdf"
+ PURPOSE "Provides a PDF backend for QPainter."
+ CONDITION QT_FEATURE_temporaryfile
+)
+qt_feature_definition("pdf" "QT_NO_PDF" NEGATE VALUE "1")
+qt_feature("desktopservices" PUBLIC
+ SECTION "Utilities"
+ LABEL "QDesktopServices"
+ PURPOSE "Provides methods for accessing common desktop services."
+)
+qt_feature_definition("desktopservices" "QT_NO_DESKTOPSERVICES" NEGATE VALUE "1")
+qt_feature("systemtrayicon" PUBLIC
+ SECTION "Utilities"
+ LABEL "QSystemTrayIcon"
+ PURPOSE "Provides an icon for an application in the system tray."
+ CONDITION QT_FEATURE_temporaryfile
+)
+qt_feature_definition("systemtrayicon" "QT_NO_SYSTEMTRAYICON" NEGATE VALUE "1")
+qt_feature("accessibility" PUBLIC
+ SECTION "Utilities"
+ LABEL "Accessibility"
+ PURPOSE "Provides accessibility support."
+ CONDITION QT_FEATURE_properties
+)
+qt_feature_definition("accessibility" "QT_NO_ACCESSIBILITY" NEGATE VALUE "1")
+qt_feature("multiprocess" PRIVATE
+ SECTION "Utilities"
+ LABEL "Multi process"
+ PURPOSE "Provides support for detecting the desktop environment, launching external processes and opening URLs."
+ CONDITION NOT INTEGRITY
+)
+qt_feature("whatsthis" PUBLIC
+ SECTION "Widget Support"
+ LABEL "QWhatsThis"
+ PURPOSE "Supports displaying \"What's this\" help."
+)
+qt_feature_definition("whatsthis" "QT_NO_WHATSTHIS" NEGATE VALUE "1")
+
+qt_extra_definition("QT_QPA_DEFAULT_PLATFORM" "${QT_QPA_DEFAULT_PLATFORM}" PUBLIC)
diff --git a/src/gui/configure.json b/src/gui/configure.json
index 4741ed345a..adc0000322 100644
--- a/src/gui/configure.json
+++ b/src/gui/configure.json
@@ -1139,8 +1139,7 @@
"label": "Desktop OpenGL",
"enable": "input.opengl == 'desktop'",
"disable": "input.opengl == 'es2' || input.opengl == 'dynamic' || input.opengl == 'no'",
- "condition": "(config.win32 && !config.winrt && !features.opengles2 && (config.msvc || libs.opengl))
- || (!config.watchos && !config.win32 && !config.wasm && libs.opengl)"
+ "condition": "(config.win32 && !config.winrt && !features.opengles2 && (config.msvc || libs.opengl)) || (!config.watchos && !config.win32 && !config.wasm && libs.opengl)"
},
"opengl-dynamic": {
"label": "Dynamic OpenGL",
@@ -1602,9 +1601,7 @@
{
"type": "note",
"condition": "features.xcb && config.darwin",
- "message": "XCB support on macOS is minimal and untested. Some features will
-not work properly or at all (e.g. OpenGL, desktop services or accessibility),
-or may depend on your system and XQuartz setup."
+ "message": "XCB support on macOS is minimal and untested. Some features will not work properly or at all (e.g. OpenGL, desktop services or accessibility), or may depend on your system and XQuartz setup."
},
{
"type": "note",
@@ -1619,17 +1616,12 @@ or may depend on your system and XQuartz setup."
{
"type": "warning",
"condition": "features.gui && config.linux && !config.android && !features.xcb && !features.eglfs && !features.directfb && !features.linuxfb && !features.mirclient",
- "message": "No QPA platform plugin enabled! This will
-produce a Qt that cannot run GUI applications.
-The dependencies needed for xcb to build are listed in
-src/plugins/platforms/xcb/README"
+ "message": "No QPA platform plugin enabled! This will produce a Qt that cannot run GUI applications. The dependencies needed for xcb to build are listed in src/plugins/platforms/xcb/README"
},
{
"type": "warning",
"condition": "config.win32 && (features.opengles2 || features.opengl-dynamic) && !features.angle",
- "message": "Using OpenGL ES 2.0 on Windows without ANGLE.
-The build will most likely fail.
-Specify -opengl desktop to use regular OpenGL."
+ "message": "Using OpenGL ES 2.0 on Windows without ANGLE. The build will most likely fail. Specify -opengl desktop to use regular OpenGL."
},
{
"type": "warning",
@@ -1639,9 +1631,7 @@ Specify -opengl desktop to use regular OpenGL."
{
"type": "error",
"condition": "features.gui && !config.watchos && input.opengl != 'no' && !features.opengl-desktop && !features.opengles2 && !features.opengl-dynamic",
- "message": "The OpenGL functionality tests failed!
-You might need to modify the include and library search paths by editing QMAKE_INCDIR_OPENGL[_ES2],
-QMAKE_LIBDIR_OPENGL[_ES2] and QMAKE_LIBS_OPENGL[_ES2] in the mkspec for your platform."
+ "message": "The OpenGL functionality tests failed! You might need to modify the include and library search paths by editing QMAKE_INCDIR_OPENGL[_ES2], QMAKE_LIBDIR_OPENGL[_ES2] and QMAKE_LIBS_OPENGL[_ES2] in the mkspec for your platform."
},
{
"type": "warning",
diff --git a/src/gui/painting/qcoregraphics.mm b/src/gui/painting/qcoregraphics.mm
index 2249859c43..d45da14767 100644
--- a/src/gui/painting/qcoregraphics.mm
+++ b/src/gui/painting/qcoregraphics.mm
@@ -153,7 +153,7 @@ QPixmap qt_mac_toQPixmap(const NSImage *image, const QSizeF &size)
return QPixmap();
[NSGraphicsContext saveGraphicsState];
[NSGraphicsContext setCurrentContext:gc];
- [image drawInRect:iconRect fromRect:iconRect operation:NSCompositeSourceOver fraction:1.0 respectFlipped:YES hints:nil];
+ [image drawInRect:iconRect fromRect:iconRect operation:NSCompositingOperationSourceOver fraction:1.0 respectFlipped:YES hints:nil];
[NSGraphicsContext restoreGraphicsState];
return pixmap;
}
diff --git a/src/network/CMakeLists.txt b/src/network/CMakeLists.txt
new file mode 100644
index 0000000000..fd684c7eb2
--- /dev/null
+++ b/src/network/CMakeLists.txt
@@ -0,0 +1,382 @@
+# Generated from network.pro.
+
+#####################################################################
+## QtNetwork Module:
+#####################################################################
+
+add_qt_module(Network
+ SOURCES
+ access/qabstractnetworkcache.cpp access/qabstractnetworkcache.h access/qabstractnetworkcache_p.h
+ access/qhsts.cpp access/qhsts_p.h
+ access/qhstspolicy.cpp access/qhstspolicy.h
+ access/qhstsstore.cpp access/qhstsstore_p.h
+ access/qnetworkaccessauthenticationmanager.cpp access/qnetworkaccessauthenticationmanager_p.h
+ access/qnetworkaccessbackend.cpp access/qnetworkaccessbackend_p.h
+ access/qnetworkaccesscache.cpp access/qnetworkaccesscache_p.h
+ access/qnetworkaccesscachebackend.cpp access/qnetworkaccesscachebackend_p.h
+ access/qnetworkaccessdebugpipebackend.cpp access/qnetworkaccessdebugpipebackend_p.h
+ access/qnetworkaccessfilebackend.cpp access/qnetworkaccessfilebackend_p.h
+ access/qnetworkaccessmanager.cpp access/qnetworkaccessmanager.h access/qnetworkaccessmanager_p.h
+ access/qnetworkcookie.cpp access/qnetworkcookie.h access/qnetworkcookie_p.h
+ access/qnetworkcookiejar.cpp access/qnetworkcookiejar.h access/qnetworkcookiejar_p.h
+ access/qnetworkfile.cpp access/qnetworkfile_p.h
+ access/qnetworkreply.cpp access/qnetworkreply.h access/qnetworkreply_p.h
+ access/qnetworkreplydataimpl.cpp access/qnetworkreplydataimpl_p.h
+ access/qnetworkreplyfileimpl.cpp access/qnetworkreplyfileimpl_p.h
+ access/qnetworkreplyimpl.cpp access/qnetworkreplyimpl_p.h
+ access/qnetworkrequest.cpp access/qnetworkrequest.h access/qnetworkrequest_p.h
+ bearer/qbearerengine.cpp bearer/qbearerengine_p.h
+ bearer/qbearerplugin.cpp bearer/qbearerplugin_p.h
+ bearer/qnetworkconfigmanager.cpp bearer/qnetworkconfigmanager.h bearer/qnetworkconfigmanager_p.cpp bearer/qnetworkconfigmanager_p.h
+ bearer/qnetworkconfiguration.cpp bearer/qnetworkconfiguration.h bearer/qnetworkconfiguration_p.h
+ bearer/qnetworksession.cpp bearer/qnetworksession.h bearer/qnetworksession_p.h
+ bearer/qsharednetworksession.cpp bearer/qsharednetworksession_p.h
+ kernel/qauthenticator.cpp kernel/qauthenticator.h kernel/qauthenticator_p.h
+ kernel/qhostaddress.cpp kernel/qhostaddress.h kernel/qhostaddress_p.h
+ kernel/qhostinfo.cpp kernel/qhostinfo.h kernel/qhostinfo_p.h
+ kernel/qnetworkdatagram.cpp kernel/qnetworkdatagram.h kernel/qnetworkdatagram_p.h
+ kernel/qnetworkinterface.cpp kernel/qnetworkinterface.h kernel/qnetworkinterface_p.h
+ kernel/qnetworkinterface_unix_p.h
+ kernel/qnetworkproxy.cpp kernel/qnetworkproxy.h
+ kernel/qtnetworkglobal.h kernel/qtnetworkglobal_p.h
+ socket/qabstractsocket.cpp socket/qabstractsocket.h socket/qabstractsocket_p.h
+ socket/qabstractsocketengine.cpp socket/qabstractsocketengine_p.h
+ socket/qtcpserver.cpp socket/qtcpserver.h socket/qtcpserver_p.h
+ socket/qtcpsocket.cpp socket/qtcpsocket.h socket/qtcpsocket_p.h
+ socket/qudpsocket.cpp socket/qudpsocket.h
+ ssl/qasn1element.cpp ssl/qasn1element_p.h
+ ssl/qpassworddigestor.cpp ssl/qpassworddigestor.h
+ ssl/qssl.cpp ssl/qssl.h ssl/qssl_p.h
+ ssl/qsslcertificate.cpp ssl/qsslcertificate.h ssl/qsslcertificate_p.h
+ ssl/qsslcertificateextension.cpp ssl/qsslcertificateextension.h ssl/qsslcertificateextension_p.h
+ DEFINES
+ QT_NO_USING_NAMESPACE
+ QT_NO_FOREACH
+ INCLUDE_DIRECTORIES
+ kernel
+ LIBRARIES
+ Qt::CorePrivate
+)
+
+## Scopes:
+#####################################################################
+
+find_library(FWCoreFoundation CoreFoundation)
+find_library(FWSecurity Security)
+find_library(FWCFNetwork CFNetwork)
+find_library(FWCoreServices CoreServices)
+find_library(FWSystemConfiguration SystemConfiguration)
+
+#
+#extend_target(Network CONDITION MSVC
+#)
+#
+#extend_target(Network CONDITION (MSVC) AND (equals(QT_ARCH, i386))
+#)
+#
+#extend_target(Network CONDITION QT_FEATURE_bearermanagement
+#)
+
+extend_target(Network CONDITION QT_FEATURE_ftp
+ SOURCES
+ access/qftp.cpp access/qftp_p.h
+ access/qnetworkaccessftpbackend.cpp access/qnetworkaccessftpbackend_p.h
+)
+
+extend_target(Network CONDITION QT_FEATURE_networkdiskcache
+ SOURCES
+ access/qnetworkdiskcache.cpp access/qnetworkdiskcache.h access/qnetworkdiskcache_p.h
+)
+
+extend_target(Network CONDITION APPLE_OSX
+ LIBRARIES
+ ${FWSecurity}
+)
+
+extend_target(Network CONDITION WASM
+ SOURCES
+ access/qnetworkreplywasmimpl.cpp access/qnetworkreplywasmimpl_p.h
+)
+
+extend_target(Network CONDITION QT_FEATURE_http
+ SOURCES
+ access/http2/bitstreams.cpp access/http2/bitstreams_p.h
+ access/http2/hpack.cpp access/http2/hpack_p.h
+ access/http2/hpacktable.cpp access/http2/hpacktable_p.h
+ access/http2/http2frames.cpp access/http2/http2frames_p.h
+ access/http2/http2protocol.cpp access/http2/http2protocol_p.h
+ access/http2/http2streams.cpp access/http2/http2streams_p.h
+ access/http2/huffman.cpp access/http2/huffman_p.h
+ access/qabstractprotocolhandler.cpp access/qabstractprotocolhandler_p.h
+ access/qhttp2protocolhandler.cpp access/qhttp2protocolhandler_p.h
+ access/qhttpmultipart.cpp access/qhttpmultipart.h access/qhttpmultipart_p.h
+ access/qhttpnetworkconnection.cpp access/qhttpnetworkconnection_p.h
+ access/qhttpnetworkconnectionchannel.cpp access/qhttpnetworkconnectionchannel_p.h
+ access/qhttpnetworkheader.cpp access/qhttpnetworkheader_p.h
+ access/qhttpnetworkreply.cpp access/qhttpnetworkreply_p.h
+ access/qhttpnetworkrequest.cpp access/qhttpnetworkrequest_p.h
+ access/qhttpprotocolhandler.cpp access/qhttpprotocolhandler_p.h
+ access/qhttpthreaddelegate.cpp access/qhttpthreaddelegate_p.h
+ access/qnetworkreplyhttpimpl.cpp access/qnetworkreplyhttpimpl_p.h
+ LIBRARIES
+ ZLIB::ZLIB
+)
+
+extend_target(Network CONDITION APPLE_UIKIT
+ SOURCES
+ kernel/qnetworkinterface_uikit_p.h
+)
+
+if(APPLE_OSX)
+ set(proxy_sources kernel/qnetworkproxy_mac.cpp)
+elseif(WIN32 AND NOT WINRT)
+ set(proxy_sources kernel/qnetworkproxy_win.cpp)
+elseif(QT_FEATURE_libproxy)
+ set(proxy_sources kernel/qnetworkproxy_libproxy.cpp)
+ set(proxy_libs libproxy libdl)
+else()
+ set(proxy_sources kernel/qnetworkproxy_generic.cpp)
+endif()
+
+if(NOT DEFINED proxy_libs)
+ set(proxy_libs "")
+endif()
+
+extend_target(Network
+ SOURCES
+ ${proxy_sources}
+ LIBRARIES
+ ${proxy_libs}
+)
+
+extend_target(Network CONDITION (QT_FEATURE_http) AND (QT_FEATURE_ssl)
+ SOURCES
+ access/qspdyprotocolhandler.cpp access/qspdyprotocolhandler_p.h
+)
+
+extend_target(Network CONDITION QT_FEATURE_ftp
+ SOURCES
+ kernel/qurlinfo.cpp kernel/qurlinfo_p.h
+)
+
+extend_target(Network CONDITION QT_FEATURE_dnslookup
+ SOURCES
+ kernel/qdnslookup.cpp kernel/qdnslookup.h kernel/qdnslookup_p.h
+)
+
+extend_target(Network CONDITION UNIX
+ SOURCES
+ kernel/qhostinfo_unix.cpp
+)
+#
+#extend_target(Network CONDITION (UNIX) AND (NOT INTEGRITY)
+#)
+
+extend_target(Network CONDITION WIN32
+ SOURCES
+ kernel/qhostinfo_win.cpp
+)
+
+extend_target(Network CONDITION WIN32 AND NOT WINRT
+ SOURCES
+ kernel/qnetworkinterface_win.cpp
+ LIBRARIES
+ dnsapi
+ iphlpapi
+)
+
+extend_target(Network CONDITION WIN32 AND NOT WINRT AND QT_FEATURE_dnslookup
+ SOURCES
+ kernel/qdnslookup_win.cpp
+)
+
+extend_target(Network CONDITION ((UNIX) AND (NOT INTEGRITY)) AND (QT_FEATURE_dnslookup)
+ SOURCES
+ kernel/qdnslookup_unix.cpp
+)
+
+extend_target(Network CONDITION (UNIX) AND (QT_FEATURE_linux_netlink)
+ SOURCES
+ kernel/qnetworkinterface_linux.cpp
+)
+
+extend_target(Network CONDITION (UNIX) AND (NOT ((UNIX) AND (QT_FEATURE_linux_netlink)))
+ SOURCES
+ kernel/qnetworkinterface_unix.cpp
+)
+#
+#extend_target(Network CONDITION ANDROID
+#)
+
+extend_target(Network CONDITION (ANDROID) AND (QT_FEATURE_dnslookup)
+ SOURCES
+ -kernel/qdnslookup_unix.cpp
+ kernel/qdnslookup_android.cpp
+)
+
+extend_target(Network CONDITION QT_FEATURE_socks5
+ SOURCES
+ socket/qsocks5socketengine.cpp socket/qsocks5socketengine_p.h
+)
+
+extend_target(Network CONDITION QT_FEATURE_http
+ SOURCES
+ socket/qhttpsocketengine.cpp socket/qhttpsocketengine_p.h
+)
+
+extend_target(Network CONDITION QT_FEATURE_sctp
+ SOURCES
+ socket/qsctpserver.cpp socket/qsctpserver.h socket/qsctpserver_p.h
+ socket/qsctpsocket.cpp socket/qsctpsocket.h socket/qsctpsocket_p.h
+)
+
+extend_target(Network CONDITION NOT WINRT
+ SOURCES
+ socket/qnativesocketengine.cpp socket/qnativesocketengine_p.h
+)
+
+extend_target(Network CONDITION UNIX
+ SOURCES
+ socket/qnativesocketengine_unix.cpp
+ socket/qnet_unix_p.h
+)
+
+### FIXME
+# extend_target(Network CONDITION msvc AND equals(QT_ARCH, i386):
+# QMAKE_LFLAGS += /BASE:0x64000000
+# )
+
+extend_target(Network CONDITION WIN32
+ SOURCES
+)
+
+extend_target(Network CONDITION (WIN32) AND (NOT WINRT)
+ SOURCES
+ socket/qnativesocketengine_win.cpp
+)
+
+extend_target(Network CONDITION WIN32
+ LIBRARIES
+ ws2_32
+)
+
+extend_target(Network CONDITION (WIN32) AND (NOT WINRT)
+ LIBRARIES
+ advapi32
+)
+
+extend_target(Network CONDITION WINRT
+ SOURCES
+ socket/qnativesocketengine_winrt.cpp socket/qnativesocketengine_winrt_p.h
+)
+
+extend_target(Network CONDITION NOT QT_FEATURE_openssl
+ SOURCES
+ ssl/qsslcertificate_qt.cpp
+)
+
+extend_target(Network CONDITION QT_FEATURE_ssl
+ SOURCES
+ ssl/qsslcipher.cpp ssl/qsslcipher.h ssl/qsslcipher_p.h
+ ssl/qsslconfiguration.cpp ssl/qsslconfiguration.h ssl/qsslconfiguration_p.h
+ ssl/qssldiffiehellmanparameters.cpp ssl/qssldiffiehellmanparameters.h ssl/qssldiffiehellmanparameters_p.h
+ ssl/qsslellipticcurve.cpp ssl/qsslellipticcurve.h
+ ssl/qsslerror.cpp ssl/qsslerror.h
+ ssl/qsslkey.h ssl/qsslkey_p.cpp ssl/qsslkey_p.h
+ ssl/qsslpresharedkeyauthenticator.cpp ssl/qsslpresharedkeyauthenticator.h ssl/qsslpresharedkeyauthenticator_p.h
+ ssl/qsslsocket.cpp ssl/qsslsocket.h ssl/qsslsocket_p.h
+)
+
+extend_target(Network CONDITION (QT_FEATURE_ssl) AND (WINRT)
+ SOURCES
+ ssl/qsslcertificate_winrt.cpp
+ ssl/qssldiffiehellmanparameters_dummy.cpp
+ ssl/qsslellipticcurve_dummy.cpp
+ ssl/qsslkey_qt.cpp
+ ssl/qsslkey_winrt.cpp
+ ssl/qsslsocket_winrt.cpp ssl/qsslsocket_winrt_p.h
+)
+
+extend_target(Network CONDITION (QT_FEATURE_ssl) AND (QT_FEATURE_securetransport)
+ SOURCES
+ ssl/qssldiffiehellmanparameters_dummy.cpp
+ ssl/qsslellipticcurve_dummy.cpp
+ ssl/qsslkey_mac.cpp
+ ssl/qsslkey_qt.cpp
+ ssl/qsslsocket_mac.cpp ssl/qsslsocket_mac_p.h
+ ssl/qsslsocket_mac_shared.cpp
+)
+
+extend_target(Network CONDITION (QT_FEATURE_ssl) AND (QT_FEATURE_dtls)
+ SOURCES
+ ssl/qdtls.cpp ssl/qdtls.h ssl/qdtls_p.h
+)
+
+extend_target(Network CONDITION (QT_FEATURE_ssl) AND (QT_FEATURE_openssl)
+ SOURCES
+ ssl/qsslcertificate_openssl.cpp
+ ssl/qsslcontext_openssl.cpp ssl/qsslcontext_openssl_p.h
+ ssl/qssldiffiehellmanparameters_openssl.cpp
+ ssl/qsslellipticcurve_openssl.cpp
+ ssl/qsslkey_openssl.cpp
+ ssl/qsslsocket_openssl.cpp ssl/qsslsocket_openssl_p.h
+ ssl/qsslsocket_openssl_symbols.cpp ssl/qsslsocket_openssl_symbols_p.h
+)
+
+extend_target(Network CONDITION ((QT_FEATURE_ssl) AND (QT_FEATURE_openssl)) AND (QT_FEATURE_dtls)
+ SOURCES
+ ssl/qdtls_openssl.cpp ssl/qdtls_openssl_p.h
+)
+
+extend_target(Network CONDITION ((QT_FEATURE_ssl) AND (QT_FEATURE_openssl)) AND (QT_FEATURE_opensslv11)
+ SOURCES
+ ssl/qsslcontext_openssl11.cpp
+ ssl/qsslsocket_openssl11.cpp
+ ssl/qsslsocket_openssl11_symbols_p.h
+)
+
+extend_target(Network CONDITION ((QT_FEATURE_ssl) AND (QT_FEATURE_openssl)) AND (NOT QT_FEATURE_opensslv11)
+ SOURCES
+ ssl/qsslcontext_opensslpre11.cpp
+ ssl/qsslsocket_opensslpre11.cpp
+ ssl/qsslsocket_opensslpre11_symbols_p.h
+)
+
+extend_target(Network CONDITION (APPLE_OSX) AND (NOT APPLE_UIKIT)
+ LIBRARIES
+ ${FWCoreServices}
+ ${FWSystemConfiguration}
+)
+
+extend_target(Network CONDITION APPLE_OSX
+ LIBRARIES
+ ${FWCoreFoundation}
+)
+
+extend_target(Network CONDITION ((QT_FEATURE_ssl) AND (QT_FEATURE_openssl)) AND (APPLE)
+ SOURCES
+ ssl/qsslsocket_mac_shared.cpp
+)
+#
+#extend_target(Network CONDITION ((QT_FEATURE_ssl) AND (QT_FEATURE_openssl)) AND (ANDROID)
+#)
+
+extend_target(Network CONDITION (((QT_FEATURE_ssl) AND (QT_FEATURE_openssl)) AND (ANDROID)) AND (NOT ANDROID_EMBEDDED)
+ SOURCES
+ ssl/qsslsocket_openssl_android.cpp
+)
+#
+#extend_target(Network CONDITION ((QT_FEATURE_ssl) AND (QT_FEATURE_openssl)) AND (QT_FEATURE_openssl_linked)
+#)
+#
+#extend_target(Network CONDITION ((QT_FEATURE_ssl) AND (QT_FEATURE_openssl)) AND (NOT (((QT_FEATURE_ssl) AND (QT_FEATURE_openssl)) AND (QT_FEATURE_openssl_linked)))
+#)
+
+extend_target(Network CONDITION ((QT_FEATURE_ssl) AND (QT_FEATURE_openssl)) AND (WIN32)
+ SOURCES
+ ssl/qwindowscarootfetcher.cpp ssl/qwindowscarootfetcher_p.h
+ LIBRARIES
+ crypt32
+)
+
+add_qt_docs(./doc/qtnetwork.qdocconf)
diff --git a/src/network/configure.cmake b/src/network/configure.cmake
new file mode 100644
index 0000000000..dd7f487fc5
--- /dev/null
+++ b/src/network/configure.cmake
@@ -0,0 +1,265 @@
+
+
+#### Inputs
+
+
+
+#### Libraries
+
+find_package(libproxy)
+set_package_properties(libproxy PROPERTIES TYPE OPTIONAL)
+find_package(OpenSSL)
+set_package_properties(OpenSSL PROPERTIES TYPE OPTIONAL)
+
+
+#### Tests
+
+# getifaddrs
+qt_config_compile_test(getifaddrs
+ LABEL "getifaddrs()"
+"
+#include <sys/types.h>
+#include <sys/socket.h>
+#include <net/if.h>
+#include <ifaddrs.h>
+
+int main(int argc, char **argv)
+{
+ (void)argc; (void)argv;
+ /* BEGIN TEST: */
+ifaddrs *list;
+getifaddrs(&list);
+freeifaddrs(list);
+ /* END TEST: */
+ return 0;
+}
+")
+
+# ipv6ifname
+qt_config_compile_test(ipv6ifname
+ LABEL "IPv6 ifname"
+"
+#include <sys/types.h>
+#include <sys/socket.h>
+#include <net/if.h>
+
+int main(int argc, char **argv)
+{
+ (void)argc; (void)argv;
+ /* BEGIN TEST: */
+char buf[IFNAMSIZ];
+if_nametoindex(\"eth0\");
+if_indextoname(1, buf);
+if_freenameindex(if_nameindex());
+ /* END TEST: */
+ return 0;
+}
+")
+
+# linux-netlink
+qt_config_compile_test(linux_netlink
+ LABEL "Linux AF_NETLINK sockets"
+"
+#include <asm/types.h>
+#include <linux/netlink.h>
+#include <linux/rtnetlink.h>
+#include <sys/socket.h>
+
+int main(int argc, char **argv)
+{
+ (void)argc; (void)argv;
+ /* BEGIN TEST: */
+struct rtattr rta = { };
+struct ifinfomsg ifi = {};
+struct ifaddrmsg ifa = {};
+struct ifa_cacheinfo ci;
+ci.ifa_prefered = ci.ifa_valid = 0;
+(void)RTM_NEWLINK; (void)RTM_NEWADDR;
+(void)IFLA_ADDRESS; (void)IFLA_IFNAME;
+(void)IFA_ADDRESS; (void)IFA_LABEL; (void)IFA_CACHEINFO;
+(void)(IFA_F_SECONDARY | IFA_F_DEPRECATED | IFA_F_PERMANENT | IFA_F_MANAGETEMPADDR);
+ /* END TEST: */
+ return 0;
+}
+")
+
+# sctp
+qt_config_compile_test(sctp
+ LABEL "SCTP support"
+"
+#include <sys/types.h>
+#include <sys/socket.h>
+#include <netinet/in.h>
+#include <netinet/sctp.h>
+
+int main(int argc, char **argv)
+{
+ (void)argc; (void)argv;
+ /* BEGIN TEST: */
+sctp_initmsg sctpInitMsg;
+socklen_t sctpInitMsgSize = sizeof(sctpInitMsg);
+(void) socket(PF_INET, SOCK_STREAM, IPPROTO_SCTP);
+(void) getsockopt(-1, SOL_SCTP, SCTP_INITMSG, &sctpInitMsg, &sctpInitMsgSize);
+ /* END TEST: */
+ return 0;
+}
+")
+
+# dtls
+qt_config_compile_test(dtls
+ LABEL "DTLS support in OpenSSL"
+"
+#include <openssl/ssl.h>
+#if defined(OPENSSL_NO_DTLS) || !defined(DTLS1_2_VERSION)
+# error OpenSSL without DTLS support
+#endif
+int main(int argc, char **argv)
+{
+ (void)argc; (void)argv;
+ /* BEGIN TEST: */
+
+ /* END TEST: */
+ return 0;
+}
+")
+
+
+
+#### Features
+
+qt_feature("corewlan" PUBLIC PRIVATE
+ LABEL "CoreWLan"
+ CONDITION libs.corewlan OR FIXME
+ EMIT_IF APPLE
+)
+qt_feature_definition("corewlan" "QT_NO_COREWLAN" NEGATE VALUE "1")
+qt_feature("getifaddrs" PUBLIC
+ LABEL "getifaddrs()"
+ CONDITION TEST_getifaddrs
+)
+qt_feature_definition("getifaddrs" "QT_NO_GETIFADDRS" NEGATE VALUE "1")
+qt_feature("ipv6ifname" PUBLIC
+ LABEL "IPv6 ifname"
+ CONDITION TEST_ipv6ifname
+)
+qt_feature_definition("ipv6ifname" "QT_NO_IPV6IFNAME" NEGATE VALUE "1")
+qt_feature("libproxy" PRIVATE
+ LABEL "libproxy"
+ AUTODETECT OFF
+ CONDITION libproxy_FOUND
+)
+qt_feature("linux_netlink" PRIVATE
+ LABEL "Linux AF_NETLINK"
+ CONDITION LINUX AND TEST_linux_netlink
+)
+qt_feature("openssl" PUBLIC PRIVATE
+ LABEL "OpenSSL"
+ AUTODETECT NOT WINRT AND NOT WASM
+ CONDITION NOT QT_FEATURE_securetransport AND ( QT_FEATURE_openssl_linked OR OPENSSL_INCLUDE_DIR )
+ ENABLE INPUT_openssl STREQUAL 'yes' OR INPUT_openssl STREQUAL 'linked' OR INPUT_openssl STREQUAL 'runtime'
+ DISABLE INPUT_openssl STREQUAL 'no' OR INPUT_ssl STREQUAL 'no'
+)
+qt_feature_definition("openssl" "QT_NO_OPENSSL" NEGATE)
+qt_feature("openssl_linked" PUBLIC PRIVATE
+ LABEL " Qt directly linked to OpenSSL"
+ CONDITION NOT QT_FEATURE_securetransport AND libs.openssl OR FIXME
+ ENABLE INPUT_openssl STREQUAL 'linked'
+ DISABLE ( NOT INPUT_openssl STREQUAL 'linked' )
+)
+qt_feature_definition("openssl_linked" "QT_LINKED_OPENSSL")
+qt_feature("securetransport" PUBLIC PRIVATE
+ LABEL "SecureTransport"
+ CONDITION APPLE AND ( INPUT_openssl STREQUAL '' OR INPUT_openssl STREQUAL 'no' )
+ DISABLE INPUT_securetransport STREQUAL 'no' OR INPUT_ssl STREQUAL 'no'
+)
+qt_feature_definition("securetransport" "QT_SECURETRANSPORT")
+qt_feature("ssl" PUBLIC
+ LABEL "SSL"
+ CONDITION WINRT OR QT_FEATURE_securetransport OR QT_FEATURE_openssl
+)
+qt_feature_definition("ssl" "QT_NO_SSL" NEGATE VALUE "1")
+qt_feature("dtls" PUBLIC
+ SECTION "Networking"
+ LABEL "DTLS"
+ PURPOSE "Provides a DTLS implementation"
+ CONDITION QT_FEATURE_openssl AND TEST_dtls
+)
+qt_feature("opensslv11" PUBLIC
+ LABEL "OpenSSL 1.1"
+ CONDITION QT_FEATURE_openssl AND ( OPENSSL_VERSION VERSION_GREATER_EQUAL "1.1.0" )
+)
+qt_feature("sctp" PUBLIC
+ LABEL "SCTP"
+ AUTODETECT OFF
+ CONDITION TEST_sctp
+)
+qt_feature_definition("sctp" "QT_NO_SCTP" NEGATE VALUE "1")
+qt_feature("system_proxies" PRIVATE
+ LABEL "Use system proxies"
+)
+qt_feature("ftp" PUBLIC
+ SECTION "Networking"
+ LABEL "FTP"
+ PURPOSE "Provides support for the File Transfer Protocol in QNetworkAccessManager."
+ CONDITION QT_FEATURE_textdate
+)
+qt_feature_definition("ftp" "QT_NO_FTP" NEGATE VALUE "1")
+qt_feature("http" PUBLIC
+ SECTION "Networking"
+ LABEL "HTTP"
+ PURPOSE "Provides support for the Hypertext Transfer Protocol in QNetworkAccessManager."
+ CONDITION QT_FEATURE_thread
+)
+qt_feature_definition("http" "QT_NO_HTTP" NEGATE VALUE "1")
+qt_feature("udpsocket" PUBLIC
+ SECTION "Networking"
+ LABEL "QUdpSocket"
+ PURPOSE "Provides access to UDP sockets."
+)
+qt_feature_definition("udpsocket" "QT_NO_UDPSOCKET" NEGATE VALUE "1")
+qt_feature("networkproxy" PUBLIC
+ SECTION "Networking"
+ LABEL "QNetworkProxy"
+ PURPOSE "Provides network proxy support."
+)
+qt_feature_definition("networkproxy" "QT_NO_NETWORKPROXY" NEGATE VALUE "1")
+qt_feature("socks5" PUBLIC
+ SECTION "Networking"
+ LABEL "SOCKS5"
+ PURPOSE "Provides SOCKS5 support in QNetworkProxy."
+ CONDITION QT_FEATURE_networkproxy
+)
+qt_feature_definition("socks5" "QT_NO_SOCKS5" NEGATE VALUE "1")
+qt_feature("networkinterface" PUBLIC
+ SECTION "Networking"
+ LABEL "QNetworkInterface"
+ PURPOSE "Supports enumerating a host's IP addresses and network interfaces."
+ CONDITION NOT WASM
+)
+qt_feature_definition("networkinterface" "QT_NO_NETWORKINTERFACE" NEGATE VALUE "1")
+qt_feature("networkdiskcache" PUBLIC
+ SECTION "Networking"
+ LABEL "QNetworkDiskCache"
+ PURPOSE "Provides a disk cache for network resources."
+ CONDITION QT_FEATURE_temporaryfile
+)
+qt_feature_definition("networkdiskcache" "QT_NO_NETWORKDISKCACHE" NEGATE VALUE "1")
+qt_feature("bearermanagement" PUBLIC
+ SECTION "Networking"
+ LABEL "Bearer management"
+ PURPOSE "Provides bearer management for the network stack."
+ CONDITION QT_FEATURE_thread AND QT_FEATURE_library AND QT_FEATURE_networkinterface AND QT_FEATURE_properties
+)
+qt_feature_definition("bearermanagement" "QT_NO_BEARERMANAGEMENT" NEGATE VALUE "1")
+qt_feature("localserver" PUBLIC
+ SECTION "Networking"
+ LABEL "QLocalServer"
+ PURPOSE "Provides a local socket based server."
+ CONDITION QT_FEATURE_temporaryfile
+)
+qt_feature_definition("localserver" "QT_NO_LOCALSERVER" NEGATE VALUE "1")
+qt_feature("dnslookup" PUBLIC
+ SECTION "Networking"
+ LABEL "QDnsLookup"
+ PURPOSE "Provides API for DNS lookups."
+)
diff --git a/src/network/configure.json b/src/network/configure.json
index 327131ba11..9acc4cd7a6 100644
--- a/src/network/configure.json
+++ b/src/network/configure.json
@@ -324,25 +324,13 @@
"report": [
{
"type": "note",
- "condition": "features.openssl-linked && libs.openssl.source != 0
- && input.openssl.prefix == '' && input.openssl.libs == '' && input.openssl.libs.debug == ''",
- "message": "When linking against OpenSSL, you can override the default
-library names through OPENSSL_LIBS.
-For example:
- OPENSSL_LIBS='-L/opt/ssl/lib -lssl -lcrypto' ./configure -openssl-linked"
+ "condition": "features.openssl-linked && libs.openssl.source != 0 && input.openssl.prefix == '' && input.openssl.libs == '' && input.openssl.libs.debug == ''",
+ "message": "When linking against OpenSSL, you can override the default library names through OPENSSL_LIBS. For example: OPENSSL_LIBS='-L/opt/ssl/lib -lssl -lcrypto' ./configure -openssl-linked"
},
{
"type": "warning",
"condition": "features.libproxy && input.qt_namespace == ''",
- "message": "Some of libproxy's plugins may use incompatible Qt versions.
-
- Some platforms and distributions ship libproxy with plugins, such
- as config_kde4.so, that are linked against old versions of Qt; and
- libproxy loads these plugins automatically when initialized. If Qt
- is not in a namespace, that loading causes a crash. Even if the
- systems on which you build and test have no such plugins, your
- users' systems may have them. We therefore recommend that you
- combine -libproxy with -qtnamespace when configuring Qt."
+ "message": "Some of libproxy's plugins may use incompatible Qt versions. Some platforms and distributions ship libproxy with plugins, such as config_kde4.so, that are linked against old versions of Qt; and libproxy loads these plugins automatically when initialized. If Qt is not in a namespace, that loading causes a crash. Even if the systems on which you build and test have no such plugins, your users' systems may have them. We therefore recommend that you combine -libproxy with -qtnamespace when configuring Qt."
}
],
diff --git a/src/opengl/CMakeLists.txt b/src/opengl/CMakeLists.txt
new file mode 100644
index 0000000000..f67fea4d16
--- /dev/null
+++ b/src/opengl/CMakeLists.txt
@@ -0,0 +1,58 @@
+# Generated from opengl.pro.
+
+#####################################################################
+## QtOpenGL Module:
+#####################################################################
+
+add_qt_module(OpenGL
+ SOURCES
+ gl2paintengineex/qgl2pexvertexarray.cpp gl2paintengineex/qgl2pexvertexarray_p.h
+ gl2paintengineex/qglcustomshaderstage.cpp gl2paintengineex/qglcustomshaderstage_p.h
+ gl2paintengineex/qglengineshadermanager.cpp gl2paintengineex/qglengineshadermanager_p.h
+ gl2paintengineex/qglengineshadersource_p.h
+ gl2paintengineex/qglgradientcache.cpp gl2paintengineex/qglgradientcache_p.h
+ gl2paintengineex/qglshadercache_p.h
+ gl2paintengineex/qpaintengineex_opengl2.cpp gl2paintengineex/qpaintengineex_opengl2_p.h
+ gl2paintengineex/qtextureglyphcache_gl.cpp gl2paintengineex/qtextureglyphcache_gl_p.h
+ qgl.cpp qgl.h qgl_p.h
+ qglbuffer.cpp qglbuffer.h
+ qglcolormap.cpp qglcolormap.h
+ qglframebufferobject.cpp qglframebufferobject.h qglframebufferobject_p.h
+ qglfunctions.cpp qglfunctions.h
+ qglpaintdevice.cpp qglpaintdevice_p.h
+ qglpixelbuffer.cpp qglpixelbuffer.h qglpixelbuffer_p.h
+ qglshaderprogram.cpp qglshaderprogram.h
+ qtopenglglobal.h
+ DEFINES
+ QT_NO_USING_NAMESPACE
+ QT_NO_FOREACH
+ LIBRARIES
+ Qt::CorePrivate
+ Qt::GuiPrivate
+ Qt::WidgetsPrivate
+)
+
+## Scopes:
+#####################################################################
+#
+#extend_target(OpenGL CONDITION MSVC
+#)
+#
+#extend_target(OpenGL CONDITION (MSVC) AND (equals(QT_ARCH, i386))
+#)
+#
+#extend_target(OpenGL CONDITION solaris-cc*
+#)
+#
+#extend_target(OpenGL CONDITION QT_FEATURE_opengl
+#)
+#
+#extend_target(OpenGL CONDITION QT_FEATURE_opengles2
+#)
+
+extend_target(OpenGL CONDITION QT_FEATURE_graphicseffect
+ SOURCES
+ qgraphicsshadereffect.cpp qgraphicsshadereffect_p.h
+)
+
+add_qt_docs(./doc/qtopengl.qdocconf)
diff --git a/src/platformheaders/CMakeLists.txt b/src/platformheaders/CMakeLists.txt
new file mode 100644
index 0000000000..493cb9f17a
--- /dev/null
+++ b/src/platformheaders/CMakeLists.txt
@@ -0,0 +1,7 @@
+# FIXME Add the rest of the stuff
+
+add_qt_module(PlatformHeaders SOURCES fake.cpp)
+
+extend_target(PlatformHeaders CONDITION APPLE SOURCES cocoafunctions/qcocoawindowfunctions.h)
+
+add_qt_docs(./doc/qtplatformheaders.qdocconf)
diff --git a/src/platformheaders/fake.cpp b/src/platformheaders/fake.cpp
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/src/platformheaders/fake.cpp
diff --git a/src/platformsupport/CMakeLists.txt b/src/platformsupport/CMakeLists.txt
new file mode 100644
index 0000000000..158cecbec0
--- /dev/null
+++ b/src/platformsupport/CMakeLists.txt
@@ -0,0 +1,23 @@
+# Generated from platformsupport.pro.
+
+qt_pull_features_into_current_scope(PRIVATE_FEATURES Qt::Gui)
+add_subdirectory(themes)
+add_subdirectory(edid)
+add_subdirectory(eventdispatchers)
+
+if(QT_FEATURE_freetype OR APPLE OR WIN32)
+ add_subdirectory(fontdatabases)
+endif()
+
+if((UNIX AND (NOT uikit)) OR QT_FEATURE_xcb)
+ add_subdirectory(services)
+endif()
+
+if(QT_FEATURE_accessibility)
+ add_subdirectory(accessibility)
+endif()
+
+if(APPLE)
+ add_subdirectory(clipboard)
+ add_subdirectory(graphics)
+endif()
diff --git a/src/platformsupport/accessibility/CMakeLists.txt b/src/platformsupport/accessibility/CMakeLists.txt
new file mode 100644
index 0000000000..453e2d1ab8
--- /dev/null
+++ b/src/platformsupport/accessibility/CMakeLists.txt
@@ -0,0 +1,16 @@
+# Generated from accessibility.pro.
+
+#####################################################################
+## QtAccessibilitySupport Module:
+#####################################################################
+
+add_qt_module(AccessibilitySupport
+ STATIC
+ SOURCES
+ qaccessiblebridgeutils.cpp qaccessiblebridgeutils_p.h
+ DEFINES
+ QT_NO_CAST_FROM_ASCII
+ LIBRARIES
+ Qt::CorePrivate
+ Qt::GuiPrivate
+)
diff --git a/src/platformsupport/clipboard/CMakeLists.txt b/src/platformsupport/clipboard/CMakeLists.txt
new file mode 100644
index 0000000000..5c960c1477
--- /dev/null
+++ b/src/platformsupport/clipboard/CMakeLists.txt
@@ -0,0 +1,27 @@
+# Generated from clipboard.pro.
+
+#####################################################################
+## QtClipboardSupport Module:
+#####################################################################
+
+find_library(FWAppKit AppKit)
+find_library(FWImageIO ImageIO)
+find_library(FWCoreFoundation CoreFoundation)
+
+add_qt_module(ClipboardSupport
+ STATIC
+ SOURCES
+ qmacmime.mm qmacmime_p.h
+ DEFINES
+ QT_NO_CAST_FROM_ASCII
+ LIBRARIES
+ Qt::CorePrivate
+ Qt::Gui
+)
+
+## Scopes:
+#####################################################################
+
+extend_target(ClipboardSupport CONDITION APPLE
+ LIBRARIES ${FWAppKit} ${FWImageIO} ${FWCoreFoundation}
+)
diff --git a/src/platformsupport/edid/CMakeLists.txt b/src/platformsupport/edid/CMakeLists.txt
new file mode 100644
index 0000000000..c5f55624c8
--- /dev/null
+++ b/src/platformsupport/edid/CMakeLists.txt
@@ -0,0 +1,15 @@
+# Generated from edid.pro.
+
+#####################################################################
+## QtEdidSupport Module:
+#####################################################################
+
+add_qt_module(EdidSupport
+ STATIC
+ SOURCES
+ qedidparser.cpp qedidparser_p.h
+ DEFINES
+ QT_NO_CAST_FROM_ASCII
+ LIBRARIES
+ Qt::CorePrivate
+)
diff --git a/src/platformsupport/eventdispatchers/CMakeLists.txt b/src/platformsupport/eventdispatchers/CMakeLists.txt
new file mode 100644
index 0000000000..54a4287ccc
--- /dev/null
+++ b/src/platformsupport/eventdispatchers/CMakeLists.txt
@@ -0,0 +1,39 @@
+# Generated from eventdispatchers.pro.
+
+find_package(GLib)
+set_package_properties(GLib PROPERTIES TYPE OPTIONAL)
+
+#####################################################################
+## QtEventDispatcherSupport Module:
+#####################################################################
+
+add_qt_module(EventDispatcherSupport
+ STATIC
+ DEFINES
+ QT_NO_CAST_FROM_ASCII
+ LIBRARIES
+ Qt::CorePrivate
+ Qt::GuiPrivate
+)
+
+## Scopes:
+#####################################################################
+
+extend_target(EventDispatcherSupport CONDITION UNIX
+ SOURCES
+ qgenericunixeventdispatcher.cpp qgenericunixeventdispatcher_p.h
+ qunixeventdispatcher.cpp
+ qunixeventdispatcher_qpa_p.h
+)
+
+extend_target(EventDispatcherSupport CONDITION NOT UNIX
+ SOURCES
+ qwindowsguieventdispatcher.cpp qwindowsguieventdispatcher_p.h
+)
+
+extend_target(EventDispatcherSupport CONDITION QT_FEATURE_glib
+ SOURCES
+ qeventdispatcher_glib.cpp qeventdispatcher_glib_p.h
+ LIBRARIES
+ PkgConfig::GLib
+)
diff --git a/src/platformsupport/fontdatabases/CMakeLists.txt b/src/platformsupport/fontdatabases/CMakeLists.txt
new file mode 100644
index 0000000000..ca54c41915
--- /dev/null
+++ b/src/platformsupport/fontdatabases/CMakeLists.txt
@@ -0,0 +1,106 @@
+# Generated from fontdatabases.pro.
+
+#####################################################################
+## QtFontDatabaseSupport Module:
+#####################################################################
+
+find_package(Freetype)
+find_library(FWCoreGraphics CoreGraphics)
+find_library(FWCoreFoundation CoreFoundation)
+find_library(FWCoreText CoreText)
+find_library(FWFoundation Foundation)
+find_library(FWAppKit AppKit)
+
+add_qt_module(FontDatabaseSupport
+ STATIC
+ SOURCES fake.cpp
+ DEFINES
+ QT_NO_CAST_FROM_ASCII
+ LIBRARIES
+ Qt::CorePrivate
+ Qt::GuiPrivate
+)
+
+extend_target(FontDatabaseSupport CONDITION APPLE
+ SOURCES
+ mac/qcoretextfontdatabase.mm mac/qcoretextfontdatabase_p.h
+ mac/qfontengine_coretext.mm mac/qfontengine_coretext_p.h
+ LIBRARIES
+ ${FWCoreFoundation}
+ ${FWCoreGraphics}
+ ${FWCoreText}
+ ${FWFoundation}
+ ${FWAppKit}
+)
+
+extend_target(FontDatabaseSupport CONDITION APPLE AND QT_FEATURE_freetype
+ SOURCES
+ freetype/qfontengine_ft.cpp freetype/qfontengine_ft_p.h
+ LIBRARIES
+ Freetype::Freetype
+)
+
+extend_target(FontDatabaseSupport CONDITION QT_FEATURE_freetype
+ SOURCES
+ freetype/qfontengine_ft.cpp freetype/qfontengine_ft_p.h
+ freetype/qfreetypefontdatabase.cpp freetype/qfreetypefontdatabase_p.h
+ LIBRARIES
+ Freetype::Freetype
+)
+
+extend_target(FontDatabaseSupport CONDITION UNIX
+ SOURCES
+ genericunix/qgenericunixfontdatabase_p.h
+)
+
+extend_target(FontDatabaseSupport CONDITION UNIX AND QT_FEATURE_fontconfig
+ SOURCES
+ fontconfig/qfontconfigdatabase.cpp fontconfig/qfontconfigdatabase_p.h
+ fontconfig/qfontenginemultifontconfig.cpp fontconfig/qfontenginemultifontconfig_p.h
+ LIBRARIES
+ fontconfig
+)
+
+#extend_target(FontDatabaseSupport CONDITION WIN32
+#)
+
+#extend_target(FontDatabaseSupport CONDITION (WIN32) AND (NOT WINRT)
+# SOURCES
+# qwindowsfontdatabase.cpp qwindowsfontdatabase_p.h
+# qwindowsfontengine.cpp qwindowsfontengine_p.h
+# qwindowsnativeimage.cpp qwindowsnativeimage_p.h
+# LIBRARIES
+# Qt::GuiPrivate
+#)
+
+#extend_target(FontDatabaseSupport CONDITION ((WIN32) AND (NOT WINRT)) AND (QT_FEATURE_freetype)
+# SOURCES
+# qwindowsfontdatabase_ft.cpp qwindowsfontdatabase_ft_p.h
+#)
+
+#extend_target(FontDatabaseSupport CONDITION ((WIN32) AND (NOT WINRT)) AND (QT_FEATURE_directwrite)
+# SOURCES
+# qwindowsfontenginedirectwrite.cpp qwindowsfontenginedirectwrite_p.h
+#)
+
+#extend_target(FontDatabaseSupport CONDITION (((WIN32) AND (NOT WINRT)) AND (QT_FEATURE_directwrite)) AND (QT_FEATURE_directwrite2)
+# DEFINES
+# QT_USE_DIRECTWRITE2
+#)
+
+#extend_target(FontDatabaseSupport CONDITION ((WIN32) AND (NOT WINRT)) AND (NOT QT_FEATURE_directwrite)
+# DEFINES
+# QT_NO_DIRECTWRITE
+#)
+##
+##extend_target(FontDatabaseSupport CONDITION ((WIN32) AND (NOT WINRT)) AND (mingw)
+##)
+
+#extend_target(FontDatabaseSupport CONDITION WINRT
+# SOURCES
+# qwinrtfontdatabase.cpp qwinrtfontdatabase_p.h
+# DEFINES
+# __WRL_NO_DEFAULT_LIB__
+# LIBRARIES
+# Qt::GuiPrivate
+#)
diff --git a/src/platformsupport/fontdatabases/fake.cpp b/src/platformsupport/fontdatabases/fake.cpp
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/src/platformsupport/fontdatabases/fake.cpp
diff --git a/src/platformsupport/graphics/CMakeLists.txt b/src/platformsupport/graphics/CMakeLists.txt
new file mode 100644
index 0000000000..2846fc024b
--- /dev/null
+++ b/src/platformsupport/graphics/CMakeLists.txt
@@ -0,0 +1,15 @@
+# Generated from graphics.pro.
+
+#####################################################################
+## QtGraphicsSupport Module:
+#####################################################################
+
+add_qt_module(GraphicsSupport
+ SOURCES
+ qrasterbackingstore.cpp qrasterbackingstore_p.h
+ DEFINES
+ QT_NO_CAST_FROM_ASCII
+ LIBRARIES
+ Qt::CorePrivate
+ Qt::GuiPrivate
+)
diff --git a/src/platformsupport/services/CMakeLists.txt b/src/platformsupport/services/CMakeLists.txt
new file mode 100644
index 0000000000..afa5bc166d
--- /dev/null
+++ b/src/platformsupport/services/CMakeLists.txt
@@ -0,0 +1,24 @@
+# Generated from services.pro.
+
+#####################################################################
+## QtServiceSupport Module:
+#####################################################################
+
+add_qt_module(ServiceSupport
+ STATIC
+ SOURCES
+ genericunix/qgenericunixservices.cpp genericunix/qgenericunixservices_p.h
+ DEFINES
+ QT_NO_CAST_FROM_ASCII
+ LIBRARIES
+ Qt::CorePrivate
+ Qt::GuiPrivate
+)
+
+## Scopes:
+#####################################################################
+
+extend_target(ServiceSupport CONDITION QT_FEATURE_dbus
+ LIBRARIES
+ Qt::DBus
+)
diff --git a/src/platformsupport/themes/CMakeLists.txt b/src/platformsupport/themes/CMakeLists.txt
new file mode 100644
index 0000000000..db9f84a5b7
--- /dev/null
+++ b/src/platformsupport/themes/CMakeLists.txt
@@ -0,0 +1,55 @@
+# Generated from themes.pro.
+
+#####################################################################
+## QtThemeSupport Module:
+#####################################################################
+
+add_qt_module(ThemeSupport
+ STATIC
+ SOURCES
+ qabstractfileiconengine.cpp qabstractfileiconengine_p.h
+ DEFINES
+ QT_NO_CAST_FROM_ASCII
+ LIBRARIES
+ Qt::CorePrivate
+ Qt::GuiPrivate
+)
+
+## Scopes:
+#####################################################################
+#
+#extend_target(ThemeSupport CONDITION if(unix
+#)
+
+extend_target(ThemeSupport CONDITION (UNIX AND (NOT APPLE_UIKIT)) OR QT_FEATURE_xcb
+ SOURCES
+ genericunix/qgenericunixthemes.cpp genericunix/qgenericunixthemes_p.h
+)
+
+extend_target(ThemeSupport CONDITION ((UNIX AND (NOT APPLE_UIKIT)) OR QT_FEATURE_xcb) AND QT_FEATURE_dbus
+ SOURCES
+ genericunix/dbusmenu/qdbusmenuadaptor.cpp genericunix/dbusmenu/qdbusmenuadaptor.cpp genericunix/dbusmenu/qdbusmenuadaptor_p.h genericunix/dbusmenu/qdbusmenuadaptor_p.h
+ genericunix/dbusmenu/qdbusmenubar.cpp genericunix/dbusmenu/qdbusmenubar.cpp genericunix/dbusmenu/qdbusmenubar_p.h genericunix/dbusmenu/qdbusmenubar_p.h
+ genericunix/dbusmenu/qdbusmenuconnection.cpp genericunix/dbusmenu/qdbusmenuconnection.cpp genericunix/dbusmenu/qdbusmenuconnection_p.h genericunix/dbusmenu/qdbusmenuconnection_p.h
+ genericunix/dbusmenu/qdbusmenuregistrarproxy.cpp genericunix/dbusmenu/qdbusmenuregistrarproxy.cpp genericunix/dbusmenu/qdbusmenuregistrarproxy_p.h genericunix/dbusmenu/qdbusmenuregistrarproxy_p.h
+ genericunix/dbusmenu/qdbusmenutypes.cpp genericunix/dbusmenu/qdbusmenutypes.cpp genericunix/dbusmenu/qdbusmenutypes_p.h genericunix/dbusmenu/qdbusmenutypes_p.h
+ genericunix/dbusmenu/qdbusplatformmenu.cpp genericunix/dbusmenu/qdbusplatformmenu.cpp genericunix/dbusmenu/qdbusplatformmenu_p.h genericunix/dbusmenu/qdbusplatformmenu_p.h
+ INCLUDE_DIRECTORIES
+ genericunix/dbusmenu/
+ genericunix/dbusmenu/
+ LIBRARIES
+ Qt::DBus
+)
+
+extend_target(ThemeSupport CONDITION ((UNIX AND (NOT APPLE_UIKIT)) OR QT_FEATURE_xcb) AND QT_FEATURE_dbus AND QT_FEATURE_systemtrayicon
+ SOURCES
+ genericunix/dbustray/qdbustrayicon.cpp genericunix/dbustray/qdbustrayicon.cpp genericunix/dbustray/qdbustrayicon_p.h genericunix/dbustray/qdbustrayicon_p.h
+ genericunix/dbustray/qdbustraytypes.cpp genericunix/dbustray/qdbustraytypes.cpp genericunix/dbustray/qdbustraytypes_p.h genericunix/dbustray/qdbustraytypes_p.h
+ genericunix/dbustray/qstatusnotifieritemadaptor.cpp genericunix/dbustray/qstatusnotifieritemadaptor.cpp genericunix/dbustray/qstatusnotifieritemadaptor_p.h genericunix/dbustray/qstatusnotifieritemadaptor_p.h
+ genericunix/dbustray/qxdgnotificationproxy.cpp genericunix/dbustray/qxdgnotificationproxy.cpp genericunix/dbustray/qxdgnotificationproxy_p.h genericunix/dbustray/qxdgnotificationproxy_p.h
+ INCLUDE_DIRECTORIES
+ genericunix/dbustray/
+ genericunix/dbustray/
+ LIBRARIES
+ Qt::DBus
+)
diff --git a/src/plugins/CMakeLists.txt b/src/plugins/CMakeLists.txt
new file mode 100644
index 0000000000..ff9afb9c89
--- /dev/null
+++ b/src/plugins/CMakeLists.txt
@@ -0,0 +1,3 @@
+if(QT_FEATURE_gui)
+ add_subdirectory(platforms)
+endif()
diff --git a/src/plugins/platforms/CMakeLists.txt b/src/plugins/platforms/CMakeLists.txt
new file mode 100644
index 0000000000..f0ac297d17
--- /dev/null
+++ b/src/plugins/platforms/CMakeLists.txt
@@ -0,0 +1,10 @@
+qt_pull_features_into_current_scope(PRIVATE_FEATURES Qt::Gui)
+
+if(QT_FEATURE_xcb)
+ add_subdirectory(xcb)
+endif()
+
+if(APPLE)
+ add_subdirectory(cocoa)
+endif(APPLE)
+
diff --git a/src/plugins/platforms/cocoa/CMakeLists.txt b/src/plugins/platforms/cocoa/CMakeLists.txt
new file mode 100644
index 0000000000..66cc2bcd89
--- /dev/null
+++ b/src/plugins/platforms/cocoa/CMakeLists.txt
@@ -0,0 +1,115 @@
+find_package(OpenGL)
+find_library(FWAppkit AppKit)
+find_library(FWCoreServices CoreServices)
+find_library(FWCarbon Carbon)
+find_library(FWIOKit IOKit)
+find_library(FWQuartzCore QuartzCore)
+find_library(FWCoreVideo CoreVideo)
+find_library(FWMetal Metal)
+find_library(FWcups cups)
+
+add_qt_plugin(qcocoa
+ TYPE platforms
+ SOURCES
+ main.mm
+ messages.cpp messages.h
+ qcocoaaccessibility.h qcocoaaccessibility.mm
+ qcocoaaccessibilityelement.h qcocoaaccessibilityelement.mm
+ qcocoaapplication.h qcocoaapplication.mm
+ qcocoaapplicationdelegate.h qcocoaapplicationdelegate.mm
+ qcocoabackingstore.h qcocoabackingstore.mm
+ qcocoaclipboard.h qcocoaclipboard.mm
+ qcocoacursor.h qcocoacursor.mm
+ qcocoadrag.h qcocoadrag.mm
+ qcocoaeventdispatcher.h qcocoaeventdispatcher.mm
+ qcocoahelpers.h qcocoahelpers.mm
+ qcocoainputcontext.h qcocoainputcontext.mm
+ qcocoaintegration.h qcocoaintegration.mm
+ qcocoaintrospection.h qcocoaintrospection.mm
+ qcocoakeymapper.h qcocoakeymapper.mm
+ qcocoamenu.h qcocoamenu.mm
+ qcocoamenubar.h qcocoamenubar.mm
+ qcocoamenuitem.h qcocoamenuitem.mm
+ qcocoamenuloader.h qcocoamenuloader.mm
+ qcocoamimetypes.h qcocoamimetypes.mm
+ qcocoanativeinterface.h qcocoanativeinterface.mm
+ qcocoansmenu.h qcocoansmenu.mm
+ qcocoascreen.h qcocoascreen.mm
+ qcocoaservices.h qcocoaservices.mm
+ qcocoasystemsettings.h qcocoasystemsettings.mm
+ qcocoasystemtrayicon.h qcocoasystemtrayicon.mm
+ qcocoatheme.h qcocoatheme.mm
+ qcocoawindow.h qcocoawindow.mm
+ qmacclipboard.h qmacclipboard.mm
+ qmultitouch_mac.mm qmultitouch_mac_p.h
+ qnsview.h qnsview.mm
+ qnswindow.h qnswindow.mm
+ qnswindowdelegate.h qnswindowdelegate.mm
+ LIBRARIES
+ Qt::CorePrivate
+ Qt::GuiPrivate
+ Qt::AccessibilitySupportPrivate
+ Qt::ClipboardSupportPrivate
+ Qt::ThemeSupportPrivate
+ Qt::FontDatabaseSupportPrivate
+ Qt::GraphicsSupportPrivate
+ Qt::PlatformHeaders
+ ${FWAppKit}
+ ${FWCoreServices}
+ ${FWCarbon}
+ ${FWIOKit}
+ ${FWQuartzCore}
+ ${FWCoreVideo}
+ ${FWMetal}
+ ${FWcups}
+)
+
+add_qt_resource(qcocoa qcocoaresources PREFIX "/qt-project.org/mac/cursors"
+ FILES images/spincursor.png images/waitcursor.png images/sizeallcursor.png
+)
+
+extend_target(qcocoa CONDITION QT_FEATURE_opengl
+ SOURCES
+ qcocoaglcontext.h qcocoaglcontext.mm
+ LIBRARIES
+ OpenGL::GL
+)
+
+extend_target(qcocoa CONDITION QT_FEATURE_vulkan
+ SOURCES
+ qcocoavulkaninstance.h qcocoavulkaninstance.mm
+)
+
+extend_target(qcocoa CONDITION QT_FEATURE_vulkan
+ LIBRARIES
+ vulkan_support_private
+)
+
+extend_target(qcocoa CONDITION QT_FEATURE_widgets
+ SOURCES
+ qcocoaprintdevice.h qcocoaprintdevice.mm
+ qcocoaprintersupport.h qcocoaprintersupport.mm
+ qpaintengine_mac.mm qpaintengine_mac_p.h
+ qprintengine_mac.mm qprintengine_mac_p.h
+ LIBRARIES
+ Qt::WidgetsPrivate
+ Qt::PrintSupportPrivate
+)
+
+extend_target(qcocoa CONDITION (QT_FEATURE_widgets) AND (QT_FEATURE_colordialog)
+ SOURCES
+ qcocoacolordialoghelper.h qcocoacolordialoghelper.mm
+)
+
+extend_target(qcocoa CONDITION (QT_FEATURE_widgets) AND (QT_FEATURE_filedialog)
+ SOURCES
+ qcocoafiledialoghelper.h qcocoafiledialoghelper.mm
+)
+
+extend_target(qcocoa CONDITION (QT_FEATURE_widgets) AND (QT_FEATURE_fontdialog)
+ SOURCES
+ qcocoafontdialoghelper.h qcocoafontdialoghelper.mm
+)
+
+#extend_target(qcocoa CONDITION NOT equals(TARGET, $$QT_DEFAULT_QPA_PLUGIN)
+#)
diff --git a/src/plugins/platforms/xcb/CMakeLists.txt b/src/plugins/platforms/xcb/CMakeLists.txt
new file mode 100644
index 0000000000..90c924b4b1
--- /dev/null
+++ b/src/plugins/platforms/xcb/CMakeLists.txt
@@ -0,0 +1,172 @@
+# Generated from xcb_qpa_lib.pro.
+
+#####################################################################
+## QtXcbQpa Module:
+#####################################################################
+find_package(X11_XCB)
+find_package(X11)
+find_package(XCB)
+find_package(XKB)
+find_package(PkgConfig)
+
+pkg_check_modules(XKB_COMMON_X11 xkbcommon-x11>=0.4.1 IMPORTED_TARGET)
+
+add_qt_module(XcbQpa
+ NO_MODULE_HEADERS
+ SOURCES
+ gl_integrations/qxcbglintegration.cpp gl_integrations/qxcbglintegration.h
+ gl_integrations/qxcbglintegrationfactory.cpp gl_integrations/qxcbglintegrationfactory.h
+ gl_integrations/qxcbglintegrationplugin.h
+ gl_integrations/qxcbnativeinterfacehandler.cpp gl_integrations/qxcbnativeinterfacehandler.h
+ qxcbbackingstore.cpp qxcbbackingstore.h
+ qxcbclipboard.cpp qxcbclipboard.h
+ qxcbconnection.cpp qxcbconnection.h
+ qxcbcursor.cpp qxcbcursor.h
+ qxcbimage.cpp qxcbimage.h
+ qxcbintegration.cpp qxcbintegration.h
+ qxcbkeyboard.cpp qxcbkeyboard.h
+ qxcbmime.cpp qxcbmime.h
+ qxcbnativeinterface.cpp qxcbnativeinterface.h
+ qxcbobject.h
+ qxcbscreen.cpp qxcbscreen.h
+ qxcbsystemtraytracker.cpp qxcbsystemtraytracker.h
+ qxcbwindow.cpp qxcbwindow.h
+ qxcbwmsupport.cpp qxcbwmsupport.h
+ qxcbxkbcommon.h
+ qxcbxsettings.cpp qxcbxsettings.h
+ DEFINES
+ QT_NO_FOREACH
+ QT_BUILD_XCB_PLUGIN
+ INCLUDE_DIRECTORIES
+ gl_integrations/
+ LIBRARIES
+ Qt::CorePrivate
+ Qt::GuiPrivate
+ Qt::ServiceSupportPrivate
+ Qt::ThemeSupportPrivate
+ Qt::EventDispatcherSupportPrivate
+ Qt::FontDatabaseSupportPrivate
+ Qt::EdidSupportPrivate
+ X11::XCB
+ XCB::XCB
+ XCB::SHAPE
+ XCB::ICCCM
+ XCB::RANDR
+ XCB::XKB
+ XCB::SYNC
+ XCB::XFIXES
+ XCB::XINERAMA
+ XCB::SHM
+ XCB::IMAGE
+ XCB::RENDER
+ XCB::RENDERUTIL
+ XCB::KEYSYMS
+ XKB::XKB
+ PkgConfig::XKB_COMMON_X11
+)
+
+## Scopes:
+#####################################################################
+
+extend_target(XcbQpa CONDITION TARGET Qt::linuxaccessibility_support_private
+ LIBRARIES
+ linuxaccessibility_supportPrivate
+)
+
+extend_target(XcbQpa CONDITION QT_FEATURE_vulkan
+ LIBRARIES
+ vulkan_supportPrivate
+)
+
+extend_target(XcbQpa CONDITION QT_FEATURE_draganddrop
+ SOURCES
+ qxcbdrag.cpp qxcbdrag.h
+)
+#
+#extend_target(XcbQpa CONDITION QT_FEATURE_xcb_xlib
+#)
+
+extend_target(XcbQpa CONDITION QT_FEATURE_xcb_xinput
+ SOURCES
+ qxcbconnection_xi2.cpp
+)
+
+extend_target(XcbQpa CONDITION QT_FEATURE_xcb_sm
+ SOURCES
+ qxcbsessionmanager.cpp qxcbsessionmanager.h
+ LIBRARIES
+ ${X11_SM_LIB} ${X11_ICE_LIB}
+)
+
+extend_target(XcbQpa CONDITION QT_FEATURE_vulkan
+ SOURCES
+ qxcbvulkaninstance.cpp qxcbvulkaninstance.h
+ qxcbvulkanwindow.cpp qxcbvulkanwindow.h
+)
+#
+#extend_target(XcbQpa CONDITION NOT QT_FEATURE_system_xcb
+#)
+#
+#extend_target(XcbQpa CONDITION NOT NOT QT_FEATURE_system_xcb
+#)
+#
+#extend_target(XcbQpa CONDITION (NOT NOT QT_FEATURE_system_xcb) AND (QT_FEATURE_xkb)
+#)
+#
+#extend_target(XcbQpa CONDITION (NOT NOT QT_FEATURE_system_xcb) AND (QT_FEATURE_xcb_render)
+#)
+#
+#extend_target(XcbQpa CONDITION (NOT NOT QT_FEATURE_system_xcb) AND (QT_FEATURE_xcb_xinput)
+#)
+#
+#extend_target(XcbQpa CONDITION NOT QT_FEATURE_xkbcommon_system
+#)
+
+extend_target(XcbQpa CONDITION (NOT QT_FEATURE_xkbcommon_system) AND (QT_FEATURE_xkb)
+ INCLUDE_DIRECTORIES
+ ../../../3rdparty/xkbcommon/src/x11
+)
+
+extend_target(XcbQpa CONDITION (NOT QT_FEATURE_xkbcommon_system) AND (NOT QT_FEATURE_xkb)
+ INCLUDE_DIRECTORIES
+ ../../../3rdparty/xkbcommon
+ ../../../3rdparty/xkbcommon/xkbcommon
+ ../../../3rdparty/xkbcommon/src
+ ../../../3rdparty/xkbcommon/src/xkbcomp
+)
+#
+#extend_target(XcbQpa CONDITION NOT NOT QT_FEATURE_xkbcommon_system
+#)
+#
+#extend_target(XcbQpa CONDITION QT_FEATURE_dlopen
+#)
+
+extend_target(XcbQpa CONDITION QT_FEATURE_xcb_native_painting
+ SOURCES
+ nativepainting/qbackingstore_x11.cpp nativepainting/qbackingstore_x11_p.h
+ nativepainting/qcolormap_x11.cpp nativepainting/qcolormap_x11_p.h
+ nativepainting/qpaintengine_x11.cpp nativepainting/qpaintengine_x11_p.h
+ nativepainting/qpixmap_x11.cpp nativepainting/qpixmap_x11_p.h
+ nativepainting/qt_x11_p.h
+ nativepainting/qtessellator.cpp nativepainting/qtessellator_p.h
+ nativepainting/qxcbnativepainting.cpp nativepainting/qxcbnativepainting.h
+ INCLUDE_DIRECTORIES
+ nativepainting/
+)
+#
+#extend_target(XcbQpa CONDITION (QT_FEATURE_xcb_native_painting) AND (QT_FEATURE_xrender)
+#)
+
+extend_target(XcbQpa CONDITION (QT_FEATURE_xcb_native_painting) AND (QT_FEATURE_fontconfig)
+ LIBRARIES
+ freetype
+)
+
+add_qt_plugin(qxcb
+ TYPE platforms
+ SOURCES
+ qxcbmain.cpp
+ LIBRARIES
+ Qt::XcbQpa
+ Qt::GuiPrivate
+)
diff --git a/src/plugins/sqldrivers/configure.json b/src/plugins/sqldrivers/configure.json
index 4802d3b04d..417d894978 100644
--- a/src/plugins/sqldrivers/configure.json
+++ b/src/plugins/sqldrivers/configure.json
@@ -221,9 +221,7 @@
{
"type": "warning",
"condition": "config.win32 && !config.msvc && features.sql-oci",
- "message": "Qt does not support compiling the Oracle database driver with
-MinGW, due to lack of such support from Oracle. Consider disabling the
-Oracle driver, as the current build will most likely fail."
+ "message": "Qt does not support compiling the Oracle database driver with MinGW, due to lack of such support from Oracle. Consider disabling the Oracle driver, as the current build will most likely fail."
}
],
diff --git a/src/testlib/CMakeLists.txt b/src/testlib/CMakeLists.txt
new file mode 100644
index 0000000000..3650fd0e37
--- /dev/null
+++ b/src/testlib/CMakeLists.txt
@@ -0,0 +1,89 @@
+#####################################################################
+## Test Module:
+#####################################################################
+
+add_qt_module(Test
+ # Typically the Qt module name results in qt${module}-config.h, but
+ # testlib is an exception where QtTest uses qttestlib-config.h.
+ CONFIG_MODULE_NAME "testlib"
+ SOURCES
+ qabstracttestlogger.cpp
+ qasciikey.cpp
+ qbenchmark.cpp qbenchmark.h qbenchmark_p.h
+ qbenchmarkevent.cpp qbenchmarkevent_p.h
+ qbenchmarkmeasurement.cpp qbenchmarkmeasurement_p.h
+ qbenchmarkmetric.cpp qbenchmarkmetric.h qbenchmarkmetric_p.h
+ qbenchmarkperfevents.cpp qbenchmarkperfevents_p.h
+ qbenchmarktimemeasurers_p.h
+ qbenchmarkvalgrind.cpp qbenchmarkvalgrind_p.h
+ qcsvbenchmarklogger.cpp
+ qplaintestlogger.cpp
+ qsignaldumper.cpp
+ qsignalspy.h
+ qtaptestlogger.cpp qtaptestlogger_p.h
+ qteamcitylogger.cpp
+ qtest.h
+ qtest_gui.h
+ qtest_network.h
+ qtest_widgets.h
+ qtestaccessible.h
+ qtestassert.h
+ qtestblacklist.cpp qtestblacklist_p.h
+ qtestcase.cpp qtestcase.h
+ qtestdata.cpp qtestdata.h
+ qtestelement.cpp
+ qtestelementattribute.cpp
+ qtestevent.h
+ qtesteventloop.h
+ qtesthelpers_p.h
+ qtestkeyboard.h
+ qtestlog.cpp
+ qtestmouse.cpp qtestmouse.h
+ qtestresult.cpp
+ qtestspontaneevent.h
+ qtestsystem.h
+ qtesttable.cpp
+ qtesttouch.h
+ qtestxunitstreamer.cpp
+ qttestglobal.h
+ qxmltestlogger.cpp
+ qxunittestlogger.cpp
+ LIBRARIES
+ CorePrivate
+ PUBLIC_LIBRARIES
+ Core
+ DEFINES
+ QT_NO_CAST_TO_ASCII QT_NO_CAST_FROM_ASCII
+ QT_NO_FOREACH
+ QT_NO_DATASTREAM
+)
+
+# Typically the module name is also the define symbol, but testlib works
+# differently and uses QT_BUILD_TESTLIB_LIB, derived from the name testlib.pro.
+set_target_properties(Test PROPERTIES DEFINE_SYMBOL QT_BUILD_TESTLIB_LIB)
+
+### Platform support:
+#####################################################################
+extend_target(Test CONDITION APPLE
+ SOURCES
+ qappletestlogger.cpp qappletestlogger_p.h
+ LIBRARIES ${FWSecurity}
+
+ # FIXME: Skip XCTEST support, disabled in qmake build system
+)
+
+extend_target(Test CONDITION APPLE_OSX
+ SOURCES qtestutil_macos.mm qtestutil_macos_p.h
+ LIBRARIES ${FWFoundation} ${FWApplicationServices} ${FWIOKit}
+)
+
+
+### Feature support:
+#####################################################################
+
+## itemmodeltester:
+extend_target(Test CONDITION QT_FEATURE_itemmodeltester
+ SOURCES qabstractitemmodeltester.cpp qabstractitemmodeltester.h
+)
+
+add_qt_docs(./doc/qttestlib.qdocconf)
diff --git a/src/testlib/configure.cmake b/src/testlib/configure.cmake
new file mode 100644
index 0000000000..2509e11330
--- /dev/null
+++ b/src/testlib/configure.cmake
@@ -0,0 +1,21 @@
+
+
+#### Inputs
+
+
+
+#### Libraries
+
+
+
+#### Tests
+
+
+
+#### Features
+
+qt_feature("itemmodeltester" PUBLIC
+ LABEL "Tester for item models"
+ PURPOSE "Provides a utility to test item models."
+ CONDITION QT_FEATURE_itemmodel
+)
diff --git a/src/tools/CMakeLists.txt b/src/tools/CMakeLists.txt
new file mode 100644
index 0000000000..6c8866b371
--- /dev/null
+++ b/src/tools/CMakeLists.txt
@@ -0,0 +1,2 @@
+add_subdirectory(uic)
+add_subdirectory(qvkgen)
diff --git a/src/tools/bootstrap/CMakeLists.txt b/src/tools/bootstrap/CMakeLists.txt
new file mode 100644
index 0000000000..e85f7e9e16
--- /dev/null
+++ b/src/tools/bootstrap/CMakeLists.txt
@@ -0,0 +1,151 @@
+
+if(WIN32)
+ set(os_sources
+ ../../corelib/global/qoperatingsystemversion_win.cpp
+ ../../corelib/io/qfilesystemengine_win.cpp
+ ../../corelib/io/qfilesystemiterator_win.cpp
+ ../../corelib/io/qfsfileengine_win.cpp
+ ../../corelib/kernel/qcoreapplication_win.cpp
+ ../../corelib/plugin/qsystemlibrary.cpp
+ ../../corelib/io/qstandardpaths_win.cpp
+ )
+ set(os_libs user32 ole32 advapi32 shell32 netapi32)
+else()
+ set(os_sources
+ ../../corelib/kernel/qcore_unix.cpp
+ ../../corelib/io/qfilesystemengine_unix.cpp
+ ../../corelib/io/qfilesystemiterator_unix.cpp
+ ../../corelib/io/qfsfileengine_unix.cpp
+ )
+
+ if(APPLE)
+ list(APPEND os_sources
+ ../../corelib/global/qoperatingsystemversion_darwin.mm
+ ../../corelib/io/qstandardpaths_mac.mm
+ ../../corelib/kernel/qcoreapplication_mac.cpp
+ ../../corelib/kernel/qcore_mac.cpp
+ ../../corelib/kernel/qcore_mac_objc.mm
+ ../../corelib/kernel/qcore_foundation.mm
+ ../../corelib/io/qurl.cpp
+ )
+ else()
+ list(APPEND os_sources ../../corelib/io/qstandardpaths_unix.cpp)
+ endif()
+ set(os_libs "")
+endif()
+
+add_library(QtBootstrap STATIC
+ ../../corelib/codecs/qlatincodec.cpp
+ ../../corelib/codecs/qtextcodec.cpp
+ ../../corelib/codecs/qutfcodec.cpp
+ ../../corelib/global/qendian.cpp
+ ../../corelib/global/qglobal.cpp
+ ../../corelib/global/qlogging.cpp
+ ../../corelib/global/qmalloc.cpp
+ ../../corelib/global/qnumeric.cpp
+ ../../corelib/global/qoperatingsystemversion.cpp
+ ../../corelib/global/qrandom.cpp
+ ../../corelib/io/qabstractfileengine.cpp
+ ../../corelib/io/qbuffer.cpp
+ ../../corelib/io/qdebug.cpp
+ ../../corelib/io/qdir.cpp
+ ../../corelib/io/qdiriterator.cpp
+ ../../corelib/io/qfile.cpp
+ ../../corelib/io/qfileinfo.cpp
+ ../../corelib/io/qfilesystementry.cpp
+ ../../corelib/io/qfilesystemengine.cpp
+ ../../corelib/io/qfsfileengine.cpp
+ ../../corelib/io/qfsfileengine_iterator.cpp
+ ../../corelib/io/qiodevice.cpp
+ ../../corelib/io/qfiledevice.cpp
+ ../../corelib/io/qresource.cpp
+ ../../corelib/io/qtemporarydir.cpp
+ ../../corelib/io/qtemporaryfile.cpp
+ ../../corelib/io/qsavefile.cpp
+ ../../corelib/io/qstandardpaths.cpp
+ ../../corelib/io/qloggingcategory.cpp
+ ../../corelib/io/qloggingregistry.cpp
+ ../../corelib/kernel/qcoreapplication.cpp
+ ../../corelib/kernel/qcoreglobaldata.cpp
+ ../../corelib/kernel/qmetatype.cpp
+ ../../corelib/kernel/qvariant.cpp
+ ../../corelib/kernel/qsystemerror.cpp
+ ../../corelib/plugin/quuid.cpp
+ ../../corelib/serialization/qdatastream.cpp
+ ../../corelib/serialization/qjson.cpp
+ ../../corelib/serialization/qjsondocument.cpp
+ ../../corelib/serialization/qjsonobject.cpp
+ ../../corelib/serialization/qjsonarray.cpp
+ ../../corelib/serialization/qjsonvalue.cpp
+ ../../corelib/serialization/qjsonparser.cpp
+ ../../corelib/serialization/qjsonwriter.cpp
+ ../../corelib/serialization/qtextstream.cpp
+ ../../corelib/serialization/qxmlutils.cpp
+ ../../corelib/serialization/qxmlstream.cpp
+ ../../corelib/tools/qbitarray.cpp
+ ../../corelib/tools/qbytearray.cpp
+ ../../corelib/tools/qarraydata.cpp
+ ../../corelib/tools/qbytearraymatcher.cpp
+ ../../corelib/tools/qcommandlineparser.cpp
+ ../../corelib/tools/qcommandlineoption.cpp
+ ../../corelib/tools/qcryptographichash.cpp
+ ../../corelib/tools/qdatetime.cpp
+ ../../corelib/tools/qhash.cpp
+ ../../corelib/tools/qlist.cpp
+ ../../corelib/tools/qlinkedlist.cpp
+ ../../corelib/tools/qlocale.cpp
+ ../../corelib/tools/qlocale_tools.cpp
+ ../../corelib/tools/qmap.cpp
+ ../../corelib/tools/qregexp.cpp
+ ../../corelib/tools/qringbuffer.cpp
+ ../../corelib/tools/qpoint.cpp
+ ../../corelib/tools/qrect.cpp
+ ../../corelib/tools/qsize.cpp
+ ../../corelib/tools/qline.cpp
+ ../../corelib/tools/qstring.cpp
+ ../../corelib/tools/qstringbuilder.cpp
+ ../../corelib/tools/qstring_compat.cpp
+ ../../corelib/tools/qstringlist.cpp
+ ../../corelib/tools/qversionnumber.cpp
+ ../../corelib/tools/qvsnprintf.cpp
+ ../../xml/dom/qdom.cpp
+ ../../xml/sax/qxml.cpp
+ ${os_sources}
+)
+
+add_library(Qt::Bootstrap ALIAS QtBootstrap)
+
+qt_ensure_perl()
+foreach(module QtCore QtXml)
+ execute_process(COMMAND "${HOST_PERL}" -w "${PROJECT_SOURCE_DIR}/bin/syncqt.pl" -quiet -minimal -module "${module}" -version "${PROJECT_VERSION}" -outdir "${PROJECT_BINARY_DIR}" "${PROJECT_SOURCE_DIR}")
+ target_include_directories(QtBootstrap PUBLIC
+ "${PROJECT_BINARY_DIR}/include/${module}"
+ "${PROJECT_BINARY_DIR}/include/${module}/${PROJECT_VERSION}"
+ "${PROJECT_BINARY_DIR}/include/${module}/${PROJECT_VERSION}/${module}")
+endforeach()
+
+target_compile_definitions(QtBootstrap PUBLIC
+ QT_VERSION_MAJOR=${PROJECT_VERSION_MAJOR}
+ QT_VERSION_MINOR=${PROJECT_VERSION_MINOR}
+ QT_VERSION_PATCH=${PROJECT_VERSION_PATCH}
+ QT_VERSION_STR="${PROJECT_VERSION}"
+ QT_BOOTSTRAPPED
+ QT_NO_CAST_ASCII
+ QT_NO_FOREACH
+ QT_NO_CAST_FROM_ASCII
+)
+target_link_libraries(QtBootstrap PUBLIC Qt::Platform ${os_libs})
+target_include_directories(QtBootstrap PUBLIC "${PROJECT_BINARY_DIR}/include")
+target_link_libraries(QtBootstrap PRIVATE ZLIB::ZLIB)
+
+### fixme: Expose as some cmake equivalent of a reusable qmake mkspecs/features/gc_binaries.prf.
+if(APPLE)
+ target_link_libraries(QtBootstrap INTERFACE "-Wl,-dead_strip")
+endif()
+
+if (APPLE)
+ find_library(FWFoundation Foundation)
+ find_library(FWCoreServices CoreServices)
+ target_link_libraries(QtBootstrap INTERFACE ${FWFoundation})
+ target_link_libraries(QtBootstrap PRIVATE ${FWCoreServices})
+endif()
diff --git a/src/tools/moc/CMakeLists.txt b/src/tools/moc/CMakeLists.txt
new file mode 100644
index 0000000000..b16ed026a4
--- /dev/null
+++ b/src/tools/moc/CMakeLists.txt
@@ -0,0 +1,10 @@
+add_qt_tool(moc BOOTSTRAP
+ LIBRARIES tinycbor
+ SOURCES
+ moc.cpp
+ preprocessor.cpp
+ generator.cpp
+ parser.cpp
+ token.cpp
+ main.cpp
+)
diff --git a/src/tools/qfloat16-tables/CMakeLists.txt b/src/tools/qfloat16-tables/CMakeLists.txt
new file mode 100644
index 0000000000..60d6282976
--- /dev/null
+++ b/src/tools/qfloat16-tables/CMakeLists.txt
@@ -0,0 +1,2 @@
+add_qt_tool(qfloat16-tables BOOTSTRAP SOURCES gen_qfloat16_tables.cpp)
+
diff --git a/src/tools/qmocscanner/CMakeLists.txt b/src/tools/qmocscanner/CMakeLists.txt
new file mode 100644
index 0000000000..fd0190dc6e
--- /dev/null
+++ b/src/tools/qmocscanner/CMakeLists.txt
@@ -0,0 +1,10 @@
+set(_mocscanner "${PROJECT_BINARY_DIR}/${INSTALL_BINDIR}/qmocscanner${CMAKE_EXECUTABLE_SUFFIX}")
+try_compile(mocscanner_built "${CMAKE_CURRENT_BINARY_DIR}" "${CMAKE_CURRENT_SOURCE_DIR}/main.cpp" COPY_FILE "${_mocscanner}")
+
+add_executable(qmocscanner IMPORTED GLOBAL)
+set_target_properties(qmocscanner PROPERTIES IMPORTED_LOCATION "${_mocscanner}")
+
+install(PROGRAMS "${_mocscanner}" DESTINATION "${INSTALL_BINDIR}")
+add_executable("Qt::qmocscanner" ALIAS "qmocscanner")
+
+# FIXME: This should get exported to ToolsTargets!
diff --git a/src/tools/qmocscanner/main.cpp b/src/tools/qmocscanner/main.cpp
new file mode 100644
index 0000000000..3509820c61
--- /dev/null
+++ b/src/tools/qmocscanner/main.cpp
@@ -0,0 +1,623 @@
+/****************************************************************************
+**
+** Copyright (C) 2018 The Qt Company Ltd.
+** Copyright (C) 2016 Intel Corporation.
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the qmocscanner application of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:GPL-EXCEPT$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3 as published by the Free Software
+** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <iostream>
+#include <fstream>
+#include <vector>
+#include <string>
+#include <set>
+#include <unordered_set>
+#include <assert.h>
+#include <limits.h>
+#include <string.h>
+#include <stdarg.h>
+
+struct ScanResult
+{
+ std::string fileName;
+ bool foundMocRelevantMacro = false;
+ std::vector<std::string> includedMocFiles;
+};
+
+struct Option
+{
+ static int debug_level;
+};
+int Option::debug_level = 0;
+
+static void debug_msg(int level, const char *fmt, ...)
+{
+ if (level < 3)
+ return;
+ va_list ap;
+ va_start(ap, fmt);
+ vfprintf(stderr, fmt, ap);
+ va_end(ap);
+}
+
+#define qmake_endOfLine(c) (c == '\r' || c == '\n')
+
+static int skipEscapedLineEnds(const char *buffer, int buffer_len, int offset, int *lines)
+{
+ // Join physical lines to make logical lines, as in the C preprocessor
+ while (offset + 1 < buffer_len
+ && buffer[offset] == '\\'
+ && qmake_endOfLine(buffer[offset + 1])) {
+ offset += 2;
+ ++*lines;
+ if (offset < buffer_len
+ && buffer[offset - 1] == '\r'
+ && buffer[offset] == '\n') // CRLF
+ offset++;
+ }
+ return offset;
+}
+
+static bool matchWhileUnsplitting(const char *buffer, int buffer_len, int start,
+ const char *needle, int needle_len,
+ int *matchlen, int *lines)
+{
+ int x = start;
+ for (int n = 0; n < needle_len;
+ n++, x = skipEscapedLineEnds(buffer, buffer_len, x + 1, lines)) {
+ if (x >= buffer_len || buffer[x] != needle[n])
+ return false;
+ }
+ // That also skipped any remaining BSNLs immediately after the match.
+
+ // Tell caller how long the match was:
+ *matchlen = x - start;
+
+ return true;
+}
+
+/* Advance from an opening quote at buffer[offset] to the matching close quote. */
+static int scanPastString(char *buffer, int buffer_len, int offset, int *lines)
+{
+ // http://en.cppreference.com/w/cpp/language/string_literal
+ // It might be a C++11 raw string.
+ bool israw = false;
+ if (buffer[offset] == '"' && offset > 0) {
+ int explore = offset - 1;
+ bool prefix = false; // One of L, U, u or u8 may appear before R
+ bool saw8 = false; // Partial scan of u8
+ while (explore >= 0) {
+ // Cope with backslash-newline interruptions of the prefix:
+ if (explore > 0
+ && qmake_endOfLine(buffer[explore])
+ && buffer[explore - 1] == '\\') {
+ explore -= 2;
+ } else if (explore > 1
+ && buffer[explore] == '\n'
+ && buffer[explore - 1] == '\r'
+ && buffer[explore - 2] == '\\') {
+ explore -= 3;
+ // Remaining cases can only decrement explore by one at a time:
+ } else if (saw8 && buffer[explore] == 'u') {
+ explore--;
+ saw8 = false;
+ prefix = true;
+ } else if (saw8 || prefix) {
+ break;
+ } else if (explore > 1 && buffer[explore] == '8') {
+ explore--;
+ saw8 = true;
+ } else if (buffer[explore] == 'L'
+ || buffer[explore] == 'U'
+ || buffer[explore] == 'u') {
+ explore--;
+ prefix = true;
+ } else if (buffer[explore] == 'R') {
+ if (israw)
+ break;
+ explore--;
+ israw = true;
+ } else {
+ break;
+ }
+ }
+ // Check the R (with possible prefix) isn't just part of an identifier:
+ if (israw && explore >= 0
+ && (isalnum(buffer[explore]) || buffer[explore] == '_')) {
+ israw = false;
+ }
+ }
+
+ if (israw) {
+#define SKIP_BSNL(pos) skipEscapedLineEnds(buffer, buffer_len, (pos), lines)
+
+ offset = SKIP_BSNL(offset + 1);
+ const char *const delim = buffer + offset;
+ int clean = offset;
+ while (offset < buffer_len && buffer[offset] != '(') {
+ if (clean < offset)
+ buffer[clean++] = buffer[offset];
+ else
+ clean++;
+
+ offset = SKIP_BSNL(offset + 1);
+ }
+ /*
+ Not checking correctness (trust real compiler to do that):
+ - no controls, spaces, '(', ')', '\\' or (presumably) '"' in delim;
+ - at most 16 bytes in delim
+
+ Raw strings are surely defined after phase 2, when BSNLs are resolved;
+ so the delimiter's exclusion of '\\' and space (including newlines)
+ applies too late to save us the need to cope with BSNLs in it.
+ */
+
+ const int delimlen = buffer + clean - delim;
+ int matchlen = delimlen, extralines = 0;
+ while ((offset = SKIP_BSNL(offset + 1)) < buffer_len
+ && (buffer[offset] != ')'
+ || (delimlen > 0 &&
+ !matchWhileUnsplitting(buffer, buffer_len,
+ offset + 1, delim, delimlen,
+ &matchlen, &extralines))
+ || buffer[offset + 1 + matchlen] != '"')) {
+ // skip, but keep track of lines
+ if (qmake_endOfLine(buffer[offset]))
+ ++*lines;
+ extralines = 0;
+ }
+ *lines += extralines; // from the match
+ // buffer[offset] is ')'
+ offset += 1 + matchlen; // 1 for ')', then delim
+ // buffer[offset] is '"'
+
+#undef SKIP_BSNL
+ } else { // Traditional string or char literal:
+ const char term = buffer[offset];
+ while (++offset < buffer_len && buffer[offset] != term) {
+ if (buffer[offset] == '\\')
+ ++offset;
+ else if (qmake_endOfLine(buffer[offset]))
+ ++*lines;
+ }
+ }
+
+ return offset;
+}
+
+static std::vector<std::string> findIncludes(const char *fileName, char *buffer, int buffer_len)
+{
+ std::vector<std::string> includes;
+ int line_count = 1;
+ enum {
+ /*
+ States of C preprocessing (for TYPE_C only), after backslash-newline
+ elimination and skipping comments and spaces (i.e. in ANSI X3.159-1989
+ section 2.1.1.2's phase 4). We're about to study buffer[x] to decide
+ on which transition to do.
+ */
+ AtStart, // start of logical line; a # may start a preprocessor directive
+ HadHash, // saw a # at start, looking for preprocessor keyword
+ WantName, // saw #include or #import, waiting for name
+ InCode // after directive, parsing non-#include directive or in actual code
+ } cpp_state = AtStart;
+
+ int x = 0;
+ if (buffer_len >= 3) {
+ const unsigned char *p = (unsigned char *)buffer;
+ // skip UTF-8 BOM, if present
+ if (p[0] == 0xEF && p[1] == 0xBB && p[2] == 0xBF)
+ x += 3;
+ }
+ for (; x < buffer_len; ++x) {
+ bool try_local = true;
+ char *inc = nullptr;
+ // We've studied all buffer[i] for i < x
+ for (; x < buffer_len; ++x) {
+ // How to handle backslash-newline (BSNL) pairs:
+#define SKIP_BSNL(pos) skipEscapedLineEnds(buffer, buffer_len, (pos), &line_count)
+
+ // Seek code or directive, skipping comments and space:
+ for (; (x = SKIP_BSNL(x)) < buffer_len; ++x) {
+ if (buffer[x] == ' ' || buffer[x] == '\t') {
+ // keep going
+ } else if (buffer[x] == '/') {
+ int extralines = 0;
+ int y = skipEscapedLineEnds(buffer, buffer_len, x + 1, &extralines);
+ if (y >= buffer_len) {
+ x = y;
+ break;
+ } else if (buffer[y] == '/') { // C++-style comment
+ line_count += extralines;
+ x = SKIP_BSNL(y + 1);
+ while (x < buffer_len && !qmake_endOfLine(buffer[x]))
+ x = SKIP_BSNL(x + 1); // skip
+
+ cpp_state = AtStart;
+ ++line_count;
+ } else if (buffer[y] == '*') { // C-style comment
+ line_count += extralines;
+ x = y;
+ while ((x = SKIP_BSNL(++x)) < buffer_len) {
+ if (buffer[x] == '*') {
+ extralines = 0;
+ y = skipEscapedLineEnds(buffer, buffer_len,
+ x + 1, &extralines);
+ if (y < buffer_len && buffer[y] == '/') {
+ line_count += extralines;
+ x = y; // for loop shall step past this
+ break;
+ }
+ } else if (qmake_endOfLine(buffer[x])) {
+ ++line_count;
+ }
+ }
+ } else {
+ // buffer[x] is the division operator
+ break;
+ }
+ } else if (qmake_endOfLine(buffer[x])) {
+ ++line_count;
+ cpp_state = AtStart;
+ } else {
+ /* Drop out of phases 1, 2, 3, into phase 4 */
+ break;
+ }
+ }
+ // Phase 4 study of buffer[x]:
+
+ if (x >= buffer_len)
+ break;
+
+ switch (cpp_state) {
+ case HadHash:
+ {
+ // Read keyword; buffer[x] starts first preprocessing token after #
+ const char *const keyword = buffer + x;
+ int clean = x;
+ while (x < buffer_len && buffer[x] >= 'a' && buffer[x] <= 'z') {
+ // skip over keyword, consolidating it if it contains BSNLs
+ // (see WantName's similar code consolidating inc, below)
+ if (clean < x)
+ buffer[clean++] = buffer[x];
+ else
+ clean++;
+
+ x = SKIP_BSNL(x + 1);
+ }
+ const int keyword_len = buffer + clean - keyword;
+ x--; // Still need to study buffer[x] next time round for loop.
+
+ cpp_state =
+ ((keyword_len == 7 && !strncmp(keyword, "include", 7)) // C & Obj-C
+ || (keyword_len == 6 && !strncmp(keyword, "import", 6))) // Obj-C
+ ? WantName : InCode;
+ break;
+ }
+
+ case WantName:
+ {
+ char term = buffer[x];
+ if (term == '<') {
+ try_local = false;
+ term = '>';
+ } else if (term != '"') {
+ /*
+ Possibly malformed, but this may be something like:
+ #include IDENTIFIER
+ which does work, if #define IDENTIFIER "filename" is
+ in effect. This is beyond this noddy preprocessor's
+ powers of tracking. So give up and resume searching
+ for a directive. We haven't made sense of buffer[x],
+ so back up to ensure we do study it (now as code) next
+ time round the loop.
+ */
+ x--;
+ cpp_state = InCode;
+ continue;
+ }
+
+ x = SKIP_BSNL(x + 1);
+ inc = buffer + x;
+ int clean = x; // offset if we need to clear \-newlines
+ for (; x < buffer_len && buffer[x] != term; x = SKIP_BSNL(x + 1)) {
+ if (qmake_endOfLine(buffer[x])) { // malformed
+ cpp_state = AtStart;
+ ++line_count;
+ break;
+ }
+
+ /*
+ If we do skip any BSNLs, we need to consolidate the
+ surviving text by copying to lower indices. For that
+ to be possible, we also have to keep 'clean' advanced
+ in step with x even when we've yet to see any BSNLs.
+ */
+ if (clean < x)
+ buffer[clean++] = buffer[x];
+ else
+ clean++;
+ }
+ if (cpp_state == WantName)
+ buffer[clean] = '\0';
+ else // i.e. malformed
+ inc = nullptr;
+
+ cpp_state = InCode; // hereafter
+ break;
+ }
+
+ case AtStart:
+ // Preprocessor directive?
+ if (buffer[x] == '#') {
+ cpp_state = HadHash;
+ break;
+ }
+ cpp_state = InCode;
+ // ... and fall through to handle buffer[x] as such.
+ case InCode:
+ // matching quotes (string literals and character literals)
+ if (buffer[x] == '\'' || buffer[x] == '"') {
+ x = scanPastString(buffer, buffer_len, x, &line_count);
+ // for loop's ++x shall step over the closing quote.
+ }
+ // else: buffer[x] is just some code; move on.
+ break;
+ }
+
+ if (inc) // We were in WantName and found a name.
+ break;
+#undef SKIP_BSNL
+ }
+ if (x >= buffer_len)
+ break;
+
+ if (inc) {
+ includes.push_back(inc);
+ }
+ }
+ return includes;
+}
+
+static bool isCWordChar(char c) {
+ return c == '_'
+ || (c >= 'a' && c <= 'z')
+ || (c >= 'A' && c <= 'Z')
+ || (c >= '0' && c <= '9');
+}
+
+static bool scanBufferForMocRelevantMacros(const char *fileName, char *buffer, int buffer_len)
+{
+ int line_count = 1;
+ bool ignore[3] = { false, false, false }; // [0] for Q_OBJECT, [1] for Q_GADGET, [2] for Q_NAMESPACE
+ /* qmake ignore Q_GADGET */
+ /* qmake ignore Q_OBJECT */
+ /* qmake ignore Q_NAMESPACE */
+ for (int x = 0; x < buffer_len; x++) {
+#define SKIP_BSNL(pos) skipEscapedLineEnds(buffer, buffer_len, (pos), &line_count)
+ x = SKIP_BSNL(x);
+ if (buffer[x] == '/') {
+ int extralines = 0;
+ int y = skipEscapedLineEnds(buffer, buffer_len, x + 1, &extralines);
+ if (buffer_len > y) {
+ // If comment, advance to the character that ends it:
+ if (buffer[y] == '/') { // C++-style comment
+ line_count += extralines;
+ x = y;
+ do {
+ x = SKIP_BSNL(x + 1);
+ } while (x < buffer_len && !qmake_endOfLine(buffer[x]));
+
+ } else if (buffer[y] == '*') { // C-style comment
+ line_count += extralines;
+ x = SKIP_BSNL(y + 1);
+ for (; x < buffer_len; x = SKIP_BSNL(x + 1)) {
+ if (buffer[x] == 't' || buffer[x] == 'q') { // ignore
+ if (buffer_len >= (x + 20) &&
+ !strncmp(buffer + x + 1, "make ignore Q_OBJECT", 20)) {
+ debug_msg(2, "Mocgen: %s:%d Found \"qmake ignore Q_OBJECT\"",
+ fileName, line_count);
+ x += 20;
+ ignore[0] = true;
+ } else if (buffer_len >= (x + 20) &&
+ !strncmp(buffer + x + 1, "make ignore Q_GADGET", 20)) {
+ debug_msg(2, "Mocgen: %s:%d Found \"qmake ignore Q_GADGET\"",
+ fileName, line_count);
+ x += 20;
+ ignore[1] = true;
+ } else if (buffer_len >= (x + 23) &&
+ !strncmp(buffer + x + 1, "make ignore Q_NAMESPACE", 23)) {
+ debug_msg(2, "Mocgen: %s:%d Found \"qmake ignore Q_NAMESPACE\"",
+ fileName, line_count);
+ x += 23;
+ ignore[2] = true;
+ }
+ } else if (buffer[x] == '*') {
+ extralines = 0;
+ y = skipEscapedLineEnds(buffer, buffer_len, x + 1, &extralines);
+ if (buffer_len > y && buffer[y] == '/') {
+ line_count += extralines;
+ x = y;
+ break;
+ }
+ } else if (Option::debug_level && qmake_endOfLine(buffer[x])) {
+ ++line_count;
+ }
+ }
+ }
+ // else: don't update x, buffer[x] is just the division operator.
+ }
+ } else if (buffer[x] == '\'' || buffer[x] == '"') {
+ x = scanPastString(buffer, buffer_len, x, &line_count);
+ // Leaves us on closing quote; for loop's x++ steps us past it.
+ }
+
+ if (x < buffer_len && Option::debug_level && qmake_endOfLine(buffer[x]))
+ ++line_count;
+ if (buffer_len > x + 8 && !isCWordChar(buffer[x])) {
+ int morelines = 0;
+ int y = skipEscapedLineEnds(buffer, buffer_len, x + 1, &morelines);
+ if (buffer[y] == 'Q') {
+ static const char interesting[][12] = { "Q_OBJECT", "Q_GADGET", "Q_NAMESPACE"};
+ for (int interest = 0; interest < 3; ++interest) {
+ if (ignore[interest])
+ continue;
+
+ int matchlen = 0, extralines = 0;
+ size_t needle_len = strlen(interesting[interest]);
+ assert(needle_len <= INT_MAX);
+ if (matchWhileUnsplitting(buffer, buffer_len, y,
+ interesting[interest],
+ static_cast<int>(needle_len),
+ &matchlen, &extralines)
+ && y + matchlen < buffer_len
+ && !isCWordChar(buffer[y + matchlen])) {
+ if (Option::debug_level) {
+ buffer[y + matchlen] = '\0';
+ debug_msg(2, "Mocgen: %s:%d Found MOC symbol %s",
+ fileName,
+ line_count + morelines, buffer + y);
+ }
+ return true;
+ }
+ }
+ }
+ }
+#undef SKIP_BSNL
+ }
+ return false;
+}
+
+static bool startsWith(const std::string &str, const char *needle)
+{
+ return str.find(needle) == 0;
+}
+
+static bool endsWith(const std::string &str, const char *needle)
+{
+ return str.rfind(needle) == str.size() - strlen(needle);
+}
+
+static std::string fileNameFromPath(const std::string &path)
+{
+ int separatorIndex = path.rfind("/");
+ if (separatorIndex == -1)
+ return path;
+ return path.substr(separatorIndex + 1);
+}
+
+static ScanResult scanFile(const std::string &fileName)
+{
+ ScanResult result;
+ result.fileName = fileName;
+
+ std::ifstream file(fileName, std::ios::binary);
+ if (!file.is_open())
+ return result;
+
+ file.seekg(0, std::ios_base::end);
+ auto size = file.tellg();
+ if (size == 0)
+ return result;
+ file.seekg(0, std::ios_base::beg);
+
+ std::vector<char> buffer;
+ buffer.resize(size);
+ char *bufferPtr = &(*buffer.begin());
+ file.read(bufferPtr, size);
+
+ file.close();
+
+ result.foundMocRelevantMacro = scanBufferForMocRelevantMacros(fileName.c_str(), bufferPtr, size);
+
+ for (const auto &include: findIncludes(fileName.c_str(), bufferPtr, size)) {
+ if (startsWith(include, "moc_") && endsWith(include, ".cpp")) {
+ std::string mocHeader = include.substr(strlen("moc_"),
+ include.size() - strlen("moc_") - strlen(".cpp"));
+ mocHeader.append(".h");
+ result.includedMocFiles.push_back(mocHeader);
+ } else if (endsWith(include, ".moc")) {
+ std::string mocHeader = include.substr(0, include.size() - strlen(".moc"));
+ mocHeader.append(".cpp");
+ result.includedMocFiles.push_back(mocHeader);
+ }
+ }
+
+ return result;
+}
+
+static void writeSetToFile(const char *fileName, const std::set<std::string> &content)
+{
+ std::ofstream file(fileName, std::ios::binary);
+ for (const auto &entry: content) {
+ const std::string &fileName = entry;
+ file << fileName << std::endl;
+ }
+}
+
+int main(int argc, char **argv)
+{
+ if (argc != 4) {
+ fprintf(stderr, "usage: %s <sources file> <included mocs output file> <built mocs output file>\n", argv[0]);
+ return EXIT_FAILURE;
+ }
+
+ std::vector<std::string> sourcesAndHeaders;
+ {
+ std::ifstream file(argv[1]);
+ if (!file.is_open()) {
+ std::cerr << "failed to open input file " << argv[1] << std::endl;
+ return EXIT_FAILURE;
+ }
+ for (std::string line; std::getline(file, line);)
+ sourcesAndHeaders.push_back(line);
+ }
+
+ std::unordered_set<std::string> mocCandidates;
+ std::unordered_set<std::string> mocFilesInIncludeStatements;
+
+ for (const auto &sourceOrHeader: sourcesAndHeaders) {
+ auto result = scanFile(sourceOrHeader);
+ if (result.foundMocRelevantMacro)
+ mocCandidates.insert(result.fileName);
+ for (const auto &header: result.includedMocFiles)
+ mocFilesInIncludeStatements.insert(header);
+ }
+
+ std::set<std::string> mocFilesToInclude;
+ std::set<std::string> mocFilesToBuild;
+
+ for (const auto &candidate: mocCandidates) {
+ std::string fileName = fileNameFromPath(candidate);
+ if (mocFilesInIncludeStatements.find(fileName) != mocFilesInIncludeStatements.end())
+ mocFilesToInclude.insert(candidate);
+ else
+ mocFilesToBuild.insert(candidate);
+ }
+
+ writeSetToFile(argv[2], mocFilesToInclude);
+ writeSetToFile(argv[3], mocFilesToBuild);
+
+ return EXIT_SUCCESS;
+}
diff --git a/src/tools/qvkgen/CMakeLists.txt b/src/tools/qvkgen/CMakeLists.txt
new file mode 100644
index 0000000000..2e9ab3458b
--- /dev/null
+++ b/src/tools/qvkgen/CMakeLists.txt
@@ -0,0 +1,5 @@
+#####################################################################
+## qvkgen Tool:
+#####################################################################
+
+add_qt_tool(qvkgen SOURCES qvkgen.cpp)
diff --git a/src/tools/rcc/CMakeLists.txt b/src/tools/rcc/CMakeLists.txt
new file mode 100644
index 0000000000..4a882e7860
--- /dev/null
+++ b/src/tools/rcc/CMakeLists.txt
@@ -0,0 +1 @@
+add_qt_tool(rcc BOOTSTRAP SOURCES rcc.cpp main.cpp)
diff --git a/src/tools/tracegen/CMakeLists.txt b/src/tools/tracegen/CMakeLists.txt
new file mode 100644
index 0000000000..85ae0ffef7
--- /dev/null
+++ b/src/tools/tracegen/CMakeLists.txt
@@ -0,0 +1,10 @@
+add_qt_tool(tracegen BOOTSTRAP
+ SOURCES
+ etw.cpp
+ helpers.cpp
+ lttng.cpp
+ panic.cpp
+ provider.cpp
+ qtheaders.cpp
+ tracegen.cpp
+)
diff --git a/src/tools/uic/CMakeLists.txt b/src/tools/uic/CMakeLists.txt
new file mode 100644
index 0000000000..0c40af3540
--- /dev/null
+++ b/src/tools/uic/CMakeLists.txt
@@ -0,0 +1,16 @@
+add_qt_tool(uic
+ SOURCES
+ cpp/cppwritedeclaration.cpp
+ cpp/cppwriteincludes.cpp
+ cpp/cppwriteinitialization.cpp
+ customwidgetsinfo.cpp
+ databaseinfo.cpp
+ driver.cpp
+ main.cpp
+ treewalker.cpp
+ ui4.cpp
+ uic.cpp
+ validator.cpp
+ INCLUDE_DIRECTORIES cpp
+ DEFINES QT_UIC QT_UIC_CPP_GENERATOR
+)
diff --git a/src/widgets/CMakeLists.txt b/src/widgets/CMakeLists.txt
new file mode 100644
index 0000000000..22f6ec4d34
--- /dev/null
+++ b/src/widgets/CMakeLists.txt
@@ -0,0 +1,612 @@
+# Generated from widgets.pro.
+
+#####################################################################
+## QtWidgets Module:
+#####################################################################
+
+add_qt_module(Widgets
+ SOURCES
+ itemviews/qfileiconprovider.cpp itemviews/qfileiconprovider.h itemviews/qfileiconprovider_p.h
+ kernel/qaction.cpp kernel/qaction.h kernel/qaction_p.h
+ kernel/qactiongroup.cpp kernel/qactiongroup.h
+ kernel/qapplication.cpp kernel/qapplication.h kernel/qapplication_p.h
+ kernel/qboxlayout.cpp kernel/qboxlayout.h
+ kernel/qdesktopwidget.cpp kernel/qdesktopwidget.h kernel/qdesktopwidget_p.h
+ kernel/qgesture.cpp kernel/qgesture.h kernel/qgesture_p.h
+ kernel/qgesturemanager.cpp kernel/qgesturemanager_p.h
+ kernel/qgesturerecognizer.cpp kernel/qgesturerecognizer.h
+ kernel/qgridlayout.cpp kernel/qgridlayout.h
+ kernel/qlayout.cpp kernel/qlayout.h kernel/qlayout_p.h
+ kernel/qlayoutengine.cpp kernel/qlayoutengine_p.h
+ kernel/qlayoutitem.cpp kernel/qlayoutitem.h
+ kernel/qshortcut.cpp kernel/qshortcut.h
+ kernel/qsizepolicy.cpp kernel/qsizepolicy.h
+ kernel/qstackedlayout.cpp kernel/qstackedlayout.h
+ kernel/qstandardgestures.cpp kernel/qstandardgestures_p.h
+ kernel/qtestsupport_widgets.cpp kernel/qtestsupport_widgets.h
+ kernel/qtooltip.cpp kernel/qtooltip.h
+ kernel/qtwidgetsglobal.h kernel/qtwidgetsglobal_p.h
+ kernel/qwidget.cpp kernel/qwidget.h kernel/qwidget_p.h
+ kernel/qwidgetaction.cpp kernel/qwidgetaction.h kernel/qwidgetaction_p.h
+ kernel/qwidgetbackingstore.cpp kernel/qwidgetbackingstore_p.h
+ kernel/qwidgetsvariant.cpp
+ kernel/qwidgetwindow.cpp kernel/qwidgetwindow_p.h
+ kernel/qwindowcontainer.cpp kernel/qwindowcontainer_p.h
+ styles/qcommonstyle.cpp styles/qcommonstyle.h styles/qcommonstyle_p.h
+ styles/qcommonstylepixmaps_p.h
+ styles/qdrawutil.cpp styles/qdrawutil.h
+ styles/qpixmapstyle.cpp styles/qpixmapstyle_p.h
+ styles/qpixmapstyle_p_p.h
+ styles/qproxystyle.cpp styles/qproxystyle.h styles/qproxystyle_p.h
+ styles/qstyle.cpp styles/qstyle.h styles/qstyle.qrc
+ styles/qstyleanimation.cpp styles/qstyleanimation_p.h
+ styles/qstylefactory.cpp styles/qstylefactory.h
+ styles/qstylehelper.cpp styles/qstylehelper_p.h
+ styles/qstyleoption.cpp styles/qstyleoption.h
+ styles/qstylepainter.cpp styles/qstylepainter.h
+ styles/qstyleplugin.cpp styles/qstyleplugin.h
+ styles/qstylesheetstyle.cpp styles/qstylesheetstyle_p.h
+ styles/qstylesheetstyle_default.cpp
+ util/qcolormap.cpp util/qcolormap.h
+ util/qsystemtrayicon.cpp util/qsystemtrayicon.h util/qsystemtrayicon_p.h
+ widgets/qabstractscrollarea.cpp widgets/qabstractscrollarea.h widgets/qabstractscrollarea_p.h
+ widgets/qfocusframe.cpp widgets/qfocusframe.h
+ widgets/qframe.cpp widgets/qframe.h widgets/qframe_p.h
+ widgets/qwidgetanimator.cpp widgets/qwidgetanimator_p.h
+ DEFINES
+ QT_NO_USING_NAMESPACE
+ INCLUDE_DIRECTORIES
+ dialogs/
+ LIBRARIES
+ Qt::CorePrivate
+ Qt::GuiPrivate
+ PUBLIC_LIBRARIES
+ Qt::Core
+ Qt::Gui
+)
+
+## Scopes:
+#####################################################################
+#
+#extend_target(Widgets CONDITION MSVC
+#)
+#
+#extend_target(Widgets CONDITION (MSVC) AND (equals(QT_ARCH, i386))
+#)
+#
+#extend_target(Widgets CONDITION APPLE_OSX
+#)
+
+extend_target(Widgets CONDITION (APPLE_OSX) AND (macos)
+ LIBRARIES
+ ${FWAppKit}
+ z
+)
+
+extend_target(Widgets CONDITION ((APPLE_OSX) AND (macos)) AND (*-mwerks)
+ INCLUDE_DIRECTORIES
+ compat
+)
+
+extend_target(Widgets CONDITION WIN32
+ INCLUDE_DIRECTORIES
+ ../3rdparty/wintab
+)
+
+extend_target(Widgets CONDITION (WIN32) AND (NOT WINRT)
+ LIBRARIES
+ shell32
+ uxtheme
+ dwmapi
+)
+
+extend_target(Widgets CONDITION QT_FEATURE_graphicseffect
+ SOURCES
+ effects/qgraphicseffect.cpp effects/qgraphicseffect.h effects/qgraphicseffect_p.h
+ effects/qpixmapfilter.cpp effects/qpixmapfilter_p.h
+)
+#
+#extend_target(Widgets CONDITION contains(DEFINES,QT_EVAL)
+#)
+#
+#extend_target(Widgets CONDITION testcocoon
+#)
+
+extend_target(Widgets CONDITION macx
+ SOURCES
+ kernel/qmacgesturerecognizer.cpp kernel/qmacgesturerecognizer_p.h
+)
+
+extend_target(Widgets CONDITION QT_FEATURE_opengl
+ SOURCES
+ kernel/qopenglwidget.cpp kernel/qopenglwidget.h
+)
+
+extend_target(Widgets CONDITION QT_FEATURE_formlayout
+ SOURCES
+ kernel/qformlayout.cpp kernel/qformlayout.h
+)
+
+extend_target(Widgets CONDITION QT_FEATURE_whatsthis
+ SOURCES
+ kernel/qwhatsthis.cpp kernel/qwhatsthis.h
+)
+
+extend_target(Widgets CONDITION QT_FEATURE_style_windows
+ SOURCES
+ styles/qwindowsstyle.cpp styles/qwindowsstyle_p.h
+ styles/qwindowsstyle_p_p.h
+)
+
+extend_target(Widgets CONDITION QT_FEATURE_style_fusion
+ SOURCES
+ styles/qfusionstyle.cpp styles/qfusionstyle_p.h
+ styles/qfusionstyle_p_p.h
+)
+
+extend_target(Widgets CONDITION QT_FEATURE_abstractbutton
+ SOURCES
+ widgets/qabstractbutton.cpp widgets/qabstractbutton.h widgets/qabstractbutton_p.h
+)
+
+extend_target(Widgets CONDITION QT_FEATURE_abstractslider
+ SOURCES
+ widgets/qabstractslider.cpp widgets/qabstractslider.h widgets/qabstractslider_p.h
+)
+
+extend_target(Widgets CONDITION QT_FEATURE_buttongroup
+ SOURCES
+ widgets/qbuttongroup.cpp widgets/qbuttongroup.h widgets/qbuttongroup_p.h
+)
+
+extend_target(Widgets CONDITION QT_FEATURE_calendarwidget
+ SOURCES
+ widgets/qcalendarwidget.cpp widgets/qcalendarwidget.h
+)
+
+extend_target(Widgets CONDITION QT_FEATURE_checkbox
+ SOURCES
+ widgets/qcheckbox.cpp widgets/qcheckbox.h
+)
+
+extend_target(Widgets CONDITION QT_FEATURE_combobox
+ SOURCES
+ widgets/qcombobox.cpp widgets/qcombobox.h widgets/qcombobox_p.h
+)
+
+extend_target(Widgets CONDITION QT_FEATURE_commandlinkbutton
+ SOURCES
+ widgets/qcommandlinkbutton.cpp widgets/qcommandlinkbutton.h
+)
+
+extend_target(Widgets CONDITION QT_FEATURE_datetimeedit
+ SOURCES
+ widgets/qdatetimeedit.cpp widgets/qdatetimeedit.h widgets/qdatetimeedit_p.h
+)
+
+extend_target(Widgets CONDITION QT_FEATURE_dial
+ SOURCES
+ widgets/qdial.cpp widgets/qdial.h
+)
+
+extend_target(Widgets CONDITION QT_FEATURE_dockwidget
+ SOURCES
+ widgets/qdockarealayout.cpp widgets/qdockarealayout_p.h
+ widgets/qdockwidget.cpp widgets/qdockwidget.h widgets/qdockwidget_p.h
+)
+
+extend_target(Widgets CONDITION QT_FEATURE_effects
+ SOURCES
+ widgets/qeffects.cpp widgets/qeffects_p.h
+)
+
+extend_target(Widgets CONDITION QT_FEATURE_fontcombobox
+ SOURCES
+ widgets/qfontcombobox.cpp widgets/qfontcombobox.h
+)
+
+extend_target(Widgets CONDITION QT_FEATURE_groupbox
+ SOURCES
+ widgets/qgroupbox.cpp widgets/qgroupbox.h
+)
+
+extend_target(Widgets CONDITION QT_FEATURE_keysequenceedit
+ SOURCES
+ widgets/qkeysequenceedit.cpp widgets/qkeysequenceedit.h widgets/qkeysequenceedit_p.h
+)
+
+extend_target(Widgets CONDITION QT_FEATURE_label
+ SOURCES
+ widgets/qlabel.cpp widgets/qlabel.h widgets/qlabel_p.h
+)
+
+extend_target(Widgets CONDITION QT_FEATURE_lcdnumber
+ SOURCES
+ widgets/qlcdnumber.cpp widgets/qlcdnumber.h
+)
+
+extend_target(Widgets CONDITION QT_FEATURE_lineedit
+ SOURCES
+ widgets/qlineedit.cpp widgets/qlineedit.h widgets/qlineedit_p.cpp widgets/qlineedit_p.h
+ widgets/qwidgetlinecontrol.cpp widgets/qwidgetlinecontrol_p.h
+)
+
+extend_target(Widgets CONDITION QT_FEATURE_mainwindow
+ SOURCES
+ widgets/qmainwindow.cpp widgets/qmainwindow.h
+ widgets/qmainwindowlayout.cpp widgets/qmainwindowlayout_p.h
+)
+
+extend_target(Widgets CONDITION QT_FEATURE_mdiarea
+ SOURCES
+ widgets/qmdiarea.cpp widgets/qmdiarea.h widgets/qmdiarea_p.h
+ widgets/qmdisubwindow.cpp widgets/qmdisubwindow.h widgets/qmdisubwindow_p.h
+)
+
+extend_target(Widgets CONDITION QT_FEATURE_menu
+ SOURCES
+ widgets/qmenu.cpp widgets/qmenu.h widgets/qmenu_p.h
+)
+
+extend_target(Widgets CONDITION QT_FEATURE_menubar
+ SOURCES
+ widgets/qmenubar.cpp widgets/qmenubar.h widgets/qmenubar_p.h
+)
+
+extend_target(Widgets CONDITION QT_FEATURE_progressbar
+ SOURCES
+ widgets/qprogressbar.cpp widgets/qprogressbar.h
+)
+
+extend_target(Widgets CONDITION QT_FEATURE_pushbutton
+ SOURCES
+ widgets/qpushbutton.cpp widgets/qpushbutton.h widgets/qpushbutton_p.h
+)
+
+extend_target(Widgets CONDITION QT_FEATURE_radiobutton
+ SOURCES
+ widgets/qradiobutton.cpp widgets/qradiobutton.h
+)
+
+extend_target(Widgets CONDITION QT_FEATURE_resizehandler
+ SOURCES
+ widgets/qwidgetresizehandler.cpp widgets/qwidgetresizehandler_p.h
+)
+
+extend_target(Widgets CONDITION QT_FEATURE_dialogbuttonbox
+ SOURCES
+ widgets/qdialogbuttonbox.cpp widgets/qdialogbuttonbox.h
+)
+
+extend_target(Widgets CONDITION QT_FEATURE_rubberband
+ SOURCES
+ widgets/qrubberband.cpp widgets/qrubberband.h
+)
+
+extend_target(Widgets CONDITION QT_FEATURE_scrollarea
+ SOURCES
+ widgets/qscrollarea.cpp widgets/qscrollarea.h widgets/qscrollarea_p.h
+)
+
+extend_target(Widgets CONDITION QT_FEATURE_scrollbar
+ SOURCES
+ widgets/qscrollbar.cpp widgets/qscrollbar.h widgets/qscrollbar_p.h
+)
+
+extend_target(Widgets CONDITION QT_FEATURE_sizegrip
+ SOURCES
+ widgets/qsizegrip.cpp widgets/qsizegrip.h
+)
+
+extend_target(Widgets CONDITION QT_FEATURE_slider
+ SOURCES
+ widgets/qslider.cpp widgets/qslider.h
+)
+
+extend_target(Widgets CONDITION QT_FEATURE_spinbox
+ SOURCES
+ widgets/qabstractspinbox.cpp widgets/qabstractspinbox.h widgets/qabstractspinbox_p.h
+ widgets/qspinbox.cpp widgets/qspinbox.h
+)
+
+extend_target(Widgets CONDITION QT_FEATURE_splashscreen
+ SOURCES
+ widgets/qsplashscreen.cpp widgets/qsplashscreen.h
+)
+
+extend_target(Widgets CONDITION QT_FEATURE_splitter
+ SOURCES
+ widgets/qsplitter.cpp widgets/qsplitter.h widgets/qsplitter_p.h
+)
+
+extend_target(Widgets CONDITION QT_FEATURE_stackedwidget
+ SOURCES
+ widgets/qstackedwidget.cpp widgets/qstackedwidget.h
+)
+
+extend_target(Widgets CONDITION QT_FEATURE_statusbar
+ SOURCES
+ widgets/qstatusbar.cpp widgets/qstatusbar.h
+)
+
+extend_target(Widgets CONDITION QT_FEATURE_tabbar
+ SOURCES
+ widgets/qtabbar.cpp widgets/qtabbar.h widgets/qtabbar_p.h
+)
+
+extend_target(Widgets CONDITION QT_FEATURE_textedit
+ SOURCES
+ widgets/qplaintextedit.cpp widgets/qplaintextedit.h widgets/qplaintextedit_p.h
+ widgets/qtextedit.cpp widgets/qtextedit.h widgets/qtextedit_p.h
+)
+
+extend_target(Widgets CONDITION QT_FEATURE_textbrowser
+ SOURCES
+ widgets/qtextbrowser.cpp widgets/qtextbrowser.h
+)
+
+extend_target(Widgets CONDITION QT_FEATURE_tabwidget
+ SOURCES
+ widgets/qtabwidget.cpp widgets/qtabwidget.h
+)
+
+extend_target(Widgets CONDITION QT_FEATURE_toolbar
+ SOURCES
+ widgets/qtoolbar.cpp widgets/qtoolbar.h widgets/qtoolbar_p.h
+ widgets/qtoolbararealayout.cpp widgets/qtoolbararealayout_p.h
+ widgets/qtoolbarlayout.cpp widgets/qtoolbarlayout_p.h
+ widgets/qtoolbarseparator.cpp widgets/qtoolbarseparator_p.h
+)
+
+extend_target(Widgets CONDITION QT_FEATURE_toolbox
+ SOURCES
+ widgets/qtoolbox.cpp widgets/qtoolbox.h
+)
+
+extend_target(Widgets CONDITION QT_FEATURE_toolbutton
+ SOURCES
+ widgets/qtoolbarextension.cpp widgets/qtoolbarextension_p.h
+ widgets/qtoolbutton.cpp widgets/qtoolbutton.h
+)
+
+extend_target(Widgets CONDITION QT_FEATURE_widgettextcontrol
+ SOURCES
+ widgets/qwidgettextcontrol.cpp widgets/qwidgettextcontrol_p.h
+ widgets/qwidgettextcontrol_p_p.h
+)
+
+extend_target(Widgets CONDITION macx
+ SOURCES
+ widgets/qmaccocoaviewcontainer_mac.h widgets/qmaccocoaviewcontainer_mac.mm
+ widgets/qmacnativewidget_mac.h widgets/qmacnativewidget_mac.mm
+)
+
+extend_target(Widgets CONDITION (macx) AND (QT_FEATURE_menu OR QT_FEATURE_menubar)
+ SOURCES
+ widgets/qmenu_mac.mm
+)
+
+extend_target(Widgets CONDITION QT_FEATURE_colordialog
+ SOURCES
+ dialogs/qcolordialog.cpp dialogs/qcolordialog.h
+)
+
+extend_target(Widgets CONDITION QT_FEATURE_dialog
+ SOURCES
+ dialogs/qdialog.cpp dialogs/qdialog.h dialogs/qdialog_p.h
+)
+
+extend_target(Widgets CONDITION QT_FEATURE_errormessage
+ SOURCES
+ dialogs/qerrormessage.cpp dialogs/qerrormessage.h
+)
+
+extend_target(Widgets CONDITION QT_FEATURE_filedialog
+ SOURCES
+ dialogs/qfiledialog.cpp dialogs/qfiledialog.h dialogs/qfiledialog.ui dialogs/qfiledialog_p.h
+ dialogs/qsidebar.cpp dialogs/qsidebar_p.h
+)
+
+extend_target(Widgets CONDITION QT_FEATURE_filesystemmodel
+ SOURCES
+ dialogs/qfileinfogatherer.cpp dialogs/qfileinfogatherer_p.h
+ dialogs/qfilesystemmodel.cpp dialogs/qfilesystemmodel.h dialogs/qfilesystemmodel_p.h
+)
+
+extend_target(Widgets CONDITION QT_FEATURE_fontdialog
+ SOURCES
+ dialogs/qfontdialog.cpp dialogs/qfontdialog.h dialogs/qfontdialog_p.h
+)
+
+extend_target(Widgets CONDITION QT_FEATURE_fscompleter
+ SOURCES
+ dialogs/qfscompleter_p.h
+)
+
+extend_target(Widgets CONDITION QT_FEATURE_inputdialog
+ SOURCES
+ dialogs/qinputdialog.cpp dialogs/qinputdialog.h
+)
+
+extend_target(Widgets CONDITION QT_FEATURE_messagebox
+ SOURCES
+ dialogs/qmessagebox.cpp dialogs/qmessagebox.h dialogs/qmessagebox.qrc
+)
+
+extend_target(Widgets CONDITION QT_FEATURE_progressdialog
+ SOURCES
+ dialogs/qprogressdialog.cpp dialogs/qprogressdialog.h
+)
+
+extend_target(Widgets CONDITION QT_FEATURE_wizard
+ SOURCES
+ dialogs/qwizard.cpp dialogs/qwizard.h
+)
+
+extend_target(Widgets CONDITION (QT_FEATURE_wizard) AND (WIN32)
+ SOURCES
+ dialogs/qwizard_win.cpp dialogs/qwizard_win_p.h
+)
+
+extend_target(Widgets CONDITION QT_FEATURE_accessibility
+ SOURCES
+ accessible/complexwidgets.cpp accessible/complexwidgets_p.h
+ accessible/qaccessiblemenu.cpp accessible/qaccessiblemenu_p.h
+ accessible/qaccessiblewidget.cpp accessible/qaccessiblewidget.h
+ accessible/qaccessiblewidgetfactory.cpp accessible/qaccessiblewidgetfactory_p.h
+ accessible/qaccessiblewidgets.cpp accessible/qaccessiblewidgets_p.h
+ accessible/rangecontrols.cpp accessible/rangecontrols_p.h
+ accessible/simplewidgets.cpp accessible/simplewidgets_p.h
+)
+
+extend_target(Widgets CONDITION (QT_FEATURE_accessibility) AND (QT_FEATURE_itemviews)
+ SOURCES
+ accessible/itemviews.cpp accessible/itemviews_p.h
+)
+
+extend_target(Widgets CONDITION QT_FEATURE_itemviews
+ SOURCES
+ itemviews/qabstractitemdelegate.cpp itemviews/qabstractitemdelegate.h itemviews/qabstractitemdelegate_p.h
+ itemviews/qabstractitemview.cpp itemviews/qabstractitemview.h itemviews/qabstractitemview_p.h
+ itemviews/qbsptree.cpp itemviews/qbsptree_p.h
+ itemviews/qheaderview.cpp itemviews/qheaderview.h itemviews/qheaderview_p.h
+ itemviews/qitemdelegate.cpp itemviews/qitemdelegate.h
+ itemviews/qitemeditorfactory.cpp itemviews/qitemeditorfactory.h itemviews/qitemeditorfactory_p.h
+ itemviews/qstyleditemdelegate.cpp itemviews/qstyleditemdelegate.h
+ itemviews/qwidgetitemdata_p.h
+)
+
+extend_target(Widgets CONDITION QT_FEATURE_columnview
+ SOURCES
+ itemviews/qcolumnview.cpp itemviews/qcolumnview.h itemviews/qcolumnview_p.h
+ itemviews/qcolumnviewgrip.cpp itemviews/qcolumnviewgrip_p.h
+)
+
+extend_target(Widgets CONDITION QT_FEATURE_datawidgetmapper
+ SOURCES
+ itemviews/qdatawidgetmapper.cpp itemviews/qdatawidgetmapper.h
+)
+
+extend_target(Widgets CONDITION QT_FEATURE_dirmodel
+ SOURCES
+ itemviews/qdirmodel.cpp itemviews/qdirmodel.h
+)
+
+extend_target(Widgets CONDITION QT_FEATURE_listview
+ SOURCES
+ itemviews/qlistview.cpp itemviews/qlistview.h itemviews/qlistview_p.h
+)
+
+extend_target(Widgets CONDITION QT_FEATURE_listwidget
+ SOURCES
+ itemviews/qlistwidget.cpp itemviews/qlistwidget.h itemviews/qlistwidget_p.h
+)
+
+extend_target(Widgets CONDITION QT_FEATURE_tableview
+ SOURCES
+ itemviews/qtableview.cpp itemviews/qtableview.h itemviews/qtableview_p.h
+)
+
+extend_target(Widgets CONDITION QT_FEATURE_tablewidget
+ SOURCES
+ itemviews/qtablewidget.cpp itemviews/qtablewidget.h itemviews/qtablewidget_p.h
+)
+
+extend_target(Widgets CONDITION QT_FEATURE_treeview
+ SOURCES
+ itemviews/qtreeview.cpp itemviews/qtreeview.h itemviews/qtreeview_p.h
+)
+
+extend_target(Widgets CONDITION QT_FEATURE_treewidget
+ SOURCES
+ itemviews/qtreewidget.cpp itemviews/qtreewidget.h itemviews/qtreewidget_p.h
+ itemviews/qtreewidgetitemiterator.cpp itemviews/qtreewidgetitemiterator.h
+)
+
+extend_target(Widgets CONDITION QT_FEATURE_graphicsview
+ SOURCES
+ graphicsview/qgraph_p.h
+ graphicsview/qgraphicsanchorlayout.cpp graphicsview/qgraphicsanchorlayout.h graphicsview/qgraphicsanchorlayout_p.cpp graphicsview/qgraphicsanchorlayout_p.h
+ graphicsview/qgraphicsgridlayout.cpp graphicsview/qgraphicsgridlayout.h
+ graphicsview/qgraphicsgridlayoutengine.cpp graphicsview/qgraphicsgridlayoutengine_p.h
+ graphicsview/qgraphicsitem.cpp graphicsview/qgraphicsitem.h graphicsview/qgraphicsitem_p.h
+ graphicsview/qgraphicsitemanimation.cpp graphicsview/qgraphicsitemanimation.h
+ graphicsview/qgraphicslayout.cpp graphicsview/qgraphicslayout.h graphicsview/qgraphicslayout_p.cpp graphicsview/qgraphicslayout_p.h
+ graphicsview/qgraphicslayoutitem.cpp graphicsview/qgraphicslayoutitem.h graphicsview/qgraphicslayoutitem_p.h
+ graphicsview/qgraphicslayoutstyleinfo.cpp graphicsview/qgraphicslayoutstyleinfo_p.h
+ graphicsview/qgraphicslinearlayout.cpp graphicsview/qgraphicslinearlayout.h
+ graphicsview/qgraphicsproxywidget.cpp graphicsview/qgraphicsproxywidget.h graphicsview/qgraphicsproxywidget_p.h
+ graphicsview/qgraphicsscene.cpp graphicsview/qgraphicsscene.h graphicsview/qgraphicsscene_p.h
+ graphicsview/qgraphicsscene_bsp.cpp graphicsview/qgraphicsscene_bsp_p.h
+ graphicsview/qgraphicsscenebsptreeindex.cpp graphicsview/qgraphicsscenebsptreeindex_p.h
+ graphicsview/qgraphicssceneevent.cpp graphicsview/qgraphicssceneevent.h
+ graphicsview/qgraphicssceneindex.cpp graphicsview/qgraphicssceneindex_p.h
+ graphicsview/qgraphicsscenelinearindex.cpp graphicsview/qgraphicsscenelinearindex_p.h
+ graphicsview/qgraphicstransform.cpp graphicsview/qgraphicstransform.h graphicsview/qgraphicstransform_p.h
+ graphicsview/qgraphicsview.cpp graphicsview/qgraphicsview.h graphicsview/qgraphicsview_p.h
+ graphicsview/qgraphicswidget.cpp graphicsview/qgraphicswidget.h graphicsview/qgraphicswidget_p.cpp graphicsview/qgraphicswidget_p.h
+ graphicsview/qsimplex_p.cpp graphicsview/qsimplex_p.h
+)
+
+extend_target(Widgets CONDITION QT_FEATURE_completer
+ SOURCES
+ util/qcompleter.cpp util/qcompleter.h util/qcompleter_p.h
+)
+
+extend_target(Widgets CONDITION QT_FEATURE_scroller
+ SOURCES
+ util/qflickgesture.cpp util/qflickgesture_p.h
+ util/qscroller.cpp util/qscroller.h util/qscroller_p.h
+ util/qscrollerproperties.cpp util/qscrollerproperties.h util/qscrollerproperties_p.h
+)
+
+extend_target(Widgets CONDITION QT_FEATURE_undocommand
+ SOURCES
+ util/qundostack.cpp util/qundostack.h util/qundostack_p.h
+)
+
+extend_target(Widgets CONDITION QT_FEATURE_undogroup
+ SOURCES
+ util/qundogroup.cpp util/qundogroup.h
+)
+
+extend_target(Widgets CONDITION QT_FEATURE_undoview
+ SOURCES
+ util/qundoview.cpp util/qundoview.h
+)
+
+extend_target(Widgets CONDITION QT_FEATURE_xcb
+ SOURCES
+ util/qsystemtrayicon_x11.cpp
+)
+
+extend_target(Widgets CONDITION NOT QT_FEATURE_xcb
+ SOURCES
+ util/qsystemtrayicon_qpa.cpp
+)
+
+extend_target(Widgets CONDITION APPLE_OSX
+ SOURCES
+ util/qscroller_mac.mm
+)
+
+extend_target(Widgets CONDITION QT_FEATURE_statemachine
+ SOURCES
+ statemachine/qguistatemachine.cpp
+)
+
+extend_target(Widgets CONDITION QT_FEATURE_qeventtransition
+ SOURCES
+ statemachine/qbasickeyeventtransition.cpp statemachine/qbasickeyeventtransition_p.h
+ statemachine/qbasicmouseeventtransition.cpp statemachine/qbasicmouseeventtransition_p.h
+ statemachine/qkeyeventtransition.cpp statemachine/qkeyeventtransition.h
+ statemachine/qmouseeventtransition.cpp statemachine/qmouseeventtransition.h
+)
+
+# Enable Evaluation based on QT_EVAL variable being set from the outside:
+extend_target(Widgets CONDITION QT_EVAL LIBRARIES Qt_Evaluation)
+
+
+qt_create_tracepoints(Widgets ./qtwidgets.tracepoints)
+
+add_qt_docs(./doc/qtwidgets.qdocconf)
diff --git a/src/widgets/configure.cmake b/src/widgets/configure.cmake
new file mode 100644
index 0000000000..3fae04b0d2
--- /dev/null
+++ b/src/widgets/configure.cmake
@@ -0,0 +1,567 @@
+
+
+#### Inputs
+
+
+
+#### Libraries
+
+
+
+#### Tests
+
+
+
+#### Features
+
+qt_feature("gtk3" PRIVATE
+ LABEL "GTK+"
+ AUTODETECT NOT APPLE
+ CONDITION QT_FEATURE_glib AND libs.gtk3 OR FIXME
+)
+qt_feature("style_fusion" PRIVATE
+ LABEL "Fusion"
+)
+qt_feature("style_mac" PRIVATE
+ LABEL "macOS"
+ CONDITION APPLE_OSX
+)
+qt_feature("style_windows" PRIVATE
+ LABEL "Windows"
+)
+qt_feature("style_windowsvista" PRIVATE
+ LABEL "WindowsVista"
+ CONDITION QT_FEATURE_style_windows AND WIN32 AND NOT WINRT AND tests.uxtheme OR FIXME
+)
+qt_feature("style_android" PRIVATE
+ LABEL "Android"
+ AUTODETECT ANDROID
+)
+qt_feature("style_stylesheet" PUBLIC
+ SECTION "Styles"
+ LABEL "QStyleSheetStyle"
+ PURPOSE "Provides a widget style which is configurable via CSS."
+ CONDITION QT_FEATURE_style_windows AND QT_FEATURE_properties AND QT_FEATURE_cssparser
+)
+qt_feature_definition("style_stylesheet" "QT_NO_STYLE_STYLESHEET" NEGATE VALUE "1")
+qt_feature("effects" PRIVATE
+ SECTION "Kernel"
+ LABEL "Effects"
+ PURPOSE "Provides special widget effects (e.g. fading and scrolling)."
+)
+qt_feature("filesystemmodel" PUBLIC
+ SECTION "File I/O"
+ LABEL "QFileSystemModel"
+ PURPOSE "Provides a data model for the local filesystem."
+ CONDITION QT_FEATURE_itemmodel AND QT_FEATURE_thread
+)
+qt_feature_definition("filesystemmodel" "QT_NO_FILESYSTEMMODEL" NEGATE VALUE "1")
+qt_feature("itemviews" PUBLIC
+ SECTION "ItemViews"
+ LABEL "The Model/View Framework"
+ PURPOSE "Provides the model/view architecture managing the relationship between data and the way it is presented to the user."
+ CONDITION QT_FEATURE_itemmodel AND QT_FEATURE_scrollarea
+)
+qt_feature_definition("itemviews" "QT_NO_ITEMVIEWS" NEGATE VALUE "1")
+qt_feature("treewidget" PUBLIC
+ SECTION "Widgets"
+ LABEL "QTreeWidget"
+ PURPOSE "Provides views using tree models."
+ CONDITION QT_FEATURE_treeview
+)
+qt_feature_definition("treewidget" "QT_NO_TREEWIDGET" NEGATE VALUE "1")
+qt_feature("listwidget" PUBLIC
+ SECTION "Widgets"
+ LABEL "QListWidget"
+ PURPOSE "Provides item-based list widgets."
+ CONDITION QT_FEATURE_listview
+)
+qt_feature_definition("listwidget" "QT_NO_LISTWIDGET" NEGATE VALUE "1")
+qt_feature("tablewidget" PUBLIC
+ SECTION "Widgets"
+ LABEL "QTableWidget"
+ PURPOSE "Provides item-based table views."
+ CONDITION QT_FEATURE_tableview
+)
+qt_feature_definition("tablewidget" "QT_NO_TABLEWIDGET" NEGATE VALUE "1")
+qt_feature("abstractbutton" PUBLIC
+ SECTION "Widgets"
+ LABEL "QAbstractButton"
+ PURPOSE "Abstract base class of button widgets, providing functionality common to buttons."
+)
+qt_feature("commandlinkbutton" PUBLIC
+ SECTION "Widgets"
+ LABEL "QCommandLinkButton"
+ PURPOSE "Provides a Vista style command link button."
+ CONDITION QT_FEATURE_pushbutton
+)
+qt_feature("datetimeedit" PUBLIC
+ SECTION "Widgets"
+ LABEL "QDateTimeEdit"
+ PURPOSE "Supports editing dates and times."
+ CONDITION QT_FEATURE_calendarwidget AND QT_FEATURE_datestring AND QT_FEATURE_textdate AND QT_FEATURE_datetimeparser
+)
+qt_feature_definition("datetimeedit" "QT_NO_DATETIMEEDIT" NEGATE VALUE "1")
+qt_feature("stackedwidget" PUBLIC
+ SECTION "Widgets"
+ LABEL "QStackedWidget"
+ PURPOSE "Provides stacked widgets."
+)
+qt_feature_definition("stackedwidget" "QT_NO_STACKEDWIDGET" NEGATE VALUE "1")
+qt_feature("textbrowser" PUBLIC
+ SECTION "Widgets"
+ LABEL "QTextBrowser"
+ PURPOSE "Supports HTML document browsing."
+ CONDITION QT_FEATURE_textedit
+)
+qt_feature_definition("textbrowser" "QT_NO_TEXTBROWSER" NEGATE VALUE "1")
+qt_feature("splashscreen" PUBLIC
+ SECTION "Widgets"
+ LABEL "QSplashScreen"
+ PURPOSE "Supports splash screens that can be shown during application startup."
+)
+qt_feature_definition("splashscreen" "QT_NO_SPLASHSCREEN" NEGATE VALUE "1")
+qt_feature("splitter" PUBLIC
+ SECTION "Widgets"
+ LABEL "QSplitter"
+ PURPOSE "Provides user controlled splitter widgets."
+)
+qt_feature_definition("splitter" "QT_NO_SPLITTER" NEGATE VALUE "1")
+qt_feature("widgettextcontrol" PRIVATE
+ SECTION "Widgets"
+ LABEL "QWidgetTextControl"
+ PURPOSE "Provides text control functionality to other widgets."
+)
+qt_feature("label" PUBLIC
+ SECTION "Widgets"
+ LABEL "QLabel"
+ PURPOSE "Provides a text or image display."
+ CONDITION QT_FEATURE_widgettextcontrol
+)
+qt_feature("formlayout" PUBLIC
+ SECTION "Widgets"
+ LABEL "QFormLayout"
+ PURPOSE "Manages forms of input widgets and their associated labels."
+ CONDITION QT_FEATURE_label
+)
+qt_feature("lcdnumber" PUBLIC
+ SECTION "Widgets"
+ LABEL "QLCDNumber"
+ PURPOSE "Provides LCD-like digits."
+)
+qt_feature_definition("lcdnumber" "QT_NO_LCDNUMBER" NEGATE VALUE "1")
+qt_feature("menu" PUBLIC
+ SECTION "Widgets"
+ LABEL "QMenu"
+ PURPOSE "Provides popup-menus."
+ CONDITION QT_FEATURE_action AND QT_FEATURE_pushbutton
+)
+qt_feature_definition("menu" "QT_NO_MENU" NEGATE VALUE "1")
+qt_feature("lineedit" PUBLIC
+ SECTION "Widgets"
+ LABEL "QLineEdit"
+ PURPOSE "Provides single-line edits."
+ CONDITION QT_FEATURE_widgettextcontrol
+)
+qt_feature_definition("lineedit" "QT_NO_LINEEDIT" NEGATE VALUE "1")
+qt_feature("radiobutton" PUBLIC
+ SECTION "Widgets"
+ LABEL "QRadioButton"
+ PURPOSE "Provides a radio button with a text label."
+ CONDITION QT_FEATURE_abstractbutton
+)
+qt_feature("spinbox" PUBLIC
+ SECTION "Widgets"
+ LABEL "QSpinBox"
+ PURPOSE "Provides spin boxes handling integers and discrete sets of values."
+ CONDITION QT_FEATURE_lineedit AND QT_FEATURE_validator
+)
+qt_feature_definition("spinbox" "QT_NO_SPINBOX" NEGATE VALUE "1")
+qt_feature("tabbar" PUBLIC
+ SECTION "Widgets"
+ LABEL "QTabBar"
+ PURPOSE "Provides tab bars, e.g., for use in tabbed dialogs."
+ CONDITION QT_FEATURE_toolbutton
+)
+qt_feature_definition("tabbar" "QT_NO_TABBAR" NEGATE VALUE "1")
+qt_feature("tabwidget" PUBLIC
+ SECTION "Widgets"
+ LABEL "QTabWidget"
+ PURPOSE "Supports stacking tabbed widgets."
+ CONDITION QT_FEATURE_tabbar AND QT_FEATURE_stackedwidget
+)
+qt_feature_definition("tabwidget" "QT_NO_TABWIDGET" NEGATE VALUE "1")
+qt_feature("combobox" PUBLIC
+ SECTION "Widgets"
+ LABEL "QComboBox"
+ PURPOSE "Provides drop-down boxes presenting a list of options to the user."
+ CONDITION QT_FEATURE_lineedit AND QT_FEATURE_standarditemmodel AND QT_FEATURE_listview
+)
+qt_feature_definition("combobox" "QT_NO_COMBOBOX" NEGATE VALUE "1")
+qt_feature("fontcombobox" PUBLIC
+ SECTION "Widgets"
+ LABEL "QFontComboBox"
+ PURPOSE "Provides a combobox that lets the user select a font family."
+ CONDITION QT_FEATURE_combobox AND QT_FEATURE_stringlistmodel
+)
+qt_feature_definition("fontcombobox" "QT_NO_FONTCOMBOBOX" NEGATE VALUE "1")
+qt_feature("checkbox" PUBLIC
+ SECTION "Widgets"
+ LABEL "QCheckBox("
+ PURPOSE "Provides a checkbox with a text label."
+ CONDITION QT_FEATURE_abstractbutton
+)
+qt_feature("pushbutton" PUBLIC
+ SECTION "Widgets"
+ LABEL "QPushButton"
+ PURPOSE "Provides a command button."
+ CONDITION QT_FEATURE_abstractbutton AND QT_FEATURE_action
+)
+qt_feature("toolbutton" PUBLIC
+ SECTION "Widgets"
+ LABEL "QToolButton"
+ PURPOSE "Provides quick-access buttons to commands and options."
+ CONDITION QT_FEATURE_abstractbutton AND QT_FEATURE_action
+)
+qt_feature_definition("toolbutton" "QT_NO_TOOLBUTTON" NEGATE VALUE "1")
+qt_feature("toolbar" PUBLIC
+ SECTION "Widgets"
+ LABEL "QToolBar"
+ PURPOSE "Provides movable panels containing a set of controls."
+ CONDITION QT_FEATURE_mainwindow
+)
+qt_feature_definition("toolbar" "QT_NO_TOOLBAR" NEGATE VALUE "1")
+qt_feature("toolbox" PUBLIC
+ SECTION "Widgets"
+ LABEL "QToolBox"
+ PURPOSE "Provides columns of tabbed widget items."
+ CONDITION QT_FEATURE_toolbutton AND QT_FEATURE_scrollarea
+)
+qt_feature_definition("toolbox" "QT_NO_TOOLBOX" NEGATE VALUE "1")
+qt_feature("groupbox" PUBLIC
+ SECTION "Widgets"
+ LABEL "QGroupBox"
+ PURPOSE "Provides widget grouping boxes with frames."
+)
+qt_feature_definition("groupbox" "QT_NO_GROUPBOX" NEGATE VALUE "1")
+qt_feature("buttongroup" PUBLIC
+ SECTION "Widgets"
+ LABEL "QButtonGroup"
+ PURPOSE "Supports organizing groups of button widgets."
+ CONDITION QT_FEATURE_abstractbutton AND QT_FEATURE_groupbox
+)
+qt_feature_definition("buttongroup" "QT_NO_BUTTONGROUP" NEGATE VALUE "1")
+qt_feature("mainwindow" PUBLIC
+ SECTION "Widgets"
+ LABEL "QMainWindow"
+ PURPOSE "Provides main application windows."
+ CONDITION QT_FEATURE_menu AND QT_FEATURE_resizehandler AND QT_FEATURE_toolbutton
+)
+qt_feature_definition("mainwindow" "QT_NO_MAINWINDOW" NEGATE VALUE "1")
+qt_feature("dockwidget" PUBLIC
+ SECTION "Widgets"
+ LABEL "QDockwidget"
+ PURPOSE "Supports docking widgets inside a QMainWindow or floated as a top-level window on the desktop."
+ CONDITION QT_FEATURE_mainwindow
+)
+qt_feature_definition("dockwidget" "QT_NO_DOCKWIDGET" NEGATE VALUE "1")
+qt_feature("mdiarea" PUBLIC
+ SECTION "Widgets"
+ LABEL "QMdiArea"
+ PURPOSE "Provides an area in which MDI windows are displayed."
+ CONDITION QT_FEATURE_scrollarea
+)
+qt_feature_definition("mdiarea" "QT_NO_MDIAREA" NEGATE VALUE "1")
+qt_feature("resizehandler" PUBLIC
+ SECTION "Widgets"
+ LABEL "QWidgetResizeHandler"
+ PURPOSE "Provides an internal resize handler for dock widgets."
+)
+qt_feature_definition("resizehandler" "QT_NO_RESIZEHANDLER" NEGATE VALUE "1")
+qt_feature("statusbar" PUBLIC
+ SECTION "Widgets"
+ LABEL "QStatusBar"
+ PURPOSE "Supports presentation of status information."
+)
+qt_feature_definition("statusbar" "QT_NO_STATUSBAR" NEGATE VALUE "1")
+qt_feature("menubar" PUBLIC
+ SECTION "Widgets"
+ LABEL "QMenuBar"
+ PURPOSE "Provides pull-down menu items."
+ CONDITION QT_FEATURE_menu AND QT_FEATURE_toolbutton
+)
+qt_feature_definition("menubar" "QT_NO_MENUBAR" NEGATE VALUE "1")
+qt_feature("contextmenu" PUBLIC
+ SECTION "Widgets"
+ LABEL "Context menus"
+ PURPOSE "Adds pop-up menus on right mouse click to numerous widgets."
+ CONDITION QT_FEATURE_menu
+)
+qt_feature_definition("contextmenu" "QT_NO_CONTEXTMENU" NEGATE VALUE "1")
+qt_feature("progressbar" PUBLIC
+ SECTION "Widgets"
+ LABEL "QProgressBar"
+ PURPOSE "Supports presentation of operation progress."
+)
+qt_feature_definition("progressbar" "QT_NO_PROGRESSBAR" NEGATE VALUE "1")
+qt_feature("abstractslider" PUBLIC
+ SECTION "Widgets"
+ LABEL "QAbstractSlider"
+ PURPOSE "Common super class for widgets like QScrollBar, QSlider and QDial."
+)
+qt_feature("slider" PUBLIC
+ SECTION "Widgets"
+ LABEL "QSlider"
+ PURPOSE "Provides sliders controlling a bounded value."
+ CONDITION QT_FEATURE_abstractslider
+)
+qt_feature_definition("slider" "QT_NO_SLIDER" NEGATE VALUE "1")
+qt_feature("scrollbar" PUBLIC
+ SECTION "Widgets"
+ LABEL "QScrollBar"
+ PURPOSE "Provides scrollbars allowing the user access parts of a document that is larger than the widget used to display it."
+ CONDITION QT_FEATURE_slider
+)
+qt_feature_definition("scrollbar" "QT_NO_SCROLLBAR" NEGATE VALUE "1")
+qt_feature("dial" PUBLIC
+ SECTION "Widgets"
+ LABEL "QDial"
+ PURPOSE "Provides a rounded range control, e.g., like a speedometer."
+ CONDITION QT_FEATURE_slider
+)
+qt_feature_definition("dial" "QT_NO_DIAL" NEGATE VALUE "1")
+qt_feature("scrollarea" PUBLIC
+ SECTION "Widgets"
+ LABEL "QScrollArea"
+ PURPOSE "Supports scrolling views onto widgets."
+ CONDITION QT_FEATURE_scrollbar
+)
+qt_feature_definition("scrollarea" "QT_NO_SCROLLAREA" NEGATE VALUE "1")
+qt_feature("scroller" PUBLIC
+ SECTION "Widgets"
+ LABEL "QScroller"
+ PURPOSE "Enables kinetic scrolling for any scrolling widget or graphics item."
+)
+qt_feature("graphicsview" PUBLIC
+ SECTION "Widgets"
+ LABEL "QGraphicsView"
+ PURPOSE "Provides a canvas/sprite framework."
+ CONDITION QT_FEATURE_scrollarea AND QT_FEATURE_widgettextcontrol
+)
+qt_feature_definition("graphicsview" "QT_NO_GRAPHICSVIEW" NEGATE VALUE "1")
+qt_feature("graphicseffect" PUBLIC
+ SECTION "Widgets"
+ LABEL "QGraphicsEffect"
+ PURPOSE "Provides various graphics effects."
+ CONDITION QT_FEATURE_graphicsview
+)
+qt_feature_definition("graphicseffect" "QT_NO_GRAPHICSEFFECT" NEGATE VALUE "1")
+qt_feature("textedit" PUBLIC
+ SECTION "Widgets"
+ LABEL "QTextEdit"
+ PURPOSE "Supports rich text editing."
+ CONDITION QT_FEATURE_scrollarea AND QT_FEATURE_properties AND QT_FEATURE_widgettextcontrol
+)
+qt_feature_definition("textedit" "QT_NO_TEXTEDIT" NEGATE VALUE "1")
+qt_feature("syntaxhighlighter" PUBLIC
+ SECTION "Widgets"
+ LABEL "QSyntaxHighlighter"
+ PURPOSE "Supports custom syntax highlighting."
+ CONDITION QT_FEATURE_textedit
+)
+qt_feature_definition("syntaxhighlighter" "QT_NO_SYNTAXHIGHLIGHTER" NEGATE VALUE "1")
+qt_feature("rubberband" PUBLIC
+ SECTION "Widgets"
+ LABEL "QRubberBand"
+ PURPOSE "Supports using rubberbands to indicate selections and boundaries."
+)
+qt_feature_definition("rubberband" "QT_NO_RUBBERBAND" NEGATE VALUE "1")
+qt_feature("tooltip" PUBLIC
+ SECTION "Widgets"
+ LABEL "QToolTip"
+ PURPOSE "Supports presentation of tooltips."
+ CONDITION QT_FEATURE_label
+)
+qt_feature_definition("tooltip" "QT_NO_TOOLTIP" NEGATE VALUE "1")
+qt_feature("statustip" PUBLIC
+ SECTION "Widgets"
+ LABEL "Status Tip"
+ PURPOSE "Supports status tip functionality and events."
+)
+qt_feature_definition("statustip" "QT_NO_STATUSTIP" NEGATE VALUE "1")
+qt_feature("sizegrip" PUBLIC
+ SECTION "Widgets"
+ LABEL "QSizeGrip"
+ PURPOSE "Provides corner-grips for resizing top-level windows."
+)
+qt_feature_definition("sizegrip" "QT_NO_SIZEGRIP" NEGATE VALUE "1")
+qt_feature("calendarwidget" PUBLIC
+ SECTION "Widgets"
+ LABEL "QCalendarWidget"
+ PURPOSE "Provides a monthly based calendar widget allowing the user to select a date."
+ CONDITION ( QT_FEATURE_label ) AND ( QT_FEATURE_menu ) AND ( QT_FEATURE_pushbutton ) AND ( QT_FEATURE_spinbox ) AND ( QT_FEATURE_tableview ) AND ( QT_FEATURE_textdate ) AND ( QT_FEATURE_toolbutton )
+)
+qt_feature_definition("calendarwidget" "QT_NO_CALENDARWIDGET" NEGATE VALUE "1")
+qt_feature("keysequenceedit" PUBLIC
+ SECTION "Widgets"
+ LABEL "QKeySequenceEdit"
+ PURPOSE "Provides a widget for editing QKeySequences."
+ CONDITION QT_FEATURE_lineedit AND QT_FEATURE_shortcut
+)
+qt_feature_definition("keysequenceedit" "QT_NO_KEYSEQUENCEEDIT" NEGATE VALUE "1")
+qt_feature("dialog" PUBLIC
+ SECTION "Dialogs"
+ LABEL "QDialog"
+ PURPOSE "Base class of dialog windows."
+)
+qt_feature("dialogbuttonbox" PUBLIC
+ SECTION "Dialogs"
+ LABEL "QDialogButtonBox"
+ PURPOSE "Presents buttons in a layout that is appropriate for the current widget style."
+ CONDITION QT_FEATURE_dialog AND QT_FEATURE_pushbutton
+)
+qt_feature("messagebox" PUBLIC
+ SECTION "Dialogs"
+ LABEL "QMessageBox"
+ PURPOSE "Provides message boxes displaying informative messages and simple questions."
+ CONDITION ( QT_FEATURE_checkbox ) AND ( QT_FEATURE_dialog ) AND ( QT_FEATURE_dialogbuttonbox ) AND ( QT_FEATURE_label ) AND ( QT_FEATURE_pushbutton )
+)
+qt_feature_definition("messagebox" "QT_NO_MESSAGEBOX" NEGATE VALUE "1")
+qt_feature("colordialog" PUBLIC
+ SECTION "Dialogs"
+ LABEL "QColorDialog"
+ PURPOSE "Provides a dialog widget for specifying colors."
+ CONDITION ( QT_FEATURE_dialog ) AND ( QT_FEATURE_dialogbuttonbox ) AND ( QT_FEATURE_label ) AND ( QT_FEATURE_pushbutton ) AND ( QT_FEATURE_spinbox )
+)
+qt_feature_definition("colordialog" "QT_NO_COLORDIALOG" NEGATE VALUE "1")
+qt_feature("filedialog" PUBLIC
+ SECTION "Dialogs"
+ LABEL "QFileDialog"
+ PURPOSE "Provides a dialog widget for selecting files or directories."
+ CONDITION ( QT_FEATURE_buttongroup ) AND ( QT_FEATURE_combobox ) AND ( QT_FEATURE_dialog ) AND ( QT_FEATURE_dialogbuttonbox ) AND ( QT_FEATURE_dirmodel ) AND ( QT_FEATURE_label ) AND ( QT_FEATURE_proxymodel ) AND ( QT_FEATURE_splitter ) AND ( QT_FEATURE_stackedwidget ) AND ( QT_FEATURE_treeview ) AND ( QT_FEATURE_toolbutton )
+)
+qt_feature_definition("filedialog" "QT_NO_FILEDIALOG" NEGATE VALUE "1")
+qt_feature("fontdialog" PUBLIC
+ SECTION "Dialogs"
+ LABEL "QFontDialog"
+ PURPOSE "Provides a dialog widget for selecting fonts."
+ CONDITION ( QT_FEATURE_checkbox ) AND ( QT_FEATURE_combobox ) AND ( QT_FEATURE_dialog ) AND ( QT_FEATURE_dialogbuttonbox ) AND ( QT_FEATURE_groupbox ) AND ( QT_FEATURE_label ) AND ( QT_FEATURE_pushbutton ) AND ( QT_FEATURE_stringlistmodel ) AND ( QT_FEATURE_validator )
+)
+qt_feature_definition("fontdialog" "QT_NO_FONTDIALOG" NEGATE VALUE "1")
+qt_feature("progressdialog" PUBLIC
+ SECTION "Dialogs"
+ LABEL "QProgressDialog"
+ PURPOSE "Provides feedback on the progress of a slow operation."
+ CONDITION ( QT_FEATURE_dialog ) AND ( QT_FEATURE_label ) AND ( QT_FEATURE_pushbutton ) AND ( QT_FEATURE_progressbar )
+)
+qt_feature_definition("progressdialog" "QT_NO_PROGRESSDIALOG" NEGATE VALUE "1")
+qt_feature("inputdialog" PUBLIC
+ SECTION "Dialogs"
+ LABEL "QInputDialog"
+ PURPOSE "Provides a simple convenience dialog to get a single value from the user."
+ CONDITION ( QT_FEATURE_combobox ) AND ( QT_FEATURE_dialog ) AND ( QT_FEATURE_dialogbuttonbox ) AND ( QT_FEATURE_label ) AND ( QT_FEATURE_pushbutton ) AND ( QT_FEATURE_spinbox ) AND ( QT_FEATURE_stackedwidget ) AND ( QT_FEATURE_textedit )
+)
+qt_feature_definition("inputdialog" "QT_NO_INPUTDIALOG" NEGATE VALUE "1")
+qt_feature("errormessage" PUBLIC
+ SECTION "Dialogs"
+ LABEL "QErrorMessage"
+ PURPOSE "Provides an error message display dialog."
+ CONDITION ( QT_FEATURE_checkbox ) AND ( QT_FEATURE_dialog ) AND ( QT_FEATURE_textedit ) AND ( QT_FEATURE_label ) AND ( QT_FEATURE_pushbutton ) AND ( QT_FEATURE_textedit )
+)
+qt_feature_definition("errormessage" "QT_NO_ERRORMESSAGE" NEGATE VALUE "1")
+qt_feature("wizard" PUBLIC
+ SECTION "Dialogs"
+ LABEL "QWizard"
+ PURPOSE "Provides a framework for multi-page click-through dialogs."
+ CONDITION ( QT_FEATURE_dialog ) AND ( QT_FEATURE_pushbutton ) AND ( QT_FEATURE_properties ) AND ( QT_FEATURE_label )
+)
+qt_feature_definition("wizard" "QT_NO_WIZARD" NEGATE VALUE "1")
+qt_feature("dirmodel" PUBLIC
+ SECTION "ItemViews"
+ LABEL "QDirModel"
+ PURPOSE "Provides a data model for the local filesystem."
+ CONDITION QT_FEATURE_itemviews AND QT_FEATURE_filesystemmodel
+)
+qt_feature_definition("dirmodel" "QT_NO_DIRMODEL" NEGATE VALUE "1")
+qt_feature("listview" PUBLIC
+ SECTION "ItemViews"
+ LABEL "QListView"
+ PURPOSE "Provides a list or icon view onto a model."
+ CONDITION QT_FEATURE_itemviews
+)
+qt_feature_definition("listview" "QT_NO_LISTVIEW" NEGATE VALUE "1")
+qt_feature("tableview" PUBLIC
+ SECTION "ItemViews"
+ LABEL "QTableView"
+ PURPOSE "Provides a default model/view implementation of a table view."
+ CONDITION QT_FEATURE_itemviews
+)
+qt_feature_definition("tableview" "QT_NO_TABLEVIEW" NEGATE VALUE "1")
+qt_feature("treeview" PUBLIC
+ SECTION "ItemViews"
+ LABEL "QTreeView"
+ PURPOSE "Provides a default model/view implementation of a tree view."
+ CONDITION QT_FEATURE_itemviews
+)
+qt_feature_definition("treeview" "QT_NO_TREEVIEW" NEGATE VALUE "1")
+qt_feature("datawidgetmapper" PUBLIC
+ SECTION "ItemViews"
+ LABEL "QDataWidgetMapper"
+ PURPOSE "Provides mapping between a section of a data model to widgets."
+ CONDITION QT_FEATURE_itemviews AND QT_FEATURE_properties
+)
+qt_feature_definition("datawidgetmapper" "QT_NO_DATAWIDGETMAPPER" NEGATE VALUE "1")
+qt_feature("columnview" PUBLIC
+ SECTION "ItemViews"
+ LABEL "QColumnView"
+ PURPOSE "Provides a model/view implementation of a column view."
+ CONDITION QT_FEATURE_listview
+)
+qt_feature_definition("columnview" "QT_NO_COLUMNVIEW" NEGATE VALUE "1")
+qt_feature("paint_debug" PUBLIC
+ SECTION "Painting"
+ LABEL "Painting Debug Utilities"
+ PURPOSE "Enabled debugging painting with the environment variables QT_FLUSH_UPDATE and QT_FLUSH_PAINT."
+)
+qt_feature_definition("paint_debug" "QT_NO_PAINT_DEBUG" NEGATE VALUE "1")
+qt_feature("completer" PUBLIC
+ SECTION "Utilities"
+ LABEL "QCompleter"
+ PURPOSE "Provides completions based on an item model."
+ CONDITION QT_FEATURE_proxymodel AND QT_FEATURE_itemviews
+)
+qt_feature_definition("completer" "QT_NO_COMPLETER" NEGATE VALUE "1")
+qt_feature("fscompleter" PUBLIC
+ SECTION "Utilities"
+ LABEL "QFSCompleter"
+ PURPOSE "Provides file name completion in QFileDialog."
+ CONDITION QT_FEATURE_filesystemmodel AND QT_FEATURE_completer
+)
+qt_feature_definition("fscompleter" "QT_NO_FSCOMPLETER" NEGATE VALUE "1")
+qt_feature("undocommand" PUBLIC
+ SECTION "Utilities"
+ LABEL "QUndoCommand"
+ PURPOSE "Applies (redo or) undo of a single change in a document."
+)
+qt_feature_definition("undocommand" "QT_NO_UNDOCOMMAND" NEGATE VALUE "1")
+qt_feature("undostack" PUBLIC
+ SECTION "Utilities"
+ LABEL "QUndoStack"
+ PURPOSE "Provides the ability to (redo or) undo a list of changes in a document."
+ CONDITION QT_FEATURE_undocommand
+)
+qt_feature_definition("undostack" "QT_NO_UNDOSTACK" NEGATE VALUE "1")
+qt_feature("undogroup" PUBLIC
+ SECTION "Utilities"
+ LABEL "QUndoGroup"
+ PURPOSE "Provides the ability to cluster QUndoCommands."
+ CONDITION QT_FEATURE_undostack
+)
+qt_feature_definition("undogroup" "QT_NO_UNDOGROUP" NEGATE VALUE "1")
+qt_feature("undoview" PUBLIC
+ SECTION "Utilities"
+ LABEL "QUndoView"
+ PURPOSE "Provides a widget which shows the contents of an undo stack."
+ CONDITION QT_FEATURE_undostack AND QT_FEATURE_listview
+)
+qt_feature_definition("undoview" "QT_NO_UNDOVIEW" NEGATE VALUE "1")
diff --git a/src/xml/CMakeLists.txt b/src/xml/CMakeLists.txt
new file mode 100644
index 0000000000..ae045ae76e
--- /dev/null
+++ b/src/xml/CMakeLists.txt
@@ -0,0 +1,30 @@
+# Generated from xml.pro.
+
+#####################################################################
+## QtXml Module:
+#####################################################################
+
+add_qt_module(Xml
+ SOURCES
+ dom/qdom.cpp dom/qdom.h
+ qtxmlglobal.h
+ sax/qxml.cpp sax/qxml.h sax/qxml_p.h
+ DEFINES
+ QT_NO_USING_NAMESPACE
+ QT_NO_FOREACH
+ LIBRARIES
+ Qt::CorePrivate
+ PUBLIC_LIBRARIES
+ Qt::Core
+)
+
+## Scopes:
+#####################################################################
+
+### FIXME
+# extend_target(Xml CONDITION (MSVC) AND (TEST_architecture_arch STREQUAL i386))
+# SOURCES
+# ### FIXME: QMAKE_LFLAGS += /BASE:0x61000000
+# )
+
+add_qt_docs(./doc/qtxml.qdocconf)
diff --git a/src/xml/configure.cmake b/src/xml/configure.cmake
new file mode 100644
index 0000000000..25a7de5aa2
--- /dev/null
+++ b/src/xml/configure.cmake
@@ -0,0 +1,22 @@
+
+
+#### Inputs
+
+
+
+#### Libraries
+
+
+
+#### Tests
+
+
+
+#### Features
+
+qt_feature("dom" PUBLIC
+ SECTION "File I/O"
+ LABEL "DOM"
+ PURPOSE "Supports the Document Object Model."
+)
+qt_feature_definition("dom" "QT_NO_DOM" NEGATE VALUE "1")
diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt
new file mode 100644
index 0000000000..0653827192
--- /dev/null
+++ b/tests/CMakeLists.txt
@@ -0,0 +1 @@
+add_subdirectory(auto)
diff --git a/tests/auto/CMakeLists.txt b/tests/auto/CMakeLists.txt
new file mode 100644
index 0000000000..5ee23c0023
--- /dev/null
+++ b/tests/auto/CMakeLists.txt
@@ -0,0 +1,55 @@
+# Generated from auto.pro.
+
+if (NOT APPLE_UIKIT)
+ add_subdirectory("corelib")
+endif()
+if (QT_FEATURE_dbus)
+ set(run_dbus_tests ON)
+ if(NOT CMAKE_CROSSCOMPILING AND TARGET Qt::DBus)
+ execute_process(COMMAND dbus-send --session --type=signal / local.AutotestCheck.Hello
+ RESULT_VARIABLE dbus_session_test
+ OUTPUT_QUIET ERROR_QUIET)
+ if(NOT "${dbus_session_test}" STREQUAL "0")
+ set(run_dbus_tests OFF)
+ if(QT_FEATURE_dbus_linked)
+ message(SEND_ERROR "QtDBus is enabled but session bus is not available for testing. Please check the installation.")
+ else()
+ message(WARNING "QtDBus is enabled with runtime support, but session bus is not available. Skipping QtDBus tests.")
+ endif()
+ endif()
+ endif()
+ if(run_dbus_tests)
+ add_subdirectory("dbus")
+ endif()
+endif()
+if (NOT APPLE_UIKIT AND QT_FEATURE_gui)
+ add_subdirectory("gui")
+endif()
+if (QT_FEATURE_network AND NOT WINRT)
+# add_subdirectory("network")
+endif()
+if (TARGET Qt::OpenGL AND NOT WINRT)
+ add_subdirectory("opengl")
+endif()
+if (QT_FEATURE_sql)
+# add_subdirectory("sql")
+endif()
+add_subdirectory("testlib")
+if (NOT CMAKE_CROSSCOMPILE AND QT_FEATURE_process)
+# add_subdirectory("tools")
+endif()
+if (QT_FEATURE_xml)
+# add_subdirectory("xml")
+endif()
+if (QT_FEATURE_concurrent)
+# add_subdirectory("concurrent")
+endif()
+# add_subdirectory("other")
+if (QT_FEATURE_widgets)
+ add_subdirectory("widgets")
+endif()
+if (QT_FEATURE_printsupport)
+# add_subdirectory("printsupport")
+endif()
+# add_subdirectory("cmake") ## FIXME: Does this still make sense in this form?
+# add_subdirectory("installed_cmake") ## FIXME: Does this still make sense in this form?
diff --git a/tests/auto/corelib/CMakeLists.txt b/tests/auto/corelib/CMakeLists.txt
new file mode 100644
index 0000000000..1625488909
--- /dev/null
+++ b/tests/auto/corelib/CMakeLists.txt
@@ -0,0 +1,12 @@
+add_subdirectory(animation)
+add_subdirectory(codecs)
+add_subdirectory(global)
+add_subdirectory(io)
+add_subdirectory(itemmodels)
+add_subdirectory(kernel)
+add_subdirectory(mimetypes)
+add_subdirectory(serialization)
+add_subdirectory(statemachine)
+add_subdirectory(thread)
+add_subdirectory(tools)
+
diff --git a/tests/auto/corelib/animation/CMakeLists.txt b/tests/auto/corelib/animation/CMakeLists.txt
new file mode 100644
index 0000000000..ed238bb4f7
--- /dev/null
+++ b/tests/auto/corelib/animation/CMakeLists.txt
@@ -0,0 +1,6 @@
+add_subdirectory(qabstractanimation)
+add_subdirectory(qanimationgroup)
+add_subdirectory(qparallelanimationgroup)
+add_subdirectory(qpauseanimation)
+add_subdirectory(qsequentialanimationgroup)
+add_subdirectory(qvariantanimation)
diff --git a/tests/auto/corelib/animation/qabstractanimation/CMakeLists.txt b/tests/auto/corelib/animation/qabstractanimation/CMakeLists.txt
new file mode 100644
index 0000000000..5a9bb29f18
--- /dev/null
+++ b/tests/auto/corelib/animation/qabstractanimation/CMakeLists.txt
@@ -0,0 +1 @@
+add_qt_test(tst_qabstractanimation SOURCES tst_qabstractanimation.cpp)
diff --git a/tests/auto/corelib/animation/qanimationgroup/CMakeLists.txt b/tests/auto/corelib/animation/qanimationgroup/CMakeLists.txt
new file mode 100644
index 0000000000..82f50b8f75
--- /dev/null
+++ b/tests/auto/corelib/animation/qanimationgroup/CMakeLists.txt
@@ -0,0 +1 @@
+add_qt_test(tst_qanimationgroup SOURCES tst_qanimationgroup.cpp)
diff --git a/tests/auto/corelib/animation/qparallelanimationgroup/CMakeLists.txt b/tests/auto/corelib/animation/qparallelanimationgroup/CMakeLists.txt
new file mode 100644
index 0000000000..798e49b0c0
--- /dev/null
+++ b/tests/auto/corelib/animation/qparallelanimationgroup/CMakeLists.txt
@@ -0,0 +1 @@
+add_qt_test(tst_qparallelanimationgroup SOURCES tst_qparallelanimationgroup.cpp)
diff --git a/tests/auto/corelib/animation/qpauseanimation/CMakeLists.txt b/tests/auto/corelib/animation/qpauseanimation/CMakeLists.txt
new file mode 100644
index 0000000000..a960722b87
--- /dev/null
+++ b/tests/auto/corelib/animation/qpauseanimation/CMakeLists.txt
@@ -0,0 +1 @@
+add_qt_test(tst_qpauseanimation SOURCES tst_qpauseanimation.cpp LIBRARIES Qt::CorePrivate)
diff --git a/tests/auto/corelib/animation/qsequentialanimationgroup/CMakeLists.txt b/tests/auto/corelib/animation/qsequentialanimationgroup/CMakeLists.txt
new file mode 100644
index 0000000000..da5d3cfe6a
--- /dev/null
+++ b/tests/auto/corelib/animation/qsequentialanimationgroup/CMakeLists.txt
@@ -0,0 +1 @@
+add_qt_test(tst_qsequentialanimationgroup SOURCES tst_qsequentialanimationgroup.cpp)
diff --git a/tests/auto/corelib/animation/qvariantanimation/CMakeLists.txt b/tests/auto/corelib/animation/qvariantanimation/CMakeLists.txt
new file mode 100644
index 0000000000..de548e07ff
--- /dev/null
+++ b/tests/auto/corelib/animation/qvariantanimation/CMakeLists.txt
@@ -0,0 +1 @@
+add_qt_test(tst_qvariantanimation SOURCES tst_qvariantanimation.cpp)
diff --git a/tests/auto/corelib/codecs/CMakeLists.txt b/tests/auto/corelib/codecs/CMakeLists.txt
new file mode 100644
index 0000000000..272b19f5f8
--- /dev/null
+++ b/tests/auto/corelib/codecs/CMakeLists.txt
@@ -0,0 +1,3 @@
+add_subdirectory(qtextcodec)
+add_subdirectory(utf8)
+
diff --git a/tests/auto/corelib/codecs/qtextcodec/CMakeLists.txt b/tests/auto/corelib/codecs/qtextcodec/CMakeLists.txt
new file mode 100644
index 0000000000..09b46eaa1d
--- /dev/null
+++ b/tests/auto/corelib/codecs/qtextcodec/CMakeLists.txt
@@ -0,0 +1,5 @@
+add_qt_test(tst_qtextcodec SOURCES tst_qtextcodec.cpp)
+
+if(UNIX)
+ add_subdirectory(echo)
+endif()
diff --git a/tests/auto/corelib/codecs/qtextcodec/echo/CMakeLists.txt b/tests/auto/corelib/codecs/qtextcodec/echo/CMakeLists.txt
new file mode 100644
index 0000000000..bfc7d39b5e
--- /dev/null
+++ b/tests/auto/corelib/codecs/qtextcodec/echo/CMakeLists.txt
@@ -0,0 +1 @@
+add_qt_test_helper(echo_helper SOURCES main.cpp LIBRARIES Qt::Core)
diff --git a/tests/auto/corelib/codecs/utf8/CMakeLists.txt b/tests/auto/corelib/codecs/utf8/CMakeLists.txt
new file mode 100644
index 0000000000..69825823f4
--- /dev/null
+++ b/tests/auto/corelib/codecs/utf8/CMakeLists.txt
@@ -0,0 +1 @@
+add_qt_test(tst_utf8 SOURCES tst_utf8.cpp utf8data.cpp)
diff --git a/tests/auto/corelib/global/CMakeLists.txt b/tests/auto/corelib/global/CMakeLists.txt
new file mode 100644
index 0000000000..58e083d665
--- /dev/null
+++ b/tests/auto/corelib/global/CMakeLists.txt
@@ -0,0 +1,12 @@
+add_subdirectory(q_func_info)
+add_subdirectory(qflags)
+add_subdirectory(qfloat16)
+add_subdirectory(qgetputenv)
+add_subdirectory(qglobalstatic)
+add_subdirectory(qhooks)
+add_subdirectory(qlogging)
+add_subdirectory(qnumeric)
+add_subdirectory(qrand)
+add_subdirectory(qrandomgenerator)
+add_subdirectory(qtendian)
+
diff --git a/tests/auto/corelib/global/q_func_info/CMakeLists.txt b/tests/auto/corelib/global/q_func_info/CMakeLists.txt
new file mode 100644
index 0000000000..a8384a17a7
--- /dev/null
+++ b/tests/auto/corelib/global/q_func_info/CMakeLists.txt
@@ -0,0 +1 @@
+add_qt_test(tst_q_func_info SOURCES tst_q_func_info.cpp)
diff --git a/tests/auto/corelib/global/qflags/CMakeLists.txt b/tests/auto/corelib/global/qflags/CMakeLists.txt
new file mode 100644
index 0000000000..c464dd0aab
--- /dev/null
+++ b/tests/auto/corelib/global/qflags/CMakeLists.txt
@@ -0,0 +1 @@
+add_qt_test(tst_qflags SOURCES tst_qflags.cpp)
diff --git a/tests/auto/corelib/global/qfloat16/CMakeLists.txt b/tests/auto/corelib/global/qfloat16/CMakeLists.txt
new file mode 100644
index 0000000000..272215216d
--- /dev/null
+++ b/tests/auto/corelib/global/qfloat16/CMakeLists.txt
@@ -0,0 +1 @@
+add_qt_test(tst_qfloat16 SOURCES tst_qfloat16.cpp)
diff --git a/tests/auto/corelib/global/qgetputenv/CMakeLists.txt b/tests/auto/corelib/global/qgetputenv/CMakeLists.txt
new file mode 100644
index 0000000000..390263691b
--- /dev/null
+++ b/tests/auto/corelib/global/qgetputenv/CMakeLists.txt
@@ -0,0 +1 @@
+add_qt_test(tst_qgetputenv SOURCES tst_qgetputenv.cpp)
diff --git a/tests/auto/corelib/global/qglobal/CMakeLists.txt b/tests/auto/corelib/global/qglobal/CMakeLists.txt
new file mode 100644
index 0000000000..129a35157a
--- /dev/null
+++ b/tests/auto/corelib/global/qglobal/CMakeLists.txt
@@ -0,0 +1 @@
+add_qt_test(tst_qglobal SOURCES tst_qglobal.cpp qglobal.c)
diff --git a/tests/auto/corelib/global/qglobalstatic/CMakeLists.txt b/tests/auto/corelib/global/qglobalstatic/CMakeLists.txt
new file mode 100644
index 0000000000..3aa4511d6f
--- /dev/null
+++ b/tests/auto/corelib/global/qglobalstatic/CMakeLists.txt
@@ -0,0 +1,8 @@
+add_qt_test(tst_qglobalstatic
+ SOURCES
+ tst_qglobalstatic.cpp
+ DEFINES
+ SRCDIR=\"${CMAKE_CURRENT_SOURCE_DIR}/\"
+ LIBRARIES
+ Qt::CorePrivate
+)
diff --git a/tests/auto/corelib/global/qhooks/CMakeLists.txt b/tests/auto/corelib/global/qhooks/CMakeLists.txt
new file mode 100644
index 0000000000..2412253060
--- /dev/null
+++ b/tests/auto/corelib/global/qhooks/CMakeLists.txt
@@ -0,0 +1 @@
+add_qt_test(tst_qhooks SOURCES tst_qhooks.cpp LIBRARIES Qt::CorePrivate)
diff --git a/tests/auto/corelib/global/qlogging/CMakeLists.txt b/tests/auto/corelib/global/qlogging/CMakeLists.txt
new file mode 100644
index 0000000000..05b5bdb63b
--- /dev/null
+++ b/tests/auto/corelib/global/qlogging/CMakeLists.txt
@@ -0,0 +1,10 @@
+if(NOT WINRT)
+ add_qt_test_helper(qlogging_helper SOURCES app/main.cpp DEFINES QT_MESSAGELOGCONTEXT LIBRARIES Qt::Core)
+endif()
+
+add_qt_test(tst_qlogging SOURCES tst_qlogging.cpp
+ DEFINES
+ QT_MESSAGELOGCONTEXT
+ QT_DISABLE_DEPRECATED_BEFORE=0
+ HELPER_BINARY="qlogging_helper"
+)
diff --git a/tests/auto/corelib/global/qnumeric/CMakeLists.txt b/tests/auto/corelib/global/qnumeric/CMakeLists.txt
new file mode 100644
index 0000000000..ebd05c1489
--- /dev/null
+++ b/tests/auto/corelib/global/qnumeric/CMakeLists.txt
@@ -0,0 +1 @@
+add_qt_test(tst_qnumeric SOURCES tst_qnumeric.cpp LIBRARIES Qt::CorePrivate)
diff --git a/tests/auto/corelib/global/qrand/CMakeLists.txt b/tests/auto/corelib/global/qrand/CMakeLists.txt
new file mode 100644
index 0000000000..4fccf1b0da
--- /dev/null
+++ b/tests/auto/corelib/global/qrand/CMakeLists.txt
@@ -0,0 +1 @@
+add_qt_test(tst_qrand SOURCES tst_qrand.cpp)
diff --git a/tests/auto/corelib/global/qrandomgenerator/CMakeLists.txt b/tests/auto/corelib/global/qrandomgenerator/CMakeLists.txt
new file mode 100644
index 0000000000..e742537bf8
--- /dev/null
+++ b/tests/auto/corelib/global/qrandomgenerator/CMakeLists.txt
@@ -0,0 +1 @@
+add_qt_test(tst_qrandomgenerator SOURCES tst_qrandomgenerator.cpp LIBRARIES Qt::CorePrivate)
diff --git a/tests/auto/corelib/global/qtendian/CMakeLists.txt b/tests/auto/corelib/global/qtendian/CMakeLists.txt
new file mode 100644
index 0000000000..91b5c13162
--- /dev/null
+++ b/tests/auto/corelib/global/qtendian/CMakeLists.txt
@@ -0,0 +1 @@
+add_qt_test(tst_qtendian SOURCES tst_qtendian.cpp LIBRARIES Qt::CorePrivate)
diff --git a/tests/auto/corelib/io/CMakeLists.txt b/tests/auto/corelib/io/CMakeLists.txt
new file mode 100644
index 0000000000..3cebec6d9d
--- /dev/null
+++ b/tests/auto/corelib/io/CMakeLists.txt
@@ -0,0 +1,12 @@
+add_subdirectory(largefile)
+add_subdirectory(qbuffer)
+add_subdirectory(qdataurl)
+add_subdirectory(qfilesystementry)
+add_subdirectory(qfilesystemwatcher)
+add_subdirectory(qipaddress)
+# add_subdirectory(qloggingcategory)
+add_subdirectory(qnodebug)
+add_subdirectory(qprocessenvironment)
+add_subdirectory(qstorageinfo)
+add_subdirectory(qurlquery)
+
diff --git a/tests/auto/corelib/io/largefile/CMakeLists.txt b/tests/auto/corelib/io/largefile/CMakeLists.txt
new file mode 100644
index 0000000000..d85cfd73b4
--- /dev/null
+++ b/tests/auto/corelib/io/largefile/CMakeLists.txt
@@ -0,0 +1,6 @@
+add_qt_test(tst_largefile SOURCES
+ tst_largefile.cpp
+ ../../../../shared/emulationdetector.h
+ INCLUDE_DIRECTORIES
+ ../../../../shared/
+)
diff --git a/tests/auto/corelib/io/qbuffer/CMakeLists.txt b/tests/auto/corelib/io/qbuffer/CMakeLists.txt
new file mode 100644
index 0000000000..3ed9738217
--- /dev/null
+++ b/tests/auto/corelib/io/qbuffer/CMakeLists.txt
@@ -0,0 +1 @@
+add_qt_test(tst_qbuffer SOURCES tst_qbuffer.cpp)
diff --git a/tests/auto/corelib/io/qdataurl/CMakeLists.txt b/tests/auto/corelib/io/qdataurl/CMakeLists.txt
new file mode 100644
index 0000000000..d24b18dfc9
--- /dev/null
+++ b/tests/auto/corelib/io/qdataurl/CMakeLists.txt
@@ -0,0 +1 @@
+add_qt_test(tst_qdataurl SOURCES tst_qdataurl.cpp LIBRARIES Qt::CorePrivate)
diff --git a/tests/auto/corelib/io/qfilesystementry/CMakeLists.txt b/tests/auto/corelib/io/qfilesystementry/CMakeLists.txt
new file mode 100644
index 0000000000..58c859dc2e
--- /dev/null
+++ b/tests/auto/corelib/io/qfilesystementry/CMakeLists.txt
@@ -0,0 +1,7 @@
+add_qt_test(tst_qfilesystementry SOURCES
+ tst_qfilesystementry.cpp
+ ${PROJECT_SOURCE_DIR}/src/corelib/io/qfilesystementry.cpp
+ ${PROJECT_SOURCE_DIR}/src/corelib/io/qfilesystementry_p.h
+ LIBRARIES
+ Qt::CorePrivate
+)
diff --git a/tests/auto/corelib/io/qfilesystemwatcher/CMakeLists.txt b/tests/auto/corelib/io/qfilesystemwatcher/CMakeLists.txt
new file mode 100644
index 0000000000..978f87acab
--- /dev/null
+++ b/tests/auto/corelib/io/qfilesystemwatcher/CMakeLists.txt
@@ -0,0 +1 @@
+add_qt_test(tst_qfilesystemwatcher SOURCES tst_qfilesystemwatcher.cpp)
diff --git a/tests/auto/corelib/io/qipaddress/CMakeLists.txt b/tests/auto/corelib/io/qipaddress/CMakeLists.txt
new file mode 100644
index 0000000000..c60bae1c21
--- /dev/null
+++ b/tests/auto/corelib/io/qipaddress/CMakeLists.txt
@@ -0,0 +1 @@
+add_qt_test(tst_qipaddress SOURCES tst_qipaddress.cpp LIBRARIES Qt::CorePrivate)
diff --git a/tests/auto/corelib/io/qloggingcategory/CMakeLists.txt b/tests/auto/corelib/io/qloggingcategory/CMakeLists.txt
new file mode 100644
index 0000000000..00b807eeba
--- /dev/null
+++ b/tests/auto/corelib/io/qloggingcategory/CMakeLists.txt
@@ -0,0 +1 @@
+add_qt_test(tst_qloggingcategory SOURCES tst_qloggingcategory.cpp LIBRARIES Qt::CorePrivate)
diff --git a/tests/auto/corelib/io/qnodebug/CMakeLists.txt b/tests/auto/corelib/io/qnodebug/CMakeLists.txt
new file mode 100644
index 0000000000..15e46596f4
--- /dev/null
+++ b/tests/auto/corelib/io/qnodebug/CMakeLists.txt
@@ -0,0 +1 @@
+add_qt_test(tst_qnodebug SOURCES tst_qnodebug.cpp)
diff --git a/tests/auto/corelib/io/qprocessenvironment/CMakeLists.txt b/tests/auto/corelib/io/qprocessenvironment/CMakeLists.txt
new file mode 100644
index 0000000000..68c6a9936f
--- /dev/null
+++ b/tests/auto/corelib/io/qprocessenvironment/CMakeLists.txt
@@ -0,0 +1 @@
+add_qt_test(tst_qprocessenvironment SOURCES tst_qprocessenvironment.cpp)
diff --git a/tests/auto/corelib/io/qstorageinfo/CMakeLists.txt b/tests/auto/corelib/io/qstorageinfo/CMakeLists.txt
new file mode 100644
index 0000000000..16e4415bc5
--- /dev/null
+++ b/tests/auto/corelib/io/qstorageinfo/CMakeLists.txt
@@ -0,0 +1 @@
+add_qt_test(tst_qstorageinfo SOURCES tst_qstorageinfo.cpp LIBRARIES Qt::CorePrivate)
diff --git a/tests/auto/corelib/io/qurlquery/CMakeLists.txt b/tests/auto/corelib/io/qurlquery/CMakeLists.txt
new file mode 100644
index 0000000000..88fd621720
--- /dev/null
+++ b/tests/auto/corelib/io/qurlquery/CMakeLists.txt
@@ -0,0 +1 @@
+add_qt_test(tst_qurlquery SOURCES tst_qurlquery.cpp LIBRARIES Qt::CorePrivate)
diff --git a/tests/auto/corelib/itemmodels/CMakeLists.txt b/tests/auto/corelib/itemmodels/CMakeLists.txt
new file mode 100644
index 0000000000..3f47845905
--- /dev/null
+++ b/tests/auto/corelib/itemmodels/CMakeLists.txt
@@ -0,0 +1,4 @@
+# add_subdirectory(qabstractproxymodel)
+# add_subdirectory(qitemselectionmodel)
+add_subdirectory(qstringlistmodel)
+
diff --git a/tests/auto/corelib/itemmodels/qabstractproxymodel/CMakeLists.txt b/tests/auto/corelib/itemmodels/qabstractproxymodel/CMakeLists.txt
new file mode 100644
index 0000000000..7f2e10cf65
--- /dev/null
+++ b/tests/auto/corelib/itemmodels/qabstractproxymodel/CMakeLists.txt
@@ -0,0 +1 @@
+add_qt_test(tst_qabstractproxymodel SOURCES tst_qabstractproxymodel.cpp)
diff --git a/tests/auto/corelib/itemmodels/qitemselectionmodel/CMakeLists.txt b/tests/auto/corelib/itemmodels/qitemselectionmodel/CMakeLists.txt
new file mode 100644
index 0000000000..03c2ddede1
--- /dev/null
+++ b/tests/auto/corelib/itemmodels/qitemselectionmodel/CMakeLists.txt
@@ -0,0 +1 @@
+add_qt_test(tst_qitemselectionmodel SOURCES tst_qitemselectionmodel.cpp)
diff --git a/tests/auto/corelib/itemmodels/qstringlistmodel/CMakeLists.txt b/tests/auto/corelib/itemmodels/qstringlistmodel/CMakeLists.txt
new file mode 100644
index 0000000000..1cec834423
--- /dev/null
+++ b/tests/auto/corelib/itemmodels/qstringlistmodel/CMakeLists.txt
@@ -0,0 +1,4 @@
+add_qt_test(tst_qstringlistmodel SOURCES
+ qmodellistener.h
+ tst_qstringlistmodel.cpp
+)
diff --git a/tests/auto/corelib/kernel/CMakeLists.txt b/tests/auto/corelib/kernel/CMakeLists.txt
new file mode 100644
index 0000000000..208cd89ca7
--- /dev/null
+++ b/tests/auto/corelib/kernel/CMakeLists.txt
@@ -0,0 +1,13 @@
+add_subdirectory(qdeadlinetimer)
+add_subdirectory(qelapsedtimer)
+add_subdirectory(qeventdispatcher)
+add_subdirectory(qmath)
+add_subdirectory(qmetaenum)
+add_subdirectory(qmetamethod)
+add_subdirectory(qmetaobject)
+add_subdirectory(qmetaobjectbuilder)
+add_subdirectory(qmetaproperty)
+# add_subdirectory(qmimedata)
+add_subdirectory(qsignalmapper)
+# add_subdirectory(qwineventnotifier)
+
diff --git a/tests/auto/corelib/kernel/qdeadlinetimer/CMakeLists.txt b/tests/auto/corelib/kernel/qdeadlinetimer/CMakeLists.txt
new file mode 100644
index 0000000000..0bf39130c2
--- /dev/null
+++ b/tests/auto/corelib/kernel/qdeadlinetimer/CMakeLists.txt
@@ -0,0 +1 @@
+add_qt_test(tst_qdeadlinetimer SOURCES tst_qdeadlinetimer.cpp)
diff --git a/tests/auto/corelib/kernel/qelapsedtimer/CMakeLists.txt b/tests/auto/corelib/kernel/qelapsedtimer/CMakeLists.txt
new file mode 100644
index 0000000000..7a937730ab
--- /dev/null
+++ b/tests/auto/corelib/kernel/qelapsedtimer/CMakeLists.txt
@@ -0,0 +1 @@
+add_qt_test(tst_qelapsedtimer SOURCES tst_qelapsedtimer.cpp)
diff --git a/tests/auto/corelib/kernel/qeventdispatcher/CMakeLists.txt b/tests/auto/corelib/kernel/qeventdispatcher/CMakeLists.txt
new file mode 100644
index 0000000000..832bbd4079
--- /dev/null
+++ b/tests/auto/corelib/kernel/qeventdispatcher/CMakeLists.txt
@@ -0,0 +1 @@
+add_qt_test(tst_qeventdispatcher SOURCES tst_qeventdispatcher.cpp)
diff --git a/tests/auto/corelib/kernel/qmath/CMakeLists.txt b/tests/auto/corelib/kernel/qmath/CMakeLists.txt
new file mode 100644
index 0000000000..3edebc0776
--- /dev/null
+++ b/tests/auto/corelib/kernel/qmath/CMakeLists.txt
@@ -0,0 +1 @@
+add_qt_test(tst_qmath SOURCES tst_qmath.cpp)
diff --git a/tests/auto/corelib/kernel/qmetaenum/CMakeLists.txt b/tests/auto/corelib/kernel/qmetaenum/CMakeLists.txt
new file mode 100644
index 0000000000..2db56b9f3c
--- /dev/null
+++ b/tests/auto/corelib/kernel/qmetaenum/CMakeLists.txt
@@ -0,0 +1 @@
+add_qt_test(tst_qmetaenum SOURCES tst_qmetaenum.cpp)
diff --git a/tests/auto/corelib/kernel/qmetamethod/CMakeLists.txt b/tests/auto/corelib/kernel/qmetamethod/CMakeLists.txt
new file mode 100644
index 0000000000..ca41b0d676
--- /dev/null
+++ b/tests/auto/corelib/kernel/qmetamethod/CMakeLists.txt
@@ -0,0 +1 @@
+add_qt_test(tst_qmetamethod SOURCES tst_qmetamethod.cpp)
diff --git a/tests/auto/corelib/kernel/qmetaobject/CMakeLists.txt b/tests/auto/corelib/kernel/qmetaobject/CMakeLists.txt
new file mode 100644
index 0000000000..61b64ef36d
--- /dev/null
+++ b/tests/auto/corelib/kernel/qmetaobject/CMakeLists.txt
@@ -0,0 +1 @@
+add_qt_test(tst_qmetaobject SOURCES tst_qmetaobject.cpp LIBRARIES Qt::CorePrivate)
diff --git a/tests/auto/corelib/kernel/qmetaobjectbuilder/CMakeLists.txt b/tests/auto/corelib/kernel/qmetaobjectbuilder/CMakeLists.txt
new file mode 100644
index 0000000000..bc86eb1e1e
--- /dev/null
+++ b/tests/auto/corelib/kernel/qmetaobjectbuilder/CMakeLists.txt
@@ -0,0 +1 @@
+add_qt_test(tst_qmetaobjectbuilder SOURCES tst_qmetaobjectbuilder.cpp LIBRARIES Qt::CorePrivate)
diff --git a/tests/auto/corelib/kernel/qmetaproperty/CMakeLists.txt b/tests/auto/corelib/kernel/qmetaproperty/CMakeLists.txt
new file mode 100644
index 0000000000..46635feb3a
--- /dev/null
+++ b/tests/auto/corelib/kernel/qmetaproperty/CMakeLists.txt
@@ -0,0 +1 @@
+add_qt_test(tst_qmetaproperty SOURCES tst_qmetaproperty.cpp)
diff --git a/tests/auto/corelib/kernel/qmimedata/CMakeLists.txt b/tests/auto/corelib/kernel/qmimedata/CMakeLists.txt
new file mode 100644
index 0000000000..78d0a69d68
--- /dev/null
+++ b/tests/auto/corelib/kernel/qmimedata/CMakeLists.txt
@@ -0,0 +1 @@
+add_qt_test(tst_qmimedata SOURCES tst_qmimedata.cpp)
diff --git a/tests/auto/corelib/kernel/qsignalmapper/CMakeLists.txt b/tests/auto/corelib/kernel/qsignalmapper/CMakeLists.txt
new file mode 100644
index 0000000000..1a6416fabb
--- /dev/null
+++ b/tests/auto/corelib/kernel/qsignalmapper/CMakeLists.txt
@@ -0,0 +1 @@
+add_qt_test(tst_qsignalmapper SOURCES tst_qsignalmapper.cpp)
diff --git a/tests/auto/corelib/kernel/qwineventnotifier/CMakeLists.txt b/tests/auto/corelib/kernel/qwineventnotifier/CMakeLists.txt
new file mode 100644
index 0000000000..db888dcda0
--- /dev/null
+++ b/tests/auto/corelib/kernel/qwineventnotifier/CMakeLists.txt
@@ -0,0 +1 @@
+add_qt_test(tst_qwineventnotifier SOURCES tst_qwineventnotifier.cpp LIBRARIES Qt::CorePrivate)
diff --git a/tests/auto/corelib/mimetypes/CMakeLists.txt b/tests/auto/corelib/mimetypes/CMakeLists.txt
new file mode 100644
index 0000000000..1e59aa3329
--- /dev/null
+++ b/tests/auto/corelib/mimetypes/CMakeLists.txt
@@ -0,0 +1,2 @@
+# add_subdirectory(qmimetype)
+
diff --git a/tests/auto/corelib/mimetypes/qmimetype/CMakeLists.txt b/tests/auto/corelib/mimetypes/qmimetype/CMakeLists.txt
new file mode 100644
index 0000000000..9b70d0971a
--- /dev/null
+++ b/tests/auto/corelib/mimetypes/qmimetype/CMakeLists.txt
@@ -0,0 +1 @@
+add_qt_test(tst_qmimetype SOURCES tst_qmimetype.cpp LIBRARIES Qt::CorePrivate)
diff --git a/tests/auto/corelib/serialization/CMakeLists.txt b/tests/auto/corelib/serialization/CMakeLists.txt
new file mode 100644
index 0000000000..e856ccae90
--- /dev/null
+++ b/tests/auto/corelib/serialization/CMakeLists.txt
@@ -0,0 +1,5 @@
+add_subdirectory(qcborvalue_json)
+add_subdirectory(qcborstreamreader)
+add_subdirectory(qcborstreamwriter)
+add_subdirectory(qcborvalue)
+
diff --git a/tests/auto/corelib/serialization/qcborstreamreader/CMakeLists.txt b/tests/auto/corelib/serialization/qcborstreamreader/CMakeLists.txt
new file mode 100644
index 0000000000..2db29547a4
--- /dev/null
+++ b/tests/auto/corelib/serialization/qcborstreamreader/CMakeLists.txt
@@ -0,0 +1,6 @@
+add_qt_test(tst_qcborstreamreader SOURCES
+ tst_qcborstreamreader.cpp
+ INCLUDE_DIRECTORIES
+ ../../../../../src/3rdparty/tinycbor/src
+ ../../../../../src/3rdparty/tinycbor/tests/parser
+)
diff --git a/tests/auto/corelib/serialization/qcborstreamwriter/CMakeLists.txt b/tests/auto/corelib/serialization/qcborstreamwriter/CMakeLists.txt
new file mode 100644
index 0000000000..483a335cd3
--- /dev/null
+++ b/tests/auto/corelib/serialization/qcborstreamwriter/CMakeLists.txt
@@ -0,0 +1,5 @@
+add_qt_test(tst_qcborstreamwriter SOURCES
+ tst_qcborstreamwriter.cpp
+ INCLUDE_DIRECTORIES
+ ../../../../../src/3rdparty/tinycbor/tests/encoder
+)
diff --git a/tests/auto/corelib/serialization/qcborvalue/CMakeLists.txt b/tests/auto/corelib/serialization/qcborvalue/CMakeLists.txt
new file mode 100644
index 0000000000..f1630798e9
--- /dev/null
+++ b/tests/auto/corelib/serialization/qcborvalue/CMakeLists.txt
@@ -0,0 +1,6 @@
+add_qt_test(tst_qcborvalue SOURCES
+ tst_qcborvalue.cpp
+ INCLUDE_DIRECTORIES
+ ../../../../../src/3rdparty/tinycbor/src
+ ../../../../../src/3rdparty/tinycbor/tests/parser
+)
diff --git a/tests/auto/corelib/serialization/qcborvalue_json/CMakeLists.txt b/tests/auto/corelib/serialization/qcborvalue_json/CMakeLists.txt
new file mode 100644
index 0000000000..651e0c68af
--- /dev/null
+++ b/tests/auto/corelib/serialization/qcborvalue_json/CMakeLists.txt
@@ -0,0 +1 @@
+add_qt_test(tst_qcborvalue_json SOURCES tst_qcborvalue_json.cpp)
diff --git a/tests/auto/corelib/statemachine/CMakeLists.txt b/tests/auto/corelib/statemachine/CMakeLists.txt
new file mode 100644
index 0000000000..52c956cd03
--- /dev/null
+++ b/tests/auto/corelib/statemachine/CMakeLists.txt
@@ -0,0 +1,2 @@
+add_subdirectory(qstate)
+
diff --git a/tests/auto/corelib/statemachine/qstate/CMakeLists.txt b/tests/auto/corelib/statemachine/qstate/CMakeLists.txt
new file mode 100644
index 0000000000..28aa801be9
--- /dev/null
+++ b/tests/auto/corelib/statemachine/qstate/CMakeLists.txt
@@ -0,0 +1 @@
+add_qt_test(tst_qstate SOURCES tst_qstate.cpp)
diff --git a/tests/auto/corelib/thread/CMakeLists.txt b/tests/auto/corelib/thread/CMakeLists.txt
new file mode 100644
index 0000000000..357ae844f6
--- /dev/null
+++ b/tests/auto/corelib/thread/CMakeLists.txt
@@ -0,0 +1,13 @@
+add_subdirectory(qatomicint)
+add_subdirectory(qatomicpointer)
+add_subdirectory(qfuture)
+add_subdirectory(qfuturesynchronizer)
+add_subdirectory(qmutexlocker)
+add_subdirectory(qreadlocker)
+add_subdirectory(qreadwritelock)
+add_subdirectory(qresultstore)
+add_subdirectory(qsemaphore)
+add_subdirectory(qthreadpool)
+add_subdirectory(qwaitcondition)
+add_subdirectory(qwritelocker)
+
diff --git a/tests/auto/corelib/thread/qatomicint/CMakeLists.txt b/tests/auto/corelib/thread/qatomicint/CMakeLists.txt
new file mode 100644
index 0000000000..e94c228820
--- /dev/null
+++ b/tests/auto/corelib/thread/qatomicint/CMakeLists.txt
@@ -0,0 +1 @@
+add_qt_test(tst_qatomicint SOURCES tst_qatomicint.cpp)
diff --git a/tests/auto/corelib/thread/qatomicpointer/CMakeLists.txt b/tests/auto/corelib/thread/qatomicpointer/CMakeLists.txt
new file mode 100644
index 0000000000..3a74e4dc1f
--- /dev/null
+++ b/tests/auto/corelib/thread/qatomicpointer/CMakeLists.txt
@@ -0,0 +1 @@
+add_qt_test(tst_qatomicpointer SOURCES tst_qatomicpointer.cpp)
diff --git a/tests/auto/corelib/thread/qfuture/CMakeLists.txt b/tests/auto/corelib/thread/qfuture/CMakeLists.txt
new file mode 100644
index 0000000000..d37f134c46
--- /dev/null
+++ b/tests/auto/corelib/thread/qfuture/CMakeLists.txt
@@ -0,0 +1 @@
+add_qt_test(tst_qfuture SOURCES tst_qfuture.cpp LIBRARIES Qt::CorePrivate)
diff --git a/tests/auto/corelib/thread/qfuturesynchronizer/CMakeLists.txt b/tests/auto/corelib/thread/qfuturesynchronizer/CMakeLists.txt
new file mode 100644
index 0000000000..3745db0a75
--- /dev/null
+++ b/tests/auto/corelib/thread/qfuturesynchronizer/CMakeLists.txt
@@ -0,0 +1 @@
+add_qt_test(tst_qfuturesynchronizer SOURCES tst_qfuturesynchronizer.cpp)
diff --git a/tests/auto/corelib/thread/qmutexlocker/CMakeLists.txt b/tests/auto/corelib/thread/qmutexlocker/CMakeLists.txt
new file mode 100644
index 0000000000..de6be505ea
--- /dev/null
+++ b/tests/auto/corelib/thread/qmutexlocker/CMakeLists.txt
@@ -0,0 +1 @@
+add_qt_test(tst_qmutexlocker SOURCES tst_qmutexlocker.cpp)
diff --git a/tests/auto/corelib/thread/qreadlocker/CMakeLists.txt b/tests/auto/corelib/thread/qreadlocker/CMakeLists.txt
new file mode 100644
index 0000000000..b7b7c4add7
--- /dev/null
+++ b/tests/auto/corelib/thread/qreadlocker/CMakeLists.txt
@@ -0,0 +1 @@
+add_qt_test(tst_qreadlocker SOURCES tst_qreadlocker.cpp)
diff --git a/tests/auto/corelib/thread/qreadwritelock/CMakeLists.txt b/tests/auto/corelib/thread/qreadwritelock/CMakeLists.txt
new file mode 100644
index 0000000000..2a8ac42909
--- /dev/null
+++ b/tests/auto/corelib/thread/qreadwritelock/CMakeLists.txt
@@ -0,0 +1 @@
+add_qt_test(tst_qreadwritelock SOURCES tst_qreadwritelock.cpp)
diff --git a/tests/auto/corelib/thread/qresultstore/CMakeLists.txt b/tests/auto/corelib/thread/qresultstore/CMakeLists.txt
new file mode 100644
index 0000000000..52fefb84bb
--- /dev/null
+++ b/tests/auto/corelib/thread/qresultstore/CMakeLists.txt
@@ -0,0 +1 @@
+add_qt_test(tst_qresultstore SOURCES tst_qresultstore.cpp LIBRARIES Qt::CorePrivate)
diff --git a/tests/auto/corelib/thread/qsemaphore/CMakeLists.txt b/tests/auto/corelib/thread/qsemaphore/CMakeLists.txt
new file mode 100644
index 0000000000..7bc1183bd2
--- /dev/null
+++ b/tests/auto/corelib/thread/qsemaphore/CMakeLists.txt
@@ -0,0 +1 @@
+add_qt_test(tst_qsemaphore SOURCES tst_qsemaphore.cpp)
diff --git a/tests/auto/corelib/thread/qthreadpool/CMakeLists.txt b/tests/auto/corelib/thread/qthreadpool/CMakeLists.txt
new file mode 100644
index 0000000000..385bfcdea4
--- /dev/null
+++ b/tests/auto/corelib/thread/qthreadpool/CMakeLists.txt
@@ -0,0 +1 @@
+add_qt_test(tst_qthreadpool SOURCES tst_qthreadpool.cpp)
diff --git a/tests/auto/corelib/thread/qwaitcondition/CMakeLists.txt b/tests/auto/corelib/thread/qwaitcondition/CMakeLists.txt
new file mode 100644
index 0000000000..ab81379e03
--- /dev/null
+++ b/tests/auto/corelib/thread/qwaitcondition/CMakeLists.txt
@@ -0,0 +1 @@
+add_qt_test(tst_qwaitcondition SOURCES tst_qwaitcondition.cpp)
diff --git a/tests/auto/corelib/thread/qwritelocker/CMakeLists.txt b/tests/auto/corelib/thread/qwritelocker/CMakeLists.txt
new file mode 100644
index 0000000000..4635a34b6e
--- /dev/null
+++ b/tests/auto/corelib/thread/qwritelocker/CMakeLists.txt
@@ -0,0 +1 @@
+add_qt_test(tst_qwritelocker SOURCES tst_qwritelocker.cpp)
diff --git a/tests/auto/corelib/tools/CMakeLists.txt b/tests/auto/corelib/tools/CMakeLists.txt
new file mode 100644
index 0000000000..befa8e900d
--- /dev/null
+++ b/tests/auto/corelib/tools/CMakeLists.txt
@@ -0,0 +1,47 @@
+add_subdirectory(qalgorithms)
+add_subdirectory(qarraydata)
+add_subdirectory(qbitarray)
+add_subdirectory(qbytearraylist)
+add_subdirectory(qbytedatabuffer)
+add_subdirectory(qcache)
+add_subdirectory(qcommandlineparser)
+add_subdirectory(qcontiguouscache)
+add_subdirectory(qdate)
+add_subdirectory(qeasingcurve)
+add_subdirectory(qexplicitlyshareddatapointer)
+add_subdirectory(qhash)
+add_subdirectory(qhashfunctions)
+add_subdirectory(qlinkedlist)
+add_subdirectory(qlist)
+add_subdirectory(qmakearray)
+add_subdirectory(qmap)
+add_subdirectory(qmargins)
+add_subdirectory(qmessageauthenticationcode)
+add_subdirectory(qpair)
+add_subdirectory(qpoint)
+add_subdirectory(qpointf)
+add_subdirectory(qqueue)
+add_subdirectory(qrect)
+add_subdirectory(qregexp)
+add_subdirectory(qregularexpression)
+add_subdirectory(qringbuffer)
+add_subdirectory(qscopedpointer)
+add_subdirectory(qscopedvaluerollback)
+add_subdirectory(qscopeguard)
+add_subdirectory(qset)
+add_subdirectory(qsize)
+add_subdirectory(qsizef)
+add_subdirectory(qstl)
+add_subdirectory(qstring_no_cast_from_bytearray)
+add_subdirectory(qstringbuilder/qstringbuilder1)
+add_subdirectory(qstringbuilder/qstringbuilder2)
+add_subdirectory(qstringbuilder/qstringbuilder3)
+add_subdirectory(qstringbuilder/qstringbuilder4)
+add_subdirectory(qstringiterator)
+add_subdirectory(qstringlist)
+add_subdirectory(qstringmatcher)
+add_subdirectory(qstringref)
+add_subdirectory(qtime)
+add_subdirectory(qtimeline)
+add_subdirectory(qvarlengtharray)
+
diff --git a/tests/auto/corelib/tools/qalgorithms/CMakeLists.txt b/tests/auto/corelib/tools/qalgorithms/CMakeLists.txt
new file mode 100644
index 0000000000..66c205b605
--- /dev/null
+++ b/tests/auto/corelib/tools/qalgorithms/CMakeLists.txt
@@ -0,0 +1 @@
+add_qt_test(tst_qalgorithms SOURCES tst_qalgorithms.cpp)
diff --git a/tests/auto/corelib/tools/qarraydata/CMakeLists.txt b/tests/auto/corelib/tools/qarraydata/CMakeLists.txt
new file mode 100644
index 0000000000..573f13af55
--- /dev/null
+++ b/tests/auto/corelib/tools/qarraydata/CMakeLists.txt
@@ -0,0 +1,4 @@
+add_qt_test(tst_qarraydata SOURCES
+ tst_qarraydata.cpp
+ simplevector.h
+)
diff --git a/tests/auto/corelib/tools/qbitarray/CMakeLists.txt b/tests/auto/corelib/tools/qbitarray/CMakeLists.txt
new file mode 100644
index 0000000000..684fa58694
--- /dev/null
+++ b/tests/auto/corelib/tools/qbitarray/CMakeLists.txt
@@ -0,0 +1 @@
+add_qt_test(tst_qbitarray SOURCES tst_qbitarray.cpp)
diff --git a/tests/auto/corelib/tools/qbytearraylist/CMakeLists.txt b/tests/auto/corelib/tools/qbytearraylist/CMakeLists.txt
new file mode 100644
index 0000000000..f7b8314dbd
--- /dev/null
+++ b/tests/auto/corelib/tools/qbytearraylist/CMakeLists.txt
@@ -0,0 +1 @@
+add_qt_test(tst_qbytearraylist SOURCES tst_qbytearraylist.cpp)
diff --git a/tests/auto/corelib/tools/qbytedatabuffer/CMakeLists.txt b/tests/auto/corelib/tools/qbytedatabuffer/CMakeLists.txt
new file mode 100644
index 0000000000..c02ee4c284
--- /dev/null
+++ b/tests/auto/corelib/tools/qbytedatabuffer/CMakeLists.txt
@@ -0,0 +1 @@
+add_qt_test(tst_qbytedatabuffer SOURCES tst_qbytedatabuffer.cpp LIBRARIES Qt::CorePrivate)
diff --git a/tests/auto/corelib/tools/qcache/CMakeLists.txt b/tests/auto/corelib/tools/qcache/CMakeLists.txt
new file mode 100644
index 0000000000..816614bebf
--- /dev/null
+++ b/tests/auto/corelib/tools/qcache/CMakeLists.txt
@@ -0,0 +1 @@
+add_qt_test(tst_qcache SOURCES tst_qcache.cpp)
diff --git a/tests/auto/corelib/tools/qcommandlineparser/CMakeLists.txt b/tests/auto/corelib/tools/qcommandlineparser/CMakeLists.txt
new file mode 100644
index 0000000000..33d254a034
--- /dev/null
+++ b/tests/auto/corelib/tools/qcommandlineparser/CMakeLists.txt
@@ -0,0 +1 @@
+add_qt_test(tst_qcommandlineparser SOURCES tst_qcommandlineparser.cpp)
diff --git a/tests/auto/corelib/tools/qcontiguouscache/CMakeLists.txt b/tests/auto/corelib/tools/qcontiguouscache/CMakeLists.txt
new file mode 100644
index 0000000000..3f7dc63c5b
--- /dev/null
+++ b/tests/auto/corelib/tools/qcontiguouscache/CMakeLists.txt
@@ -0,0 +1 @@
+add_qt_test(tst_qcontiguouscache SOURCES tst_qcontiguouscache.cpp)
diff --git a/tests/auto/corelib/tools/qdate/CMakeLists.txt b/tests/auto/corelib/tools/qdate/CMakeLists.txt
new file mode 100644
index 0000000000..e967a03edf
--- /dev/null
+++ b/tests/auto/corelib/tools/qdate/CMakeLists.txt
@@ -0,0 +1 @@
+add_qt_test(tst_qdate SOURCES tst_qdate.cpp)
diff --git a/tests/auto/corelib/tools/qeasingcurve/CMakeLists.txt b/tests/auto/corelib/tools/qeasingcurve/CMakeLists.txt
new file mode 100644
index 0000000000..42bfd081af
--- /dev/null
+++ b/tests/auto/corelib/tools/qeasingcurve/CMakeLists.txt
@@ -0,0 +1 @@
+add_qt_test(tst_qeasingcurve SOURCES tst_qeasingcurve.cpp)
diff --git a/tests/auto/corelib/tools/qexplicitlyshareddatapointer/CMakeLists.txt b/tests/auto/corelib/tools/qexplicitlyshareddatapointer/CMakeLists.txt
new file mode 100644
index 0000000000..5da0db0398
--- /dev/null
+++ b/tests/auto/corelib/tools/qexplicitlyshareddatapointer/CMakeLists.txt
@@ -0,0 +1 @@
+add_qt_test(tst_qexplicitlyshareddatapointer SOURCES tst_qexplicitlyshareddatapointer.cpp)
diff --git a/tests/auto/corelib/tools/qhash/CMakeLists.txt b/tests/auto/corelib/tools/qhash/CMakeLists.txt
new file mode 100644
index 0000000000..1e0026e5ba
--- /dev/null
+++ b/tests/auto/corelib/tools/qhash/CMakeLists.txt
@@ -0,0 +1 @@
+add_qt_test(tst_qhash SOURCES tst_qhash.cpp)
diff --git a/tests/auto/corelib/tools/qhashfunctions/CMakeLists.txt b/tests/auto/corelib/tools/qhashfunctions/CMakeLists.txt
new file mode 100644
index 0000000000..2a9b50e70e
--- /dev/null
+++ b/tests/auto/corelib/tools/qhashfunctions/CMakeLists.txt
@@ -0,0 +1 @@
+add_qt_test(tst_qhashfunctions SOURCES tst_qhashfunctions.cpp)
diff --git a/tests/auto/corelib/tools/qlinkedlist/CMakeLists.txt b/tests/auto/corelib/tools/qlinkedlist/CMakeLists.txt
new file mode 100644
index 0000000000..aad00ab21e
--- /dev/null
+++ b/tests/auto/corelib/tools/qlinkedlist/CMakeLists.txt
@@ -0,0 +1 @@
+add_qt_test(tst_qlinkedlist SOURCES tst_qlinkedlist.cpp)
diff --git a/tests/auto/corelib/tools/qlist/CMakeLists.txt b/tests/auto/corelib/tools/qlist/CMakeLists.txt
new file mode 100644
index 0000000000..ca5195b12e
--- /dev/null
+++ b/tests/auto/corelib/tools/qlist/CMakeLists.txt
@@ -0,0 +1 @@
+add_qt_test(tst_qlist SOURCES tst_qlist.cpp)
diff --git a/tests/auto/corelib/tools/qmakearray/CMakeLists.txt b/tests/auto/corelib/tools/qmakearray/CMakeLists.txt
new file mode 100644
index 0000000000..f63961fe14
--- /dev/null
+++ b/tests/auto/corelib/tools/qmakearray/CMakeLists.txt
@@ -0,0 +1 @@
+add_qt_test(tst_qmakearray SOURCES tst_qmakearray.cpp LIBRARIES Qt::CorePrivate)
diff --git a/tests/auto/corelib/tools/qmap/CMakeLists.txt b/tests/auto/corelib/tools/qmap/CMakeLists.txt
new file mode 100644
index 0000000000..a53b522bd8
--- /dev/null
+++ b/tests/auto/corelib/tools/qmap/CMakeLists.txt
@@ -0,0 +1 @@
+add_qt_test(tst_qmap SOURCES tst_qmap.cpp)
diff --git a/tests/auto/corelib/tools/qmargins/CMakeLists.txt b/tests/auto/corelib/tools/qmargins/CMakeLists.txt
new file mode 100644
index 0000000000..7bfb2d01f2
--- /dev/null
+++ b/tests/auto/corelib/tools/qmargins/CMakeLists.txt
@@ -0,0 +1 @@
+add_qt_test(tst_qmargins SOURCES tst_qmargins.cpp)
diff --git a/tests/auto/corelib/tools/qmessageauthenticationcode/CMakeLists.txt b/tests/auto/corelib/tools/qmessageauthenticationcode/CMakeLists.txt
new file mode 100644
index 0000000000..1c85138607
--- /dev/null
+++ b/tests/auto/corelib/tools/qmessageauthenticationcode/CMakeLists.txt
@@ -0,0 +1 @@
+add_qt_test(tst_qmessageauthenticationcode SOURCES tst_qmessageauthenticationcode.cpp)
diff --git a/tests/auto/corelib/tools/qpair/CMakeLists.txt b/tests/auto/corelib/tools/qpair/CMakeLists.txt
new file mode 100644
index 0000000000..e8a0c8e855
--- /dev/null
+++ b/tests/auto/corelib/tools/qpair/CMakeLists.txt
@@ -0,0 +1 @@
+add_qt_test(tst_qpair SOURCES tst_qpair.cpp)
diff --git a/tests/auto/corelib/tools/qpoint/CMakeLists.txt b/tests/auto/corelib/tools/qpoint/CMakeLists.txt
new file mode 100644
index 0000000000..869ddab1c7
--- /dev/null
+++ b/tests/auto/corelib/tools/qpoint/CMakeLists.txt
@@ -0,0 +1 @@
+add_qt_test(tst_qpoint SOURCES tst_qpoint.cpp)
diff --git a/tests/auto/corelib/tools/qpointf/CMakeLists.txt b/tests/auto/corelib/tools/qpointf/CMakeLists.txt
new file mode 100644
index 0000000000..d0cfc0c8ed
--- /dev/null
+++ b/tests/auto/corelib/tools/qpointf/CMakeLists.txt
@@ -0,0 +1 @@
+add_qt_test(tst_qpointf SOURCES tst_qpointf.cpp)
diff --git a/tests/auto/corelib/tools/qqueue/CMakeLists.txt b/tests/auto/corelib/tools/qqueue/CMakeLists.txt
new file mode 100644
index 0000000000..4e8a711fd9
--- /dev/null
+++ b/tests/auto/corelib/tools/qqueue/CMakeLists.txt
@@ -0,0 +1 @@
+add_qt_test(tst_qqueue SOURCES tst_qqueue.cpp)
diff --git a/tests/auto/corelib/tools/qrect/CMakeLists.txt b/tests/auto/corelib/tools/qrect/CMakeLists.txt
new file mode 100644
index 0000000000..3ffa3d1d34
--- /dev/null
+++ b/tests/auto/corelib/tools/qrect/CMakeLists.txt
@@ -0,0 +1 @@
+add_qt_test(tst_qrect SOURCES tst_qrect.cpp)
diff --git a/tests/auto/corelib/tools/qregexp/CMakeLists.txt b/tests/auto/corelib/tools/qregexp/CMakeLists.txt
new file mode 100644
index 0000000000..1a37644977
--- /dev/null
+++ b/tests/auto/corelib/tools/qregexp/CMakeLists.txt
@@ -0,0 +1 @@
+add_qt_test(tst_qregexp SOURCES tst_qregexp.cpp)
diff --git a/tests/auto/corelib/tools/qregularexpression/CMakeLists.txt b/tests/auto/corelib/tools/qregularexpression/CMakeLists.txt
new file mode 100644
index 0000000000..ff0cb8d962
--- /dev/null
+++ b/tests/auto/corelib/tools/qregularexpression/CMakeLists.txt
@@ -0,0 +1 @@
+add_qt_test(tst_qregularexpression SOURCES tst_qregularexpression.cpp)
diff --git a/tests/auto/corelib/tools/qringbuffer/CMakeLists.txt b/tests/auto/corelib/tools/qringbuffer/CMakeLists.txt
new file mode 100644
index 0000000000..ccb9a1b7b4
--- /dev/null
+++ b/tests/auto/corelib/tools/qringbuffer/CMakeLists.txt
@@ -0,0 +1 @@
+add_qt_test(tst_qringbuffer SOURCES tst_qringbuffer.cpp LIBRARIES Qt::CorePrivate)
diff --git a/tests/auto/corelib/tools/qscopedpointer/CMakeLists.txt b/tests/auto/corelib/tools/qscopedpointer/CMakeLists.txt
new file mode 100644
index 0000000000..24cc66b34a
--- /dev/null
+++ b/tests/auto/corelib/tools/qscopedpointer/CMakeLists.txt
@@ -0,0 +1 @@
+add_qt_test(tst_qscopedpointer SOURCES tst_qscopedpointer.cpp)
diff --git a/tests/auto/corelib/tools/qscopedvaluerollback/CMakeLists.txt b/tests/auto/corelib/tools/qscopedvaluerollback/CMakeLists.txt
new file mode 100644
index 0000000000..e772f67fb4
--- /dev/null
+++ b/tests/auto/corelib/tools/qscopedvaluerollback/CMakeLists.txt
@@ -0,0 +1 @@
+add_qt_test(tst_qscopedvaluerollback SOURCES tst_qscopedvaluerollback.cpp)
diff --git a/tests/auto/corelib/tools/qscopeguard/CMakeLists.txt b/tests/auto/corelib/tools/qscopeguard/CMakeLists.txt
new file mode 100644
index 0000000000..dae2fd49ff
--- /dev/null
+++ b/tests/auto/corelib/tools/qscopeguard/CMakeLists.txt
@@ -0,0 +1 @@
+add_qt_test(tst_qscopeguard SOURCES tst_qscopeguard.cpp)
diff --git a/tests/auto/corelib/tools/qset/CMakeLists.txt b/tests/auto/corelib/tools/qset/CMakeLists.txt
new file mode 100644
index 0000000000..e602ff4293
--- /dev/null
+++ b/tests/auto/corelib/tools/qset/CMakeLists.txt
@@ -0,0 +1 @@
+add_qt_test(tst_qset SOURCES tst_qset.cpp)
diff --git a/tests/auto/corelib/tools/qsize/CMakeLists.txt b/tests/auto/corelib/tools/qsize/CMakeLists.txt
new file mode 100644
index 0000000000..595b5f4af8
--- /dev/null
+++ b/tests/auto/corelib/tools/qsize/CMakeLists.txt
@@ -0,0 +1 @@
+add_qt_test(tst_qsize SOURCES tst_qsize.cpp)
diff --git a/tests/auto/corelib/tools/qsizef/CMakeLists.txt b/tests/auto/corelib/tools/qsizef/CMakeLists.txt
new file mode 100644
index 0000000000..05aa4ba8a7
--- /dev/null
+++ b/tests/auto/corelib/tools/qsizef/CMakeLists.txt
@@ -0,0 +1 @@
+add_qt_test(tst_qsizef SOURCES tst_qsizef.cpp)
diff --git a/tests/auto/corelib/tools/qstl/CMakeLists.txt b/tests/auto/corelib/tools/qstl/CMakeLists.txt
new file mode 100644
index 0000000000..37a9529e8f
--- /dev/null
+++ b/tests/auto/corelib/tools/qstl/CMakeLists.txt
@@ -0,0 +1 @@
+add_qt_test(tst_qstl SOURCES tst_qstl.cpp)
diff --git a/tests/auto/corelib/tools/qstring_no_cast_from_bytearray/CMakeLists.txt b/tests/auto/corelib/tools/qstring_no_cast_from_bytearray/CMakeLists.txt
new file mode 100644
index 0000000000..46a9e9ff79
--- /dev/null
+++ b/tests/auto/corelib/tools/qstring_no_cast_from_bytearray/CMakeLists.txt
@@ -0,0 +1 @@
+add_qt_test(tst_qstring_no_cast_from_bytearray SOURCES tst_qstring_no_cast_from_bytearray.cpp)
diff --git a/tests/auto/corelib/tools/qstringbuilder/qstringbuilder1/CMakeLists.txt b/tests/auto/corelib/tools/qstringbuilder/qstringbuilder1/CMakeLists.txt
new file mode 100644
index 0000000000..2fad1ee7ed
--- /dev/null
+++ b/tests/auto/corelib/tools/qstringbuilder/qstringbuilder1/CMakeLists.txt
@@ -0,0 +1 @@
+add_qt_test(tst_qstringbuilder1 SOURCES tst_qstringbuilder1.cpp)
diff --git a/tests/auto/corelib/tools/qstringbuilder/qstringbuilder2/CMakeLists.txt b/tests/auto/corelib/tools/qstringbuilder/qstringbuilder2/CMakeLists.txt
new file mode 100644
index 0000000000..93231a22e1
--- /dev/null
+++ b/tests/auto/corelib/tools/qstringbuilder/qstringbuilder2/CMakeLists.txt
@@ -0,0 +1 @@
+add_qt_test(tst_qstringbuilder2 SOURCES tst_qstringbuilder2.cpp)
diff --git a/tests/auto/corelib/tools/qstringbuilder/qstringbuilder3/CMakeLists.txt b/tests/auto/corelib/tools/qstringbuilder/qstringbuilder3/CMakeLists.txt
new file mode 100644
index 0000000000..4669fc93b4
--- /dev/null
+++ b/tests/auto/corelib/tools/qstringbuilder/qstringbuilder3/CMakeLists.txt
@@ -0,0 +1 @@
+add_qt_test(tst_qstringbuilder3 SOURCES tst_qstringbuilder3.cpp)
diff --git a/tests/auto/corelib/tools/qstringbuilder/qstringbuilder4/CMakeLists.txt b/tests/auto/corelib/tools/qstringbuilder/qstringbuilder4/CMakeLists.txt
new file mode 100644
index 0000000000..d6e7be6c11
--- /dev/null
+++ b/tests/auto/corelib/tools/qstringbuilder/qstringbuilder4/CMakeLists.txt
@@ -0,0 +1 @@
+add_qt_test(tst_qstringbuilder4 SOURCES tst_qstringbuilder4.cpp)
diff --git a/tests/auto/corelib/tools/qstringiterator/CMakeLists.txt b/tests/auto/corelib/tools/qstringiterator/CMakeLists.txt
new file mode 100644
index 0000000000..572ada1f4c
--- /dev/null
+++ b/tests/auto/corelib/tools/qstringiterator/CMakeLists.txt
@@ -0,0 +1 @@
+add_qt_test(tst_qstringiterator SOURCES tst_qstringiterator.cpp LIBRARIES Qt::CorePrivate)
diff --git a/tests/auto/corelib/tools/qstringlist/CMakeLists.txt b/tests/auto/corelib/tools/qstringlist/CMakeLists.txt
new file mode 100644
index 0000000000..af361fbbcc
--- /dev/null
+++ b/tests/auto/corelib/tools/qstringlist/CMakeLists.txt
@@ -0,0 +1 @@
+add_qt_test(tst_qstringlist SOURCES tst_qstringlist.cpp)
diff --git a/tests/auto/corelib/tools/qstringmatcher/CMakeLists.txt b/tests/auto/corelib/tools/qstringmatcher/CMakeLists.txt
new file mode 100644
index 0000000000..1bf0a6e15f
--- /dev/null
+++ b/tests/auto/corelib/tools/qstringmatcher/CMakeLists.txt
@@ -0,0 +1 @@
+add_qt_test(tst_qstringmatcher SOURCES tst_qstringmatcher.cpp)
diff --git a/tests/auto/corelib/tools/qstringref/CMakeLists.txt b/tests/auto/corelib/tools/qstringref/CMakeLists.txt
new file mode 100644
index 0000000000..d4daf1a437
--- /dev/null
+++ b/tests/auto/corelib/tools/qstringref/CMakeLists.txt
@@ -0,0 +1 @@
+add_qt_test(tst_qstringref SOURCES tst_qstringref.cpp)
diff --git a/tests/auto/corelib/tools/qtime/CMakeLists.txt b/tests/auto/corelib/tools/qtime/CMakeLists.txt
new file mode 100644
index 0000000000..0b8b4c81f3
--- /dev/null
+++ b/tests/auto/corelib/tools/qtime/CMakeLists.txt
@@ -0,0 +1 @@
+add_qt_test(tst_qtime SOURCES tst_qtime.cpp)
diff --git a/tests/auto/corelib/tools/qtimeline/CMakeLists.txt b/tests/auto/corelib/tools/qtimeline/CMakeLists.txt
new file mode 100644
index 0000000000..b23f07e9b5
--- /dev/null
+++ b/tests/auto/corelib/tools/qtimeline/CMakeLists.txt
@@ -0,0 +1 @@
+add_qt_test(tst_qtimeline SOURCES tst_qtimeline.cpp)
diff --git a/tests/auto/corelib/tools/qvarlengtharray/CMakeLists.txt b/tests/auto/corelib/tools/qvarlengtharray/CMakeLists.txt
new file mode 100644
index 0000000000..a1bea13f9e
--- /dev/null
+++ b/tests/auto/corelib/tools/qvarlengtharray/CMakeLists.txt
@@ -0,0 +1 @@
+add_qt_test(tst_qvarlengtharray SOURCES tst_qvarlengtharray.cpp)
diff --git a/tests/auto/dbus/CMakeLists.txt b/tests/auto/dbus/CMakeLists.txt
new file mode 100644
index 0000000000..6371c52ceb
--- /dev/null
+++ b/tests/auto/dbus/CMakeLists.txt
@@ -0,0 +1,33 @@
+# Generated from dbus.pro.
+
+add_subdirectory(qdbusconnection_delayed)
+add_subdirectory(qdbusconnection)
+add_subdirectory(qdbusconnection_no_app)
+add_subdirectory(qdbusconnection_no_bus)
+add_subdirectory(qdbusconnection_no_libdbus)
+add_subdirectory(qdbusconnection_spyhook)
+add_subdirectory(qdbuscontext)
+add_subdirectory(qdbuslocalcalls)
+add_subdirectory(qdbusmetaobject)
+add_subdirectory(qdbusmetatype)
+add_subdirectory(qdbuspendingcall)
+add_subdirectory(qdbuspendingreply)
+add_subdirectory(qdbusreply)
+add_subdirectory(qdbusservicewatcher)
+add_subdirectory(qdbustype)
+add_subdirectory(qdbusthreading)
+
+if(QT_FEATURE_process)
+ # missing add_qt_binary: add_subdirectory("qdbusabstractadaptor")
+ # missing add_qt_binary: add_subdirectory("qdbusabstractinterface")
+ # missing add_qt_binary: add_subdirectory("qdbusinterface")
+
+ if(QT_FEATURE_private_tests)
+ add_subdirectory(qdbusmarshall)
+ endif()
+endif()
+
+### FIXME
+# if(QT_FEATURE_xml)
+# add_subdirectory(qdbusxmlparser)
+# endif()
diff --git a/tests/auto/dbus/qdbusabstractadaptor/CMakeLists.txt b/tests/auto/dbus/qdbusabstractadaptor/CMakeLists.txt
new file mode 100644
index 0000000000..9a8132d115
--- /dev/null
+++ b/tests/auto/dbus/qdbusabstractadaptor/CMakeLists.txt
@@ -0,0 +1,4 @@
+# Generated from qdbusabstractadaptor.pro.
+
+add_subdirectory(qmyserver)
+add_subdirectory(qdbusabstractadaptor)
diff --git a/tests/auto/dbus/qdbusabstractadaptor/qdbusabstractadaptor/CMakeLists.txt b/tests/auto/dbus/qdbusabstractadaptor/qdbusabstractadaptor/CMakeLists.txt
new file mode 100644
index 0000000000..953eeb4fa4
--- /dev/null
+++ b/tests/auto/dbus/qdbusabstractadaptor/qdbusabstractadaptor/CMakeLists.txt
@@ -0,0 +1,14 @@
+# Generated from qdbusabstractadaptor.pro.
+
+#####################################################################
+## ../tst_qdbusabstractadaptor Test:
+#####################################################################
+
+add_qt_test(../tst_qdbusabstractadaptor
+ SOURCES
+ ../myobject.h
+ ../tst_qdbusabstractadaptor.cpp
+ LIBRARIES
+ Qt::CorePrivate
+ Qt::DBus
+)
diff --git a/tests/auto/dbus/qdbusabstractadaptor/qmyserver/CMakeLists.txt b/tests/auto/dbus/qdbusabstractadaptor/qmyserver/CMakeLists.txt
new file mode 100644
index 0000000000..627b29ff42
--- /dev/null
+++ b/tests/auto/dbus/qdbusabstractadaptor/qmyserver/CMakeLists.txt
@@ -0,0 +1,13 @@
+# Generated from qmyserver.pro.
+
+#####################################################################
+## qmyserver Binary:
+#####################################################################
+
+add_qt_executable(qmyserver
+ SOURCES
+ ../myobject.h
+ qmyserver.cpp
+ LIBRARIES
+ Qt::DBus
+)
diff --git a/tests/auto/dbus/qdbusabstractinterface/CMakeLists.txt b/tests/auto/dbus/qdbusabstractinterface/CMakeLists.txt
new file mode 100644
index 0000000000..111012aba9
--- /dev/null
+++ b/tests/auto/dbus/qdbusabstractinterface/CMakeLists.txt
@@ -0,0 +1,4 @@
+# Generated from qdbusabstractinterface.pro.
+
+add_subdirectory(qpinger)
+add_subdirectory(qdbusabstractinterface)
diff --git a/tests/auto/dbus/qdbusabstractinterface/qdbusabstractinterface/CMakeLists.txt b/tests/auto/dbus/qdbusabstractinterface/qdbusabstractinterface/CMakeLists.txt
new file mode 100644
index 0000000000..5bbd2ebbaa
--- /dev/null
+++ b/tests/auto/dbus/qdbusabstractinterface/qdbusabstractinterface/CMakeLists.txt
@@ -0,0 +1,13 @@
+# Generated from qdbusabstractinterface.pro.
+
+#####################################################################
+## ../tst_qdbusabstractinterface Test:
+#####################################################################
+
+add_qt_test(../tst_qdbusabstractinterface
+ SOURCES
+ ../interface.cpp ../interface.h
+ ../tst_qdbusabstractinterface.cpp
+ LIBRARIES
+ Qt::DBus
+)
diff --git a/tests/auto/dbus/qdbusabstractinterface/qpinger/CMakeLists.txt b/tests/auto/dbus/qdbusabstractinterface/qpinger/CMakeLists.txt
new file mode 100644
index 0000000000..91427dacab
--- /dev/null
+++ b/tests/auto/dbus/qdbusabstractinterface/qpinger/CMakeLists.txt
@@ -0,0 +1,13 @@
+# Generated from qpinger.pro.
+
+#####################################################################
+## qpinger Binary:
+#####################################################################
+
+add_qt_executable(qpinger
+ SOURCES
+ ../interface.cpp ../interface.h
+ qpinger.cpp
+ LIBRARIES
+ Qt::DBus
+)
diff --git a/tests/auto/dbus/qdbusconnection/CMakeLists.txt b/tests/auto/dbus/qdbusconnection/CMakeLists.txt
new file mode 100644
index 0000000000..e2886d9185
--- /dev/null
+++ b/tests/auto/dbus/qdbusconnection/CMakeLists.txt
@@ -0,0 +1,12 @@
+# Generated from qdbusconnection.pro.
+
+#####################################################################
+## tst_qdbusconnection Test:
+#####################################################################
+
+add_qt_test(tst_qdbusconnection
+ SOURCES
+ tst_qdbusconnection.cpp tst_qdbusconnection.h
+ LIBRARIES
+ Qt::DBus
+)
diff --git a/tests/auto/dbus/qdbusconnection_delayed/CMakeLists.txt b/tests/auto/dbus/qdbusconnection_delayed/CMakeLists.txt
new file mode 100644
index 0000000000..8463fea971
--- /dev/null
+++ b/tests/auto/dbus/qdbusconnection_delayed/CMakeLists.txt
@@ -0,0 +1,14 @@
+# Generated from qdbusconnection_delayed.pro.
+
+#####################################################################
+## tst_qdbusconnection_delayed Test:
+#####################################################################
+
+add_qt_test(tst_qdbusconnection_delayed
+ SOURCES
+ tst_qdbusconnection_delayed.cpp
+ DEFINES
+ SRCDIR="${CMAKE_CURRENT_SOURCE_DIR}/"
+ LIBRARIES
+ Qt::DBus
+)
diff --git a/tests/auto/dbus/qdbusconnection_no_app/CMakeLists.txt b/tests/auto/dbus/qdbusconnection_no_app/CMakeLists.txt
new file mode 100644
index 0000000000..07223682cf
--- /dev/null
+++ b/tests/auto/dbus/qdbusconnection_no_app/CMakeLists.txt
@@ -0,0 +1,16 @@
+# Generated from qdbusconnection_no_app.pro.
+
+#####################################################################
+## tst_qdbusconnection_no_app Test:
+#####################################################################
+
+add_qt_test(tst_qdbusconnection_no_app
+ SOURCES
+ ../qdbusconnection/tst_qdbusconnection.h
+ tst_qdbusconnection_no_app.cpp
+ DEFINES
+ SRCDIR="${CMAKE_CURRENT_SOURCE_DIR}/"
+ tst_QDBusConnection=tst_QDBusConnection_NoApplication
+ LIBRARIES
+ Qt::DBus
+)
diff --git a/tests/auto/dbus/qdbusconnection_no_bus/CMakeLists.txt b/tests/auto/dbus/qdbusconnection_no_bus/CMakeLists.txt
new file mode 100644
index 0000000000..8cd1e2a3d3
--- /dev/null
+++ b/tests/auto/dbus/qdbusconnection_no_bus/CMakeLists.txt
@@ -0,0 +1,12 @@
+# Generated from qdbusconnection_no_bus.pro.
+
+#####################################################################
+## tst_qdbusconnection_no_bus Test:
+#####################################################################
+
+add_qt_test(tst_qdbusconnection_no_bus
+ SOURCES
+ tst_qdbusconnection_no_bus.cpp
+ LIBRARIES
+ Qt::DBus
+)
diff --git a/tests/auto/dbus/qdbusconnection_no_libdbus/CMakeLists.txt b/tests/auto/dbus/qdbusconnection_no_libdbus/CMakeLists.txt
new file mode 100644
index 0000000000..08a5c3cad5
--- /dev/null
+++ b/tests/auto/dbus/qdbusconnection_no_libdbus/CMakeLists.txt
@@ -0,0 +1,15 @@
+# Generated from qdbusconnection_no_libdbus.pro.
+
+#####################################################################
+## tst_qdbusconnection_no_libdbus Test:
+#####################################################################
+
+add_qt_test(tst_qdbusconnection_no_libdbus
+ SOURCES
+ ../qdbusconnection_no_bus/tst_qdbusconnection_no_bus.cpp
+ DEFINES
+ SIMULATE_LOAD_FAIL
+ tst_QDBusConnectionNoBus=tst_QDBusConnectionNoLibDBus1
+ LIBRARIES
+ Qt::DBus
+)
diff --git a/tests/auto/dbus/qdbusconnection_no_libdbus/tst_qdbusconnection_no_libdbus.cpp b/tests/auto/dbus/qdbusconnection_no_libdbus/tst_qdbusconnection_no_libdbus.cpp
new file mode 100644
index 0000000000..e93b8aa609
--- /dev/null
+++ b/tests/auto/dbus/qdbusconnection_no_libdbus/tst_qdbusconnection_no_libdbus.cpp
@@ -0,0 +1,73 @@
+/****************************************************************************
+**
+** Copyright (C) 2016 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the test suite of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:GPL-EXCEPT$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3 as published by the Free Software
+** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+#include <qcoreapplication.h>
+#include <qdebug.h>
+
+#include <QtTest/QtTest>
+#include <QtDBus/QtDBus>
+
+#include <stdlib.h>
+
+/* This test uses an appless main, to ensure that no D-Bus stuff is implicitly done
+ It also sets the magic "QT_SIMULATE_DBUS_LIBFAIL" env variable, that is only available
+ in developer builds. That env variable simulates a D-Bus library load fail.
+
+ In no case should the QDBus module crash because D-Bus libs couldn't be loaded */
+
+class tst_QDBusConnectionNoBus : public QObject
+{
+ Q_OBJECT
+
+public:
+ tst_QDBusConnectionNoBus()
+ {
+ qputenv("DBUS_SESSION_BUS_ADDRESS", "unix:abstract=/tmp/does_not_exist");
+#ifdef SIMULATE_LOAD_FAIL
+ qputenv("QT_SIMULATE_DBUS_LIBFAIL", "1");
+#endif
+ }
+
+private slots:
+ void connectToBus();
+};
+
+
+void tst_QDBusConnectionNoBus::connectToBus()
+{
+ int argc = 0;
+ QCoreApplication app(argc, 0);
+
+ QDBusConnection con = QDBusConnection::sessionBus();
+
+ QVERIFY(!con.isConnected()); // if we didn't crash here, the test passed :)
+}
+
+QTEST_APPLESS_MAIN(tst_QDBusConnectionNoBus)
+
+#include "tst_qdbusconnection_no_libdbus.moc"
+
diff --git a/tests/auto/dbus/qdbusconnection_spyhook/CMakeLists.txt b/tests/auto/dbus/qdbusconnection_spyhook/CMakeLists.txt
new file mode 100644
index 0000000000..e7c6cf0ea2
--- /dev/null
+++ b/tests/auto/dbus/qdbusconnection_spyhook/CMakeLists.txt
@@ -0,0 +1,17 @@
+# Generated from qdbusconnection_spyhook.pro.
+
+#####################################################################
+## tst_qdbusconnection_spyhook Test:
+#####################################################################
+
+add_qt_test(tst_qdbusconnection_spyhook
+ SOURCES
+ ../qdbusconnection/tst_qdbusconnection.h
+ tst_qdbusconnection_spyhook.cpp
+ DEFINES
+ SRCDIR="${CMAKE_CURRENT_SOURCE_DIR}/"
+ tst_QDBusConnection=tst_QDBusConnection_SpyHook
+ LIBRARIES
+ Qt::DBus
+ RUN_SERIAL
+)
diff --git a/tests/auto/dbus/qdbuscontext/CMakeLists.txt b/tests/auto/dbus/qdbuscontext/CMakeLists.txt
new file mode 100644
index 0000000000..e5ecc293e5
--- /dev/null
+++ b/tests/auto/dbus/qdbuscontext/CMakeLists.txt
@@ -0,0 +1,12 @@
+# Generated from qdbuscontext.pro.
+
+#####################################################################
+## tst_qdbuscontext Test:
+#####################################################################
+
+add_qt_test(tst_qdbuscontext
+ SOURCES
+ tst_qdbuscontext.cpp
+ LIBRARIES
+ Qt::DBus
+)
diff --git a/tests/auto/dbus/qdbusinterface/CMakeLists.txt b/tests/auto/dbus/qdbusinterface/CMakeLists.txt
new file mode 100644
index 0000000000..ae79490a83<