From e9c45bbdddd4df005bdaa5eea9740d351e6eaea2 Mon Sep 17 00:00:00 2001 From: Simon Hausmann Date: Wed, 24 Oct 2018 15:20:27 +0200 Subject: Begin port of qtbase to CMake MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Done-by: Alexandru Croitor Done-by: Frederik Gladhorn Done-by: Kevin Funk Done-by: Mikhail Svetkin Done-by: Simon Hausmann Done-by: Tobias Hunger Done-by: Tor Arne Vestbø Done-by: Volker Krause Change-Id: Ida4f8bd190f9a4849a1af7b5b7981337a5df5310 Reviewed-by: Simon Hausmann Reviewed-by: Tobias Hunger Reviewed-by: Mikhail Svetkin --- .gitignore | 2 + CMakeLists.txt | 43 + .../extra-cmake-modules/COPYING-CMAKE-SCRIPTS | 22 + .../find-modules/ECMFindModuleHelpersStub.cmake | 1 + .../find-modules/FindWayland.cmake | 143 +++ .../find-modules/FindX11_XCB.cmake | 118 +++ .../extra-cmake-modules/find-modules/FindXCB.cmake | 201 ++++ .../modules/ECMEnableSanitizers.cmake | 173 ++++ .../modules/ECMFindModuleHelpers.cmake | 297 ++++++ .../extra-cmake-modules/qt_attribution.json | 15 + cmake/3rdparty/kwin/COPYING-CMAKE-SCRIPTS | 22 + cmake/3rdparty/kwin/FindFontconfig.cmake | 50 + cmake/3rdparty/kwin/FindLibdrm.cmake | 126 +++ cmake/3rdparty/kwin/FindLibinput.cmake | 125 +++ cmake/3rdparty/kwin/FindXKB.cmake | 101 ++ cmake/3rdparty/kwin/Findgbm.cmake | 125 +++ cmake/3rdparty/kwin/qt_attribution.json | 17 + cmake/FindAtomic.cmake | 37 + cmake/FindGLib.cmake | 3 + cmake/FindLibsystemd.cmake | 3 + cmake/FindLibudev.cmake | 3 + cmake/FindPCRE2.cmake | 13 + cmake/FindWrapDoubleConversion.cmake | 36 + cmake/Finddouble-conversion.cmake | 30 + cmake/QtBaseConfigureTests.cmake | 139 +++ cmake/QtBaseGlobalTargets.cmake | 58 ++ cmake/QtBuild.cmake | 1080 ++++++++++++++++++++ cmake/QtCompilerOptimization.cmake | 106 ++ cmake/QtConfig.cmake.in | 43 + cmake/QtFeature.cmake | 435 ++++++++ cmake/QtModuleConfig.cmake.in | 9 + cmake/QtPlatformSupport.cmake | 41 + cmake/QtPostProcess.cmake | 32 + cmake/QtSetup.cmake | 47 + cmake/README.md | 103 ++ cmake/tests/features/CMakeLists.txt | 42 + cmake/tests/features/configure.cmake | 35 + cmake/tests/features/src/CMakeLists.txt | 7 + configure.cmake | 421 ++++++++ configure.json | 11 +- examples/CMakeLists.txt | 3 + examples/gui/CMakeLists.txt | 1 + examples/gui/rasterwindow/CMakeLists.txt | 18 + qmake/CMakeLists.txt | 2 + src/3rdparty/CMakeLists.txt | 2 + src/3rdparty/harfbuzz/CMakeLists.txt | 11 + src/3rdparty/tinycbor/CMakeLists.txt | 2 + src/CMakeLists.txt | 65 ++ src/corelib/CMakeLists.txt | 781 ++++++++++++++ src/corelib/configure.cmake | 712 +++++++++++++ src/corelib/configure.json | 27 +- src/corelib/global/qconfig.cpp.in | 65 ++ src/dbus/CMakeLists.txt | 58 ++ src/gui/CMakeLists.txt | 494 +++++++++ src/gui/configure.cmake | 946 +++++++++++++++++ src/gui/configure.json | 20 +- src/gui/painting/qcoregraphics.mm | 2 +- src/network/CMakeLists.txt | 382 +++++++ src/network/configure.cmake | 265 +++++ src/network/configure.json | 18 +- src/opengl/CMakeLists.txt | 58 ++ src/platformheaders/CMakeLists.txt | 7 + src/platformheaders/fake.cpp | 0 src/platformsupport/CMakeLists.txt | 23 + src/platformsupport/accessibility/CMakeLists.txt | 16 + src/platformsupport/clipboard/CMakeLists.txt | 27 + src/platformsupport/edid/CMakeLists.txt | 15 + .../eventdispatchers/CMakeLists.txt | 39 + src/platformsupport/fontdatabases/CMakeLists.txt | 106 ++ src/platformsupport/fontdatabases/fake.cpp | 0 src/platformsupport/graphics/CMakeLists.txt | 15 + src/platformsupport/services/CMakeLists.txt | 24 + src/platformsupport/themes/CMakeLists.txt | 55 + src/plugins/CMakeLists.txt | 3 + src/plugins/platforms/CMakeLists.txt | 10 + src/plugins/platforms/cocoa/CMakeLists.txt | 115 +++ src/plugins/platforms/xcb/CMakeLists.txt | 172 ++++ src/plugins/sqldrivers/configure.json | 4 +- src/testlib/CMakeLists.txt | 89 ++ src/testlib/configure.cmake | 21 + src/tools/CMakeLists.txt | 2 + src/tools/bootstrap/CMakeLists.txt | 151 +++ src/tools/moc/CMakeLists.txt | 10 + src/tools/qfloat16-tables/CMakeLists.txt | 2 + src/tools/qmocscanner/CMakeLists.txt | 10 + src/tools/qmocscanner/main.cpp | 623 +++++++++++ src/tools/qvkgen/CMakeLists.txt | 5 + src/tools/rcc/CMakeLists.txt | 1 + src/tools/tracegen/CMakeLists.txt | 10 + src/tools/uic/CMakeLists.txt | 16 + src/widgets/CMakeLists.txt | 612 +++++++++++ src/widgets/configure.cmake | 567 ++++++++++ src/xml/CMakeLists.txt | 30 + src/xml/configure.cmake | 22 + tests/CMakeLists.txt | 1 + tests/auto/CMakeLists.txt | 55 + tests/auto/corelib/CMakeLists.txt | 12 + tests/auto/corelib/animation/CMakeLists.txt | 6 + .../animation/qabstractanimation/CMakeLists.txt | 1 + .../animation/qanimationgroup/CMakeLists.txt | 1 + .../qparallelanimationgroup/CMakeLists.txt | 1 + .../animation/qpauseanimation/CMakeLists.txt | 1 + .../qsequentialanimationgroup/CMakeLists.txt | 1 + .../animation/qvariantanimation/CMakeLists.txt | 1 + tests/auto/corelib/codecs/CMakeLists.txt | 3 + .../auto/corelib/codecs/qtextcodec/CMakeLists.txt | 5 + .../corelib/codecs/qtextcodec/echo/CMakeLists.txt | 1 + tests/auto/corelib/codecs/utf8/CMakeLists.txt | 1 + tests/auto/corelib/global/CMakeLists.txt | 12 + .../auto/corelib/global/q_func_info/CMakeLists.txt | 1 + tests/auto/corelib/global/qflags/CMakeLists.txt | 1 + tests/auto/corelib/global/qfloat16/CMakeLists.txt | 1 + .../auto/corelib/global/qgetputenv/CMakeLists.txt | 1 + tests/auto/corelib/global/qglobal/CMakeLists.txt | 1 + .../corelib/global/qglobalstatic/CMakeLists.txt | 8 + tests/auto/corelib/global/qhooks/CMakeLists.txt | 1 + tests/auto/corelib/global/qlogging/CMakeLists.txt | 10 + tests/auto/corelib/global/qnumeric/CMakeLists.txt | 1 + tests/auto/corelib/global/qrand/CMakeLists.txt | 1 + .../corelib/global/qrandomgenerator/CMakeLists.txt | 1 + tests/auto/corelib/global/qtendian/CMakeLists.txt | 1 + tests/auto/corelib/io/CMakeLists.txt | 12 + tests/auto/corelib/io/largefile/CMakeLists.txt | 6 + tests/auto/corelib/io/qbuffer/CMakeLists.txt | 1 + tests/auto/corelib/io/qdataurl/CMakeLists.txt | 1 + .../corelib/io/qfilesystementry/CMakeLists.txt | 7 + .../corelib/io/qfilesystemwatcher/CMakeLists.txt | 1 + tests/auto/corelib/io/qipaddress/CMakeLists.txt | 1 + .../corelib/io/qloggingcategory/CMakeLists.txt | 1 + tests/auto/corelib/io/qnodebug/CMakeLists.txt | 1 + .../corelib/io/qprocessenvironment/CMakeLists.txt | 1 + tests/auto/corelib/io/qstorageinfo/CMakeLists.txt | 1 + tests/auto/corelib/io/qurlquery/CMakeLists.txt | 1 + tests/auto/corelib/itemmodels/CMakeLists.txt | 4 + .../itemmodels/qabstractproxymodel/CMakeLists.txt | 1 + .../itemmodels/qitemselectionmodel/CMakeLists.txt | 1 + .../itemmodels/qstringlistmodel/CMakeLists.txt | 4 + tests/auto/corelib/kernel/CMakeLists.txt | 13 + .../corelib/kernel/qdeadlinetimer/CMakeLists.txt | 1 + .../corelib/kernel/qelapsedtimer/CMakeLists.txt | 1 + .../corelib/kernel/qeventdispatcher/CMakeLists.txt | 1 + tests/auto/corelib/kernel/qmath/CMakeLists.txt | 1 + tests/auto/corelib/kernel/qmetaenum/CMakeLists.txt | 1 + .../auto/corelib/kernel/qmetamethod/CMakeLists.txt | 1 + .../auto/corelib/kernel/qmetaobject/CMakeLists.txt | 1 + .../kernel/qmetaobjectbuilder/CMakeLists.txt | 1 + .../corelib/kernel/qmetaproperty/CMakeLists.txt | 1 + tests/auto/corelib/kernel/qmimedata/CMakeLists.txt | 1 + .../corelib/kernel/qsignalmapper/CMakeLists.txt | 1 + .../kernel/qwineventnotifier/CMakeLists.txt | 1 + tests/auto/corelib/mimetypes/CMakeLists.txt | 2 + .../corelib/mimetypes/qmimetype/CMakeLists.txt | 1 + tests/auto/corelib/serialization/CMakeLists.txt | 5 + .../serialization/qcborstreamreader/CMakeLists.txt | 6 + .../serialization/qcborstreamwriter/CMakeLists.txt | 5 + .../serialization/qcborvalue/CMakeLists.txt | 6 + .../serialization/qcborvalue_json/CMakeLists.txt | 1 + tests/auto/corelib/statemachine/CMakeLists.txt | 2 + .../corelib/statemachine/qstate/CMakeLists.txt | 1 + tests/auto/corelib/thread/CMakeLists.txt | 13 + .../auto/corelib/thread/qatomicint/CMakeLists.txt | 1 + .../corelib/thread/qatomicpointer/CMakeLists.txt | 1 + tests/auto/corelib/thread/qfuture/CMakeLists.txt | 1 + .../thread/qfuturesynchronizer/CMakeLists.txt | 1 + .../corelib/thread/qmutexlocker/CMakeLists.txt | 1 + .../auto/corelib/thread/qreadlocker/CMakeLists.txt | 1 + .../corelib/thread/qreadwritelock/CMakeLists.txt | 1 + .../corelib/thread/qresultstore/CMakeLists.txt | 1 + .../auto/corelib/thread/qsemaphore/CMakeLists.txt | 1 + .../auto/corelib/thread/qthreadpool/CMakeLists.txt | 1 + .../corelib/thread/qwaitcondition/CMakeLists.txt | 1 + .../corelib/thread/qwritelocker/CMakeLists.txt | 1 + tests/auto/corelib/tools/CMakeLists.txt | 47 + .../auto/corelib/tools/qalgorithms/CMakeLists.txt | 1 + tests/auto/corelib/tools/qarraydata/CMakeLists.txt | 4 + tests/auto/corelib/tools/qbitarray/CMakeLists.txt | 1 + .../corelib/tools/qbytearraylist/CMakeLists.txt | 1 + .../corelib/tools/qbytedatabuffer/CMakeLists.txt | 1 + tests/auto/corelib/tools/qcache/CMakeLists.txt | 1 + .../tools/qcommandlineparser/CMakeLists.txt | 1 + .../corelib/tools/qcontiguouscache/CMakeLists.txt | 1 + tests/auto/corelib/tools/qdate/CMakeLists.txt | 1 + .../auto/corelib/tools/qeasingcurve/CMakeLists.txt | 1 + .../qexplicitlyshareddatapointer/CMakeLists.txt | 1 + tests/auto/corelib/tools/qhash/CMakeLists.txt | 1 + .../corelib/tools/qhashfunctions/CMakeLists.txt | 1 + .../auto/corelib/tools/qlinkedlist/CMakeLists.txt | 1 + tests/auto/corelib/tools/qlist/CMakeLists.txt | 1 + tests/auto/corelib/tools/qmakearray/CMakeLists.txt | 1 + tests/auto/corelib/tools/qmap/CMakeLists.txt | 1 + tests/auto/corelib/tools/qmargins/CMakeLists.txt | 1 + .../qmessageauthenticationcode/CMakeLists.txt | 1 + tests/auto/corelib/tools/qpair/CMakeLists.txt | 1 + tests/auto/corelib/tools/qpoint/CMakeLists.txt | 1 + tests/auto/corelib/tools/qpointf/CMakeLists.txt | 1 + tests/auto/corelib/tools/qqueue/CMakeLists.txt | 1 + tests/auto/corelib/tools/qrect/CMakeLists.txt | 1 + tests/auto/corelib/tools/qregexp/CMakeLists.txt | 1 + .../tools/qregularexpression/CMakeLists.txt | 1 + .../auto/corelib/tools/qringbuffer/CMakeLists.txt | 1 + .../corelib/tools/qscopedpointer/CMakeLists.txt | 1 + .../tools/qscopedvaluerollback/CMakeLists.txt | 1 + .../auto/corelib/tools/qscopeguard/CMakeLists.txt | 1 + tests/auto/corelib/tools/qset/CMakeLists.txt | 1 + tests/auto/corelib/tools/qsize/CMakeLists.txt | 1 + tests/auto/corelib/tools/qsizef/CMakeLists.txt | 1 + tests/auto/corelib/tools/qstl/CMakeLists.txt | 1 + .../qstring_no_cast_from_bytearray/CMakeLists.txt | 1 + .../qstringbuilder/qstringbuilder1/CMakeLists.txt | 1 + .../qstringbuilder/qstringbuilder2/CMakeLists.txt | 1 + .../qstringbuilder/qstringbuilder3/CMakeLists.txt | 1 + .../qstringbuilder/qstringbuilder4/CMakeLists.txt | 1 + .../corelib/tools/qstringiterator/CMakeLists.txt | 1 + .../auto/corelib/tools/qstringlist/CMakeLists.txt | 1 + .../corelib/tools/qstringmatcher/CMakeLists.txt | 1 + tests/auto/corelib/tools/qstringref/CMakeLists.txt | 1 + tests/auto/corelib/tools/qtime/CMakeLists.txt | 1 + tests/auto/corelib/tools/qtimeline/CMakeLists.txt | 1 + .../corelib/tools/qvarlengtharray/CMakeLists.txt | 1 + tests/auto/dbus/CMakeLists.txt | 33 + .../auto/dbus/qdbusabstractadaptor/CMakeLists.txt | 4 + .../qdbusabstractadaptor/CMakeLists.txt | 14 + .../qdbusabstractadaptor/qmyserver/CMakeLists.txt | 13 + .../dbus/qdbusabstractinterface/CMakeLists.txt | 4 + .../qdbusabstractinterface/CMakeLists.txt | 13 + .../qdbusabstractinterface/qpinger/CMakeLists.txt | 13 + tests/auto/dbus/qdbusconnection/CMakeLists.txt | 12 + .../dbus/qdbusconnection_delayed/CMakeLists.txt | 14 + .../dbus/qdbusconnection_no_app/CMakeLists.txt | 16 + .../dbus/qdbusconnection_no_bus/CMakeLists.txt | 12 + .../dbus/qdbusconnection_no_libdbus/CMakeLists.txt | 15 + .../tst_qdbusconnection_no_libdbus.cpp | 73 ++ .../dbus/qdbusconnection_spyhook/CMakeLists.txt | 17 + tests/auto/dbus/qdbuscontext/CMakeLists.txt | 12 + tests/auto/dbus/qdbusinterface/CMakeLists.txt | 4 + .../qdbusinterface/qdbusinterface/CMakeLists.txt | 28 + .../dbus/qdbusinterface/qmyserver/CMakeLists.txt | 13 + tests/auto/dbus/qdbuslocalcalls/CMakeLists.txt | 12 + tests/auto/dbus/qdbusmarshall/CMakeLists.txt | 4 + .../qdbusmarshall/qdbusmarshall/CMakeLists.txt | 26 + tests/auto/dbus/qdbusmarshall/qpong/CMakeLists.txt | 12 + tests/auto/dbus/qdbusmetaobject/CMakeLists.txt | 12 + tests/auto/dbus/qdbusmetatype/CMakeLists.txt | 12 + tests/auto/dbus/qdbuspendingcall/CMakeLists.txt | 12 + tests/auto/dbus/qdbuspendingreply/CMakeLists.txt | 12 + tests/auto/dbus/qdbusreply/CMakeLists.txt | 12 + tests/auto/dbus/qdbusservicewatcher/CMakeLists.txt | 12 + tests/auto/dbus/qdbusthreading/CMakeLists.txt | 12 + tests/auto/dbus/qdbustype/CMakeLists.txt | 26 + tests/auto/dbus/qdbusxmlparser/CMakeLists.txt | 14 + tests/auto/gui/CMakeLists.txt | 19 + tests/auto/gui/image/CMakeLists.txt | 15 + .../auto/gui/image/qimageiohandler/CMakeLists.txt | 1 + tests/auto/gui/image/qpicture/CMakeLists.txt | 1 + tests/auto/gui/itemmodels/CMakeLists.txt | 4 + .../gui/itemmodels/qstandarditem/CMakeLists.txt | 1 + tests/auto/gui/kernel/CMakeLists.txt | 38 + tests/auto/gui/kernel/qcursor/CMakeLists.txt | 1 + tests/auto/gui/kernel/qevent/CMakeLists.txt | 1 + .../auto/gui/kernel/qfileopenevent/CMakeLists.txt | 2 + .../qfileopeneventexternal/CMakeLists.txt | 1 + .../gui/kernel/qfileopenevent/test/CMakeLists.txt | 1 + tests/auto/gui/kernel/qguivariant/CMakeLists.txt | 2 + .../qguivariant/no_application/CMakeLists.txt | 1 + tests/auto/gui/kernel/qmouseevent/CMakeLists.txt | 1 + tests/auto/gui/kernel/qpalette/CMakeLists.txt | 1 + tests/auto/gui/math3d/CMakeLists.txt | 3 + tests/auto/gui/math3d/qmatrixnxn/CMakeLists.txt | 5 + tests/auto/gui/math3d/qquaternion/CMakeLists.txt | 1 + tests/auto/gui/math3d/qvectornd/CMakeLists.txt | 1 + tests/auto/gui/painting/CMakeLists.txt | 19 + tests/auto/gui/painting/qpagesize/CMakeLists.txt | 1 + .../auto/gui/painting/qpaintengine/CMakeLists.txt | 1 + .../auto/gui/painting/qpainterpath/CMakeLists.txt | 1 + .../painting/qpainterpathstroker/CMakeLists.txt | 1 + tests/auto/gui/painting/qpen/CMakeLists.txt | 1 + tests/auto/gui/util/CMakeLists.txt | 13 + .../auto/gui/util/qdoublevalidator/CMakeLists.txt | 1 + tests/auto/gui/util/qintvalidator/CMakeLists.txt | 1 + .../auto/gui/util/qregexpvalidator/CMakeLists.txt | 1 + .../qregularexpressionvalidator/CMakeLists.txt | 1 + tests/auto/opengl/CMakeLists.txt | 6 + tests/auto/opengl/qgl/CMakeLists.txt | 7 + tests/auto/opengl/qglbuffer/CMakeLists.txt | 1 + tests/auto/opengl/qglfunctions/CMakeLists.txt | 1 + tests/auto/opengl/qglthreads/CMakeLists.txt | 7 + tests/auto/other/qtokenautomaton/CMakeLists.txt | 15 + tests/auto/other/toolsupport/CMakeLists.txt | 1 + tests/auto/testlib/CMakeLists.txt | 4 + .../qabstractitemmodeltester/CMakeLists.txt | 8 + tests/auto/testlib/qsignalspy/CMakeLists.txt | 1 + tests/auto/testlib/selftests/CMakeLists.txt | 42 + tests/auto/testlib/selftests/alive/CMakeLists.txt | 1 + tests/auto/testlib/selftests/assert/CMakeLists.txt | 1 + tests/auto/testlib/selftests/badxml/CMakeLists.txt | 1 + .../selftests/benchlibcallgrind/CMakeLists.txt | 1 + .../selftests/benchlibcounting/CMakeLists.txt | 1 + .../selftests/benchlibeventcounter/CMakeLists.txt | 1 + .../selftests/benchliboptions/CMakeLists.txt | 1 + .../selftests/benchlibwalltime/CMakeLists.txt | 1 + .../selftests/commandlinedata/CMakeLists.txt | 1 + .../auto/testlib/selftests/counting/CMakeLists.txt | 1 + .../auto/testlib/selftests/crashes/CMakeLists.txt | 1 + .../testlib/selftests/datatable/CMakeLists.txt | 1 + .../auto/testlib/selftests/datetime/CMakeLists.txt | 1 + .../testlib/selftests/deleteLater/CMakeLists.txt | 1 + .../selftests/deleteLater_noApp/CMakeLists.txt | 1 + .../testlib/selftests/differentexec/CMakeLists.txt | 1 + .../testlib/selftests/expectfail/CMakeLists.txt | 1 + .../testlib/selftests/failcleanup/CMakeLists.txt | 1 + .../auto/testlib/selftests/failinit/CMakeLists.txt | 1 + .../testlib/selftests/failinitdata/CMakeLists.txt | 1 + .../testlib/selftests/fetchbogus/CMakeLists.txt | 1 + tests/auto/testlib/selftests/float/CMakeLists.txt | 1 + .../testlib/selftests/globaldata/CMakeLists.txt | 1 + .../testlib/selftests/longstring/CMakeLists.txt | 1 + .../testlib/selftests/maxwarnings/CMakeLists.txt | 1 + .../testlib/selftests/multiexec/CMakeLists.txt | 1 + .../selftests/pairdiagnostics/CMakeLists.txt | 1 + .../testlib/selftests/printdatatags/CMakeLists.txt | 1 + .../printdatatagswithglobaltags/CMakeLists.txt | 1 + .../selftests/qexecstringlist/CMakeLists.txt | 1 + .../testlib/selftests/singleskip/CMakeLists.txt | 1 + tests/auto/testlib/selftests/skip/CMakeLists.txt | 1 + .../testlib/selftests/skipcleanup/CMakeLists.txt | 1 + .../auto/testlib/selftests/skipinit/CMakeLists.txt | 1 + .../testlib/selftests/skipinitdata/CMakeLists.txt | 1 + tests/auto/testlib/selftests/sleep/CMakeLists.txt | 1 + tests/auto/testlib/selftests/strcmp/CMakeLists.txt | 1 + .../auto/testlib/selftests/subtest/CMakeLists.txt | 1 + .../selftests/tuplediagnostics/CMakeLists.txt | 1 + .../auto/testlib/selftests/warnings/CMakeLists.txt | 1 + tests/auto/testlib/selftests/xunit/CMakeLists.txt | 1 + tests/auto/tools/qdbusxml2cpp/CMakeLists.txt | 1 + tests/auto/tools/uic/CMakeLists.txt | 1 + tests/auto/widgets/CMakeLists.txt | 10 + tests/auto/widgets/dialogs/CMakeLists.txt | 19 + .../widgets/dialogs/qcolordialog/CMakeLists.txt | 1 + tests/auto/widgets/dialogs/qdialog/CMakeLists.txt | 8 + .../widgets/dialogs/qerrormessage/CMakeLists.txt | 1 + .../widgets/dialogs/qfiledialog/CMakeLists.txt | 9 + .../widgets/dialogs/qfiledialog2/CMakeLists.txt | 10 + .../dialogs/qfilesystemmodel/CMakeLists.txt | 5 + .../widgets/dialogs/qfontdialog/CMakeLists.txt | 9 + .../widgets/dialogs/qinputdialog/CMakeLists.txt | 1 + .../widgets/dialogs/qmessagebox/CMakeLists.txt | 6 + .../widgets/dialogs/qprogressdialog/CMakeLists.txt | 1 + tests/auto/widgets/dialogs/qsidebar/CMakeLists.txt | 5 + tests/auto/widgets/dialogs/qwizard/CMakeLists.txt | 8 + tests/auto/widgets/effects/CMakeLists.txt | 2 + .../widgets/effects/qgraphicseffect/CMakeLists.txt | 6 + .../widgets/effects/qpixmapfilter/CMakeLists.txt | 5 + tests/auto/widgets/graphicsview/CMakeLists.txt | 25 + .../qgraphicsanchorlayout/CMakeLists.txt | 6 + .../qgraphicsanchorlayout1/CMakeLists.txt | 6 + .../qgraphicseffectsource/CMakeLists.txt | 6 + .../qgraphicsgridlayout/CMakeLists.txt | 1 + .../graphicsview/qgraphicsitem/CMakeLists.txt | 11 + .../qgraphicsitemanimation/CMakeLists.txt | 6 + .../graphicsview/qgraphicslayout/CMakeLists.txt | 6 + .../qgraphicslayoutitem/CMakeLists.txt | 1 + .../qgraphicslinearlayout/CMakeLists.txt | 1 + .../graphicsview/qgraphicsobject/CMakeLists.txt | 1 + .../qgraphicspixmapitem/CMakeLists.txt | 1 + .../qgraphicspolygonitem/CMakeLists.txt | 1 + .../qgraphicsproxywidget/CMakeLists.txt | 10 + .../graphicsview/qgraphicsscene/CMakeLists.txt | 15 + .../qgraphicssceneindex/CMakeLists.txt | 6 + .../graphicsview/qgraphicstransform/CMakeLists.txt | 1 + .../graphicsview/qgraphicsview/CMakeLists.txt | 12 + .../graphicsview/qgraphicswidget/CMakeLists.txt | 6 + tests/auto/widgets/itemviews/CMakeLists.txt | 21 + .../itemviews/qabstractitemview/CMakeLists.txt | 5 + .../widgets/itemviews/qcolumnview/CMakeLists.txt | 11 + .../itemviews/qdatawidgetmapper/CMakeLists.txt | 1 + .../widgets/itemviews/qdirmodel/CMakeLists.txt | 19 + .../itemviews/qfileiconprovider/CMakeLists.txt | 1 + .../widgets/itemviews/qheaderview/CMakeLists.txt | 6 + .../widgets/itemviews/qitemdelegate/CMakeLists.txt | 3 + .../itemviews/qitemeditorfactory/CMakeLists.txt | 1 + .../widgets/itemviews/qitemview/CMakeLists.txt | 1 + .../widgets/itemviews/qlistview/CMakeLists.txt | 13 + .../widgets/itemviews/qlistwidget/CMakeLists.txt | 8 + .../widgets/itemviews/qtableview/CMakeLists.txt | 7 + .../widgets/itemviews/qtablewidget/CMakeLists.txt | 1 + .../widgets/itemviews/qtreeview/CMakeLists.txt | 11 + .../widgets/itemviews/qtreewidget/CMakeLists.txt | 1 + .../qtreewidgetitemiterator/CMakeLists.txt | 1 + tests/auto/widgets/kernel/CMakeLists.txt | 27 + tests/auto/widgets/kernel/kernel.pro | 2 +- tests/auto/widgets/kernel/qaction/CMakeLists.txt | 6 + .../widgets/kernel/qactiongroup/CMakeLists.txt | 1 + .../auto/widgets/kernel/qboxlayout/CMakeLists.txt | 1 + .../widgets/kernel/qdesktopwidget/CMakeLists.txt | 1 + .../auto/widgets/kernel/qformlayout/CMakeLists.txt | 1 + .../kernel/qgesturerecognizer/CMakeLists.txt | 6 + .../auto/widgets/kernel/qgridlayout/CMakeLists.txt | 10 + tests/auto/widgets/kernel/qlayout/CMakeLists.txt | 3 + tests/auto/widgets/kernel/qshortcut/CMakeLists.txt | 1 + .../auto/widgets/kernel/qsizepolicy/CMakeLists.txt | 1 + .../widgets/kernel/qstackedlayout/CMakeLists.txt | 1 + tests/auto/widgets/kernel/qtooltip/CMakeLists.txt | 1 + tests/auto/widgets/kernel/qwidget/CMakeLists.txt | 16 + .../widgets/kernel/qwidget_window/CMakeLists.txt | 7 + .../widgets/kernel/qwidgetaction/CMakeLists.txt | 1 + .../widgets/kernel/qwidgetmetatype/CMakeLists.txt | 1 + .../widgets/kernel/qwidgetsvariant/CMakeLists.txt | 8 + .../widgets/kernel/qwindowcontainer/CMakeLists.txt | 1 + tests/auto/widgets/styles/CMakeLists.txt | 12 + tests/auto/widgets/styles/qmacstyle/CMakeLists.txt | 1 + tests/auto/widgets/styles/qstyle/CMakeLists.txt | 3 + .../widgets/styles/qstyleoption/CMakeLists.txt | 1 + .../widgets/styles/qstylesheetstyle/CMakeLists.txt | 9 + tests/auto/widgets/util/CMakeLists.txt | 7 + tests/auto/widgets/util/qcompleter/CMakeLists.txt | 1 + tests/auto/widgets/util/qscroller/CMakeLists.txt | 1 + .../widgets/util/qsystemtrayicon/CMakeLists.txt | 1 + tests/auto/widgets/util/qundogroup/CMakeLists.txt | 1 + tests/auto/widgets/util/qundostack/CMakeLists.txt | 1 + tests/auto/widgets/widgets/CMakeLists.txt | 55 + .../widgets/widgets/qabstractbutton/CMakeLists.txt | 1 + .../widgets/qabstractscrollarea/CMakeLists.txt | 1 + .../widgets/widgets/qabstractslider/CMakeLists.txt | 1 + .../widgets/qabstractspinbox/CMakeLists.txt | 7 + .../widgets/widgets/qbuttongroup/CMakeLists.txt | 1 + .../widgets/widgets/qcalendarwidget/CMakeLists.txt | 1 + .../auto/widgets/widgets/qcheckbox/CMakeLists.txt | 1 + .../auto/widgets/widgets/qcombobox/CMakeLists.txt | 8 + .../widgets/qcommandlinkbutton/CMakeLists.txt | 1 + .../widgets/widgets/qdatetimeedit/CMakeLists.txt | 6 + tests/auto/widgets/widgets/qdial/CMakeLists.txt | 1 + .../widgets/qdialogbuttonbox/CMakeLists.txt | 1 + .../widgets/widgets/qdockwidget/CMakeLists.txt | 6 + .../widgets/widgets/qdoublespinbox/CMakeLists.txt | 1 + .../widgets/widgets/qfocusframe/CMakeLists.txt | 1 + .../widgets/widgets/qfontcombobox/CMakeLists.txt | 1 + tests/auto/widgets/widgets/qframe/CMakeLists.txt | 1 + .../auto/widgets/widgets/qgroupbox/CMakeLists.txt | 1 + .../widgets/qkeysequenceedit/CMakeLists.txt | 1 + tests/auto/widgets/widgets/qlabel/CMakeLists.txt | 6 + .../auto/widgets/widgets/qlcdnumber/CMakeLists.txt | 1 + .../auto/widgets/widgets/qlineedit/CMakeLists.txt | 9 + .../widgets/widgets/qmainwindow/CMakeLists.txt | 1 + tests/auto/widgets/widgets/qmdiarea/CMakeLists.txt | 14 + .../widgets/widgets/qmdisubwindow/CMakeLists.txt | 7 + tests/auto/widgets/widgets/qmenu/CMakeLists.txt | 13 + tests/auto/widgets/widgets/qmenubar/CMakeLists.txt | 6 + .../widgets/widgets/qopenglwidget/CMakeLists.txt | 6 + .../widgets/widgets/qplaintextedit/CMakeLists.txt | 7 + .../widgets/widgets/qprogressbar/CMakeLists.txt | 1 + .../widgets/widgets/qpushbutton/CMakeLists.txt | 1 + .../widgets/widgets/qradiobutton/CMakeLists.txt | 1 + .../widgets/widgets/qscrollarea/CMakeLists.txt | 1 + .../auto/widgets/widgets/qscrollbar/CMakeLists.txt | 1 + .../auto/widgets/widgets/qsizegrip/CMakeLists.txt | 1 + tests/auto/widgets/widgets/qslider/CMakeLists.txt | 1 + tests/auto/widgets/widgets/qspinbox/CMakeLists.txt | 1 + .../widgets/widgets/qsplashscreen/CMakeLists.txt | 1 + .../auto/widgets/widgets/qsplitter/CMakeLists.txt | 1 + .../widgets/widgets/qstackedwidget/CMakeLists.txt | 1 + .../auto/widgets/widgets/qstatusbar/CMakeLists.txt | 1 + tests/auto/widgets/widgets/qtabbar/CMakeLists.txt | 1 + .../auto/widgets/widgets/qtabwidget/CMakeLists.txt | 3 + .../widgets/widgets/qtextbrowser/CMakeLists.txt | 3 + .../auto/widgets/widgets/qtextedit/CMakeLists.txt | 8 + tests/auto/widgets/widgets/qtoolbar/CMakeLists.txt | 1 + tests/auto/widgets/widgets/qtoolbox/CMakeLists.txt | 1 + .../widgets/widgets/qtoolbutton/CMakeLists.txt | 1 + .../corelib/io/qdir/10000/CMakeLists.txt | 1 + .../corelib/io/qprocess/test/CMakeLists.txt | 5 + .../corelib/kernel/events/CMakeLists.txt | 1 + .../corelib/kernel/qcoreapplication/CMakeLists.txt | 1 + .../corelib/kernel/qmetatype/CMakeLists.txt | 1 + .../corelib/mimetypes/qmimedatabase/CMakeLists.txt | 1 + .../benchmarks/corelib/plugin/quuid/CMakeLists.txt | 1 + .../corelib/thread/qmutex/CMakeLists.txt | 1 + .../corelib/thread/qthreadpool/CMakeLists.txt | 1 + .../corelib/thread/qthreadstorage/CMakeLists.txt | 1 + .../corelib/thread/qwaitcondition/CMakeLists.txt | 1 + .../tools/containers-associative/CMakeLists.txt | 1 + .../tools/containers-sequential/CMakeLists.txt | 1 + .../corelib/tools/qalgorithms/CMakeLists.txt | 1 + .../benchmarks/corelib/tools/qchar/CMakeLists.txt | 1 + .../corelib/tools/qdatetime/CMakeLists.txt | 1 + .../benchmarks/corelib/tools/qlist/CMakeLists.txt | 1 + .../corelib/tools/qlocale/CMakeLists.txt | 1 + .../corelib/tools/qstring/CMakeLists.txt | 1 + .../corelib/tools/qtimezone/CMakeLists.txt | 1 + .../benchmarks/gui/image/blendbench/CMakeLists.txt | 3 + .../gui/image/qimagescale/CMakeLists.txt | 3 + .../gui/image/qpixmapcache/CMakeLists.txt | 3 + .../gui/kernel/qguimetatype/CMakeLists.txt | 3 + .../gui/kernel/qguivariant/CMakeLists.txt | 3 + .../gui/math3d/qmatrix4x4/CMakeLists.txt | 3 + .../gui/math3d/qquaternion/CMakeLists.txt | 3 + .../gui/painting/qtransform/CMakeLists.txt | 3 + .../gui/text/qfontmetrics/CMakeLists.txt | 3 + tests/manual/CMakeLists.txt | 92 ++ tests/manual/qcursor/childwindow/CMakeLists.txt | 5 + tests/manual/qmetatype/CMakeLists.txt | 5 + .../qopenglwindow/multiwindow/CMakeLists.txt | 3 + util/cmake/Pipfile | 14 + util/cmake/cmakeconversionrate.py | 127 +++ util/cmake/configurejson2cmake.py | 860 ++++++++++++++++ util/cmake/generate_module_map.sh | 38 + util/cmake/helper.py | 206 ++++ util/cmake/pro2cmake.py | 736 +++++++++++++ util/cmake/run_pro2cmake.py | 44 + util/cmake/tests/__init__.py | 0 util/cmake/tests/data/complex_values.pro | 22 + util/cmake/tests/data/definetest.pro | 6 + util/cmake/tests/data/else.pro | 6 + util/cmake/tests/data/else2.pro | 4 + util/cmake/tests/data/else3.pro | 7 + util/cmake/tests/data/else4.pro | 6 + util/cmake/tests/data/else5.pro | 10 + util/cmake/tests/data/else6.pro | 11 + util/cmake/tests/data/else7.pro | 2 + util/cmake/tests/data/else8.pro | 5 + util/cmake/tests/data/function_if.pro | 4 + util/cmake/tests/data/include.pro | 3 + util/cmake/tests/data/load.pro | 3 + util/cmake/tests/data/quoted.pro | 5 + util/cmake/tests/data/unset.pro | 2 + util/cmake/tests/test_parsing.py | 162 +++ 525 files changed, 15211 insertions(+), 61 deletions(-) create mode 100644 CMakeLists.txt create mode 100644 cmake/3rdparty/extra-cmake-modules/COPYING-CMAKE-SCRIPTS create mode 100644 cmake/3rdparty/extra-cmake-modules/find-modules/ECMFindModuleHelpersStub.cmake create mode 100644 cmake/3rdparty/extra-cmake-modules/find-modules/FindWayland.cmake create mode 100644 cmake/3rdparty/extra-cmake-modules/find-modules/FindX11_XCB.cmake create mode 100644 cmake/3rdparty/extra-cmake-modules/find-modules/FindXCB.cmake create mode 100644 cmake/3rdparty/extra-cmake-modules/modules/ECMEnableSanitizers.cmake create mode 100644 cmake/3rdparty/extra-cmake-modules/modules/ECMFindModuleHelpers.cmake create mode 100644 cmake/3rdparty/extra-cmake-modules/qt_attribution.json create mode 100644 cmake/3rdparty/kwin/COPYING-CMAKE-SCRIPTS create mode 100644 cmake/3rdparty/kwin/FindFontconfig.cmake create mode 100644 cmake/3rdparty/kwin/FindLibdrm.cmake create mode 100644 cmake/3rdparty/kwin/FindLibinput.cmake create mode 100644 cmake/3rdparty/kwin/FindXKB.cmake create mode 100644 cmake/3rdparty/kwin/Findgbm.cmake create mode 100644 cmake/3rdparty/kwin/qt_attribution.json create mode 100644 cmake/FindAtomic.cmake create mode 100644 cmake/FindGLib.cmake create mode 100644 cmake/FindLibsystemd.cmake create mode 100644 cmake/FindLibudev.cmake create mode 100644 cmake/FindPCRE2.cmake create mode 100644 cmake/FindWrapDoubleConversion.cmake create mode 100644 cmake/Finddouble-conversion.cmake create mode 100644 cmake/QtBaseConfigureTests.cmake create mode 100644 cmake/QtBaseGlobalTargets.cmake create mode 100644 cmake/QtBuild.cmake create mode 100644 cmake/QtCompilerOptimization.cmake create mode 100644 cmake/QtConfig.cmake.in create mode 100644 cmake/QtFeature.cmake create mode 100644 cmake/QtModuleConfig.cmake.in create mode 100644 cmake/QtPlatformSupport.cmake create mode 100644 cmake/QtPostProcess.cmake create mode 100644 cmake/QtSetup.cmake create mode 100644 cmake/README.md create mode 100644 cmake/tests/features/CMakeLists.txt create mode 100644 cmake/tests/features/configure.cmake create mode 100644 cmake/tests/features/src/CMakeLists.txt create mode 100644 configure.cmake create mode 100644 examples/CMakeLists.txt create mode 100644 examples/gui/CMakeLists.txt create mode 100644 examples/gui/rasterwindow/CMakeLists.txt create mode 100644 qmake/CMakeLists.txt create mode 100644 src/3rdparty/CMakeLists.txt create mode 100644 src/3rdparty/harfbuzz/CMakeLists.txt create mode 100644 src/3rdparty/tinycbor/CMakeLists.txt create mode 100644 src/CMakeLists.txt create mode 100644 src/corelib/CMakeLists.txt create mode 100644 src/corelib/configure.cmake create mode 100644 src/corelib/global/qconfig.cpp.in create mode 100644 src/dbus/CMakeLists.txt create mode 100644 src/gui/CMakeLists.txt create mode 100644 src/gui/configure.cmake create mode 100644 src/network/CMakeLists.txt create mode 100644 src/network/configure.cmake create mode 100644 src/opengl/CMakeLists.txt create mode 100644 src/platformheaders/CMakeLists.txt create mode 100644 src/platformheaders/fake.cpp create mode 100644 src/platformsupport/CMakeLists.txt create mode 100644 src/platformsupport/accessibility/CMakeLists.txt create mode 100644 src/platformsupport/clipboard/CMakeLists.txt create mode 100644 src/platformsupport/edid/CMakeLists.txt create mode 100644 src/platformsupport/eventdispatchers/CMakeLists.txt create mode 100644 src/platformsupport/fontdatabases/CMakeLists.txt create mode 100644 src/platformsupport/fontdatabases/fake.cpp create mode 100644 src/platformsupport/graphics/CMakeLists.txt create mode 100644 src/platformsupport/services/CMakeLists.txt create mode 100644 src/platformsupport/themes/CMakeLists.txt create mode 100644 src/plugins/CMakeLists.txt create mode 100644 src/plugins/platforms/CMakeLists.txt create mode 100644 src/plugins/platforms/cocoa/CMakeLists.txt create mode 100644 src/plugins/platforms/xcb/CMakeLists.txt create mode 100644 src/testlib/CMakeLists.txt create mode 100644 src/testlib/configure.cmake create mode 100644 src/tools/CMakeLists.txt create mode 100644 src/tools/bootstrap/CMakeLists.txt create mode 100644 src/tools/moc/CMakeLists.txt create mode 100644 src/tools/qfloat16-tables/CMakeLists.txt create mode 100644 src/tools/qmocscanner/CMakeLists.txt create mode 100644 src/tools/qmocscanner/main.cpp create mode 100644 src/tools/qvkgen/CMakeLists.txt create mode 100644 src/tools/rcc/CMakeLists.txt create mode 100644 src/tools/tracegen/CMakeLists.txt create mode 100644 src/tools/uic/CMakeLists.txt create mode 100644 src/widgets/CMakeLists.txt create mode 100644 src/widgets/configure.cmake create mode 100644 src/xml/CMakeLists.txt create mode 100644 src/xml/configure.cmake create mode 100644 tests/CMakeLists.txt create mode 100644 tests/auto/CMakeLists.txt create mode 100644 tests/auto/corelib/CMakeLists.txt create mode 100644 tests/auto/corelib/animation/CMakeLists.txt create mode 100644 tests/auto/corelib/animation/qabstractanimation/CMakeLists.txt create mode 100644 tests/auto/corelib/animation/qanimationgroup/CMakeLists.txt create mode 100644 tests/auto/corelib/animation/qparallelanimationgroup/CMakeLists.txt create mode 100644 tests/auto/corelib/animation/qpauseanimation/CMakeLists.txt create mode 100644 tests/auto/corelib/animation/qsequentialanimationgroup/CMakeLists.txt create mode 100644 tests/auto/corelib/animation/qvariantanimation/CMakeLists.txt create mode 100644 tests/auto/corelib/codecs/CMakeLists.txt create mode 100644 tests/auto/corelib/codecs/qtextcodec/CMakeLists.txt create mode 100644 tests/auto/corelib/codecs/qtextcodec/echo/CMakeLists.txt create mode 100644 tests/auto/corelib/codecs/utf8/CMakeLists.txt create mode 100644 tests/auto/corelib/global/CMakeLists.txt create mode 100644 tests/auto/corelib/global/q_func_info/CMakeLists.txt create mode 100644 tests/auto/corelib/global/qflags/CMakeLists.txt create mode 100644 tests/auto/corelib/global/qfloat16/CMakeLists.txt create mode 100644 tests/auto/corelib/global/qgetputenv/CMakeLists.txt create mode 100644 tests/auto/corelib/global/qglobal/CMakeLists.txt create mode 100644 tests/auto/corelib/global/qglobalstatic/CMakeLists.txt create mode 100644 tests/auto/corelib/global/qhooks/CMakeLists.txt create mode 100644 tests/auto/corelib/global/qlogging/CMakeLists.txt create mode 100644 tests/auto/corelib/global/qnumeric/CMakeLists.txt create mode 100644 tests/auto/corelib/global/qrand/CMakeLists.txt create mode 100644 tests/auto/corelib/global/qrandomgenerator/CMakeLists.txt create mode 100644 tests/auto/corelib/global/qtendian/CMakeLists.txt create mode 100644 tests/auto/corelib/io/CMakeLists.txt create mode 100644 tests/auto/corelib/io/largefile/CMakeLists.txt create mode 100644 tests/auto/corelib/io/qbuffer/CMakeLists.txt create mode 100644 tests/auto/corelib/io/qdataurl/CMakeLists.txt create mode 100644 tests/auto/corelib/io/qfilesystementry/CMakeLists.txt create mode 100644 tests/auto/corelib/io/qfilesystemwatcher/CMakeLists.txt create mode 100644 tests/auto/corelib/io/qipaddress/CMakeLists.txt create mode 100644 tests/auto/corelib/io/qloggingcategory/CMakeLists.txt create mode 100644 tests/auto/corelib/io/qnodebug/CMakeLists.txt create mode 100644 tests/auto/corelib/io/qprocessenvironment/CMakeLists.txt create mode 100644 tests/auto/corelib/io/qstorageinfo/CMakeLists.txt create mode 100644 tests/auto/corelib/io/qurlquery/CMakeLists.txt create mode 100644 tests/auto/corelib/itemmodels/CMakeLists.txt create mode 100644 tests/auto/corelib/itemmodels/qabstractproxymodel/CMakeLists.txt create mode 100644 tests/auto/corelib/itemmodels/qitemselectionmodel/CMakeLists.txt create mode 100644 tests/auto/corelib/itemmodels/qstringlistmodel/CMakeLists.txt create mode 100644 tests/auto/corelib/kernel/CMakeLists.txt create mode 100644 tests/auto/corelib/kernel/qdeadlinetimer/CMakeLists.txt create mode 100644 tests/auto/corelib/kernel/qelapsedtimer/CMakeLists.txt create mode 100644 tests/auto/corelib/kernel/qeventdispatcher/CMakeLists.txt create mode 100644 tests/auto/corelib/kernel/qmath/CMakeLists.txt create mode 100644 tests/auto/corelib/kernel/qmetaenum/CMakeLists.txt create mode 100644 tests/auto/corelib/kernel/qmetamethod/CMakeLists.txt create mode 100644 tests/auto/corelib/kernel/qmetaobject/CMakeLists.txt create mode 100644 tests/auto/corelib/kernel/qmetaobjectbuilder/CMakeLists.txt create mode 100644 tests/auto/corelib/kernel/qmetaproperty/CMakeLists.txt create mode 100644 tests/auto/corelib/kernel/qmimedata/CMakeLists.txt create mode 100644 tests/auto/corelib/kernel/qsignalmapper/CMakeLists.txt create mode 100644 tests/auto/corelib/kernel/qwineventnotifier/CMakeLists.txt create mode 100644 tests/auto/corelib/mimetypes/CMakeLists.txt create mode 100644 tests/auto/corelib/mimetypes/qmimetype/CMakeLists.txt create mode 100644 tests/auto/corelib/serialization/CMakeLists.txt create mode 100644 tests/auto/corelib/serialization/qcborstreamreader/CMakeLists.txt create mode 100644 tests/auto/corelib/serialization/qcborstreamwriter/CMakeLists.txt create mode 100644 tests/auto/corelib/serialization/qcborvalue/CMakeLists.txt create mode 100644 tests/auto/corelib/serialization/qcborvalue_json/CMakeLists.txt create mode 100644 tests/auto/corelib/statemachine/CMakeLists.txt create mode 100644 tests/auto/corelib/statemachine/qstate/CMakeLists.txt create mode 100644 tests/auto/corelib/thread/CMakeLists.txt create mode 100644 tests/auto/corelib/thread/qatomicint/CMakeLists.txt create mode 100644 tests/auto/corelib/thread/qatomicpointer/CMakeLists.txt create mode 100644 tests/auto/corelib/thread/qfuture/CMakeLists.txt create mode 100644 tests/auto/corelib/thread/qfuturesynchronizer/CMakeLists.txt create mode 100644 tests/auto/corelib/thread/qmutexlocker/CMakeLists.txt create mode 100644 tests/auto/corelib/thread/qreadlocker/CMakeLists.txt create mode 100644 tests/auto/corelib/thread/qreadwritelock/CMakeLists.txt create mode 100644 tests/auto/corelib/thread/qresultstore/CMakeLists.txt create mode 100644 tests/auto/corelib/thread/qsemaphore/CMakeLists.txt create mode 100644 tests/auto/corelib/thread/qthreadpool/CMakeLists.txt create mode 100644 tests/auto/corelib/thread/qwaitcondition/CMakeLists.txt create mode 100644 tests/auto/corelib/thread/qwritelocker/CMakeLists.txt create mode 100644 tests/auto/corelib/tools/CMakeLists.txt create mode 100644 tests/auto/corelib/tools/qalgorithms/CMakeLists.txt create mode 100644 tests/auto/corelib/tools/qarraydata/CMakeLists.txt create mode 100644 tests/auto/corelib/tools/qbitarray/CMakeLists.txt create mode 100644 tests/auto/corelib/tools/qbytearraylist/CMakeLists.txt create mode 100644 tests/auto/corelib/tools/qbytedatabuffer/CMakeLists.txt create mode 100644 tests/auto/corelib/tools/qcache/CMakeLists.txt create mode 100644 tests/auto/corelib/tools/qcommandlineparser/CMakeLists.txt create mode 100644 tests/auto/corelib/tools/qcontiguouscache/CMakeLists.txt create mode 100644 tests/auto/corelib/tools/qdate/CMakeLists.txt create mode 100644 tests/auto/corelib/tools/qeasingcurve/CMakeLists.txt create mode 100644 tests/auto/corelib/tools/qexplicitlyshareddatapointer/CMakeLists.txt create mode 100644 tests/auto/corelib/tools/qhash/CMakeLists.txt create mode 100644 tests/auto/corelib/tools/qhashfunctions/CMakeLists.txt create mode 100644 tests/auto/corelib/tools/qlinkedlist/CMakeLists.txt create mode 100644 tests/auto/corelib/tools/qlist/CMakeLists.txt create mode 100644 tests/auto/corelib/tools/qmakearray/CMakeLists.txt create mode 100644 tests/auto/corelib/tools/qmap/CMakeLists.txt create mode 100644 tests/auto/corelib/tools/qmargins/CMakeLists.txt create mode 100644 tests/auto/corelib/tools/qmessageauthenticationcode/CMakeLists.txt create mode 100644 tests/auto/corelib/tools/qpair/CMakeLists.txt create mode 100644 tests/auto/corelib/tools/qpoint/CMakeLists.txt create mode 100644 tests/auto/corelib/tools/qpointf/CMakeLists.txt create mode 100644 tests/auto/corelib/tools/qqueue/CMakeLists.txt create mode 100644 tests/auto/corelib/tools/qrect/CMakeLists.txt create mode 100644 tests/auto/corelib/tools/qregexp/CMakeLists.txt create mode 100644 tests/auto/corelib/tools/qregularexpression/CMakeLists.txt create mode 100644 tests/auto/corelib/tools/qringbuffer/CMakeLists.txt create mode 100644 tests/auto/corelib/tools/qscopedpointer/CMakeLists.txt create mode 100644 tests/auto/corelib/tools/qscopedvaluerollback/CMakeLists.txt create mode 100644 tests/auto/corelib/tools/qscopeguard/CMakeLists.txt create mode 100644 tests/auto/corelib/tools/qset/CMakeLists.txt create mode 100644 tests/auto/corelib/tools/qsize/CMakeLists.txt create mode 100644 tests/auto/corelib/tools/qsizef/CMakeLists.txt create mode 100644 tests/auto/corelib/tools/qstl/CMakeLists.txt create mode 100644 tests/auto/corelib/tools/qstring_no_cast_from_bytearray/CMakeLists.txt create mode 100644 tests/auto/corelib/tools/qstringbuilder/qstringbuilder1/CMakeLists.txt create mode 100644 tests/auto/corelib/tools/qstringbuilder/qstringbuilder2/CMakeLists.txt create mode 100644 tests/auto/corelib/tools/qstringbuilder/qstringbuilder3/CMakeLists.txt create mode 100644 tests/auto/corelib/tools/qstringbuilder/qstringbuilder4/CMakeLists.txt create mode 100644 tests/auto/corelib/tools/qstringiterator/CMakeLists.txt create mode 100644 tests/auto/corelib/tools/qstringlist/CMakeLists.txt create mode 100644 tests/auto/corelib/tools/qstringmatcher/CMakeLists.txt create mode 100644 tests/auto/corelib/tools/qstringref/CMakeLists.txt create mode 100644 tests/auto/corelib/tools/qtime/CMakeLists.txt create mode 100644 tests/auto/corelib/tools/qtimeline/CMakeLists.txt create mode 100644 tests/auto/corelib/tools/qvarlengtharray/CMakeLists.txt create mode 100644 tests/auto/dbus/CMakeLists.txt create mode 100644 tests/auto/dbus/qdbusabstractadaptor/CMakeLists.txt create mode 100644 tests/auto/dbus/qdbusabstractadaptor/qdbusabstractadaptor/CMakeLists.txt create mode 100644 tests/auto/dbus/qdbusabstractadaptor/qmyserver/CMakeLists.txt create mode 100644 tests/auto/dbus/qdbusabstractinterface/CMakeLists.txt create mode 100644 tests/auto/dbus/qdbusabstractinterface/qdbusabstractinterface/CMakeLists.txt create mode 100644 tests/auto/dbus/qdbusabstractinterface/qpinger/CMakeLists.txt create mode 100644 tests/auto/dbus/qdbusconnection/CMakeLists.txt create mode 100644 tests/auto/dbus/qdbusconnection_delayed/CMakeLists.txt create mode 100644 tests/auto/dbus/qdbusconnection_no_app/CMakeLists.txt create mode 100644 tests/auto/dbus/qdbusconnection_no_bus/CMakeLists.txt create mode 100644 tests/auto/dbus/qdbusconnection_no_libdbus/CMakeLists.txt create mode 100644 tests/auto/dbus/qdbusconnection_no_libdbus/tst_qdbusconnection_no_libdbus.cpp create mode 100644 tests/auto/dbus/qdbusconnection_spyhook/CMakeLists.txt create mode 100644 tests/auto/dbus/qdbuscontext/CMakeLists.txt create mode 100644 tests/auto/dbus/qdbusinterface/CMakeLists.txt create mode 100644 tests/auto/dbus/qdbusinterface/qdbusinterface/CMakeLists.txt create mode 100644 tests/auto/dbus/qdbusinterface/qmyserver/CMakeLists.txt create mode 100644 tests/auto/dbus/qdbuslocalcalls/CMakeLists.txt create mode 100644 tests/auto/dbus/qdbusmarshall/CMakeLists.txt create mode 100644 tests/auto/dbus/qdbusmarshall/qdbusmarshall/CMakeLists.txt create mode 100644 tests/auto/dbus/qdbusmarshall/qpong/CMakeLists.txt create mode 100644 tests/auto/dbus/qdbusmetaobject/CMakeLists.txt create mode 100644 tests/auto/dbus/qdbusmetatype/CMakeLists.txt create mode 100644 tests/auto/dbus/qdbuspendingcall/CMakeLists.txt create mode 100644 tests/auto/dbus/qdbuspendingreply/CMakeLists.txt create mode 100644 tests/auto/dbus/qdbusreply/CMakeLists.txt create mode 100644 tests/auto/dbus/qdbusservicewatcher/CMakeLists.txt create mode 100644 tests/auto/dbus/qdbusthreading/CMakeLists.txt create mode 100644 tests/auto/dbus/qdbustype/CMakeLists.txt create mode 100644 tests/auto/dbus/qdbusxmlparser/CMakeLists.txt create mode 100644 tests/auto/gui/CMakeLists.txt create mode 100644 tests/auto/gui/image/CMakeLists.txt create mode 100644 tests/auto/gui/image/qimageiohandler/CMakeLists.txt create mode 100644 tests/auto/gui/image/qpicture/CMakeLists.txt create mode 100644 tests/auto/gui/itemmodels/CMakeLists.txt create mode 100644 tests/auto/gui/itemmodels/qstandarditem/CMakeLists.txt create mode 100644 tests/auto/gui/kernel/CMakeLists.txt create mode 100644 tests/auto/gui/kernel/qcursor/CMakeLists.txt create mode 100644 tests/auto/gui/kernel/qevent/CMakeLists.txt create mode 100644 tests/auto/gui/kernel/qfileopenevent/CMakeLists.txt create mode 100644 tests/auto/gui/kernel/qfileopenevent/qfileopeneventexternal/CMakeLists.txt create mode 100644 tests/auto/gui/kernel/qfileopenevent/test/CMakeLists.txt create mode 100644 tests/auto/gui/kernel/qguivariant/CMakeLists.txt create mode 100644 tests/auto/gui/kernel/qguivariant/no_application/CMakeLists.txt create mode 100644 tests/auto/gui/kernel/qmouseevent/CMakeLists.txt create mode 100644 tests/auto/gui/kernel/qpalette/CMakeLists.txt create mode 100644 tests/auto/gui/math3d/CMakeLists.txt create mode 100644 tests/auto/gui/math3d/qmatrixnxn/CMakeLists.txt create mode 100644 tests/auto/gui/math3d/qquaternion/CMakeLists.txt create mode 100644 tests/auto/gui/math3d/qvectornd/CMakeLists.txt create mode 100644 tests/auto/gui/painting/CMakeLists.txt create mode 100644 tests/auto/gui/painting/qpagesize/CMakeLists.txt create mode 100644 tests/auto/gui/painting/qpaintengine/CMakeLists.txt create mode 100644 tests/auto/gui/painting/qpainterpath/CMakeLists.txt create mode 100644 tests/auto/gui/painting/qpainterpathstroker/CMakeLists.txt create mode 100644 tests/auto/gui/painting/qpen/CMakeLists.txt create mode 100644 tests/auto/gui/util/CMakeLists.txt create mode 100644 tests/auto/gui/util/qdoublevalidator/CMakeLists.txt create mode 100644 tests/auto/gui/util/qintvalidator/CMakeLists.txt create mode 100644 tests/auto/gui/util/qregexpvalidator/CMakeLists.txt create mode 100644 tests/auto/gui/util/qregularexpressionvalidator/CMakeLists.txt create mode 100644 tests/auto/opengl/CMakeLists.txt create mode 100644 tests/auto/opengl/qgl/CMakeLists.txt create mode 100644 tests/auto/opengl/qglbuffer/CMakeLists.txt create mode 100644 tests/auto/opengl/qglfunctions/CMakeLists.txt create mode 100644 tests/auto/opengl/qglthreads/CMakeLists.txt create mode 100644 tests/auto/other/qtokenautomaton/CMakeLists.txt create mode 100644 tests/auto/other/toolsupport/CMakeLists.txt create mode 100644 tests/auto/testlib/CMakeLists.txt create mode 100644 tests/auto/testlib/qabstractitemmodeltester/CMakeLists.txt create mode 100644 tests/auto/testlib/qsignalspy/CMakeLists.txt create mode 100644 tests/auto/testlib/selftests/CMakeLists.txt create mode 100644 tests/auto/testlib/selftests/alive/CMakeLists.txt create mode 100644 tests/auto/testlib/selftests/assert/CMakeLists.txt create mode 100644 tests/auto/testlib/selftests/badxml/CMakeLists.txt create mode 100644 tests/auto/testlib/selftests/benchlibcallgrind/CMakeLists.txt create mode 100644 tests/auto/testlib/selftests/benchlibcounting/CMakeLists.txt create mode 100644 tests/auto/testlib/selftests/benchlibeventcounter/CMakeLists.txt create mode 100644 tests/auto/testlib/selftests/benchliboptions/CMakeLists.txt create mode 100644 tests/auto/testlib/selftests/benchlibwalltime/CMakeLists.txt create mode 100644 tests/auto/testlib/selftests/commandlinedata/CMakeLists.txt create mode 100644 tests/auto/testlib/selftests/counting/CMakeLists.txt create mode 100644 tests/auto/testlib/selftests/crashes/CMakeLists.txt create mode 100644 tests/auto/testlib/selftests/datatable/CMakeLists.txt create mode 100644 tests/auto/testlib/selftests/datetime/CMakeLists.txt create mode 100644 tests/auto/testlib/selftests/deleteLater/CMakeLists.txt create mode 100644 tests/auto/testlib/selftests/deleteLater_noApp/CMakeLists.txt create mode 100644 tests/auto/testlib/selftests/differentexec/CMakeLists.txt create mode 100644 tests/auto/testlib/selftests/expectfail/CMakeLists.txt create mode 100644 tests/auto/testlib/selftests/failcleanup/CMakeLists.txt create mode 100644 tests/auto/testlib/selftests/failinit/CMakeLists.txt create mode 100644 tests/auto/testlib/selftests/failinitdata/CMakeLists.txt create mode 100644 tests/auto/testlib/selftests/fetchbogus/CMakeLists.txt create mode 100644 tests/auto/testlib/selftests/float/CMakeLists.txt create mode 100644 tests/auto/testlib/selftests/globaldata/CMakeLists.txt create mode 100644 tests/auto/testlib/selftests/longstring/CMakeLists.txt create mode 100644 tests/auto/testlib/selftests/maxwarnings/CMakeLists.txt create mode 100644 tests/auto/testlib/selftests/multiexec/CMakeLists.txt create mode 100644 tests/auto/testlib/selftests/pairdiagnostics/CMakeLists.txt create mode 100644 tests/auto/testlib/selftests/printdatatags/CMakeLists.txt create mode 100644 tests/auto/testlib/selftests/printdatatagswithglobaltags/CMakeLists.txt create mode 100644 tests/auto/testlib/selftests/qexecstringlist/CMakeLists.txt create mode 100644 tests/auto/testlib/selftests/singleskip/CMakeLists.txt create mode 100644 tests/auto/testlib/selftests/skip/CMakeLists.txt create mode 100644 tests/auto/testlib/selftests/skipcleanup/CMakeLists.txt create mode 100644 tests/auto/testlib/selftests/skipinit/CMakeLists.txt create mode 100644 tests/auto/testlib/selftests/skipinitdata/CMakeLists.txt create mode 100644 tests/auto/testlib/selftests/sleep/CMakeLists.txt create mode 100644 tests/auto/testlib/selftests/strcmp/CMakeLists.txt create mode 100644 tests/auto/testlib/selftests/subtest/CMakeLists.txt create mode 100644 tests/auto/testlib/selftests/tuplediagnostics/CMakeLists.txt create mode 100644 tests/auto/testlib/selftests/warnings/CMakeLists.txt create mode 100644 tests/auto/testlib/selftests/xunit/CMakeLists.txt create mode 100644 tests/auto/tools/qdbusxml2cpp/CMakeLists.txt create mode 100644 tests/auto/tools/uic/CMakeLists.txt create mode 100644 tests/auto/widgets/CMakeLists.txt create mode 100644 tests/auto/widgets/dialogs/CMakeLists.txt create mode 100644 tests/auto/widgets/dialogs/qcolordialog/CMakeLists.txt create mode 100644 tests/auto/widgets/dialogs/qdialog/CMakeLists.txt create mode 100644 tests/auto/widgets/dialogs/qerrormessage/CMakeLists.txt create mode 100644 tests/auto/widgets/dialogs/qfiledialog/CMakeLists.txt create mode 100644 tests/auto/widgets/dialogs/qfiledialog2/CMakeLists.txt create mode 100644 tests/auto/widgets/dialogs/qfilesystemmodel/CMakeLists.txt create mode 100644 tests/auto/widgets/dialogs/qfontdialog/CMakeLists.txt create mode 100644 tests/auto/widgets/dialogs/qinputdialog/CMakeLists.txt create mode 100644 tests/auto/widgets/dialogs/qmessagebox/CMakeLists.txt create mode 100644 tests/auto/widgets/dialogs/qprogressdialog/CMakeLists.txt create mode 100644 tests/auto/widgets/dialogs/qsidebar/CMakeLists.txt create mode 100644 tests/auto/widgets/dialogs/qwizard/CMakeLists.txt create mode 100644 tests/auto/widgets/effects/CMakeLists.txt create mode 100644 tests/auto/widgets/effects/qgraphicseffect/CMakeLists.txt create mode 100644 tests/auto/widgets/effects/qpixmapfilter/CMakeLists.txt create mode 100644 tests/auto/widgets/graphicsview/CMakeLists.txt create mode 100644 tests/auto/widgets/graphicsview/qgraphicsanchorlayout/CMakeLists.txt create mode 100644 tests/auto/widgets/graphicsview/qgraphicsanchorlayout1/CMakeLists.txt create mode 100644 tests/auto/widgets/graphicsview/qgraphicseffectsource/CMakeLists.txt create mode 100644 tests/auto/widgets/graphicsview/qgraphicsgridlayout/CMakeLists.txt create mode 100644 tests/auto/widgets/graphicsview/qgraphicsitem/CMakeLists.txt create mode 100644 tests/auto/widgets/graphicsview/qgraphicsitemanimation/CMakeLists.txt create mode 100644 tests/auto/widgets/graphicsview/qgraphicslayout/CMakeLists.txt create mode 100644 tests/auto/widgets/graphicsview/qgraphicslayoutitem/CMakeLists.txt create mode 100644 tests/auto/widgets/graphicsview/qgraphicslinearlayout/CMakeLists.txt create mode 100644 tests/auto/widgets/graphicsview/qgraphicsobject/CMakeLists.txt create mode 100644 tests/auto/widgets/graphicsview/qgraphicspixmapitem/CMakeLists.txt create mode 100644 tests/auto/widgets/graphicsview/qgraphicspolygonitem/CMakeLists.txt create mode 100644 tests/auto/widgets/graphicsview/qgraphicsproxywidget/CMakeLists.txt create mode 100644 tests/auto/widgets/graphicsview/qgraphicsscene/CMakeLists.txt create mode 100644 tests/auto/widgets/graphicsview/qgraphicssceneindex/CMakeLists.txt create mode 100644 tests/auto/widgets/graphicsview/qgraphicstransform/CMakeLists.txt create mode 100644 tests/auto/widgets/graphicsview/qgraphicsview/CMakeLists.txt create mode 100644 tests/auto/widgets/graphicsview/qgraphicswidget/CMakeLists.txt create mode 100644 tests/auto/widgets/itemviews/CMakeLists.txt create mode 100644 tests/auto/widgets/itemviews/qabstractitemview/CMakeLists.txt create mode 100644 tests/auto/widgets/itemviews/qcolumnview/CMakeLists.txt create mode 100644 tests/auto/widgets/itemviews/qdatawidgetmapper/CMakeLists.txt create mode 100644 tests/auto/widgets/itemviews/qdirmodel/CMakeLists.txt create mode 100644 tests/auto/widgets/itemviews/qfileiconprovider/CMakeLists.txt create mode 100644 tests/auto/widgets/itemviews/qheaderview/CMakeLists.txt create mode 100644 tests/auto/widgets/itemviews/qitemdelegate/CMakeLists.txt create mode 100644 tests/auto/widgets/itemviews/qitemeditorfactory/CMakeLists.txt create mode 100644 tests/auto/widgets/itemviews/qitemview/CMakeLists.txt create mode 100644 tests/auto/widgets/itemviews/qlistview/CMakeLists.txt create mode 100644 tests/auto/widgets/itemviews/qlistwidget/CMakeLists.txt create mode 100644 tests/auto/widgets/itemviews/qtableview/CMakeLists.txt create mode 100644 tests/auto/widgets/itemviews/qtablewidget/CMakeLists.txt create mode 100644 tests/auto/widgets/itemviews/qtreeview/CMakeLists.txt create mode 100644 tests/auto/widgets/itemviews/qtreewidget/CMakeLists.txt create mode 100644 tests/auto/widgets/itemviews/qtreewidgetitemiterator/CMakeLists.txt create mode 100644 tests/auto/widgets/kernel/CMakeLists.txt create mode 100644 tests/auto/widgets/kernel/qaction/CMakeLists.txt create mode 100644 tests/auto/widgets/kernel/qactiongroup/CMakeLists.txt create mode 100644 tests/auto/widgets/kernel/qboxlayout/CMakeLists.txt create mode 100644 tests/auto/widgets/kernel/qdesktopwidget/CMakeLists.txt create mode 100644 tests/auto/widgets/kernel/qformlayout/CMakeLists.txt create mode 100644 tests/auto/widgets/kernel/qgesturerecognizer/CMakeLists.txt create mode 100644 tests/auto/widgets/kernel/qgridlayout/CMakeLists.txt create mode 100644 tests/auto/widgets/kernel/qlayout/CMakeLists.txt create mode 100644 tests/auto/widgets/kernel/qshortcut/CMakeLists.txt create mode 100644 tests/auto/widgets/kernel/qsizepolicy/CMakeLists.txt create mode 100644 tests/auto/widgets/kernel/qstackedlayout/CMakeLists.txt create mode 100644 tests/auto/widgets/kernel/qtooltip/CMakeLists.txt create mode 100644 tests/auto/widgets/kernel/qwidget/CMakeLists.txt create mode 100644 tests/auto/widgets/kernel/qwidget_window/CMakeLists.txt create mode 100644 tests/auto/widgets/kernel/qwidgetaction/CMakeLists.txt create mode 100644 tests/auto/widgets/kernel/qwidgetmetatype/CMakeLists.txt create mode 100644 tests/auto/widgets/kernel/qwidgetsvariant/CMakeLists.txt create mode 100644 tests/auto/widgets/kernel/qwindowcontainer/CMakeLists.txt create mode 100644 tests/auto/widgets/styles/CMakeLists.txt create mode 100644 tests/auto/widgets/styles/qmacstyle/CMakeLists.txt create mode 100644 tests/auto/widgets/styles/qstyle/CMakeLists.txt create mode 100644 tests/auto/widgets/styles/qstyleoption/CMakeLists.txt create mode 100644 tests/auto/widgets/styles/qstylesheetstyle/CMakeLists.txt create mode 100644 tests/auto/widgets/util/CMakeLists.txt create mode 100644 tests/auto/widgets/util/qcompleter/CMakeLists.txt create mode 100644 tests/auto/widgets/util/qscroller/CMakeLists.txt create mode 100644 tests/auto/widgets/util/qsystemtrayicon/CMakeLists.txt create mode 100644 tests/auto/widgets/util/qundogroup/CMakeLists.txt create mode 100644 tests/auto/widgets/util/qundostack/CMakeLists.txt create mode 100644 tests/auto/widgets/widgets/CMakeLists.txt create mode 100644 tests/auto/widgets/widgets/qabstractbutton/CMakeLists.txt create mode 100644 tests/auto/widgets/widgets/qabstractscrollarea/CMakeLists.txt create mode 100644 tests/auto/widgets/widgets/qabstractslider/CMakeLists.txt create mode 100644 tests/auto/widgets/widgets/qabstractspinbox/CMakeLists.txt create mode 100644 tests/auto/widgets/widgets/qbuttongroup/CMakeLists.txt create mode 100644 tests/auto/widgets/widgets/qcalendarwidget/CMakeLists.txt create mode 100644 tests/auto/widgets/widgets/qcheckbox/CMakeLists.txt create mode 100644 tests/auto/widgets/widgets/qcombobox/CMakeLists.txt create mode 100644 tests/auto/widgets/widgets/qcommandlinkbutton/CMakeLists.txt create mode 100644 tests/auto/widgets/widgets/qdatetimeedit/CMakeLists.txt create mode 100644 tests/auto/widgets/widgets/qdial/CMakeLists.txt create mode 100644 tests/auto/widgets/widgets/qdialogbuttonbox/CMakeLists.txt create mode 100644 tests/auto/widgets/widgets/qdockwidget/CMakeLists.txt create mode 100644 tests/auto/widgets/widgets/qdoublespinbox/CMakeLists.txt create mode 100644 tests/auto/widgets/widgets/qfocusframe/CMakeLists.txt create mode 100644 tests/auto/widgets/widgets/qfontcombobox/CMakeLists.txt create mode 100644 tests/auto/widgets/widgets/qframe/CMakeLists.txt create mode 100644 tests/auto/widgets/widgets/qgroupbox/CMakeLists.txt create mode 100644 tests/auto/widgets/widgets/qkeysequenceedit/CMakeLists.txt create mode 100644 tests/auto/widgets/widgets/qlabel/CMakeLists.txt create mode 100644 tests/auto/widgets/widgets/qlcdnumber/CMakeLists.txt create mode 100644 tests/auto/widgets/widgets/qlineedit/CMakeLists.txt create mode 100644 tests/auto/widgets/widgets/qmainwindow/CMakeLists.txt create mode 100644 tests/auto/widgets/widgets/qmdiarea/CMakeLists.txt create mode 100644 tests/auto/widgets/widgets/qmdisubwindow/CMakeLists.txt create mode 100644 tests/auto/widgets/widgets/qmenu/CMakeLists.txt create mode 100644 tests/auto/widgets/widgets/qmenubar/CMakeLists.txt create mode 100644 tests/auto/widgets/widgets/qopenglwidget/CMakeLists.txt create mode 100644 tests/auto/widgets/widgets/qplaintextedit/CMakeLists.txt create mode 100644 tests/auto/widgets/widgets/qprogressbar/CMakeLists.txt create mode 100644 tests/auto/widgets/widgets/qpushbutton/CMakeLists.txt create mode 100644 tests/auto/widgets/widgets/qradiobutton/CMakeLists.txt create mode 100644 tests/auto/widgets/widgets/qscrollarea/CMakeLists.txt create mode 100644 tests/auto/widgets/widgets/qscrollbar/CMakeLists.txt create mode 100644 tests/auto/widgets/widgets/qsizegrip/CMakeLists.txt create mode 100644 tests/auto/widgets/widgets/qslider/CMakeLists.txt create mode 100644 tests/auto/widgets/widgets/qspinbox/CMakeLists.txt create mode 100644 tests/auto/widgets/widgets/qsplashscreen/CMakeLists.txt create mode 100644 tests/auto/widgets/widgets/qsplitter/CMakeLists.txt create mode 100644 tests/auto/widgets/widgets/qstackedwidget/CMakeLists.txt create mode 100644 tests/auto/widgets/widgets/qstatusbar/CMakeLists.txt create mode 100644 tests/auto/widgets/widgets/qtabbar/CMakeLists.txt create mode 100644 tests/auto/widgets/widgets/qtabwidget/CMakeLists.txt create mode 100644 tests/auto/widgets/widgets/qtextbrowser/CMakeLists.txt create mode 100644 tests/auto/widgets/widgets/qtextedit/CMakeLists.txt create mode 100644 tests/auto/widgets/widgets/qtoolbar/CMakeLists.txt create mode 100644 tests/auto/widgets/widgets/qtoolbox/CMakeLists.txt create mode 100644 tests/auto/widgets/widgets/qtoolbutton/CMakeLists.txt create mode 100644 tests/benchmarks/corelib/io/qdir/10000/CMakeLists.txt create mode 100644 tests/benchmarks/corelib/io/qprocess/test/CMakeLists.txt create mode 100644 tests/benchmarks/corelib/kernel/events/CMakeLists.txt create mode 100644 tests/benchmarks/corelib/kernel/qcoreapplication/CMakeLists.txt create mode 100644 tests/benchmarks/corelib/kernel/qmetatype/CMakeLists.txt create mode 100644 tests/benchmarks/corelib/mimetypes/qmimedatabase/CMakeLists.txt create mode 100644 tests/benchmarks/corelib/plugin/quuid/CMakeLists.txt create mode 100644 tests/benchmarks/corelib/thread/qmutex/CMakeLists.txt create mode 100644 tests/benchmarks/corelib/thread/qthreadpool/CMakeLists.txt create mode 100644 tests/benchmarks/corelib/thread/qthreadstorage/CMakeLists.txt create mode 100644 tests/benchmarks/corelib/thread/qwaitcondition/CMakeLists.txt create mode 100644 tests/benchmarks/corelib/tools/containers-associative/CMakeLists.txt create mode 100644 tests/benchmarks/corelib/tools/containers-sequential/CMakeLists.txt create mode 100644 tests/benchmarks/corelib/tools/qalgorithms/CMakeLists.txt create mode 100644 tests/benchmarks/corelib/tools/qchar/CMakeLists.txt create mode 100644 tests/benchmarks/corelib/tools/qdatetime/CMakeLists.txt create mode 100644 tests/benchmarks/corelib/tools/qlist/CMakeLists.txt create mode 100644 tests/benchmarks/corelib/tools/qlocale/CMakeLists.txt create mode 100644 tests/benchmarks/corelib/tools/qstring/CMakeLists.txt create mode 100644 tests/benchmarks/corelib/tools/qtimezone/CMakeLists.txt create mode 100644 tests/benchmarks/gui/image/blendbench/CMakeLists.txt create mode 100644 tests/benchmarks/gui/image/qimagescale/CMakeLists.txt create mode 100644 tests/benchmarks/gui/image/qpixmapcache/CMakeLists.txt create mode 100644 tests/benchmarks/gui/kernel/qguimetatype/CMakeLists.txt create mode 100644 tests/benchmarks/gui/kernel/qguivariant/CMakeLists.txt create mode 100644 tests/benchmarks/gui/math3d/qmatrix4x4/CMakeLists.txt create mode 100644 tests/benchmarks/gui/math3d/qquaternion/CMakeLists.txt create mode 100644 tests/benchmarks/gui/painting/qtransform/CMakeLists.txt create mode 100644 tests/benchmarks/gui/text/qfontmetrics/CMakeLists.txt create mode 100644 tests/manual/CMakeLists.txt create mode 100644 tests/manual/qcursor/childwindow/CMakeLists.txt create mode 100644 tests/manual/qmetatype/CMakeLists.txt create mode 100644 tests/manual/qopenglwindow/multiwindow/CMakeLists.txt create mode 100644 util/cmake/Pipfile create mode 100755 util/cmake/cmakeconversionrate.py create mode 100755 util/cmake/configurejson2cmake.py create mode 100755 util/cmake/generate_module_map.sh create mode 100644 util/cmake/helper.py create mode 100755 util/cmake/pro2cmake.py create mode 100755 util/cmake/run_pro2cmake.py create mode 100644 util/cmake/tests/__init__.py create mode 100644 util/cmake/tests/data/complex_values.pro create mode 100644 util/cmake/tests/data/definetest.pro create mode 100644 util/cmake/tests/data/else.pro create mode 100644 util/cmake/tests/data/else2.pro create mode 100644 util/cmake/tests/data/else3.pro create mode 100644 util/cmake/tests/data/else4.pro create mode 100644 util/cmake/tests/data/else5.pro create mode 100644 util/cmake/tests/data/else6.pro create mode 100644 util/cmake/tests/data/else7.pro create mode 100644 util/cmake/tests/data/else8.pro create mode 100644 util/cmake/tests/data/function_if.pro create mode 100644 util/cmake/tests/data/include.pro create mode 100644 util/cmake/tests/data/load.pro create mode 100644 util/cmake/tests/data/quoted.pro create mode 100644 util/cmake/tests/data/unset.pro create mode 100755 util/cmake/tests/test_parsing.py 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__FOUND`` will be set to +# TRUE if the corresponding Wayland library was found, and FALSE otherwise. If +# ``Wayland__FOUND`` is TRUE, the imported target +# ``Wayland::`` 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 +# Copyright 2014 Martin Gräßlin +# +# 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 +# Copyright 2011 Fredrik Höglund +# Copyright 2008 Helio Chissini de Castro +# Copyright 2007 Matthias Kretz +# +# 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__FOUND`` will be set to +# true if the corresponding xcb library was found, and false otherwise. If +# ``XCB__FOUND`` is true, the imported target ``XCB::`` +# 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 +# Copyright 2013 Martin Gräßlin +# Copyright 2014-2015 Alex Merry +# +# 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 +# +# 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() +# +# 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( +# RESULT_VAR +# KNOWN_COMPONENTS [ [...]] +# [SKIP_DEPENDENCY_HANDLING]) +# +# This macro will populate with a list of components found in +# _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 _FIND_REQUIRED) and call +# return(). +# +# The order of components in 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 +# __component_deps will be checked for dependent components. +# If is listed in _FIND_COMPONENTS, then all its (transitive) +# dependencies will also be added to . +# +# :: +# +# ecm_find_package_handle_library_components( +# COMPONENTS [ [...]] +# [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 __lib variable should contain the name of this library, +# and __header variable should contain the name of a header +# file associated with it (whatever relative path is normally passed to +# '#include'). __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 ::. +# +# Additional variables can be used to provide additional information: +# +# If SKIP_PKG_CONFIG, the __pkg_config variable is set, and +# pkg-config is found, the pkg-config module given by +# __pkg_config will be searched for and used to help locate the +# library and header file. It will also be used to set +# __VERSION. +# +# Note that if version information is found via pkg-config, +# __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 will be set to contain the imported +# targets for the components listed in __component_deps. +# _FOUND will also be set to false if any of the compoments in +# __component_deps are not found. This requires the components +# in __component_deps to be listed before in the +# COMPONENTS argument. +# +# The following variables will be set: +# +# ``_TARGETS`` +# the imported targets +# ``_LIBRARIES`` +# the found libraries +# ``_INCLUDE_DIRS`` +# the combined required include directories for the components +# ``_DEFINITIONS`` +# the "other" CFLAGS provided by pkg-config, if any +# ``_VERSION`` +# the value of ``__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 +# ``_TARGETS``, for example, will contain all the targets found in any +# call (although no duplicates). +# +# Since pre-1.0.0. + +#============================================================================= +# Copyright 2014 Alex Merry +# +# 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, +# +# 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 +# Copyright 2014 Martin Gräßlin +# +# 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 +# Copyright 2014 Martin Gräßlin +# +# 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 +# +# 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 +# Copyright 2014 Martin Gräßlin +# +# 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 +Copyright 2014 Martin Gräßlin , +Copyright (c) 2006,2007 Laurent Montel, " +} 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 +#include + +void test(volatile std::atomic &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 *>(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 +#include + +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 +#include + +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 + +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 + +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 + $ + $ + $ + $ + ) +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 "]*>" "" 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 + $ + $ + ${_arg_PUBLIC_INCLUDE_DIRECTORIES} + INCLUDE_DIRECTORIES + "${CMAKE_CURRENT_SOURCE_DIR}" + "${CMAKE_CURRENT_BINARY_DIR}" + $ + "${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 + $ + $ + $ + $ + $ + ) +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 ") +endfunction() + + + +function(add_qt_resource target resourceName) + qt_parse_all_arguments(rcc "add_qt_resource" "" "PREFIX;BASE" "FILES" ${ARGN}) + + set(qrcContents "") + if (${rcc_PREFIX}) + string(APPEND qrcContents " \n") + else() + string(APPEND qrcContents " \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 " ${CMAKE_CURRENT_SOURCE_DIR}/${file}\n") + endforeach() + + string(APPEND qrcContents " \n\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}$<$>:_$>") + set(targetincludes "$") + set(targetdefines "$") + + set(targetincludes "$<$:-I$\n>") + set(targetdefines "$<$:-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 \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 +#include + +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 + +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 +#ifdef __QNXNTO__ +// extra include needed in QNX7 to define NULL for the alloca() macro +# include +#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 + +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 +# 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) + + # $ 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 +typedef void (*fptr)(int); +typedef std::atomic 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 +#include + +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 +#include +#include +#include + +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 " +" +#include + +int main(int argc, char **argv) +{ + (void)argc; (void)argv; + /* BEGIN TEST: */ +std::future 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 + +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 + +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 +#include +#include +#include +#include + +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 +#include +#include +#include + +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 +#include + +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 +#include + +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 +#include +#include + +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 + +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 +#include + +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 +#include +#include +#include + +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 + +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 " + 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 and +# a qpa header is #include , 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 + +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 +#include + +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 +#include +extern \"C\" { +#include +#include +} +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 +#include +#include +#include + +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 +#include + +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 +#include + +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 +#include +#include + +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 +#include + +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 +#include + +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 + +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 +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 +#else +# include +# include +#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 + +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 + +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 +#include +#include + +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 +#else +# define GL_GLEXT_PROTOTYPES +# include +#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 + +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 + +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 +#include +#include +#include + +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 +#include +#include + +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 +#include +#include +#include + +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 +#include +#include +#include + +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 +#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 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 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 +#include +#include +#include +#include +#include +#include +#include +#include +#include + +struct ScanResult +{ + std::string fileName; + bool foundMocRelevantMacro = false; + std::vector 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 findIncludes(const char *fileName, char *buffer, int buffer_len) +{ + std::vector 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(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 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 &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 \n", argv[0]); + return EXIT_FAILURE; + } + + std::vector 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 mocCandidates; + std::unordered_set 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 mocFilesToInclude; + std::set 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 +#include + +#include +#include + +#include + +/* 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 --- /dev/null +++ b/tests/auto/dbus/qdbusinterface/CMakeLists.txt @@ -0,0 +1,4 @@ +# Generated from qdbusinterface.pro. + +add_subdirectory(qmyserver) +add_subdirectory(qdbusinterface) diff --git a/tests/auto/dbus/qdbusinterface/qdbusinterface/CMakeLists.txt b/tests/auto/dbus/qdbusinterface/qdbusinterface/CMakeLists.txt new file mode 100644 index 0000000000..624ec00bd1 --- /dev/null +++ b/tests/auto/dbus/qdbusinterface/qdbusinterface/CMakeLists.txt @@ -0,0 +1,28 @@ +# Generated from qdbusinterface.pro. + +##################################################################### +## ../tst_qdbusinterface Test: +##################################################################### + +add_qt_test(../tst_qdbusinterface + SOURCES + ../myobject.h + ../tst_qdbusinterface.cpp + LIBRARIES + Qt::CorePrivate + Qt::DBus + Qt::DBusPrivate +) + +## Scopes: +##################################################################### + +extend_target(../tst_qdbusinterface CONDITION QT_FEATURE_dbus_linked + DEFINES + QT_LINKED_LIBDBUS +) + +extend_target(../tst_qdbusinterface CONDITION NOT QT_FEATURE_dbus_linked + SOURCES + ../../../../../src/dbus/qdbus_symbols.cpp +) diff --git a/tests/auto/dbus/qdbusinterface/qmyserver/CMakeLists.txt b/tests/auto/dbus/qdbusinterface/qmyserver/CMakeLists.txt new file mode 100644 index 0000000000..627b29ff42 --- /dev/null +++ b/tests/auto/dbus/qdbusinterface/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/qdbuslocalcalls/CMakeLists.txt b/tests/auto/dbus/qdbuslocalcalls/CMakeLists.txt new file mode 100644 index 0000000000..fee5d38372 --- /dev/null +++ b/tests/auto/dbus/qdbuslocalcalls/CMakeLists.txt @@ -0,0 +1,12 @@ +# Generated from qdbuslocalcalls.pro. + +##################################################################### +## tst_qdbuslocalcalls Test: +##################################################################### + +add_qt_test(tst_qdbuslocalcalls + SOURCES + tst_qdbuslocalcalls.cpp + LIBRARIES + Qt::DBus +) diff --git a/tests/auto/dbus/qdbusmarshall/CMakeLists.txt b/tests/auto/dbus/qdbusmarshall/CMakeLists.txt new file mode 100644 index 0000000000..aabeae0f4a --- /dev/null +++ b/tests/auto/dbus/qdbusmarshall/CMakeLists.txt @@ -0,0 +1,4 @@ +# Generated from qdbusmarshall.pro. + +add_subdirectory(qpong) +add_subdirectory(qdbusmarshall) diff --git a/tests/auto/dbus/qdbusmarshall/qdbusmarshall/CMakeLists.txt b/tests/auto/dbus/qdbusmarshall/qdbusmarshall/CMakeLists.txt new file mode 100644 index 0000000000..bfa7cf0b2f --- /dev/null +++ b/tests/auto/dbus/qdbusmarshall/qdbusmarshall/CMakeLists.txt @@ -0,0 +1,26 @@ +# Generated from qdbusmarshall.pro. + +##################################################################### +## ../tst_qdbusmarshall Test: +##################################################################### + +add_qt_test(../tst_qdbusmarshall + SOURCES + ../tst_qdbusmarshall.cpp + LIBRARIES + Qt::CorePrivate + Qt::DBusPrivate +) + +## Scopes: +##################################################################### + +extend_target(../tst_qdbusmarshall CONDITION QT_FEATURE_dbus_linked + DEFINES + QT_LINKED_LIBDBUS +) + +extend_target(../tst_qdbusmarshall CONDITION NOT QT_FEATURE_dbus_linked + SOURCES + ../../../../../src/dbus/qdbus_symbols.cpp +) diff --git a/tests/auto/dbus/qdbusmarshall/qpong/CMakeLists.txt b/tests/auto/dbus/qdbusmarshall/qpong/CMakeLists.txt new file mode 100644 index 0000000000..358bb235ed --- /dev/null +++ b/tests/auto/dbus/qdbusmarshall/qpong/CMakeLists.txt @@ -0,0 +1,12 @@ +# Generated from qpong.pro. + +##################################################################### +## qpong Binary: +##################################################################### + +add_qt_executable(qpong + SOURCES + qpong.cpp + LIBRARIES + Qt::DBus +) diff --git a/tests/auto/dbus/qdbusmetaobject/CMakeLists.txt b/tests/auto/dbus/qdbusmetaobject/CMakeLists.txt new file mode 100644 index 0000000000..661339c4fe --- /dev/null +++ b/tests/auto/dbus/qdbusmetaobject/CMakeLists.txt @@ -0,0 +1,12 @@ +# Generated from qdbusmetaobject.pro. + +##################################################################### +## tst_qdbusmetaobject Test: +##################################################################### + +add_qt_test(tst_qdbusmetaobject + SOURCES + tst_qdbusmetaobject.cpp + LIBRARIES + Qt::DBusPrivate +) diff --git a/tests/auto/dbus/qdbusmetatype/CMakeLists.txt b/tests/auto/dbus/qdbusmetatype/CMakeLists.txt new file mode 100644 index 0000000000..cde3362ed8 --- /dev/null +++ b/tests/auto/dbus/qdbusmetatype/CMakeLists.txt @@ -0,0 +1,12 @@ +# Generated from qdbusmetatype.pro. + +##################################################################### +## tst_qdbusmetatype Test: +##################################################################### + +add_qt_test(tst_qdbusmetatype + SOURCES + tst_qdbusmetatype.cpp + LIBRARIES + Qt::DBus +) diff --git a/tests/auto/dbus/qdbuspendingcall/CMakeLists.txt b/tests/auto/dbus/qdbuspendingcall/CMakeLists.txt new file mode 100644 index 0000000000..86f981221a --- /dev/null +++ b/tests/auto/dbus/qdbuspendingcall/CMakeLists.txt @@ -0,0 +1,12 @@ +# Generated from qdbuspendingcall.pro. + +##################################################################### +## tst_qdbuspendingcall Test: +##################################################################### + +add_qt_test(tst_qdbuspendingcall + SOURCES + tst_qdbuspendingcall.cpp + LIBRARIES + Qt::DBus +) diff --git a/tests/auto/dbus/qdbuspendingreply/CMakeLists.txt b/tests/auto/dbus/qdbuspendingreply/CMakeLists.txt new file mode 100644 index 0000000000..82224c20d6 --- /dev/null +++ b/tests/auto/dbus/qdbuspendingreply/CMakeLists.txt @@ -0,0 +1,12 @@ +# Generated from qdbuspendingreply.pro. + +##################################################################### +## tst_qdbuspendingreply Test: +##################################################################### + +add_qt_test(tst_qdbuspendingreply + SOURCES + tst_qdbuspendingreply.cpp + LIBRARIES + Qt::DBus +) diff --git a/tests/auto/dbus/qdbusreply/CMakeLists.txt b/tests/auto/dbus/qdbusreply/CMakeLists.txt new file mode 100644 index 0000000000..283be755f6 --- /dev/null +++ b/tests/auto/dbus/qdbusreply/CMakeLists.txt @@ -0,0 +1,12 @@ +# Generated from qdbusreply.pro. + +##################################################################### +## tst_qdbusreply Test: +##################################################################### + +add_qt_test(tst_qdbusreply + SOURCES + tst_qdbusreply.cpp + LIBRARIES + Qt::DBus +) diff --git a/tests/auto/dbus/qdbusservicewatcher/CMakeLists.txt b/tests/auto/dbus/qdbusservicewatcher/CMakeLists.txt new file mode 100644 index 0000000000..fe1c3c7911 --- /dev/null +++ b/tests/auto/dbus/qdbusservicewatcher/CMakeLists.txt @@ -0,0 +1,12 @@ +# Generated from qdbusservicewatcher.pro. + +##################################################################### +## tst_qdbusservicewatcher Test: +##################################################################### + +add_qt_test(tst_qdbusservicewatcher + SOURCES + tst_qdbusservicewatcher.cpp + LIBRARIES + Qt::DBus +) diff --git a/tests/auto/dbus/qdbusthreading/CMakeLists.txt b/tests/auto/dbus/qdbusthreading/CMakeLists.txt new file mode 100644 index 0000000000..7cab309dbf --- /dev/null +++ b/tests/auto/dbus/qdbusthreading/CMakeLists.txt @@ -0,0 +1,12 @@ +# Generated from qdbusthreading.pro. + +##################################################################### +## tst_qdbusthreading Test: +##################################################################### + +add_qt_test(tst_qdbusthreading + SOURCES + tst_qdbusthreading.cpp + LIBRARIES + Qt::DBus +) diff --git a/tests/auto/dbus/qdbustype/CMakeLists.txt b/tests/auto/dbus/qdbustype/CMakeLists.txt new file mode 100644 index 0000000000..c76f44ba02 --- /dev/null +++ b/tests/auto/dbus/qdbustype/CMakeLists.txt @@ -0,0 +1,26 @@ +# Generated from qdbustype.pro. + +##################################################################### +## tst_qdbustype Test: +##################################################################### + +add_qt_test(tst_qdbustype + SOURCES + tst_qdbustype.cpp + LIBRARIES + Qt::CorePrivate + Qt::DBusPrivate +) + +## Scopes: +##################################################################### + +extend_target(tst_qdbustype CONDITION QT_FEATURE_dbus_linked + DEFINES + QT_LINKED_LIBDBUS +) + +extend_target(tst_qdbustype CONDITION NOT QT_FEATURE_dbus_linked + SOURCES + ../../../../src/dbus/qdbus_symbols.cpp +) diff --git a/tests/auto/dbus/qdbusxmlparser/CMakeLists.txt b/tests/auto/dbus/qdbusxmlparser/CMakeLists.txt new file mode 100644 index 0000000000..ab35fba048 --- /dev/null +++ b/tests/auto/dbus/qdbusxmlparser/CMakeLists.txt @@ -0,0 +1,14 @@ +# Generated from qdbusxmlparser.pro. + +##################################################################### +## tst_qdbusxmlparser Test: +##################################################################### + +add_qt_test(tst_qdbusxmlparser + SOURCES + tst_qdbusxmlparser.cpp + LIBRARIES + Qt::CorePrivate + Qt::DBusPrivate + Qt::Xml +) diff --git a/tests/auto/gui/CMakeLists.txt b/tests/auto/gui/CMakeLists.txt new file mode 100644 index 0000000000..8be8abea63 --- /dev/null +++ b/tests/auto/gui/CMakeLists.txt @@ -0,0 +1,19 @@ +# Generated from gui.pro. + +add_subdirectory("kernel") + +if(NOT APPLE_UIKIT) + add_subdirectory("image") + add_subdirectory("math3d") + add_subdirectory("painting") + if (QT_FEATURE_opengl AND NOT WINRT) + # missing CMakeLists.txt: add_subdirectory("qopenglconfig") + # missing CMakeLists.txt: add_subdirectory("qopengl") + endif() + # if (QT_FEATURE_vulkan) + # add_subdirectory("qvulkan") + # endif() + # add_subdirectory("text") + add_subdirectory("util") + add_subdirectory("itemmodels") +endif() diff --git a/tests/auto/gui/image/CMakeLists.txt b/tests/auto/gui/image/CMakeLists.txt new file mode 100644 index 0000000000..ea56c0474a --- /dev/null +++ b/tests/auto/gui/image/CMakeLists.txt @@ -0,0 +1,15 @@ +if (QT_FEATURE_network) +# add_subdirectory("qimagereader") +endif() +# add_subdirectory("qicoimageformat") +# add_subdirectory("qpixmap") +if (QT_FEATURE_private_tests) +# add_subdirectory("qpixmapcache") +endif() +# add_subdirectory("qimage") +add_subdirectory("qimageiohandler") +# add_subdirectory("qimagewriter") +# add_subdirectory("qmovie") +add_subdirectory("qpicture") +# add_subdirectory("qicon") +# add_subdirectory("qiconhighdpi") diff --git a/tests/auto/gui/image/qimageiohandler/CMakeLists.txt b/tests/auto/gui/image/qimageiohandler/CMakeLists.txt new file mode 100644 index 0000000000..fbefeb26d8 --- /dev/null +++ b/tests/auto/gui/image/qimageiohandler/CMakeLists.txt @@ -0,0 +1 @@ +add_qt_test(tst_qimageiohandler SOURCES tst_qimageiohandler.cpp LIBRARIES Qt::Gui) diff --git a/tests/auto/gui/image/qpicture/CMakeLists.txt b/tests/auto/gui/image/qpicture/CMakeLists.txt new file mode 100644 index 0000000000..c3db4ffb25 --- /dev/null +++ b/tests/auto/gui/image/qpicture/CMakeLists.txt @@ -0,0 +1 @@ +add_qt_test(tst_qpicture SOURCES tst_qpicture.cpp LIBRARIES Qt::Gui) diff --git a/tests/auto/gui/itemmodels/CMakeLists.txt b/tests/auto/gui/itemmodels/CMakeLists.txt new file mode 100644 index 0000000000..196168b1b2 --- /dev/null +++ b/tests/auto/gui/itemmodels/CMakeLists.txt @@ -0,0 +1,4 @@ +add_subdirectory("qstandarditem") +if (QT_FEATURE_widgets) +# add_subdirectory("qstandarditemmodel") +endif() diff --git a/tests/auto/gui/itemmodels/qstandarditem/CMakeLists.txt b/tests/auto/gui/itemmodels/qstandarditem/CMakeLists.txt new file mode 100644 index 0000000000..cfbf843cac --- /dev/null +++ b/tests/auto/gui/itemmodels/qstandarditem/CMakeLists.txt @@ -0,0 +1 @@ +add_qt_test(tst_qstandarditem SOURCES tst_qstandarditem.cpp LIBRARIES Qt::Gui) diff --git a/tests/auto/gui/kernel/CMakeLists.txt b/tests/auto/gui/kernel/CMakeLists.txt new file mode 100644 index 0000000000..f48625d539 --- /dev/null +++ b/tests/auto/gui/kernel/CMakeLists.txt @@ -0,0 +1,38 @@ +# add_subdirectory("qbackingstore") +if (NOT ANDROID AND NOT APPLE_UIKIT) +# add_subdirectory("qclipboard") +endif() +add_subdirectory("qcursor") +# add_subdirectory("qdrag") +add_subdirectory("qevent") +add_subdirectory("qfileopenevent") +#add_subdirectory("qguieventdispatcher") +if (QT_FEATURE_network) +# add_subdirectory("qguieventloop") +endif() +# add_subdirectory("qguimetatype") +# add_subdirectory("qguitimer") +add_subdirectory("qguivariant") +# add_subdirectory("qinputmethod") +# add_subdirectory("qkeyevent") +# add_subdirectory("qkeysequence") +add_subdirectory("qmouseevent") +if (QT_FEATURE_widgets) +# add_subdirectory("qmouseevent_modal") + add_subdirectory("qpalette") +endif() +# add_subdirectory("qscreen") +# add_subdirectory("qsurfaceformat") +# add_subdirectory("qtouchevent") +# add_subdirectory("qwindow") +# add_subdirectory("qguiapplication") +# add_subdirectory("qpixelformat") +if (QT_FEATURE_opengl) +# add_subdirectory("qopenglwindow") +endif() +# add_subdirectory("qrasterwindow") + +if(WIN32 AND NOT WINRT AND QT_FEATURE_network) +# add_subdirectory("noqteventloop") +endif() + diff --git a/tests/auto/gui/kernel/qcursor/CMakeLists.txt b/tests/auto/gui/kernel/qcursor/CMakeLists.txt new file mode 100644 index 0000000000..431aa9f374 --- /dev/null +++ b/tests/auto/gui/kernel/qcursor/CMakeLists.txt @@ -0,0 +1 @@ +add_qt_test(tst_qcursor SOURCES tst_qcursor.cpp LIBRARIES Qt::Gui) diff --git a/tests/auto/gui/kernel/qevent/CMakeLists.txt b/tests/auto/gui/kernel/qevent/CMakeLists.txt new file mode 100644 index 0000000000..7fa08d2609 --- /dev/null +++ b/tests/auto/gui/kernel/qevent/CMakeLists.txt @@ -0,0 +1 @@ +add_qt_test(tst_qevent SOURCES tst_qevent.cpp) diff --git a/tests/auto/gui/kernel/qfileopenevent/CMakeLists.txt b/tests/auto/gui/kernel/qfileopenevent/CMakeLists.txt new file mode 100644 index 0000000000..c5bafe3ebe --- /dev/null +++ b/tests/auto/gui/kernel/qfileopenevent/CMakeLists.txt @@ -0,0 +1,2 @@ +add_subdirectory("test") +add_subdirectory("qfileopeneventexternal") diff --git a/tests/auto/gui/kernel/qfileopenevent/qfileopeneventexternal/CMakeLists.txt b/tests/auto/gui/kernel/qfileopenevent/qfileopeneventexternal/CMakeLists.txt new file mode 100644 index 0000000000..fddc9399f5 --- /dev/null +++ b/tests/auto/gui/kernel/qfileopenevent/qfileopeneventexternal/CMakeLists.txt @@ -0,0 +1 @@ +add_qt_test(qfileopeneventexternal SOURCES qfileopeneventexternal.cpp LIBRARIES Qt::Gui) diff --git a/tests/auto/gui/kernel/qfileopenevent/test/CMakeLists.txt b/tests/auto/gui/kernel/qfileopenevent/test/CMakeLists.txt new file mode 100644 index 0000000000..122d449770 --- /dev/null +++ b/tests/auto/gui/kernel/qfileopenevent/test/CMakeLists.txt @@ -0,0 +1 @@ +add_qt_test(tst_qfileopenevent SOURCES tst_qfileopenevent.cpp LIBRARIES Qt::Gui) diff --git a/tests/auto/gui/kernel/qguivariant/CMakeLists.txt b/tests/auto/gui/kernel/qguivariant/CMakeLists.txt new file mode 100644 index 0000000000..41b0aacf85 --- /dev/null +++ b/tests/auto/gui/kernel/qguivariant/CMakeLists.txt @@ -0,0 +1,2 @@ +# add_subdirectory("test") +add_subdirectory("no_application") diff --git a/tests/auto/gui/kernel/qguivariant/no_application/CMakeLists.txt b/tests/auto/gui/kernel/qguivariant/no_application/CMakeLists.txt new file mode 100644 index 0000000000..b8acedbe45 --- /dev/null +++ b/tests/auto/gui/kernel/qguivariant/no_application/CMakeLists.txt @@ -0,0 +1 @@ +add_qt_test(no_application SOURCES main.cpp LIBRARIES Qt::Gui) diff --git a/tests/auto/gui/kernel/qmouseevent/CMakeLists.txt b/tests/auto/gui/kernel/qmouseevent/CMakeLists.txt new file mode 100644 index 0000000000..a478d9c027 --- /dev/null +++ b/tests/auto/gui/kernel/qmouseevent/CMakeLists.txt @@ -0,0 +1 @@ +add_qt_test(tst_qmouseevent SOURCES tst_qmouseevent.cpp LIBRARIES Qt::Gui) diff --git a/tests/auto/gui/kernel/qpalette/CMakeLists.txt b/tests/auto/gui/kernel/qpalette/CMakeLists.txt new file mode 100644 index 0000000000..d7573bbc70 --- /dev/null +++ b/tests/auto/gui/kernel/qpalette/CMakeLists.txt @@ -0,0 +1 @@ +add_qt_test(tst_qpalette SOURCES tst_qpalette.cpp LIBRARIES Qt::Gui) diff --git a/tests/auto/gui/math3d/CMakeLists.txt b/tests/auto/gui/math3d/CMakeLists.txt new file mode 100644 index 0000000000..91e59874b7 --- /dev/null +++ b/tests/auto/gui/math3d/CMakeLists.txt @@ -0,0 +1,3 @@ +add_subdirectory("qquaternion") +add_subdirectory("qvectornd") +add_subdirectory("qmatrixnxn") diff --git a/tests/auto/gui/math3d/qmatrixnxn/CMakeLists.txt b/tests/auto/gui/math3d/qmatrixnxn/CMakeLists.txt new file mode 100644 index 0000000000..f1758bf473 --- /dev/null +++ b/tests/auto/gui/math3d/qmatrixnxn/CMakeLists.txt @@ -0,0 +1,5 @@ +add_qt_test(tst_qmatrixnxn + SOURCES tst_qmatrixnxn.cpp + DEFINES QT_DISABLE_DEPRECATED_BEFORE=0 + LIBRARIES Qt::Gui +) diff --git a/tests/auto/gui/math3d/qquaternion/CMakeLists.txt b/tests/auto/gui/math3d/qquaternion/CMakeLists.txt new file mode 100644 index 0000000000..dd53422535 --- /dev/null +++ b/tests/auto/gui/math3d/qquaternion/CMakeLists.txt @@ -0,0 +1 @@ +add_qt_test(tst_qquaternion SOURCES tst_qquaternion.cpp LIBRARIES Qt::Gui) diff --git a/tests/auto/gui/math3d/qvectornd/CMakeLists.txt b/tests/auto/gui/math3d/qvectornd/CMakeLists.txt new file mode 100644 index 0000000000..7a4321740f --- /dev/null +++ b/tests/auto/gui/math3d/qvectornd/CMakeLists.txt @@ -0,0 +1 @@ +add_qt_test(tst_qvectornd SOURCES tst_qvectornd.cpp LIBRARIES Qt::Gui) diff --git a/tests/auto/gui/painting/CMakeLists.txt b/tests/auto/gui/painting/CMakeLists.txt new file mode 100644 index 0000000000..fc62e50c1e --- /dev/null +++ b/tests/auto/gui/painting/CMakeLists.txt @@ -0,0 +1,19 @@ +# Generated from painting.pro. + +add_subdirectory("qpainterpath") +add_subdirectory("qpainterpathstroker") +# add_subdirectory("qcolor") +# add_subdirectory("qbrush") +# add_subdirectory("qregion") +# add_subdirectory("qpagelayout") +add_subdirectory("qpagesize") +# add_subdirectory("qpainter") +if (QT_FEATURE_private_tests) + add_subdirectory("qpathclipper") +endif() +# add_subdirectory("qpdfwriter") +add_subdirectory("qpen") +add_subdirectory("qpaintengine") +# add_subdirectory("qtransform") +# add_subdirectory("qwmatrix") +# add_subdirectory("qpolygon") diff --git a/tests/auto/gui/painting/qpagesize/CMakeLists.txt b/tests/auto/gui/painting/qpagesize/CMakeLists.txt new file mode 100644 index 0000000000..73e7dcfd6b --- /dev/null +++ b/tests/auto/gui/painting/qpagesize/CMakeLists.txt @@ -0,0 +1 @@ +add_qt_test(tst_qpagesize SOURCES tst_qpagesize.cpp LIBRARIES Qt::Gui) diff --git a/tests/auto/gui/painting/qpaintengine/CMakeLists.txt b/tests/auto/gui/painting/qpaintengine/CMakeLists.txt new file mode 100644 index 0000000000..d361a5707b --- /dev/null +++ b/tests/auto/gui/painting/qpaintengine/CMakeLists.txt @@ -0,0 +1 @@ +add_qt_test(tst_qpaintengine SOURCES tst_qpaintengine.cpp LIBRARIES Qt::Gui) diff --git a/tests/auto/gui/painting/qpainterpath/CMakeLists.txt b/tests/auto/gui/painting/qpainterpath/CMakeLists.txt new file mode 100644 index 0000000000..3e4880ae63 --- /dev/null +++ b/tests/auto/gui/painting/qpainterpath/CMakeLists.txt @@ -0,0 +1 @@ +add_qt_test(tst_qpainterpath SOURCES tst_qpainterpath.cpp LIBRARIES Qt::Gui) diff --git a/tests/auto/gui/painting/qpainterpathstroker/CMakeLists.txt b/tests/auto/gui/painting/qpainterpathstroker/CMakeLists.txt new file mode 100644 index 0000000000..15279ca69f --- /dev/null +++ b/tests/auto/gui/painting/qpainterpathstroker/CMakeLists.txt @@ -0,0 +1 @@ +add_qt_test(tst_qpainterpathstroker SOURCES tst_qpainterpathstroker.cpp LIBRARIES Qt::Gui) diff --git a/tests/auto/gui/painting/qpen/CMakeLists.txt b/tests/auto/gui/painting/qpen/CMakeLists.txt new file mode 100644 index 0000000000..99668679ff --- /dev/null +++ b/tests/auto/gui/painting/qpen/CMakeLists.txt @@ -0,0 +1 @@ +add_qt_test(tst_qpen SOURCES tst_qpen.cpp LIBRARIES Qt::Gui) diff --git a/tests/auto/gui/util/CMakeLists.txt b/tests/auto/gui/util/CMakeLists.txt new file mode 100644 index 0000000000..c7dec5460d --- /dev/null +++ b/tests/auto/gui/util/CMakeLists.txt @@ -0,0 +1,13 @@ +# Generated from util.pro. + +# add_subdirectory("qdesktopservices") +add_subdirectory("qdoublevalidator") +add_subdirectory("qintvalidator") +add_subdirectory("qregexpvalidator") +add_subdirectory("qregularexpressionvalidator") +# add_subdirectory("qshadergenerator") +# add_subdirectory("qshadergraph") +# add_subdirectory("qshadergraphloader") +# add_subdirectory("qshadernodes") +# add_subdirectory("qshadernodesloader") +# add_subdirectory("qtexturefilereader") diff --git a/tests/auto/gui/util/qdoublevalidator/CMakeLists.txt b/tests/auto/gui/util/qdoublevalidator/CMakeLists.txt new file mode 100644 index 0000000000..5d6bf2ceea --- /dev/null +++ b/tests/auto/gui/util/qdoublevalidator/CMakeLists.txt @@ -0,0 +1 @@ +add_qt_test(tst_qdoublevalidator SOURCES tst_qdoublevalidator.cpp LIBRARIES Qt::Gui) diff --git a/tests/auto/gui/util/qintvalidator/CMakeLists.txt b/tests/auto/gui/util/qintvalidator/CMakeLists.txt new file mode 100644 index 0000000000..54bb16e248 --- /dev/null +++ b/tests/auto/gui/util/qintvalidator/CMakeLists.txt @@ -0,0 +1 @@ +add_qt_test(tst_qintvalidator SOURCES tst_qintvalidator.cpp LIBRARIES Qt::Gui) diff --git a/tests/auto/gui/util/qregexpvalidator/CMakeLists.txt b/tests/auto/gui/util/qregexpvalidator/CMakeLists.txt new file mode 100644 index 0000000000..1447d702ec --- /dev/null +++ b/tests/auto/gui/util/qregexpvalidator/CMakeLists.txt @@ -0,0 +1 @@ +add_qt_test(tst_qregexpvalidator SOURCES tst_qregexpvalidator.cpp LIBRARIES Qt::Gui) diff --git a/tests/auto/gui/util/qregularexpressionvalidator/CMakeLists.txt b/tests/auto/gui/util/qregularexpressionvalidator/CMakeLists.txt new file mode 100644 index 0000000000..8d57b0fa08 --- /dev/null +++ b/tests/auto/gui/util/qregularexpressionvalidator/CMakeLists.txt @@ -0,0 +1 @@ +add_qt_test(tst_qregularexpressionvalidator SOURCES tst_qregularexpressionvalidator.cpp LIBRARIES Qt::Gui) diff --git a/tests/auto/opengl/CMakeLists.txt b/tests/auto/opengl/CMakeLists.txt new file mode 100644 index 0000000000..54238c1fa6 --- /dev/null +++ b/tests/auto/opengl/CMakeLists.txt @@ -0,0 +1,6 @@ +# Generated from opengl.pro. + +add_subdirectory(qgl) +add_subdirectory(qglbuffer) +add_subdirectory(qglfunctions) +add_subdirectory(qglthreads) diff --git a/tests/auto/opengl/qgl/CMakeLists.txt b/tests/auto/opengl/qgl/CMakeLists.txt new file mode 100644 index 0000000000..77c0afca75 --- /dev/null +++ b/tests/auto/opengl/qgl/CMakeLists.txt @@ -0,0 +1,7 @@ +add_qt_test("tst_qgl" SOURCES qgl.qrc tst_qgl.cpp + LIBRARIES + Qt::WidgetsPrivate + Qt::OpenGLPrivate + Qt::GuiPrivate + Qt::CorePrivate +) diff --git a/tests/auto/opengl/qglbuffer/CMakeLists.txt b/tests/auto/opengl/qglbuffer/CMakeLists.txt new file mode 100644 index 0000000000..96296846b4 --- /dev/null +++ b/tests/auto/opengl/qglbuffer/CMakeLists.txt @@ -0,0 +1 @@ +add_qt_test("tst_qglbuffer" SOURCES tst_qglbuffer.cpp LIBRARIES Qt::OpenGL Qt::Widgets) diff --git a/tests/auto/opengl/qglfunctions/CMakeLists.txt b/tests/auto/opengl/qglfunctions/CMakeLists.txt new file mode 100644 index 0000000000..21a0766ac2 --- /dev/null +++ b/tests/auto/opengl/qglfunctions/CMakeLists.txt @@ -0,0 +1 @@ +add_qt_test("tst_qglfunctions" SOURCES tst_qglfunctions.cpp LIBRARIES Qt::OpenGL Qt::Widgets) diff --git a/tests/auto/opengl/qglthreads/CMakeLists.txt b/tests/auto/opengl/qglthreads/CMakeLists.txt new file mode 100644 index 0000000000..0564fe3e6f --- /dev/null +++ b/tests/auto/opengl/qglthreads/CMakeLists.txt @@ -0,0 +1,7 @@ +add_qt_test("tst_qglthreads" SOURCES tst_qglthreads.cpp tst_qglthreads.h + LIBRARIES + Qt::OpenGL + Qt::Widgets + Qt::GuiPrivate + Qt::CorePrivate +) diff --git a/tests/auto/other/qtokenautomaton/CMakeLists.txt b/tests/auto/other/qtokenautomaton/CMakeLists.txt new file mode 100644 index 0000000000..394dc614f1 --- /dev/null +++ b/tests/auto/other/qtokenautomaton/CMakeLists.txt @@ -0,0 +1,15 @@ +add_qt_test(tst_qtokenautomaton SOURCES + tst_qtokenautomaton.cpp + tokenizers/basic/basic.cpp + tokenizers/basicNamespace/basicNamespace.cpp + tokenizers/boilerplate/boilerplate.cpp + tokenizers/noNamespace/noNamespace.cpp + tokenizers/noToString/noToString.cpp + tokenizers/withNamespace/withNamespace.cpp + tokenizers/basic/basic.h + tokenizers/basicNamespace/basicNamespace.h + tokenizers/boilerplate/boilerplate.h + tokenizers/noNamespace/noNamespace.h + tokenizers/noToString/noToString.h + tokenizers/withNamespace/withNamespace.h +) diff --git a/tests/auto/other/toolsupport/CMakeLists.txt b/tests/auto/other/toolsupport/CMakeLists.txt new file mode 100644 index 0000000000..637a00bffc --- /dev/null +++ b/tests/auto/other/toolsupport/CMakeLists.txt @@ -0,0 +1 @@ +add_qt_test(tst_toolsupport SOURCES tst_toolsupport.cpp LIBRARIES Qt::CorePrivate) diff --git a/tests/auto/testlib/CMakeLists.txt b/tests/auto/testlib/CMakeLists.txt new file mode 100644 index 0000000000..ff2e0d6d8c --- /dev/null +++ b/tests/auto/testlib/CMakeLists.txt @@ -0,0 +1,4 @@ +## add_subdirectory(qabstractitemmodeltester) # FIXME: Needs GUI +add_subdirectory(qsignalspy) +add_subdirectory(selftests) + diff --git a/tests/auto/testlib/qabstractitemmodeltester/CMakeLists.txt b/tests/auto/testlib/qabstractitemmodeltester/CMakeLists.txt new file mode 100644 index 0000000000..f99b57a1fd --- /dev/null +++ b/tests/auto/testlib/qabstractitemmodeltester/CMakeLists.txt @@ -0,0 +1,8 @@ +add_qt_test(tst_qabstractitemmodeltester SOURCES + tst_qabstractitemmodeltester.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/../../other/qabstractitemmodelutils/dynamictreemodel.cpp + INCLUDE_DIRECTORIES + ${CMAKE_CURRENT_SOURCE_DIR}/../../other/qabstractitemmodelutils + INCLUDED_MOC + tst_qabstractitemmodeltester.cpp +) diff --git a/tests/auto/testlib/qsignalspy/CMakeLists.txt b/tests/auto/testlib/qsignalspy/CMakeLists.txt new file mode 100644 index 0000000000..ffdaa28de4 --- /dev/null +++ b/tests/auto/testlib/qsignalspy/CMakeLists.txt @@ -0,0 +1 @@ +add_qt_test(tst_qsignalspy SOURCES tst_qsignalspy.cpp) diff --git a/tests/auto/testlib/selftests/CMakeLists.txt b/tests/auto/testlib/selftests/CMakeLists.txt new file mode 100644 index 0000000000..ff5aa8f311 --- /dev/null +++ b/tests/auto/testlib/selftests/CMakeLists.txt @@ -0,0 +1,42 @@ +# add_subdirectory(alive) # FIXME: Needs widgets +add_subdirectory(assert) +add_subdirectory(badxml) +add_subdirectory(benchlibcallgrind) +add_subdirectory(benchlibcounting) +add_subdirectory(benchlibeventcounter) +add_subdirectory(benchliboptions) +add_subdirectory(benchlibwalltime) +add_subdirectory(commandlinedata) +add_subdirectory(counting) +add_subdirectory(crashes) +add_subdirectory(datatable) +add_subdirectory(datetime) +add_subdirectory(deleteLater) +add_subdirectory(deleteLater_noApp) +add_subdirectory(differentexec) +add_subdirectory(expectfail) +add_subdirectory(failcleanup) +add_subdirectory(failinit) +add_subdirectory(failinitdata) +add_subdirectory(fetchbogus) +add_subdirectory(float) +add_subdirectory(globaldata) +add_subdirectory(longstring) +add_subdirectory(maxwarnings) +add_subdirectory(multiexec) +add_subdirectory(pairdiagnostics) +add_subdirectory(printdatatags) +add_subdirectory(printdatatagswithglobaltags) +add_subdirectory(qexecstringlist) +add_subdirectory(singleskip) +add_subdirectory(skip) +add_subdirectory(skipcleanup) +add_subdirectory(skipinit) +add_subdirectory(skipinitdata) +add_subdirectory(sleep) +add_subdirectory(strcmp) +add_subdirectory(subtest) +add_subdirectory(tuplediagnostics) +add_subdirectory(warnings) +add_subdirectory(xunit) + diff --git a/tests/auto/testlib/selftests/alive/CMakeLists.txt b/tests/auto/testlib/selftests/alive/CMakeLists.txt new file mode 100644 index 0000000000..3523c5b11e --- /dev/null +++ b/tests/auto/testlib/selftests/alive/CMakeLists.txt @@ -0,0 +1 @@ +add_qt_test(alive SOURCES tst_alive.cpp) diff --git a/tests/auto/testlib/selftests/assert/CMakeLists.txt b/tests/auto/testlib/selftests/assert/CMakeLists.txt new file mode 100644 index 0000000000..f988275038 --- /dev/null +++ b/tests/auto/testlib/selftests/assert/CMakeLists.txt @@ -0,0 +1 @@ +add_qt_test(assert SOURCES tst_assert.cpp) diff --git a/tests/auto/testlib/selftests/badxml/CMakeLists.txt b/tests/auto/testlib/selftests/badxml/CMakeLists.txt new file mode 100644 index 0000000000..9a709a2d7d --- /dev/null +++ b/tests/auto/testlib/selftests/badxml/CMakeLists.txt @@ -0,0 +1 @@ +add_qt_test(badxml SOURCES tst_badxml.cpp LIBRARIES Qt::CorePrivate) diff --git a/tests/auto/testlib/selftests/benchlibcallgrind/CMakeLists.txt b/tests/auto/testlib/selftests/benchlibcallgrind/CMakeLists.txt new file mode 100644 index 0000000000..f247623e6c --- /dev/null +++ b/tests/auto/testlib/selftests/benchlibcallgrind/CMakeLists.txt @@ -0,0 +1 @@ +add_qt_test(benchlibcallgrind SOURCES tst_benchlibcallgrind.cpp) diff --git a/tests/auto/testlib/selftests/benchlibcounting/CMakeLists.txt b/tests/auto/testlib/selftests/benchlibcounting/CMakeLists.txt new file mode 100644 index 0000000000..e8df2820d6 --- /dev/null +++ b/tests/auto/testlib/selftests/benchlibcounting/CMakeLists.txt @@ -0,0 +1 @@ +add_qt_test(benchlibcounting SOURCES tst_benchlibcounting.cpp) diff --git a/tests/auto/testlib/selftests/benchlibeventcounter/CMakeLists.txt b/tests/auto/testlib/selftests/benchlibeventcounter/CMakeLists.txt new file mode 100644 index 0000000000..b98c46c870 --- /dev/null +++ b/tests/auto/testlib/selftests/benchlibeventcounter/CMakeLists.txt @@ -0,0 +1 @@ +add_qt_test(benchlibeventcounter SOURCES tst_benchlibeventcounter.cpp) diff --git a/tests/auto/testlib/selftests/benchliboptions/CMakeLists.txt b/tests/auto/testlib/selftests/benchliboptions/CMakeLists.txt new file mode 100644 index 0000000000..c7e57e6080 --- /dev/null +++ b/tests/auto/testlib/selftests/benchliboptions/CMakeLists.txt @@ -0,0 +1 @@ +add_qt_test(benchliboptions SOURCES tst_benchliboptions.cpp) diff --git a/tests/auto/testlib/selftests/benchlibwalltime/CMakeLists.txt b/tests/auto/testlib/selftests/benchlibwalltime/CMakeLists.txt new file mode 100644 index 0000000000..d774fb95c0 --- /dev/null +++ b/tests/auto/testlib/selftests/benchlibwalltime/CMakeLists.txt @@ -0,0 +1 @@ +add_qt_test(benchlibwalltime SOURCES tst_benchlibwalltime.cpp) diff --git a/tests/auto/testlib/selftests/commandlinedata/CMakeLists.txt b/tests/auto/testlib/selftests/commandlinedata/CMakeLists.txt new file mode 100644 index 0000000000..a9d4fee477 --- /dev/null +++ b/tests/auto/testlib/selftests/commandlinedata/CMakeLists.txt @@ -0,0 +1 @@ +add_qt_test(commandlinedata SOURCES tst_commandlinedata.cpp) diff --git a/tests/auto/testlib/selftests/counting/CMakeLists.txt b/tests/auto/testlib/selftests/counting/CMakeLists.txt new file mode 100644 index 0000000000..bde163f663 --- /dev/null +++ b/tests/auto/testlib/selftests/counting/CMakeLists.txt @@ -0,0 +1 @@ +add_qt_test(counting SOURCES tst_counting.cpp) diff --git a/tests/auto/testlib/selftests/crashes/CMakeLists.txt b/tests/auto/testlib/selftests/crashes/CMakeLists.txt new file mode 100644 index 0000000000..046e0e0fcc --- /dev/null +++ b/tests/auto/testlib/selftests/crashes/CMakeLists.txt @@ -0,0 +1 @@ +add_qt_test(crashes SOURCES tst_crashes.cpp) diff --git a/tests/auto/testlib/selftests/datatable/CMakeLists.txt b/tests/auto/testlib/selftests/datatable/CMakeLists.txt new file mode 100644 index 0000000000..a6f5bd10a7 --- /dev/null +++ b/tests/auto/testlib/selftests/datatable/CMakeLists.txt @@ -0,0 +1 @@ +add_qt_test(datatable SOURCES tst_datatable.cpp) diff --git a/tests/auto/testlib/selftests/datetime/CMakeLists.txt b/tests/auto/testlib/selftests/datetime/CMakeLists.txt new file mode 100644 index 0000000000..989f9b242c --- /dev/null +++ b/tests/auto/testlib/selftests/datetime/CMakeLists.txt @@ -0,0 +1 @@ +add_qt_test(datetime SOURCES tst_datetime.cpp) diff --git a/tests/auto/testlib/selftests/deleteLater/CMakeLists.txt b/tests/auto/testlib/selftests/deleteLater/CMakeLists.txt new file mode 100644 index 0000000000..e07f87a111 --- /dev/null +++ b/tests/auto/testlib/selftests/deleteLater/CMakeLists.txt @@ -0,0 +1 @@ +add_qt_test(tst_deleteLater SOURCES tst_deleteLater.cpp) diff --git a/tests/auto/testlib/selftests/deleteLater_noApp/CMakeLists.txt b/tests/auto/testlib/selftests/deleteLater_noApp/CMakeLists.txt new file mode 100644 index 0000000000..cd2818e2f7 --- /dev/null +++ b/tests/auto/testlib/selftests/deleteLater_noApp/CMakeLists.txt @@ -0,0 +1 @@ +add_qt_test(tst_deleteLater_noApp SOURCES tst_deleteLater_noApp.cpp) diff --git a/tests/auto/testlib/selftests/differentexec/CMakeLists.txt b/tests/auto/testlib/selftests/differentexec/CMakeLists.txt new file mode 100644 index 0000000000..9dd4fb2e89 --- /dev/null +++ b/tests/auto/testlib/selftests/differentexec/CMakeLists.txt @@ -0,0 +1 @@ +add_qt_test(differentexec SOURCES tst_differentexec.cpp) diff --git a/tests/auto/testlib/selftests/expectfail/CMakeLists.txt b/tests/auto/testlib/selftests/expectfail/CMakeLists.txt new file mode 100644 index 0000000000..72dd051b7c --- /dev/null +++ b/tests/auto/testlib/selftests/expectfail/CMakeLists.txt @@ -0,0 +1 @@ +add_qt_test(expectfail SOURCES tst_expectfail.cpp) diff --git a/tests/auto/testlib/selftests/failcleanup/CMakeLists.txt b/tests/auto/testlib/selftests/failcleanup/CMakeLists.txt new file mode 100644 index 0000000000..d6dae7593f --- /dev/null +++ b/tests/auto/testlib/selftests/failcleanup/CMakeLists.txt @@ -0,0 +1 @@ +add_qt_test(failcleanup SOURCES tst_failcleanup.cpp) diff --git a/tests/auto/testlib/selftests/failinit/CMakeLists.txt b/tests/auto/testlib/selftests/failinit/CMakeLists.txt new file mode 100644 index 0000000000..11c0cacf7f --- /dev/null +++ b/tests/auto/testlib/selftests/failinit/CMakeLists.txt @@ -0,0 +1 @@ +add_qt_test(failinit SOURCES tst_failinit.cpp) diff --git a/tests/auto/testlib/selftests/failinitdata/CMakeLists.txt b/tests/auto/testlib/selftests/failinitdata/CMakeLists.txt new file mode 100644 index 0000000000..ac7f01423e --- /dev/null +++ b/tests/auto/testlib/selftests/failinitdata/CMakeLists.txt @@ -0,0 +1 @@ +add_qt_test(failinitdata SOURCES tst_failinitdata.cpp) diff --git a/tests/auto/testlib/selftests/fetchbogus/CMakeLists.txt b/tests/auto/testlib/selftests/fetchbogus/CMakeLists.txt new file mode 100644 index 0000000000..854f63ec20 --- /dev/null +++ b/tests/auto/testlib/selftests/fetchbogus/CMakeLists.txt @@ -0,0 +1 @@ +add_qt_test(fetchbogus SOURCES tst_fetchbogus.cpp) diff --git a/tests/auto/testlib/selftests/float/CMakeLists.txt b/tests/auto/testlib/selftests/float/CMakeLists.txt new file mode 100644 index 0000000000..6068aa3a1e --- /dev/null +++ b/tests/auto/testlib/selftests/float/CMakeLists.txt @@ -0,0 +1 @@ +add_qt_test(float SOURCES tst_float.cpp) diff --git a/tests/auto/testlib/selftests/globaldata/CMakeLists.txt b/tests/auto/testlib/selftests/globaldata/CMakeLists.txt new file mode 100644 index 0000000000..2722788c8e --- /dev/null +++ b/tests/auto/testlib/selftests/globaldata/CMakeLists.txt @@ -0,0 +1 @@ +add_qt_test(globaldata SOURCES tst_globaldata.cpp) diff --git a/tests/auto/testlib/selftests/longstring/CMakeLists.txt b/tests/auto/testlib/selftests/longstring/CMakeLists.txt new file mode 100644 index 0000000000..56912b6cd1 --- /dev/null +++ b/tests/auto/testlib/selftests/longstring/CMakeLists.txt @@ -0,0 +1 @@ +add_qt_test(longstring SOURCES tst_longstring.cpp) diff --git a/tests/auto/testlib/selftests/maxwarnings/CMakeLists.txt b/tests/auto/testlib/selftests/maxwarnings/CMakeLists.txt new file mode 100644 index 0000000000..c9077b32b0 --- /dev/null +++ b/tests/auto/testlib/selftests/maxwarnings/CMakeLists.txt @@ -0,0 +1 @@ +add_qt_test(maxwarnings SOURCES maxwarnings.cpp) diff --git a/tests/auto/testlib/selftests/multiexec/CMakeLists.txt b/tests/auto/testlib/selftests/multiexec/CMakeLists.txt new file mode 100644 index 0000000000..bee72b2b17 --- /dev/null +++ b/tests/auto/testlib/selftests/multiexec/CMakeLists.txt @@ -0,0 +1 @@ +add_qt_test(multiexec SOURCES tst_multiexec.cpp) diff --git a/tests/auto/testlib/selftests/pairdiagnostics/CMakeLists.txt b/tests/auto/testlib/selftests/pairdiagnostics/CMakeLists.txt new file mode 100644 index 0000000000..677be5403a --- /dev/null +++ b/tests/auto/testlib/selftests/pairdiagnostics/CMakeLists.txt @@ -0,0 +1 @@ +add_qt_test(pairdiagnostics SOURCES tst_pairdiagnostics.cpp) diff --git a/tests/auto/testlib/selftests/printdatatags/CMakeLists.txt b/tests/auto/testlib/selftests/printdatatags/CMakeLists.txt new file mode 100644 index 0000000000..778dcc184f --- /dev/null +++ b/tests/auto/testlib/selftests/printdatatags/CMakeLists.txt @@ -0,0 +1 @@ +add_qt_test(printdatatags SOURCES tst_printdatatags.cpp) diff --git a/tests/auto/testlib/selftests/printdatatagswithglobaltags/CMakeLists.txt b/tests/auto/testlib/selftests/printdatatagswithglobaltags/CMakeLists.txt new file mode 100644 index 0000000000..0942ed15d4 --- /dev/null +++ b/tests/auto/testlib/selftests/printdatatagswithglobaltags/CMakeLists.txt @@ -0,0 +1 @@ +add_qt_test(printdatatagswithglobaltags SOURCES tst_printdatatagswithglobaltags.cpp) diff --git a/tests/auto/testlib/selftests/qexecstringlist/CMakeLists.txt b/tests/auto/testlib/selftests/qexecstringlist/CMakeLists.txt new file mode 100644 index 0000000000..6429b5f531 --- /dev/null +++ b/tests/auto/testlib/selftests/qexecstringlist/CMakeLists.txt @@ -0,0 +1 @@ +add_qt_test(qexecstringlist SOURCES tst_qexecstringlist.cpp) diff --git a/tests/auto/testlib/selftests/singleskip/CMakeLists.txt b/tests/auto/testlib/selftests/singleskip/CMakeLists.txt new file mode 100644 index 0000000000..041b06aabb --- /dev/null +++ b/tests/auto/testlib/selftests/singleskip/CMakeLists.txt @@ -0,0 +1 @@ +add_qt_test(singleskip SOURCES tst_singleskip.cpp) diff --git a/tests/auto/testlib/selftests/skip/CMakeLists.txt b/tests/auto/testlib/selftests/skip/CMakeLists.txt new file mode 100644 index 0000000000..974020cdbc --- /dev/null +++ b/tests/auto/testlib/selftests/skip/CMakeLists.txt @@ -0,0 +1 @@ +add_qt_test(skip SOURCES tst_skip.cpp) diff --git a/tests/auto/testlib/selftests/skipcleanup/CMakeLists.txt b/tests/auto/testlib/selftests/skipcleanup/CMakeLists.txt new file mode 100644 index 0000000000..bf8c6e7ade --- /dev/null +++ b/tests/auto/testlib/selftests/skipcleanup/CMakeLists.txt @@ -0,0 +1 @@ +add_qt_test(skipcleanup SOURCES tst_skipcleanup.cpp) diff --git a/tests/auto/testlib/selftests/skipinit/CMakeLists.txt b/tests/auto/testlib/selftests/skipinit/CMakeLists.txt new file mode 100644 index 0000000000..a9eb542e1c --- /dev/null +++ b/tests/auto/testlib/selftests/skipinit/CMakeLists.txt @@ -0,0 +1 @@ +add_qt_test(skipinit SOURCES tst_skipinit.cpp) diff --git a/tests/auto/testlib/selftests/skipinitdata/CMakeLists.txt b/tests/auto/testlib/selftests/skipinitdata/CMakeLists.txt new file mode 100644 index 0000000000..cc38fed14f --- /dev/null +++ b/tests/auto/testlib/selftests/skipinitdata/CMakeLists.txt @@ -0,0 +1 @@ +add_qt_test(skipinitdata SOURCES tst_skipinitdata.cpp) diff --git a/tests/auto/testlib/selftests/sleep/CMakeLists.txt b/tests/auto/testlib/selftests/sleep/CMakeLists.txt new file mode 100644 index 0000000000..49c5e97ac2 --- /dev/null +++ b/tests/auto/testlib/selftests/sleep/CMakeLists.txt @@ -0,0 +1 @@ +add_qt_test(sleep SOURCES tst_sleep.cpp) diff --git a/tests/auto/testlib/selftests/strcmp/CMakeLists.txt b/tests/auto/testlib/selftests/strcmp/CMakeLists.txt new file mode 100644 index 0000000000..cb50518af2 --- /dev/null +++ b/tests/auto/testlib/selftests/strcmp/CMakeLists.txt @@ -0,0 +1 @@ +add_qt_test(strcmp SOURCES tst_strcmp.cpp) diff --git a/tests/auto/testlib/selftests/subtest/CMakeLists.txt b/tests/auto/testlib/selftests/subtest/CMakeLists.txt new file mode 100644 index 0000000000..434fd88563 --- /dev/null +++ b/tests/auto/testlib/selftests/subtest/CMakeLists.txt @@ -0,0 +1 @@ +add_qt_test(subtest SOURCES tst_subtest.cpp) diff --git a/tests/auto/testlib/selftests/tuplediagnostics/CMakeLists.txt b/tests/auto/testlib/selftests/tuplediagnostics/CMakeLists.txt new file mode 100644 index 0000000000..1dfe64c642 --- /dev/null +++ b/tests/auto/testlib/selftests/tuplediagnostics/CMakeLists.txt @@ -0,0 +1 @@ +add_qt_test(tuplediagnostics SOURCES tst_tuplediagnostics.cpp) diff --git a/tests/auto/testlib/selftests/warnings/CMakeLists.txt b/tests/auto/testlib/selftests/warnings/CMakeLists.txt new file mode 100644 index 0000000000..35f53f2822 --- /dev/null +++ b/tests/auto/testlib/selftests/warnings/CMakeLists.txt @@ -0,0 +1 @@ +add_qt_test(warnings SOURCES tst_warnings.cpp) diff --git a/tests/auto/testlib/selftests/xunit/CMakeLists.txt b/tests/auto/testlib/selftests/xunit/CMakeLists.txt new file mode 100644 index 0000000000..8c151ab1ac --- /dev/null +++ b/tests/auto/testlib/selftests/xunit/CMakeLists.txt @@ -0,0 +1 @@ +add_qt_test(xunit SOURCES tst_xunit.cpp) diff --git a/tests/auto/tools/qdbusxml2cpp/CMakeLists.txt b/tests/auto/tools/qdbusxml2cpp/CMakeLists.txt new file mode 100644 index 0000000000..c6dbbcdc3a --- /dev/null +++ b/tests/auto/tools/qdbusxml2cpp/CMakeLists.txt @@ -0,0 +1 @@ +add_qt_test(tst_qdbusxml2cpp SOURCES tst_qdbusxml2cpp.cpp) diff --git a/tests/auto/tools/uic/CMakeLists.txt b/tests/auto/tools/uic/CMakeLists.txt new file mode 100644 index 0000000000..22d43d9868 --- /dev/null +++ b/tests/auto/tools/uic/CMakeLists.txt @@ -0,0 +1 @@ +add_qt_test(tst_uic SOURCES tst_uic.cpp) diff --git a/tests/auto/widgets/CMakeLists.txt b/tests/auto/widgets/CMakeLists.txt new file mode 100644 index 0000000000..5870f28db0 --- /dev/null +++ b/tests/auto/widgets/CMakeLists.txt @@ -0,0 +1,10 @@ +# Generated from widgets.pro. + +add_subdirectory(dialogs) +add_subdirectory(effects) +add_subdirectory(graphicsview) +add_subdirectory(itemviews) +add_subdirectory(kernel) +add_subdirectory(styles) +add_subdirectory(util) +add_subdirectory(widgets) diff --git a/tests/auto/widgets/dialogs/CMakeLists.txt b/tests/auto/widgets/dialogs/CMakeLists.txt new file mode 100644 index 0000000000..508093e7ad --- /dev/null +++ b/tests/auto/widgets/dialogs/CMakeLists.txt @@ -0,0 +1,19 @@ +add_subdirectory(qcolordialog) +add_subdirectory(qdialog) +add_subdirectory(qerrormessage) +if (NOT WINRT) + add_subdirectory(qfiledialog) + add_subdirectory(qfiledialog2) + add_subdirectory(qmessagebox) +endif() +if (NOT CMAKE_CXX_COMPILER_ID STREQUAL "GNU" OR NOT WIN32) + add_subdirectory(qfilesystemmodel) +endif() +add_subdirectory(qfontdialog) +add_subdirectory(qinputdialog) +add_subdirectory(qprogressdialog) +if (QT_FEATURE_private_tests) + add_subdirectory(qsidebar) +endif() +add_subdirectory(qwizard) + diff --git a/tests/auto/widgets/dialogs/qcolordialog/CMakeLists.txt b/tests/auto/widgets/dialogs/qcolordialog/CMakeLists.txt new file mode 100644 index 0000000000..c025189fd5 --- /dev/null +++ b/tests/auto/widgets/dialogs/qcolordialog/CMakeLists.txt @@ -0,0 +1 @@ +add_qt_test("tst_qcolordialog" SOURCES tst_qcolordialog.cpp LIBRARIES Qt::Widgets) diff --git a/tests/auto/widgets/dialogs/qdialog/CMakeLists.txt b/tests/auto/widgets/dialogs/qdialog/CMakeLists.txt new file mode 100644 index 0000000000..1164e9ed6a --- /dev/null +++ b/tests/auto/widgets/dialogs/qdialog/CMakeLists.txt @@ -0,0 +1,8 @@ +add_qt_test("tst_qdialog" + SOURCES + tst_qdialog.cpp + LIBRARIES + Qt::Widgets + Qt::GuiPrivate + Qt::CorePrivate +) diff --git a/tests/auto/widgets/dialogs/qerrormessage/CMakeLists.txt b/tests/auto/widgets/dialogs/qerrormessage/CMakeLists.txt new file mode 100644 index 0000000000..f1b03de367 --- /dev/null +++ b/tests/auto/widgets/dialogs/qerrormessage/CMakeLists.txt @@ -0,0 +1 @@ +add_qt_test("tst_qerrormessage" SOURCES tst_qerrormessage.cpp LIBRARIES Qt::Widgets) diff --git a/tests/auto/widgets/dialogs/qfiledialog/CMakeLists.txt b/tests/auto/widgets/dialogs/qfiledialog/CMakeLists.txt new file mode 100644 index 0000000000..7c22f8fa7b --- /dev/null +++ b/tests/auto/widgets/dialogs/qfiledialog/CMakeLists.txt @@ -0,0 +1,9 @@ +add_qt_test("tst_qfiledialog" + SOURCES tst_qfiledialog.cpp + DEFINES SRCDIR="${CMAKE_CURRENT_SOURCE_DIR}/" + LIBRARIES + Qt::WidgetsPrivate + Qt::CorePrivate + Qt::GuiPrivate +) + diff --git a/tests/auto/widgets/dialogs/qfiledialog2/CMakeLists.txt b/tests/auto/widgets/dialogs/qfiledialog2/CMakeLists.txt new file mode 100644 index 0000000000..7bf7b09de1 --- /dev/null +++ b/tests/auto/widgets/dialogs/qfiledialog2/CMakeLists.txt @@ -0,0 +1,10 @@ +add_qt_test("tst_qfiledialog2" + SOURCES + tst_qfiledialog2.cpp + DEFINES + SRCDIR="${CMAKE_CURRENT_SOURCE_DIR}/" + LIBRARIES + Qt::WidgetsPrivate + Qt::CorePrivate + Qt::GuiPrivate +) diff --git a/tests/auto/widgets/dialogs/qfilesystemmodel/CMakeLists.txt b/tests/auto/widgets/dialogs/qfilesystemmodel/CMakeLists.txt new file mode 100644 index 0000000000..bf615c6805 --- /dev/null +++ b/tests/auto/widgets/dialogs/qfilesystemmodel/CMakeLists.txt @@ -0,0 +1,5 @@ +add_qt_test("tst_qfilesystemmodel" SOURCES tst_qfilesystemmodel.cpp + LIBRARIES + Qt::WidgetsPrivate + Qt::CorePrivate +) diff --git a/tests/auto/widgets/dialogs/qfontdialog/CMakeLists.txt b/tests/auto/widgets/dialogs/qfontdialog/CMakeLists.txt new file mode 100644 index 0000000000..099fee7a51 --- /dev/null +++ b/tests/auto/widgets/dialogs/qfontdialog/CMakeLists.txt @@ -0,0 +1,9 @@ +add_qt_test("tst_qfontdialog" + SOURCES + testfonts.qrc + tst_qfontdialog.cpp + LIBRARIES + Qt::WidgetsPrivate + Qt::CorePrivate + Qt::GuiPrivate +) diff --git a/tests/auto/widgets/dialogs/qinputdialog/CMakeLists.txt b/tests/auto/widgets/dialogs/qinputdialog/CMakeLists.txt new file mode 100644 index 0000000000..4abe554291 --- /dev/null +++ b/tests/auto/widgets/dialogs/qinputdialog/CMakeLists.txt @@ -0,0 +1 @@ +add_qt_test("tst_qinputdialog" SOURCES tst_qinputdialog.cpp LIBRARIES Qt::WidgetsPrivate) diff --git a/tests/auto/widgets/dialogs/qmessagebox/CMakeLists.txt b/tests/auto/widgets/dialogs/qmessagebox/CMakeLists.txt new file mode 100644 index 0000000000..785a1a0184 --- /dev/null +++ b/tests/auto/widgets/dialogs/qmessagebox/CMakeLists.txt @@ -0,0 +1,6 @@ +add_qt_test("tst_qmessagebox" SOURCES tst_qmessagebox.cpp + LIBRARIES + Qt::GuiPrivate + Qt::CorePrivate + Qt::Widgets +) diff --git a/tests/auto/widgets/dialogs/qprogressdialog/CMakeLists.txt b/tests/auto/widgets/dialogs/qprogressdialog/CMakeLists.txt new file mode 100644 index 0000000000..894f2ab37e --- /dev/null +++ b/tests/auto/widgets/dialogs/qprogressdialog/CMakeLists.txt @@ -0,0 +1 @@ +add_qt_test("tst_qprogressdialog" SOURCES tst_qprogressdialog.cpp LIBRARIES Qt::Widgets) diff --git a/tests/auto/widgets/dialogs/qsidebar/CMakeLists.txt b/tests/auto/widgets/dialogs/qsidebar/CMakeLists.txt new file mode 100644 index 0000000000..6f92dc58fc --- /dev/null +++ b/tests/auto/widgets/dialogs/qsidebar/CMakeLists.txt @@ -0,0 +1,5 @@ +add_qt_test("tst_qsidebar" SOURCES tst_qsidebar.cpp + LIBRARIES + Qt::CorePrivate + Qt::WidgetsPrivate +) diff --git a/tests/auto/widgets/dialogs/qwizard/CMakeLists.txt b/tests/auto/widgets/dialogs/qwizard/CMakeLists.txt new file mode 100644 index 0000000000..3d88e2cb69 --- /dev/null +++ b/tests/auto/widgets/dialogs/qwizard/CMakeLists.txt @@ -0,0 +1,8 @@ +add_qt_test("tst_qwizard" + SOURCES + qwizard.qrc + tst_qwizard.cpp + tst_qwizard_2.cpp + LIBRARIES + Qt::Widgets +) diff --git a/tests/auto/widgets/effects/CMakeLists.txt b/tests/auto/widgets/effects/CMakeLists.txt new file mode 100644 index 0000000000..2e2045e33e --- /dev/null +++ b/tests/auto/widgets/effects/CMakeLists.txt @@ -0,0 +1,2 @@ +add_subdirectory(qgraphicseffect) +add_subdirectory(qpixmapfilter) diff --git a/tests/auto/widgets/effects/qgraphicseffect/CMakeLists.txt b/tests/auto/widgets/effects/qgraphicseffect/CMakeLists.txt new file mode 100644 index 0000000000..e3388bba73 --- /dev/null +++ b/tests/auto/widgets/effects/qgraphicseffect/CMakeLists.txt @@ -0,0 +1,6 @@ +add_qt_test("tst_qgraphicseffect" SOURCES tst_qgraphicseffect.cpp + LIBRARIES + Qt::WidgetsPrivate + Qt::CorePrivate + Qt::GuiPrivate +) diff --git a/tests/auto/widgets/effects/qpixmapfilter/CMakeLists.txt b/tests/auto/widgets/effects/qpixmapfilter/CMakeLists.txt new file mode 100644 index 0000000000..5d7df75bac --- /dev/null +++ b/tests/auto/widgets/effects/qpixmapfilter/CMakeLists.txt @@ -0,0 +1,5 @@ +add_qt_test("tst_qpixmapfilter" SOURCES tst_qpixmapfilter.cpp + LIBRARIES + Qt::WidgetsPrivate + Qt::GuiPrivate +) diff --git a/tests/auto/widgets/graphicsview/CMakeLists.txt b/tests/auto/widgets/graphicsview/CMakeLists.txt new file mode 100644 index 0000000000..8007ac18a0 --- /dev/null +++ b/tests/auto/widgets/graphicsview/CMakeLists.txt @@ -0,0 +1,25 @@ +if (QT_FEATURE_private_tests) + add_subdirectory(qgraphicsanchorlayout) + add_subdirectory(qgraphicsanchorlayout1) + add_subdirectory(qgraphicsitem) + add_subdirectory(qgraphicsscene) + add_subdirectory(qgraphicssceneindex) +endif() +add_subdirectory(qgraphicseffectsource) +add_subdirectory(qgraphicsgridlayout) +add_subdirectory(qgraphicsitemanimation) +add_subdirectory(qgraphicslayout) +add_subdirectory(qgraphicslayoutitem) +add_subdirectory(qgraphicslinearlayout) +add_subdirectory(qgraphicsobject) +add_subdirectory(qgraphicspixmapitem) +add_subdirectory(qgraphicspolygonitem) +add_subdirectory(qgraphicstransform) +if (NOT WINRT) + add_subdirectory(qgraphicsview) +endif() + +if(FALSE) # FIXME: How to test for fusion style?! + add_subdirectory(qgraphicsproxywidget) + add_subdirectory(qgraphicswidget) +endif() diff --git a/tests/auto/widgets/graphicsview/qgraphicsanchorlayout/CMakeLists.txt b/tests/auto/widgets/graphicsview/qgraphicsanchorlayout/CMakeLists.txt new file mode 100644 index 0000000000..6e97335a9a --- /dev/null +++ b/tests/auto/widgets/graphicsview/qgraphicsanchorlayout/CMakeLists.txt @@ -0,0 +1,6 @@ +add_qt_test("tst_qgraphicsanchorlayout" SOURCES tst_qgraphicsanchorlayout.cpp + LIBRARIES + Qt::WidgetsPrivate + Qt::CorePrivate + Qt::GuiPrivate +) diff --git a/tests/auto/widgets/graphicsview/qgraphicsanchorlayout1/CMakeLists.txt b/tests/auto/widgets/graphicsview/qgraphicsanchorlayout1/CMakeLists.txt new file mode 100644 index 0000000000..ef52c03bc8 --- /dev/null +++ b/tests/auto/widgets/graphicsview/qgraphicsanchorlayout1/CMakeLists.txt @@ -0,0 +1,6 @@ +add_qt_test("tst_qgraphicsanchorlayout1" SOURCES tst_qgraphicsanchorlayout1.cpp + LIBRARIES + Qt::WidgetsPrivate + Qt::CorePrivate + Qt::GuiPrivate +) diff --git a/tests/auto/widgets/graphicsview/qgraphicseffectsource/CMakeLists.txt b/tests/auto/widgets/graphicsview/qgraphicseffectsource/CMakeLists.txt new file mode 100644 index 0000000000..51add34605 --- /dev/null +++ b/tests/auto/widgets/graphicsview/qgraphicseffectsource/CMakeLists.txt @@ -0,0 +1,6 @@ +add_qt_test("tst_qgraphicseffectsource" SOURCES tst_qgraphicseffectsource.cpp + LIBRARIES + Qt::WidgetsPrivate + Qt::CorePrivate + Qt::GuiPrivate +) diff --git a/tests/auto/widgets/graphicsview/qgraphicsgridlayout/CMakeLists.txt b/tests/auto/widgets/graphicsview/qgraphicsgridlayout/CMakeLists.txt new file mode 100644 index 0000000000..ecb90ea557 --- /dev/null +++ b/tests/auto/widgets/graphicsview/qgraphicsgridlayout/CMakeLists.txt @@ -0,0 +1 @@ +add_qt_test("tst_qgraphicsgridlayout" SOURCES tst_qgraphicsgridlayout.cpp LIBRARIES Qt::Widgets) diff --git a/tests/auto/widgets/graphicsview/qgraphicsitem/CMakeLists.txt b/tests/auto/widgets/graphicsview/qgraphicsitem/CMakeLists.txt new file mode 100644 index 0000000000..e5446407ab --- /dev/null +++ b/tests/auto/widgets/graphicsview/qgraphicsitem/CMakeLists.txt @@ -0,0 +1,11 @@ +add_qt_test("tst_qgraphicsitem" SOURCES tst_qgraphicsitem.cpp + DEFINES + QT_NO_CAST_TO_ASCII + LIBRARIES + Qt::WidgetsPrivate + Qt::TestPrivate + Qt::CorePrivate + Qt::GuiPrivate +) + +extend_target("tst_qgraphicsitem" CONDITION WIN32 AND NOT WINRT LIBRARIES -luser32) diff --git a/tests/auto/widgets/graphicsview/qgraphicsitemanimation/CMakeLists.txt b/tests/auto/widgets/graphicsview/qgraphicsitemanimation/CMakeLists.txt new file mode 100644 index 0000000000..7fe81cb6ea --- /dev/null +++ b/tests/auto/widgets/graphicsview/qgraphicsitemanimation/CMakeLists.txt @@ -0,0 +1,6 @@ +add_qt_test("tst_qgraphicsitemanimation" SOURCES tst_qgraphicsitemanimation.cpp + DEFINES + QT_NO_CAST_TO_ASCII + LIBRARIES + Qt::Widgets +) diff --git a/tests/auto/widgets/graphicsview/qgraphicslayout/CMakeLists.txt b/tests/auto/widgets/graphicsview/qgraphicslayout/CMakeLists.txt new file mode 100644 index 0000000000..65ae39ae8f --- /dev/null +++ b/tests/auto/widgets/graphicsview/qgraphicslayout/CMakeLists.txt @@ -0,0 +1,6 @@ +add_qt_test("tst_qgraphicslayout" SOURCES tst_qgraphicslayout.cpp + DEFINES + QT_USE_USING_NAMESPACE + LIBRARIES + Qt::Widgets +) diff --git a/tests/auto/widgets/graphicsview/qgraphicslayoutitem/CMakeLists.txt b/tests/auto/widgets/graphicsview/qgraphicslayoutitem/CMakeLists.txt new file mode 100644 index 0000000000..8f1e57ea47 --- /dev/null +++ b/tests/auto/widgets/graphicsview/qgraphicslayoutitem/CMakeLists.txt @@ -0,0 +1 @@ +add_qt_test("tst_qgraphicslayoutitem" SOURCES tst_qgraphicslayoutitem.cpp LIBRARIES Qt::Widgets) diff --git a/tests/auto/widgets/graphicsview/qgraphicslinearlayout/CMakeLists.txt b/tests/auto/widgets/graphicsview/qgraphicslinearlayout/CMakeLists.txt new file mode 100644 index 0000000000..b4d4b6630a --- /dev/null +++ b/tests/auto/widgets/graphicsview/qgraphicslinearlayout/CMakeLists.txt @@ -0,0 +1 @@ +add_qt_test("tst_qgraphicslinearlayout" SOURCES tst_qgraphicslinearlayout.cpp LIBRARIES Qt::Widgets) diff --git a/tests/auto/widgets/graphicsview/qgraphicsobject/CMakeLists.txt b/tests/auto/widgets/graphicsview/qgraphicsobject/CMakeLists.txt new file mode 100644 index 0000000000..8d5d7ddfe4 --- /dev/null +++ b/tests/auto/widgets/graphicsview/qgraphicsobject/CMakeLists.txt @@ -0,0 +1 @@ +add_qt_test("tst_qgraphicsobject" SOURCES tst_qgraphicsobject.cpp LIBRARIES Qt::Widgets Qt::CorePrivate) diff --git a/tests/auto/widgets/graphicsview/qgraphicspixmapitem/CMakeLists.txt b/tests/auto/widgets/graphicsview/qgraphicspixmapitem/CMakeLists.txt new file mode 100644 index 0000000000..d6c87306da --- /dev/null +++ b/tests/auto/widgets/graphicsview/qgraphicspixmapitem/CMakeLists.txt @@ -0,0 +1 @@ +add_qt_test("tst_qgraphicspixmapitem" SOURCES tst_qgraphicspixmapitem.cpp LIBRARIES Qt::Widgets) diff --git a/tests/auto/widgets/graphicsview/qgraphicspolygonitem/CMakeLists.txt b/tests/auto/widgets/graphicsview/qgraphicspolygonitem/CMakeLists.txt new file mode 100644 index 0000000000..df9f5c71fe --- /dev/null +++ b/tests/auto/widgets/graphicsview/qgraphicspolygonitem/CMakeLists.txt @@ -0,0 +1 @@ +add_qt_test("tst_qgraphicspolygonitem" SOURCES tst_qgraphicspolygonitem.cpp LIBRARIES Qt::Widgets) diff --git a/tests/auto/widgets/graphicsview/qgraphicsproxywidget/CMakeLists.txt b/tests/auto/widgets/graphicsview/qgraphicsproxywidget/CMakeLists.txt new file mode 100644 index 0000000000..0dd32c50dd --- /dev/null +++ b/tests/auto/widgets/graphicsview/qgraphicsproxywidget/CMakeLists.txt @@ -0,0 +1,10 @@ +add_qt_test("tst_qgraphicsproxywidget" + SOURCES + tst_qgraphicsproxywidget.cpp + DEFINES + QTEST_QPA_MOUSE_HANDLING + LIBRARIES + Qt::WidgetsPrivate + Qt::CorePrivate + Qt::GuiPrivate +) diff --git a/tests/auto/widgets/graphicsview/qgraphicsscene/CMakeLists.txt b/tests/auto/widgets/graphicsview/qgraphicsscene/CMakeLists.txt new file mode 100644 index 0000000000..e3c0ed8559 --- /dev/null +++ b/tests/auto/widgets/graphicsview/qgraphicsscene/CMakeLists.txt @@ -0,0 +1,15 @@ +add_qt_test("tst_qgraphicsscene" + SOURCES + images.qrc + testdata.qrc + tst_qgraphicsscene.cpp + DEFINES + SRCDIR="${CMAKE_CURRENT_SOURCE_DIR}" + QT_NO_CAST_TO_ASCII + LIBRARIES + Qt::WidgetsPrivate + Qt::CorePrivate + Qt::GuiPrivate +) + +extend_target("tst_qgraphicsscene" CONDITION WIN32 AND NOT WINRT LIBRARIES -luser32) diff --git a/tests/auto/widgets/graphicsview/qgraphicssceneindex/CMakeLists.txt b/tests/auto/widgets/graphicsview/qgraphicssceneindex/CMakeLists.txt new file mode 100644 index 0000000000..127e4d1d2f --- /dev/null +++ b/tests/auto/widgets/graphicsview/qgraphicssceneindex/CMakeLists.txt @@ -0,0 +1,6 @@ +add_qt_test("tst_qgraphicssceneindex" SOURCES tst_qgraphicssceneindex.cpp + LIBRARIES + Qt::WidgetsPrivate + Qt::CorePrivate + Qt::GuiPrivate +) diff --git a/tests/auto/widgets/graphicsview/qgraphicstransform/CMakeLists.txt b/tests/auto/widgets/graphicsview/qgraphicstransform/CMakeLists.txt new file mode 100644 index 0000000000..638432f39e --- /dev/null +++ b/tests/auto/widgets/graphicsview/qgraphicstransform/CMakeLists.txt @@ -0,0 +1 @@ +add_qt_test("tst_qgraphicstransform" SOURCES tst_qgraphicstransform.cpp LIBRARIES Qt::Widgets) diff --git a/tests/auto/widgets/graphicsview/qgraphicsview/CMakeLists.txt b/tests/auto/widgets/graphicsview/qgraphicsview/CMakeLists.txt new file mode 100644 index 0000000000..9541044cfd --- /dev/null +++ b/tests/auto/widgets/graphicsview/qgraphicsview/CMakeLists.txt @@ -0,0 +1,12 @@ +add_qt_test("tst_qgraphicsview" + SOURCES + tst_qgraphicsview.cpp tst_qgraphicsview.h + tst_qgraphicsview_2.cpp + DEFINES + QT_NO_CAST_TO_ASCII + LIBRARIES + Qt::WidgetsPrivate + Qt::CorePrivate + Qt::GuiPrivate + Qt::TestPrivate +) diff --git a/tests/auto/widgets/graphicsview/qgraphicswidget/CMakeLists.txt b/tests/auto/widgets/graphicsview/qgraphicswidget/CMakeLists.txt new file mode 100644 index 0000000000..dd84df4758 --- /dev/null +++ b/tests/auto/widgets/graphicsview/qgraphicswidget/CMakeLists.txt @@ -0,0 +1,6 @@ +add_qt_test("tst_qgraphicswidget" SOURCES tst_qgraphicswidget.cpp + LIBRARIES + Qt::WidgetsPrivate + Qt::CorePrivate + Qt::GuiPrivate +) diff --git a/tests/auto/widgets/itemviews/CMakeLists.txt b/tests/auto/widgets/itemviews/CMakeLists.txt new file mode 100644 index 0000000000..a1bbf052e8 --- /dev/null +++ b/tests/auto/widgets/itemviews/CMakeLists.txt @@ -0,0 +1,21 @@ +# Generated from itemviews.pro. + +add_subdirectory(qabstractitemview) +add_subdirectory(qdatawidgetmapper) +add_subdirectory(qdirmodel) +add_subdirectory(qfileiconprovider) +# add_subdirectory(qheaderview) ## FIXME: Fails to build! +add_subdirectory(qitemdelegate) +add_subdirectory(qitemeditorfactory) +add_subdirectory(qitemview) +add_subdirectory(qlistview) +add_subdirectory(qtableview) +add_subdirectory(qtablewidget) +add_subdirectory(qtreeview) +add_subdirectory(qtreewidget) +add_subdirectory(qtreewidgetitemiterator) + +if(QT_FEATURE_private_tests) + add_subdirectory(qcolumnview) + add_subdirectory(qlistwidget) +endif() diff --git a/tests/auto/widgets/itemviews/qabstractitemview/CMakeLists.txt b/tests/auto/widgets/itemviews/qabstractitemview/CMakeLists.txt new file mode 100644 index 0000000000..dbabcecf8a --- /dev/null +++ b/tests/auto/widgets/itemviews/qabstractitemview/CMakeLists.txt @@ -0,0 +1,5 @@ +add_qt_test("tst_qabstractitemview" SOURCES tst_qabstractitemview.cpp + LIBRARIES + Qt::Widgets + Qt::TestPrivate +) diff --git a/tests/auto/widgets/itemviews/qcolumnview/CMakeLists.txt b/tests/auto/widgets/itemviews/qcolumnview/CMakeLists.txt new file mode 100644 index 0000000000..07ae31be61 --- /dev/null +++ b/tests/auto/widgets/itemviews/qcolumnview/CMakeLists.txt @@ -0,0 +1,11 @@ +add_qt_test("tst_qcolumnview" + SOURCES + ../../../../shared/fakedirmodel.h + tst_qcolumnview.cpp + LIBRARIES + Qt::Widgets + Qt::WidgetsPrivate + Qt::GuiPrivate + Qt::CorePrivate + Qt::TestPrivate +) diff --git a/tests/auto/widgets/itemviews/qdatawidgetmapper/CMakeLists.txt b/tests/auto/widgets/itemviews/qdatawidgetmapper/CMakeLists.txt new file mode 100644 index 0000000000..ef7d9cf63e --- /dev/null +++ b/tests/auto/widgets/itemviews/qdatawidgetmapper/CMakeLists.txt @@ -0,0 +1 @@ +add_qt_test("tst_qdatawidgetmapper" SOURCES tst_qdatawidgetmapper.cpp LIBRARIES Qt::Widgets) diff --git a/tests/auto/widgets/itemviews/qdirmodel/CMakeLists.txt b/tests/auto/widgets/itemviews/qdirmodel/CMakeLists.txt new file mode 100644 index 0000000000..29ffde1801 --- /dev/null +++ b/tests/auto/widgets/itemviews/qdirmodel/CMakeLists.txt @@ -0,0 +1,19 @@ +add_qt_test("tst_qdirmodel" + SOURCES + ../../../../shared/emulationdetector.h + tst_qdirmodel.cpp + INCLUDE_DIRECTORIES + ../../../../shared/ + LIBRARIES + Qt::Widgets +) + +extend_target("tst_qdirmodel" CONDITION ANDROID DEFINES SRCDIR="./") + +extend_target("tst_qdirmodel" CONDITION NOT ANDROID + DEFINES SRCDIR="${CMAKE_CURRENT_SOURCE_DIR}/" +) + +extend_target("tst_qdirmodel" CONDITION ANDROID AND NOT ANDROID_EMBEDDED + SOURCES testdata.qrc +) diff --git a/tests/auto/widgets/itemviews/qfileiconprovider/CMakeLists.txt b/tests/auto/widgets/itemviews/qfileiconprovider/CMakeLists.txt new file mode 100644 index 0000000000..c1aa9a8d3f --- /dev/null +++ b/tests/auto/widgets/itemviews/qfileiconprovider/CMakeLists.txt @@ -0,0 +1 @@ +add_qt_test("tst_qfileiconprovider" SOURCES tst_qfileiconprovider.cpp LIBRARIES Qt::Widgets) diff --git a/tests/auto/widgets/itemviews/qheaderview/CMakeLists.txt b/tests/auto/widgets/itemviews/qheaderview/CMakeLists.txt new file mode 100644 index 0000000000..512179bcca --- /dev/null +++ b/tests/auto/widgets/itemviews/qheaderview/CMakeLists.txt @@ -0,0 +1,6 @@ +add_qt_test("tst_qheaderview" SOURCES tst_qheaderview.cpp + LIBRARIES + Qt::WidgetsPrivate + Qt::CorePrivate + Qt::GuiPrivate +) diff --git a/tests/auto/widgets/itemviews/qitemdelegate/CMakeLists.txt b/tests/auto/widgets/itemviews/qitemdelegate/CMakeLists.txt new file mode 100644 index 0000000000..70cc1a7540 --- /dev/null +++ b/tests/auto/widgets/itemviews/qitemdelegate/CMakeLists.txt @@ -0,0 +1,3 @@ +add_qt_test("tst_qitemdelegate" SOURCES tst_qitemdelegate.cpp LIBRARIES Qt::WidgetsPrivate) + +extend_target("tst_qitemdelegate" CONDITION WIN32 AND NOT WINRT LIBRARIES -luser32) diff --git a/tests/auto/widgets/itemviews/qitemeditorfactory/CMakeLists.txt b/tests/auto/widgets/itemviews/qitemeditorfactory/CMakeLists.txt new file mode 100644 index 0000000000..7100fb802f --- /dev/null +++ b/tests/auto/widgets/itemviews/qitemeditorfactory/CMakeLists.txt @@ -0,0 +1 @@ +add_qt_test("tst_qitemeditorfactory" SOURCES tst_qitemeditorfactory.cpp LIBRARIES Qt::Widgets) diff --git a/tests/auto/widgets/itemviews/qitemview/CMakeLists.txt b/tests/auto/widgets/itemviews/qitemview/CMakeLists.txt new file mode 100644 index 0000000000..9b298d97f3 --- /dev/null +++ b/tests/auto/widgets/itemviews/qitemview/CMakeLists.txt @@ -0,0 +1 @@ +add_qt_test("tst_qitemview" SOURCES tst_qitemview.cpp LIBRARIES Qt::Widgets) diff --git a/tests/auto/widgets/itemviews/qlistview/CMakeLists.txt b/tests/auto/widgets/itemviews/qlistview/CMakeLists.txt new file mode 100644 index 0000000000..56812234c8 --- /dev/null +++ b/tests/auto/widgets/itemviews/qlistview/CMakeLists.txt @@ -0,0 +1,13 @@ +add_qt_test("tst_qlistview" + SOURCES + tst_qlistview.cpp + LIBRARIES + Qt::GuiPrivate + Qt::WidgetsPrivate + Qt::CorePrivate + Qt::TestPrivate +) + +extend_target("tst_qlistview" CONDITION WIN32 AND NOT WINRT + LIBRARIES -luser32 +) diff --git a/tests/auto/widgets/itemviews/qlistwidget/CMakeLists.txt b/tests/auto/widgets/itemviews/qlistwidget/CMakeLists.txt new file mode 100644 index 0000000000..5b16aa61a6 --- /dev/null +++ b/tests/auto/widgets/itemviews/qlistwidget/CMakeLists.txt @@ -0,0 +1,8 @@ +add_qt_test("tst_qlistwidget" + SOURCES + tst_qlistwidget.cpp + LIBRARIES + Qt::WidgetsPrivate + Qt::CorePrivate + Qt::GuiPrivate +) diff --git a/tests/auto/widgets/itemviews/qtableview/CMakeLists.txt b/tests/auto/widgets/itemviews/qtableview/CMakeLists.txt new file mode 100644 index 0000000000..655d91d300 --- /dev/null +++ b/tests/auto/widgets/itemviews/qtableview/CMakeLists.txt @@ -0,0 +1,7 @@ +add_qt_test("tst_qtableview" SOURCES tst_qtableview.cpp + LIBRARIES + Qt::WidgetsPrivate + Qt::CorePrivate + Qt::GuiPrivate + Qt::TestPrivate +) diff --git a/tests/auto/widgets/itemviews/qtablewidget/CMakeLists.txt b/tests/auto/widgets/itemviews/qtablewidget/CMakeLists.txt new file mode 100644 index 0000000000..f8bcef068e --- /dev/null +++ b/tests/auto/widgets/itemviews/qtablewidget/CMakeLists.txt @@ -0,0 +1 @@ +add_qt_test("tst_qtablewidget" SOURCES tst_qtablewidget.cpp LIBRARIES Qt::Widgets) diff --git a/tests/auto/widgets/itemviews/qtreeview/CMakeLists.txt b/tests/auto/widgets/itemviews/qtreeview/CMakeLists.txt new file mode 100644 index 0000000000..582b45ef78 --- /dev/null +++ b/tests/auto/widgets/itemviews/qtreeview/CMakeLists.txt @@ -0,0 +1,11 @@ +add_qt_test("tst_qtreeview" + SOURCES + ../../../../shared/fakedirmodel.h + tst_qtreeview.cpp + LIBRARIES + Qt::Widgets + Qt::WidgetsPrivate + Qt::GuiPrivate + Qt::CorePrivate + Qt::TestPrivate +) diff --git a/tests/auto/widgets/itemviews/qtreewidget/CMakeLists.txt b/tests/auto/widgets/itemviews/qtreewidget/CMakeLists.txt new file mode 100644 index 0000000000..6d180e2167 --- /dev/null +++ b/tests/auto/widgets/itemviews/qtreewidget/CMakeLists.txt @@ -0,0 +1 @@ +add_qt_test("tst_qtreewidget" SOURCES tst_qtreewidget.cpp LIBRARIES Qt::Widgets) diff --git a/tests/auto/widgets/itemviews/qtreewidgetitemiterator/CMakeLists.txt b/tests/auto/widgets/itemviews/qtreewidgetitemiterator/CMakeLists.txt new file mode 100644 index 0000000000..c29cb76bc8 --- /dev/null +++ b/tests/auto/widgets/itemviews/qtreewidgetitemiterator/CMakeLists.txt @@ -0,0 +1 @@ +add_qt_test("tst_qtreewidgetitemiterator" SOURCES tst_qtreewidgetitemiterator.cpp LIBRARIES Qt::Widgets) diff --git a/tests/auto/widgets/kernel/CMakeLists.txt b/tests/auto/widgets/kernel/CMakeLists.txt new file mode 100644 index 0000000000..046f12e014 --- /dev/null +++ b/tests/auto/widgets/kernel/CMakeLists.txt @@ -0,0 +1,27 @@ +# Generated from kernel.pro. + +add_subdirectory(qaction) +add_subdirectory(qactiongroup) +# add_subdirectory(qapplication) # FIXME: Enable this! +add_subdirectory(qboxlayout) +add_subdirectory(qdesktopwidget) +add_subdirectory(qformlayout) +add_subdirectory(qgridlayout) +add_subdirectory(qlayout) +add_subdirectory(qstackedlayout) +add_subdirectory(qtooltip) +add_subdirectory(qwidget) +add_subdirectory(qwidget_window) +add_subdirectory(qwidgetaction) +add_subdirectory(qwidgetmetatype) +add_subdirectory(qwidgetsvariant) +add_subdirectory(qwindowcontainer) +add_subdirectory(qshortcut) +add_subdirectory(qsizepolicy) +if(OFF) + add_subdirectory(qsound) +endif() + +if(NOT APPLE) + add_subdirectory(qgesturerecognizer) +endif() diff --git a/tests/auto/widgets/kernel/kernel.pro b/tests/auto/widgets/kernel/kernel.pro index 73fd934502..0382264eb8 100644 --- a/tests/auto/widgets/kernel/kernel.pro +++ b/tests/auto/widgets/kernel/kernel.pro @@ -20,7 +20,7 @@ SUBDIRS=\ qshortcut \ qsizepolicy -darwin:SUBDIRS -= \ # Uses native recognizers +darwin:SUBDIRS -= \ qgesturerecognizer \ SUBDIRS -= qsound diff --git a/tests/auto/widgets/kernel/qaction/CMakeLists.txt b/tests/auto/widgets/kernel/qaction/CMakeLists.txt new file mode 100644 index 0000000000..8bea25a189 --- /dev/null +++ b/tests/auto/widgets/kernel/qaction/CMakeLists.txt @@ -0,0 +1,6 @@ +add_qt_test("tst_qaction" SOURCES tst_qaction.cpp + LIBRARIES + Qt::GuiPrivate + Qt::CorePrivate + Qt::Widgets +) diff --git a/tests/auto/widgets/kernel/qactiongroup/CMakeLists.txt b/tests/auto/widgets/kernel/qactiongroup/CMakeLists.txt new file mode 100644 index 0000000000..404e1bab60 --- /dev/null +++ b/tests/auto/widgets/kernel/qactiongroup/CMakeLists.txt @@ -0,0 +1 @@ +add_qt_test("tst_qactiongroup" SOURCES tst_qactiongroup.cpp LIBRARIES Qt::Widgets) diff --git a/tests/auto/widgets/kernel/qboxlayout/CMakeLists.txt b/tests/auto/widgets/kernel/qboxlayout/CMakeLists.txt new file mode 100644 index 0000000000..0fb220514b --- /dev/null +++ b/tests/auto/widgets/kernel/qboxlayout/CMakeLists.txt @@ -0,0 +1 @@ +add_qt_test("tst_qboxlayout" SOURCES tst_qboxlayout.cpp LIBRARIES Qt::Widgets Qt::TestPrivate) diff --git a/tests/auto/widgets/kernel/qdesktopwidget/CMakeLists.txt b/tests/auto/widgets/kernel/qdesktopwidget/CMakeLists.txt new file mode 100644 index 0000000000..6cfea9d4f4 --- /dev/null +++ b/tests/auto/widgets/kernel/qdesktopwidget/CMakeLists.txt @@ -0,0 +1 @@ +add_qt_test("tst_qdesktopwidget" SOURCES tst_qdesktopwidget.cpp LIBRARIES Qt::Widgets) diff --git a/tests/auto/widgets/kernel/qformlayout/CMakeLists.txt b/tests/auto/widgets/kernel/qformlayout/CMakeLists.txt new file mode 100644 index 0000000000..c5ef0946f9 --- /dev/null +++ b/tests/auto/widgets/kernel/qformlayout/CMakeLists.txt @@ -0,0 +1 @@ +add_qt_test("tst_qformlayout" SOURCES tst_qformlayout.cpp LIBRARIES Qt::Widgets Qt::TestPrivate) diff --git a/tests/auto/widgets/kernel/qgesturerecognizer/CMakeLists.txt b/tests/auto/widgets/kernel/qgesturerecognizer/CMakeLists.txt new file mode 100644 index 0000000000..fe47f9bcd6 --- /dev/null +++ b/tests/auto/widgets/kernel/qgesturerecognizer/CMakeLists.txt @@ -0,0 +1,6 @@ +add_qt_test("tst_qgesturerecognizer" SOURCES tst_qgesturerecognizer.cpp + LIBRARIES + Qt::Widgets + Qt::GuiPrivate + Qt::CorePrivate +) diff --git a/tests/auto/widgets/kernel/qgridlayout/CMakeLists.txt b/tests/auto/widgets/kernel/qgridlayout/CMakeLists.txt new file mode 100644 index 0000000000..6cfd4ab427 --- /dev/null +++ b/tests/auto/widgets/kernel/qgridlayout/CMakeLists.txt @@ -0,0 +1,10 @@ +add_qt_test("tst_qgridlayout" + SOURCES + sortdialog.ui + tst_qgridlayout.cpp + LIBRARIES + Qt::WidgetsPrivate + Qt::CorePrivate + Qt::GuiPrivate + Qt::TestPrivate +) diff --git a/tests/auto/widgets/kernel/qlayout/CMakeLists.txt b/tests/auto/widgets/kernel/qlayout/CMakeLists.txt new file mode 100644 index 0000000000..a9b80c1287 --- /dev/null +++ b/tests/auto/widgets/kernel/qlayout/CMakeLists.txt @@ -0,0 +1,3 @@ +add_qt_test("tst_qlayout" SOURCES tst_qlayout.cpp LIBRARIES Qt::WidgetsPrivate Qt::TestPrivate) + +extend_target("tst_qlayout" CONDITION ANDROID AND NOT ANDROID_EMBEDDED SOURCES testdata.qrc) diff --git a/tests/auto/widgets/kernel/qshortcut/CMakeLists.txt b/tests/auto/widgets/kernel/qshortcut/CMakeLists.txt new file mode 100644 index 0000000000..d71f1aae6c --- /dev/null +++ b/tests/auto/widgets/kernel/qshortcut/CMakeLists.txt @@ -0,0 +1 @@ +add_qt_test("tst_qshortcut" SOURCES tst_qshortcut.cpp LIBRARIES Qt::Widgets) diff --git a/tests/auto/widgets/kernel/qsizepolicy/CMakeLists.txt b/tests/auto/widgets/kernel/qsizepolicy/CMakeLists.txt new file mode 100644 index 0000000000..32b17c8bba --- /dev/null +++ b/tests/auto/widgets/kernel/qsizepolicy/CMakeLists.txt @@ -0,0 +1 @@ +add_qt_test("tst_qsizepolicy" SOURCES tst_qsizepolicy.cpp LIBRARIES Qt::WidgetsPrivate) diff --git a/tests/auto/widgets/kernel/qstackedlayout/CMakeLists.txt b/tests/auto/widgets/kernel/qstackedlayout/CMakeLists.txt new file mode 100644 index 0000000000..24c681dc45 --- /dev/null +++ b/tests/auto/widgets/kernel/qstackedlayout/CMakeLists.txt @@ -0,0 +1 @@ +add_qt_test("tst_qstackedlayout" SOURCES tst_qstackedlayout.cpp LIBRARIES Qt::Widgets) diff --git a/tests/auto/widgets/kernel/qtooltip/CMakeLists.txt b/tests/auto/widgets/kernel/qtooltip/CMakeLists.txt new file mode 100644 index 0000000000..e5cdace275 --- /dev/null +++ b/tests/auto/widgets/kernel/qtooltip/CMakeLists.txt @@ -0,0 +1 @@ +add_qt_test("tst_qtooltip" SOURCES tst_qtooltip.cpp LIBRARIES Qt::Widgets) diff --git a/tests/auto/widgets/kernel/qwidget/CMakeLists.txt b/tests/auto/widgets/kernel/qwidget/CMakeLists.txt new file mode 100644 index 0000000000..ac09f88ae2 --- /dev/null +++ b/tests/auto/widgets/kernel/qwidget/CMakeLists.txt @@ -0,0 +1,16 @@ +add_qt_test("tst_qwidget" + SOURCES + qwidget.qrc + tst_qwidget.cpp + LIBRARIES + Qt::Widgets + Qt::CorePrivate + Qt::GuiPrivate + Qt::WidgetsPrivate + Qt::TestPrivate +) + +extend_target("tst_qwidget" CONDITION APPLE_OSX + SOURCES tst_qwidget_mac_helpers.mm + LIBRARIES FWSecurity FWAppKit +) diff --git a/tests/auto/widgets/kernel/qwidget_window/CMakeLists.txt b/tests/auto/widgets/kernel/qwidget_window/CMakeLists.txt new file mode 100644 index 0000000000..9d16c40be4 --- /dev/null +++ b/tests/auto/widgets/kernel/qwidget_window/CMakeLists.txt @@ -0,0 +1,7 @@ +add_qt_test("tst_qwidget_window" SOURCES tst_qwidget_window.cpp + LIBRARIES + Qt::Widgets + Qt::CorePrivate + Qt::GuiPrivate + Qt::TestPrivate +) diff --git a/tests/auto/widgets/kernel/qwidgetaction/CMakeLists.txt b/tests/auto/widgets/kernel/qwidgetaction/CMakeLists.txt new file mode 100644 index 0000000000..d58853790e --- /dev/null +++ b/tests/auto/widgets/kernel/qwidgetaction/CMakeLists.txt @@ -0,0 +1 @@ +add_qt_test("tst_qwidgetaction" SOURCES tst_qwidgetaction.cpp LIBRARIES Qt::Widgets Qt::TestPrivate) diff --git a/tests/auto/widgets/kernel/qwidgetmetatype/CMakeLists.txt b/tests/auto/widgets/kernel/qwidgetmetatype/CMakeLists.txt new file mode 100644 index 0000000000..ab69449fba --- /dev/null +++ b/tests/auto/widgets/kernel/qwidgetmetatype/CMakeLists.txt @@ -0,0 +1 @@ +add_qt_test("tst_qwidgetmetatype" SOURCES tst_qwidgetmetatype.cpp LIBRARIES Qt::Widgets) diff --git a/tests/auto/widgets/kernel/qwidgetsvariant/CMakeLists.txt b/tests/auto/widgets/kernel/qwidgetsvariant/CMakeLists.txt new file mode 100644 index 0000000000..53a479ef80 --- /dev/null +++ b/tests/auto/widgets/kernel/qwidgetsvariant/CMakeLists.txt @@ -0,0 +1,8 @@ +add_qt_test("tst_qwidgetsvariant" + SOURCES + tst_qwidgetsvariant.cpp + INCLUDE_DIRECTORIES + ./../../../other/qvariant_common + LIBRARIES + Qt::Widgets +) diff --git a/tests/auto/widgets/kernel/qwindowcontainer/CMakeLists.txt b/tests/auto/widgets/kernel/qwindowcontainer/CMakeLists.txt new file mode 100644 index 0000000000..329260bd05 --- /dev/null +++ b/tests/auto/widgets/kernel/qwindowcontainer/CMakeLists.txt @@ -0,0 +1 @@ +add_qt_test("tst_qwindowcontainer" SOURCES tst_qwindowcontainer.cpp LIBRARIES Qt::Widgets) diff --git a/tests/auto/widgets/styles/CMakeLists.txt b/tests/auto/widgets/styles/CMakeLists.txt new file mode 100644 index 0000000000..4fc260fe39 --- /dev/null +++ b/tests/auto/widgets/styles/CMakeLists.txt @@ -0,0 +1,12 @@ +# Generated from styles.pro. + +if (APPLE_OSX) + add_subdirectory(qmacstyle) +endif() +add_subdirectory(qstyle) +if (NOT APPLE_UIKIT AND NOT ANDROID AND NOT QNX) + add_subdirectory(qstyleoption) +endif() +if (QT_FEATURE_private_tests) + add_subdirectory(qstylesheetstyle) +endif() diff --git a/tests/auto/widgets/styles/qmacstyle/CMakeLists.txt b/tests/auto/widgets/styles/qmacstyle/CMakeLists.txt new file mode 100644 index 0000000000..a1b68b3d74 --- /dev/null +++ b/tests/auto/widgets/styles/qmacstyle/CMakeLists.txt @@ -0,0 +1 @@ +add_qt_test("tst_qmacstyle" SOURCES tst_qmacstyle.cpp LIBRARIES Qt::WidgetsPrivate) diff --git a/tests/auto/widgets/styles/qstyle/CMakeLists.txt b/tests/auto/widgets/styles/qstyle/CMakeLists.txt new file mode 100644 index 0000000000..b6af379092 --- /dev/null +++ b/tests/auto/widgets/styles/qstyle/CMakeLists.txt @@ -0,0 +1,3 @@ +add_qt_test("tst_qstyle" SOURCES tst_qstyle.cpp LIBRARIES Qt::Widgets Qt::TestPrivate) + +extend_target("tst_qstyle" CONDITION ANDROID AND NOT ANDROID_EMBEDDED SOURCES testdata.qrc) diff --git a/tests/auto/widgets/styles/qstyleoption/CMakeLists.txt b/tests/auto/widgets/styles/qstyleoption/CMakeLists.txt new file mode 100644 index 0000000000..855336b769 --- /dev/null +++ b/tests/auto/widgets/styles/qstyleoption/CMakeLists.txt @@ -0,0 +1 @@ +add_qt_test("tst_qstyleoption" SOURCES tst_qstyleoption.cpp LIBRARIES Qt::Widgets) diff --git a/tests/auto/widgets/styles/qstylesheetstyle/CMakeLists.txt b/tests/auto/widgets/styles/qstylesheetstyle/CMakeLists.txt new file mode 100644 index 0000000000..608b7d299b --- /dev/null +++ b/tests/auto/widgets/styles/qstylesheetstyle/CMakeLists.txt @@ -0,0 +1,9 @@ +add_qt_test("tst_qstylesheetstyle" + SOURCES + resources.qrc + tst_qstylesheetstyle.cpp + LIBRARIES + Qt::WidgetsPrivate + Qt::GuiPrivate + Qt::TestPrivate +) diff --git a/tests/auto/widgets/util/CMakeLists.txt b/tests/auto/widgets/util/CMakeLists.txt new file mode 100644 index 0000000000..0372282e7b --- /dev/null +++ b/tests/auto/widgets/util/CMakeLists.txt @@ -0,0 +1,7 @@ +# Generated from util.pro. + +add_subdirectory(qcompleter) +add_subdirectory(qscroller) +add_subdirectory(qsystemtrayicon) +add_subdirectory(qundogroup) +add_subdirectory(qundostack) diff --git a/tests/auto/widgets/util/qcompleter/CMakeLists.txt b/tests/auto/widgets/util/qcompleter/CMakeLists.txt new file mode 100644 index 0000000000..15b01f0346 --- /dev/null +++ b/tests/auto/widgets/util/qcompleter/CMakeLists.txt @@ -0,0 +1 @@ +add_qt_test("tst_qcompleter" SOURCES tst_qcompleter.cpp LIBRARIES Qt::Widgets Qt::TestPrivate) diff --git a/tests/auto/widgets/util/qscroller/CMakeLists.txt b/tests/auto/widgets/util/qscroller/CMakeLists.txt new file mode 100644 index 0000000000..006399652c --- /dev/null +++ b/tests/auto/widgets/util/qscroller/CMakeLists.txt @@ -0,0 +1 @@ +add_qt_test("tst_qscroller" SOURCES tst_qscroller.cpp LIBRARIES Qt::Widgets Qt::GuiPrivate) diff --git a/tests/auto/widgets/util/qsystemtrayicon/CMakeLists.txt b/tests/auto/widgets/util/qsystemtrayicon/CMakeLists.txt new file mode 100644 index 0000000000..2b609725a1 --- /dev/null +++ b/tests/auto/widgets/util/qsystemtrayicon/CMakeLists.txt @@ -0,0 +1 @@ +add_qt_test("tst_qsystemtrayicon" SOURCES tst_qsystemtrayicon.cpp LIBRARIES Qt::Widgets) diff --git a/tests/auto/widgets/util/qundogroup/CMakeLists.txt b/tests/auto/widgets/util/qundogroup/CMakeLists.txt new file mode 100644 index 0000000000..9c67f61c51 --- /dev/null +++ b/tests/auto/widgets/util/qundogroup/CMakeLists.txt @@ -0,0 +1 @@ +add_qt_test("tst_qundogroup" SOURCES tst_qundogroup.cpp LIBRARIES Qt::Widgets) diff --git a/tests/auto/widgets/util/qundostack/CMakeLists.txt b/tests/auto/widgets/util/qundostack/CMakeLists.txt new file mode 100644 index 0000000000..690bcdacfd --- /dev/null +++ b/tests/auto/widgets/util/qundostack/CMakeLists.txt @@ -0,0 +1 @@ +add_qt_test("tst_qundostack" SOURCES tst_qundostack.cpp LIBRARIES Qt::Widgets) diff --git a/tests/auto/widgets/widgets/CMakeLists.txt b/tests/auto/widgets/widgets/CMakeLists.txt new file mode 100644 index 0000000000..60776f5da2 --- /dev/null +++ b/tests/auto/widgets/widgets/CMakeLists.txt @@ -0,0 +1,55 @@ +# Generated from widgets.pro. + +add_subdirectory(qabstractbutton) +add_subdirectory(qabstractscrollarea) +add_subdirectory(qabstractslider) +add_subdirectory(qbuttongroup) +add_subdirectory(qcalendarwidget) +add_subdirectory(qcheckbox) +add_subdirectory(qcommandlinkbutton) +add_subdirectory(qdatetimeedit) +add_subdirectory(qdial) +add_subdirectory(qdialogbuttonbox) +add_subdirectory(qdockwidget) +add_subdirectory(qdoublespinbox) +add_subdirectory(qfocusframe) +add_subdirectory(qfontcombobox) +add_subdirectory(qframe) +add_subdirectory(qgroupbox) +add_subdirectory(qkeysequenceedit) +add_subdirectory(qlabel) +add_subdirectory(qlcdnumber) +add_subdirectory(qlineedit) +add_subdirectory(qmdiarea) +add_subdirectory(qmdisubwindow) +add_subdirectory(qmenu) +add_subdirectory(qmenubar) +add_subdirectory(qplaintextedit) +add_subdirectory(qprogressbar) +add_subdirectory(qpushbutton) +add_subdirectory(qradiobutton) +add_subdirectory(qscrollarea) +add_subdirectory(qscrollbar) +add_subdirectory(qsizegrip) +add_subdirectory(qslider) +add_subdirectory(qspinbox) +add_subdirectory(qsplitter) +add_subdirectory(qstackedwidget) +add_subdirectory(qstatusbar) +add_subdirectory(qtabbar) +add_subdirectory(qtabwidget) +add_subdirectory(qtextbrowser) +add_subdirectory(qtoolbox) +add_subdirectory(qtoolbutton) + +if(QT_FEATURE_private_tests) + add_subdirectory(qabstractspinbox) + add_subdirectory(qcombobox) + add_subdirectory(qmainwindow) + add_subdirectory(qtextedit) + add_subdirectory(qtoolbar) +endif() + +if(NOT WINRT AND QT_FEATURE_opengl) + add_subdirectory(qopenglwidget) +endif() diff --git a/tests/auto/widgets/widgets/qabstractbutton/CMakeLists.txt b/tests/auto/widgets/widgets/qabstractbutton/CMakeLists.txt new file mode 100644 index 0000000000..7b2123b530 --- /dev/null +++ b/tests/auto/widgets/widgets/qabstractbutton/CMakeLists.txt @@ -0,0 +1 @@ +add_qt_test("tst_qabstractbutton" RUN_SERIAL SOURCES tst_qabstractbutton.cpp LIBRARIES Qt::Widgets) diff --git a/tests/auto/widgets/widgets/qabstractscrollarea/CMakeLists.txt b/tests/auto/widgets/widgets/qabstractscrollarea/CMakeLists.txt new file mode 100644 index 0000000000..a003346393 --- /dev/null +++ b/tests/auto/widgets/widgets/qabstractscrollarea/CMakeLists.txt @@ -0,0 +1 @@ +add_qt_test("tst_qabstractscrollarea" RUN_SERIAL SOURCES tst_qabstractscrollarea.cpp LIBRARIES Qt::Widgets) diff --git a/tests/auto/widgets/widgets/qabstractslider/CMakeLists.txt b/tests/auto/widgets/widgets/qabstractslider/CMakeLists.txt new file mode 100644 index 0000000000..6974ae4172 --- /dev/null +++ b/tests/auto/widgets/widgets/qabstractslider/CMakeLists.txt @@ -0,0 +1 @@ +add_qt_test("tst_qabstractslider" RUN_SERIAL SOURCES tst_qabstractslider.cpp LIBRARIES Qt::Widgets Qt::TestPrivate) diff --git a/tests/auto/widgets/widgets/qabstractspinbox/CMakeLists.txt b/tests/auto/widgets/widgets/qabstractspinbox/CMakeLists.txt new file mode 100644 index 0000000000..88c69d370b --- /dev/null +++ b/tests/auto/widgets/widgets/qabstractspinbox/CMakeLists.txt @@ -0,0 +1,7 @@ +add_qt_test("tst_qabstractspinbox" RUN_SERIAL SOURCES tst_qabstractspinbox.cpp + LIBRARIES + Qt::Widgets + Qt::GuiPrivate + Qt::CorePrivate + Qt::TestPrivate +) diff --git a/tests/auto/widgets/widgets/qbuttongroup/CMakeLists.txt b/tests/auto/widgets/widgets/qbuttongroup/CMakeLists.txt new file mode 100644 index 0000000000..37b2196705 --- /dev/null +++ b/tests/auto/widgets/widgets/qbuttongroup/CMakeLists.txt @@ -0,0 +1 @@ +add_qt_test("tst_qbuttongroup" RUN_SERIAL SOURCES tst_qbuttongroup.cpp LIBRARIES Qt::Widgets) diff --git a/tests/auto/widgets/widgets/qcalendarwidget/CMakeLists.txt b/tests/auto/widgets/widgets/qcalendarwidget/CMakeLists.txt new file mode 100644 index 0000000000..4aad3abff9 --- /dev/null +++ b/tests/auto/widgets/widgets/qcalendarwidget/CMakeLists.txt @@ -0,0 +1 @@ +add_qt_test("tst_qcalendarwidget" RUN_SERIAL SOURCES tst_qcalendarwidget.cpp LIBRARIES Qt::Widgets) diff --git a/tests/auto/widgets/widgets/qcheckbox/CMakeLists.txt b/tests/auto/widgets/widgets/qcheckbox/CMakeLists.txt new file mode 100644 index 0000000000..2640889d94 --- /dev/null +++ b/tests/auto/widgets/widgets/qcheckbox/CMakeLists.txt @@ -0,0 +1 @@ +add_qt_test("tst_qcheckbox" RUN_SERIAL SOURCES tst_qcheckbox.cpp LIBRARIES Qt::Widgets) diff --git a/tests/auto/widgets/widgets/qcombobox/CMakeLists.txt b/tests/auto/widgets/widgets/qcombobox/CMakeLists.txt new file mode 100644 index 0000000000..8697a67820 --- /dev/null +++ b/tests/auto/widgets/widgets/qcombobox/CMakeLists.txt @@ -0,0 +1,8 @@ +add_qt_test("tst_qcombobox" RUN_SERIAL SOURCES tst_qcombobox.cpp + DEFINES QTEST_QPA_MOUSE_HANDLING + LIBRARIES + Qt::WidgetsPrivate + Qt::GuiPrivate + Qt::CorePrivate + Qt::TestPrivate +) diff --git a/tests/auto/widgets/widgets/qcommandlinkbutton/CMakeLists.txt b/tests/auto/widgets/widgets/qcommandlinkbutton/CMakeLists.txt new file mode 100644 index 0000000000..2893e2d0f3 --- /dev/null +++ b/tests/auto/widgets/widgets/qcommandlinkbutton/CMakeLists.txt @@ -0,0 +1 @@ +add_qt_test("tst_qcommandlinkbutton" RUN_SERIAL SOURCES tst_qcommandlinkbutton.cpp LIBRARIES Qt::Widgets) diff --git a/tests/auto/widgets/widgets/qdatetimeedit/CMakeLists.txt b/tests/auto/widgets/widgets/qdatetimeedit/CMakeLists.txt new file mode 100644 index 0000000000..1f977399ac --- /dev/null +++ b/tests/auto/widgets/widgets/qdatetimeedit/CMakeLists.txt @@ -0,0 +1,6 @@ +add_qt_test("tst_qdatetimeedit" RUN_SERIAL SOURCES tst_qdatetimeedit.cpp + LIBRARIES + Qt::Widgets + Qt::CorePrivate + Qt::WidgetsPrivate +) diff --git a/tests/auto/widgets/widgets/qdial/CMakeLists.txt b/tests/auto/widgets/widgets/qdial/CMakeLists.txt new file mode 100644 index 0000000000..76fc75d85a --- /dev/null +++ b/tests/auto/widgets/widgets/qdial/CMakeLists.txt @@ -0,0 +1 @@ +add_qt_test("tst_qdial" RUN_SERIAL SOURCES tst_qdial.cpp LIBRARIES Qt::Widgets) diff --git a/tests/auto/widgets/widgets/qdialogbuttonbox/CMakeLists.txt b/tests/auto/widgets/widgets/qdialogbuttonbox/CMakeLists.txt new file mode 100644 index 0000000000..032189307c --- /dev/null +++ b/tests/auto/widgets/widgets/qdialogbuttonbox/CMakeLists.txt @@ -0,0 +1 @@ +add_qt_test("tst_qdialogbuttonbox" RUN_SERIAL SOURCES tst_qdialogbuttonbox.cpp LIBRARIES Qt::Widgets) diff --git a/tests/auto/widgets/widgets/qdockwidget/CMakeLists.txt b/tests/auto/widgets/widgets/qdockwidget/CMakeLists.txt new file mode 100644 index 0000000000..4bbe5234d9 --- /dev/null +++ b/tests/auto/widgets/widgets/qdockwidget/CMakeLists.txt @@ -0,0 +1,6 @@ +add_qt_test("tst_qdockwidget" RUN_SERIAL SOURCES tst_qdockwidget.cpp + LIBRARIES + Qt::WidgetsPrivate + Qt::CorePrivate + Qt::GuiPrivate +) diff --git a/tests/auto/widgets/widgets/qdoublespinbox/CMakeLists.txt b/tests/auto/widgets/widgets/qdoublespinbox/CMakeLists.txt new file mode 100644 index 0000000000..8030b82b42 --- /dev/null +++ b/tests/auto/widgets/widgets/qdoublespinbox/CMakeLists.txt @@ -0,0 +1 @@ +add_qt_test("tst_qdoublespinbox" RUN_SERIAL SOURCES tst_qdoublespinbox.cpp LIBRARIES Qt::Widgets) diff --git a/tests/auto/widgets/widgets/qfocusframe/CMakeLists.txt b/tests/auto/widgets/widgets/qfocusframe/CMakeLists.txt new file mode 100644 index 0000000000..1aac33f254 --- /dev/null +++ b/tests/auto/widgets/widgets/qfocusframe/CMakeLists.txt @@ -0,0 +1 @@ +add_qt_test("tst_qfocusframe" RUN_SERIAL SOURCES tst_qfocusframe.cpp LIBRARIES Qt::Widgets) diff --git a/tests/auto/widgets/widgets/qfontcombobox/CMakeLists.txt b/tests/auto/widgets/widgets/qfontcombobox/CMakeLists.txt new file mode 100644 index 0000000000..6bb659cca2 --- /dev/null +++ b/tests/auto/widgets/widgets/qfontcombobox/CMakeLists.txt @@ -0,0 +1 @@ +add_qt_test("tst_qfontcombobox" RUN_SERIAL SOURCES tst_qfontcombobox.cpp LIBRARIES Qt::Widgets) diff --git a/tests/auto/widgets/widgets/qframe/CMakeLists.txt b/tests/auto/widgets/widgets/qframe/CMakeLists.txt new file mode 100644 index 0000000000..f109c76d0d --- /dev/null +++ b/tests/auto/widgets/widgets/qframe/CMakeLists.txt @@ -0,0 +1 @@ +add_qt_test("tst_qframe" RUN_SERIAL SOURCES tst_qframe.cpp LIBRARIES Qt::Widgets) diff --git a/tests/auto/widgets/widgets/qgroupbox/CMakeLists.txt b/tests/auto/widgets/widgets/qgroupbox/CMakeLists.txt new file mode 100644 index 0000000000..5885420d31 --- /dev/null +++ b/tests/auto/widgets/widgets/qgroupbox/CMakeLists.txt @@ -0,0 +1 @@ +add_qt_test("tst_qgroupbox" RUN_SERIAL SOURCES tst_qgroupbox.cpp LIBRARIES Qt::Widgets) diff --git a/tests/auto/widgets/widgets/qkeysequenceedit/CMakeLists.txt b/tests/auto/widgets/widgets/qkeysequenceedit/CMakeLists.txt new file mode 100644 index 0000000000..415b49dd1b --- /dev/null +++ b/tests/auto/widgets/widgets/qkeysequenceedit/CMakeLists.txt @@ -0,0 +1 @@ +add_qt_test("tst_qkeysequenceedit" RUN_SERIAL SOURCES tst_qkeysequenceedit.cpp LIBRARIES Qt::Widgets) diff --git a/tests/auto/widgets/widgets/qlabel/CMakeLists.txt b/tests/auto/widgets/widgets/qlabel/CMakeLists.txt new file mode 100644 index 0000000000..91ce86552a --- /dev/null +++ b/tests/auto/widgets/widgets/qlabel/CMakeLists.txt @@ -0,0 +1,6 @@ +add_qt_test("tst_qlabel" RUN_SERIAL SOURCES tst_qlabel.cpp + LIBRARIES + Qt::WidgetsPrivate + Qt::CorePrivate + Qt::GuiPrivate +) diff --git a/tests/auto/widgets/widgets/qlcdnumber/CMakeLists.txt b/tests/auto/widgets/widgets/qlcdnumber/CMakeLists.txt new file mode 100644 index 0000000000..4f748f0ae8 --- /dev/null +++ b/tests/auto/widgets/widgets/qlcdnumber/CMakeLists.txt @@ -0,0 +1 @@ +add_qt_test("tst_qlcdnumber" RUN_SERIAL SOURCES tst_qlcdnumber.cpp LIBRARIES Qt::Widgets) diff --git a/tests/auto/widgets/widgets/qlineedit/CMakeLists.txt b/tests/auto/widgets/widgets/qlineedit/CMakeLists.txt new file mode 100644 index 0000000000..626b9fc403 --- /dev/null +++ b/tests/auto/widgets/widgets/qlineedit/CMakeLists.txt @@ -0,0 +1,9 @@ +add_qt_test("tst_qlineedit" RUN_SERIAL SOURCES tst_qlineedit.cpp + LIBRARIES + Qt::GuiPrivate + Qt::CorePrivate + Qt::WidgetsPrivate + Qt::TestPrivate +) + +extend_target("tst_qlineedit" CONDITION APPLE_OSX LIBRARIES FWAppKit) diff --git a/tests/auto/widgets/widgets/qmainwindow/CMakeLists.txt b/tests/auto/widgets/widgets/qmainwindow/CMakeLists.txt new file mode 100644 index 0000000000..f1756bd342 --- /dev/null +++ b/tests/auto/widgets/widgets/qmainwindow/CMakeLists.txt @@ -0,0 +1 @@ +add_qt_test("tst_qmainwindow" RUN_SERIAL SOURCES tst_qmainwindow.cpp LIBRARIES Qt::WidgetsPrivate) diff --git a/tests/auto/widgets/widgets/qmdiarea/CMakeLists.txt b/tests/auto/widgets/widgets/qmdiarea/CMakeLists.txt new file mode 100644 index 0000000000..b14730c588 --- /dev/null +++ b/tests/auto/widgets/widgets/qmdiarea/CMakeLists.txt @@ -0,0 +1,14 @@ +qt_pull_features_into_current_scope(PUBLIC_FEATURES Qt::Gui) + +add_qt_test("tst_qmdiarea" RUN_SERIAL SOURCES tst_qmdiarea.cpp + DEFINES + QT_NO_CAST_TO_ASCII + QT_NO_CAST_FROM_ASCII + LIBRARIES + Qt::GuiPrivate + Qt::Widgets +) + +extend_target("tst_qmdiarea" CONDITION TARGET Qt::OpenGL LIBRARIES Qt::OpenGL) + +extend_target("tst_qmdiarea" CONDITION APPLE_OSX LIBRARIES FWSecurity) diff --git a/tests/auto/widgets/widgets/qmdisubwindow/CMakeLists.txt b/tests/auto/widgets/widgets/qmdisubwindow/CMakeLists.txt new file mode 100644 index 0000000000..c095ccebd0 --- /dev/null +++ b/tests/auto/widgets/widgets/qmdisubwindow/CMakeLists.txt @@ -0,0 +1,7 @@ +add_qt_test("tst_qmdisubwindow" RUN_SERIAL SOURCES tst_qmdisubwindow.cpp + DEFINES + QT_NO_CAST_TO_ASCII + QT_NO_CAST_FROM_ASCII + LIBRARIES + Qt::WidgetsPrivate +) diff --git a/tests/auto/widgets/widgets/qmenu/CMakeLists.txt b/tests/auto/widgets/widgets/qmenu/CMakeLists.txt new file mode 100644 index 0000000000..6e9da6d474 --- /dev/null +++ b/tests/auto/widgets/widgets/qmenu/CMakeLists.txt @@ -0,0 +1,13 @@ +add_qt_test("tst_qmenu" RUN_SERIAL SOURCES tst_qmenu.cpp + LIBRARIES + Qt::GuiPrivate + Qt::Widgets + Qt::TestPrivate +) + +extend_target("tst_qmenu" CONDITION APPLE_OSX + SOURCES tst_qmenu_mac.mm + LIBRARIES -lobjc +) + +extend_target("tst_qmenu" CONDITION NOT APPLEL_OSX DEFINES QTEST_QPA_MOUSE_HANDLING) diff --git a/tests/auto/widgets/widgets/qmenubar/CMakeLists.txt b/tests/auto/widgets/widgets/qmenubar/CMakeLists.txt new file mode 100644 index 0000000000..84878c7ec8 --- /dev/null +++ b/tests/auto/widgets/widgets/qmenubar/CMakeLists.txt @@ -0,0 +1,6 @@ +add_qt_test("tst_qmenubar" RUN_SERIAL SOURCES tst_qmenubar.cpp LIBRARIES Qt::Widgets Qt::TestPrivate) + +extend_target("tst_qmenubar" CONDITION APPLE_OSX + SOURCES tst_qmenubar_mac.mm + LIBRARIES FWAppKit +) diff --git a/tests/auto/widgets/widgets/qopenglwidget/CMakeLists.txt b/tests/auto/widgets/widgets/qopenglwidget/CMakeLists.txt new file mode 100644 index 0000000000..a9172dec4f --- /dev/null +++ b/tests/auto/widgets/widgets/qopenglwidget/CMakeLists.txt @@ -0,0 +1,6 @@ +add_qt_test("tst_qopenglwidget" RUN_SERIAL SOURCES tst_qopenglwidget.cpp + LIBRARIES + Qt::GuiPrivate + Qt::CorePrivate + Qt::Widgets +) diff --git a/tests/auto/widgets/widgets/qplaintextedit/CMakeLists.txt b/tests/auto/widgets/widgets/qplaintextedit/CMakeLists.txt new file mode 100644 index 0000000000..d05e0aa8c6 --- /dev/null +++ b/tests/auto/widgets/widgets/qplaintextedit/CMakeLists.txt @@ -0,0 +1,7 @@ +add_qt_test("tst_qplaintextedit" RUN_SERIAL SOURCES tst_qplaintextedit.cpp + LIBRARIES + Qt::WidgetsPrivate + Qt::GuiPrivate +) + +extend_target("tst_qplaintextedit" CONDITION APPLE_OSX LIBRARIES FWAppKit) diff --git a/tests/auto/widgets/widgets/qprogressbar/CMakeLists.txt b/tests/auto/widgets/widgets/qprogressbar/CMakeLists.txt new file mode 100644 index 0000000000..5fb9e79056 --- /dev/null +++ b/tests/auto/widgets/widgets/qprogressbar/CMakeLists.txt @@ -0,0 +1 @@ +add_qt_test("tst_qprogressbar" RUN_SERIAL SOURCES tst_qprogressbar.cpp LIBRARIES Qt::Widgets) diff --git a/tests/auto/widgets/widgets/qpushbutton/CMakeLists.txt b/tests/auto/widgets/widgets/qpushbutton/CMakeLists.txt new file mode 100644 index 0000000000..7b78b96844 --- /dev/null +++ b/tests/auto/widgets/widgets/qpushbutton/CMakeLists.txt @@ -0,0 +1 @@ +add_qt_test("tst_qpushbutton" RUN_SERIAL SOURCES tst_qpushbutton.cpp LIBRARIES Qt::Widgets) diff --git a/tests/auto/widgets/widgets/qradiobutton/CMakeLists.txt b/tests/auto/widgets/widgets/qradiobutton/CMakeLists.txt new file mode 100644 index 0000000000..08322899a2 --- /dev/null +++ b/tests/auto/widgets/widgets/qradiobutton/CMakeLists.txt @@ -0,0 +1 @@ +add_qt_test("tst_qradiobutton" RUN_SERIAL SOURCES tst_qradiobutton.cpp LIBRARIES Qt::Widgets) diff --git a/tests/auto/widgets/widgets/qscrollarea/CMakeLists.txt b/tests/auto/widgets/widgets/qscrollarea/CMakeLists.txt new file mode 100644 index 0000000000..b21a9755d4 --- /dev/null +++ b/tests/auto/widgets/widgets/qscrollarea/CMakeLists.txt @@ -0,0 +1 @@ +add_qt_test("tst_qscrollarea" RUN_SERIAL SOURCES tst_qscrollarea.cpp LIBRARIES Qt::Widgets) diff --git a/tests/auto/widgets/widgets/qscrollbar/CMakeLists.txt b/tests/auto/widgets/widgets/qscrollbar/CMakeLists.txt new file mode 100644 index 0000000000..88163f38c3 --- /dev/null +++ b/tests/auto/widgets/widgets/qscrollbar/CMakeLists.txt @@ -0,0 +1 @@ +add_qt_test("tst_qscrollbar" RUN_SERIAL SOURCES tst_qscrollbar.cpp LIBRARIES Qt::Widgets Qt::TestPrivate) diff --git a/tests/auto/widgets/widgets/qsizegrip/CMakeLists.txt b/tests/auto/widgets/widgets/qsizegrip/CMakeLists.txt new file mode 100644 index 0000000000..f3f6548774 --- /dev/null +++ b/tests/auto/widgets/widgets/qsizegrip/CMakeLists.txt @@ -0,0 +1 @@ +add_qt_test("tst_qsizegrip" RUN_SERIAL SOURCES tst_qsizegrip.cpp LIBRARIES Qt::Widgets) diff --git a/tests/auto/widgets/widgets/qslider/CMakeLists.txt b/tests/auto/widgets/widgets/qslider/CMakeLists.txt new file mode 100644 index 0000000000..1da3dc0d0a --- /dev/null +++ b/tests/auto/widgets/widgets/qslider/CMakeLists.txt @@ -0,0 +1 @@ +add_qt_test("tst_qslider" RUN_SERIAL SOURCES tst_qslider.cpp LIBRARIES Qt::Widgets) diff --git a/tests/auto/widgets/widgets/qspinbox/CMakeLists.txt b/tests/auto/widgets/widgets/qspinbox/CMakeLists.txt new file mode 100644 index 0000000000..80f1de0702 --- /dev/null +++ b/tests/auto/widgets/widgets/qspinbox/CMakeLists.txt @@ -0,0 +1 @@ +add_qt_test("tst_qspinbox" RUN_SERIAL SOURCES tst_qspinbox.cpp LIBRARIES Qt::Widgets) diff --git a/tests/auto/widgets/widgets/qsplashscreen/CMakeLists.txt b/tests/auto/widgets/widgets/qsplashscreen/CMakeLists.txt new file mode 100644 index 0000000000..028d8fc82e --- /dev/null +++ b/tests/auto/widgets/widgets/qsplashscreen/CMakeLists.txt @@ -0,0 +1 @@ +add_qt_test("tst_qsplashscreen" RUN_SERIAL SOURCES tst_qsplashscreen.cpp LIBRARIES Qt::Widgets) diff --git a/tests/auto/widgets/widgets/qsplitter/CMakeLists.txt b/tests/auto/widgets/widgets/qsplitter/CMakeLists.txt new file mode 100644 index 0000000000..a0dfd3a9c5 --- /dev/null +++ b/tests/auto/widgets/widgets/qsplitter/CMakeLists.txt @@ -0,0 +1 @@ +add_qt_test("tst_qsplitter" RUN_SERIAL SOURCES tst_qsplitter.cpp LIBRARIES Qt::Widgets) diff --git a/tests/auto/widgets/widgets/qstackedwidget/CMakeLists.txt b/tests/auto/widgets/widgets/qstackedwidget/CMakeLists.txt new file mode 100644 index 0000000000..8b2b79b181 --- /dev/null +++ b/tests/auto/widgets/widgets/qstackedwidget/CMakeLists.txt @@ -0,0 +1 @@ +add_qt_test("tst_qstackedwidget" RUN_SERIAL SOURCES tst_qstackedwidget.cpp LIBRARIES Qt::Widgets) diff --git a/tests/auto/widgets/widgets/qstatusbar/CMakeLists.txt b/tests/auto/widgets/widgets/qstatusbar/CMakeLists.txt new file mode 100644 index 0000000000..ba65925b6e --- /dev/null +++ b/tests/auto/widgets/widgets/qstatusbar/CMakeLists.txt @@ -0,0 +1 @@ +add_qt_test("tst_qstatusbar" RUN_SERIAL SOURCES tst_qstatusbar.cpp LIBRARIES Qt::Widgets) diff --git a/tests/auto/widgets/widgets/qtabbar/CMakeLists.txt b/tests/auto/widgets/widgets/qtabbar/CMakeLists.txt new file mode 100644 index 0000000000..003d4a778b --- /dev/null +++ b/tests/auto/widgets/widgets/qtabbar/CMakeLists.txt @@ -0,0 +1 @@ +add_qt_test("tst_qtabbar" RUN_SERIAL SOURCES tst_qtabbar.cpp LIBRARIES Qt::Widgets) diff --git a/tests/auto/widgets/widgets/qtabwidget/CMakeLists.txt b/tests/auto/widgets/widgets/qtabwidget/CMakeLists.txt new file mode 100644 index 0000000000..440603fac4 --- /dev/null +++ b/tests/auto/widgets/widgets/qtabwidget/CMakeLists.txt @@ -0,0 +1,3 @@ +add_qt_test("tst_qtabwidget" RUN_SERIAL SOURCES tst_qtabwidget.cpp LIBRARIES Qt::WidgetsPrivate) + +extend_target("tst_qtabwidget" CONDITION WIN32 AND NOT WINRT LIBRARIES -luser32) diff --git a/tests/auto/widgets/widgets/qtextbrowser/CMakeLists.txt b/tests/auto/widgets/widgets/qtextbrowser/CMakeLists.txt new file mode 100644 index 0000000000..15601c9855 --- /dev/null +++ b/tests/auto/widgets/widgets/qtextbrowser/CMakeLists.txt @@ -0,0 +1,3 @@ +add_qt_test("tst_qtextbrowser" RUN_SERIAL SOURCES tst_qtextbrowser.cpp LIBRARIES Qt::Widgets) + +extend_target("tst_qtextbrowser" CONDITION builtin_testdata DEFINES BUILTIN_TESTDATA) diff --git a/tests/auto/widgets/widgets/qtextedit/CMakeLists.txt b/tests/auto/widgets/widgets/qtextedit/CMakeLists.txt new file mode 100644 index 0000000000..1a8e79e055 --- /dev/null +++ b/tests/auto/widgets/widgets/qtextedit/CMakeLists.txt @@ -0,0 +1,8 @@ +add_qt_test("tst_qtextedit" RUN_SERIAL SOURCES tst_qtextedit.cpp + LIBRARIES + Qt::WidgetsPrivate + Qt::GuiPrivate + Qt::CorePrivate +) + +extend_target("tst_qtextedit" CONDITION APPLE_OSX LIBRARIES FWAppKit) diff --git a/tests/auto/widgets/widgets/qtoolbar/CMakeLists.txt b/tests/auto/widgets/widgets/qtoolbar/CMakeLists.txt new file mode 100644 index 0000000000..ab6d4d082a --- /dev/null +++ b/tests/auto/widgets/widgets/qtoolbar/CMakeLists.txt @@ -0,0 +1 @@ +add_qt_test("tst_qtoolbar" RUN_SERIAL SOURCES tst_qtoolbar.cpp LIBRARIES Qt::WidgetsPrivate Qt::GuiPrivate) diff --git a/tests/auto/widgets/widgets/qtoolbox/CMakeLists.txt b/tests/auto/widgets/widgets/qtoolbox/CMakeLists.txt new file mode 100644 index 0000000000..337f187878 --- /dev/null +++ b/tests/auto/widgets/widgets/qtoolbox/CMakeLists.txt @@ -0,0 +1 @@ +add_qt_test("tst_qtoolbox" RUN_SERIAL SOURCES tst_qtoolbox.cpp LIBRARIES Qt::Widgets) diff --git a/tests/auto/widgets/widgets/qtoolbutton/CMakeLists.txt b/tests/auto/widgets/widgets/qtoolbutton/CMakeLists.txt new file mode 100644 index 0000000000..a253255617 --- /dev/null +++ b/tests/auto/widgets/widgets/qtoolbutton/CMakeLists.txt @@ -0,0 +1 @@ +add_qt_test("tst_qtoolbutton" RUN_SERIAL SOURCES tst_qtoolbutton.cpp LIBRARIES Qt::Widgets) diff --git a/tests/benchmarks/corelib/io/qdir/10000/CMakeLists.txt b/tests/benchmarks/corelib/io/qdir/10000/CMakeLists.txt new file mode 100644 index 0000000000..bcb10365fa --- /dev/null +++ b/tests/benchmarks/corelib/io/qdir/10000/CMakeLists.txt @@ -0,0 +1 @@ +add_qt_test(tst_bench_qdir_10000 SOURCES bench_qdir_10000.cpp) diff --git a/tests/benchmarks/corelib/io/qprocess/test/CMakeLists.txt b/tests/benchmarks/corelib/io/qprocess/test/CMakeLists.txt new file mode 100644 index 0000000000..a6c5ceebd3 --- /dev/null +++ b/tests/benchmarks/corelib/io/qprocess/test/CMakeLists.txt @@ -0,0 +1,5 @@ +add_qt_test(../tst_bench_qprocess SOURCES + ../tst_bench_qprocess.cpp + LIBRARIES + Qt::CorePrivate +) diff --git a/tests/benchmarks/corelib/kernel/events/CMakeLists.txt b/tests/benchmarks/corelib/kernel/events/CMakeLists.txt new file mode 100644 index 0000000000..cabe71e3d6 --- /dev/null +++ b/tests/benchmarks/corelib/kernel/events/CMakeLists.txt @@ -0,0 +1 @@ +add_qt_test(tst_bench_events SOURCES main.cpp) diff --git a/tests/benchmarks/corelib/kernel/qcoreapplication/CMakeLists.txt b/tests/benchmarks/corelib/kernel/qcoreapplication/CMakeLists.txt new file mode 100644 index 0000000000..55d68f0372 --- /dev/null +++ b/tests/benchmarks/corelib/kernel/qcoreapplication/CMakeLists.txt @@ -0,0 +1 @@ +add_qt_test(tst_bench_qcoreapplication SOURCES main.cpp) diff --git a/tests/benchmarks/corelib/kernel/qmetatype/CMakeLists.txt b/tests/benchmarks/corelib/kernel/qmetatype/CMakeLists.txt new file mode 100644 index 0000000000..6bbaeee1e0 --- /dev/null +++ b/tests/benchmarks/corelib/kernel/qmetatype/CMakeLists.txt @@ -0,0 +1 @@ +add_qt_test(tst_bench_qmetatype SOURCES tst_qmetatype.cpp) diff --git a/tests/benchmarks/corelib/mimetypes/qmimedatabase/CMakeLists.txt b/tests/benchmarks/corelib/mimetypes/qmimedatabase/CMakeLists.txt new file mode 100644 index 0000000000..ec0cf48255 --- /dev/null +++ b/tests/benchmarks/corelib/mimetypes/qmimedatabase/CMakeLists.txt @@ -0,0 +1 @@ +add_qt_test(tst_bench_qmimedatabase SOURCES main.cpp) diff --git a/tests/benchmarks/corelib/plugin/quuid/CMakeLists.txt b/tests/benchmarks/corelib/plugin/quuid/CMakeLists.txt new file mode 100644 index 0000000000..e334bcb68a --- /dev/null +++ b/tests/benchmarks/corelib/plugin/quuid/CMakeLists.txt @@ -0,0 +1 @@ +add_qt_test(tst_bench_quuid SOURCES tst_quuid.cpp) diff --git a/tests/benchmarks/corelib/thread/qmutex/CMakeLists.txt b/tests/benchmarks/corelib/thread/qmutex/CMakeLists.txt new file mode 100644 index 0000000000..aef0da2565 --- /dev/null +++ b/tests/benchmarks/corelib/thread/qmutex/CMakeLists.txt @@ -0,0 +1 @@ +add_qt_test(tst_bench_qmutex SOURCES tst_qmutex.cpp) diff --git a/tests/benchmarks/corelib/thread/qthreadpool/CMakeLists.txt b/tests/benchmarks/corelib/thread/qthreadpool/CMakeLists.txt new file mode 100644 index 0000000000..55b03b9ad9 --- /dev/null +++ b/tests/benchmarks/corelib/thread/qthreadpool/CMakeLists.txt @@ -0,0 +1 @@ +add_qt_test(tst_bench_qthreadpool SOURCES tst_qthreadpool.cpp) diff --git a/tests/benchmarks/corelib/thread/qthreadstorage/CMakeLists.txt b/tests/benchmarks/corelib/thread/qthreadstorage/CMakeLists.txt new file mode 100644 index 0000000000..0797d99625 --- /dev/null +++ b/tests/benchmarks/corelib/thread/qthreadstorage/CMakeLists.txt @@ -0,0 +1 @@ +add_qt_test(tst_bench_qthreadstorage SOURCES tst_qthreadstorage.cpp) diff --git a/tests/benchmarks/corelib/thread/qwaitcondition/CMakeLists.txt b/tests/benchmarks/corelib/thread/qwaitcondition/CMakeLists.txt new file mode 100644 index 0000000000..94c4391c84 --- /dev/null +++ b/tests/benchmarks/corelib/thread/qwaitcondition/CMakeLists.txt @@ -0,0 +1 @@ +add_qt_test(tst_bench_qwaitcondition SOURCES tst_qwaitcondition.cpp) diff --git a/tests/benchmarks/corelib/tools/containers-associative/CMakeLists.txt b/tests/benchmarks/corelib/tools/containers-associative/CMakeLists.txt new file mode 100644 index 0000000000..7495677c0a --- /dev/null +++ b/tests/benchmarks/corelib/tools/containers-associative/CMakeLists.txt @@ -0,0 +1 @@ +add_qt_test(tst_bench_containers-associative SOURCES main.cpp) diff --git a/tests/benchmarks/corelib/tools/containers-sequential/CMakeLists.txt b/tests/benchmarks/corelib/tools/containers-sequential/CMakeLists.txt new file mode 100644 index 0000000000..6a22402a46 --- /dev/null +++ b/tests/benchmarks/corelib/tools/containers-sequential/CMakeLists.txt @@ -0,0 +1 @@ +add_qt_test(tst_bench_containers-sequential SOURCES main.cpp) diff --git a/tests/benchmarks/corelib/tools/qalgorithms/CMakeLists.txt b/tests/benchmarks/corelib/tools/qalgorithms/CMakeLists.txt new file mode 100644 index 0000000000..6cfb746934 --- /dev/null +++ b/tests/benchmarks/corelib/tools/qalgorithms/CMakeLists.txt @@ -0,0 +1 @@ +add_qt_test(tst_bench_qalgorithms SOURCES tst_qalgorithms.cpp) diff --git a/tests/benchmarks/corelib/tools/qchar/CMakeLists.txt b/tests/benchmarks/corelib/tools/qchar/CMakeLists.txt new file mode 100644 index 0000000000..c51e2a0059 --- /dev/null +++ b/tests/benchmarks/corelib/tools/qchar/CMakeLists.txt @@ -0,0 +1 @@ +add_qt_test(tst_bench_qchar SOURCES main.cpp) diff --git a/tests/benchmarks/corelib/tools/qdatetime/CMakeLists.txt b/tests/benchmarks/corelib/tools/qdatetime/CMakeLists.txt new file mode 100644 index 0000000000..6875fdd613 --- /dev/null +++ b/tests/benchmarks/corelib/tools/qdatetime/CMakeLists.txt @@ -0,0 +1 @@ +add_qt_test(tst_bench_qdatetime SOURCES main.cpp) diff --git a/tests/benchmarks/corelib/tools/qlist/CMakeLists.txt b/tests/benchmarks/corelib/tools/qlist/CMakeLists.txt new file mode 100644 index 0000000000..6e7dec7dfe --- /dev/null +++ b/tests/benchmarks/corelib/tools/qlist/CMakeLists.txt @@ -0,0 +1 @@ +add_qt_test(tst_bench_qlist SOURCES main.cpp) diff --git a/tests/benchmarks/corelib/tools/qlocale/CMakeLists.txt b/tests/benchmarks/corelib/tools/qlocale/CMakeLists.txt new file mode 100644 index 0000000000..b8a23bc757 --- /dev/null +++ b/tests/benchmarks/corelib/tools/qlocale/CMakeLists.txt @@ -0,0 +1 @@ +add_qt_test(tst_bench_qlocale SOURCES main.cpp) diff --git a/tests/benchmarks/corelib/tools/qstring/CMakeLists.txt b/tests/benchmarks/corelib/tools/qstring/CMakeLists.txt new file mode 100644 index 0000000000..1dd6678e8e --- /dev/null +++ b/tests/benchmarks/corelib/tools/qstring/CMakeLists.txt @@ -0,0 +1 @@ +add_qt_test(tst_bench_qstring SOURCES main.cpp) diff --git a/tests/benchmarks/corelib/tools/qtimezone/CMakeLists.txt b/tests/benchmarks/corelib/tools/qtimezone/CMakeLists.txt new file mode 100644 index 0000000000..3947ae1c5e --- /dev/null +++ b/tests/benchmarks/corelib/tools/qtimezone/CMakeLists.txt @@ -0,0 +1 @@ +add_qt_test(tst_bench_qtimezone SOURCES main.cpp) diff --git a/tests/benchmarks/gui/image/blendbench/CMakeLists.txt b/tests/benchmarks/gui/image/blendbench/CMakeLists.txt new file mode 100644 index 0000000000..24b2a79df1 --- /dev/null +++ b/tests/benchmarks/gui/image/blendbench/CMakeLists.txt @@ -0,0 +1,3 @@ +add_qt_test(tst_bench_blendbench SOURCES + main.cpp +) diff --git a/tests/benchmarks/gui/image/qimagescale/CMakeLists.txt b/tests/benchmarks/gui/image/qimagescale/CMakeLists.txt new file mode 100644 index 0000000000..58b9159eba --- /dev/null +++ b/tests/benchmarks/gui/image/qimagescale/CMakeLists.txt @@ -0,0 +1,3 @@ +add_qt_test(tst_bench_imageScale SOURCES + tst_qimagescale.cpp +) diff --git a/tests/benchmarks/gui/image/qpixmapcache/CMakeLists.txt b/tests/benchmarks/gui/image/qpixmapcache/CMakeLists.txt new file mode 100644 index 0000000000..e2aa20d75a --- /dev/null +++ b/tests/benchmarks/gui/image/qpixmapcache/CMakeLists.txt @@ -0,0 +1,3 @@ +add_qt_test(tst_bench_qpixmapcache SOURCES + tst_qpixmapcache.cpp +) diff --git a/tests/benchmarks/gui/kernel/qguimetatype/CMakeLists.txt b/tests/benchmarks/gui/kernel/qguimetatype/CMakeLists.txt new file mode 100644 index 0000000000..025a6d15ed --- /dev/null +++ b/tests/benchmarks/gui/kernel/qguimetatype/CMakeLists.txt @@ -0,0 +1,3 @@ +add_qt_test(tst_bench_qguimetatype SOURCES + tst_qguimetatype.cpp +) diff --git a/tests/benchmarks/gui/kernel/qguivariant/CMakeLists.txt b/tests/benchmarks/gui/kernel/qguivariant/CMakeLists.txt new file mode 100644 index 0000000000..f25c0a17d7 --- /dev/null +++ b/tests/benchmarks/gui/kernel/qguivariant/CMakeLists.txt @@ -0,0 +1,3 @@ +add_qt_test(tst_bench_qguivariant SOURCES + tst_qguivariant.cpp +) diff --git a/tests/benchmarks/gui/math3d/qmatrix4x4/CMakeLists.txt b/tests/benchmarks/gui/math3d/qmatrix4x4/CMakeLists.txt new file mode 100644 index 0000000000..7b6525bb63 --- /dev/null +++ b/tests/benchmarks/gui/math3d/qmatrix4x4/CMakeLists.txt @@ -0,0 +1,3 @@ +add_qt_test(tst_bench_qmatrix4x4 SOURCES + tst_qmatrix4x4.cpp +) diff --git a/tests/benchmarks/gui/math3d/qquaternion/CMakeLists.txt b/tests/benchmarks/gui/math3d/qquaternion/CMakeLists.txt new file mode 100644 index 0000000000..a7ed4a2ab8 --- /dev/null +++ b/tests/benchmarks/gui/math3d/qquaternion/CMakeLists.txt @@ -0,0 +1,3 @@ +add_qt_test(tst_bench_qquaternion SOURCES + tst_qquaternion.cpp +) diff --git a/tests/benchmarks/gui/painting/qtransform/CMakeLists.txt b/tests/benchmarks/gui/painting/qtransform/CMakeLists.txt new file mode 100644 index 0000000000..9dbfe8106a --- /dev/null +++ b/tests/benchmarks/gui/painting/qtransform/CMakeLists.txt @@ -0,0 +1,3 @@ +add_qt_test(tst_bench_qtransform SOURCES + tst_qtransform.cpp +) diff --git a/tests/benchmarks/gui/text/qfontmetrics/CMakeLists.txt b/tests/benchmarks/gui/text/qfontmetrics/CMakeLists.txt new file mode 100644 index 0000000000..44f5c09077 --- /dev/null +++ b/tests/benchmarks/gui/text/qfontmetrics/CMakeLists.txt @@ -0,0 +1,3 @@ +add_qt_test(tst_bench_QFontMetrics SOURCES + main.cpp +) diff --git a/tests/manual/CMakeLists.txt b/tests/manual/CMakeLists.txt new file mode 100644 index 0000000000..0746c0ef66 --- /dev/null +++ b/tests/manual/CMakeLists.txt @@ -0,0 +1,92 @@ +# Generated from tests/manual/manual.pro. + +add_subdirectory("bearerex") +add_subdirectory("filetest") +add_subdirectory("embeddedintoforeignwindow") +add_subdirectory("foreignwindows") +add_subdirectory("gestures") +add_subdirectory("highdpi") +add_subdirectory("inputmethodhints") +add_subdirectory("keypadnavigation") +add_subdirectory("lance") +add_subdirectory("network_remote_stresstest") +add_subdirectory("network_stresstest") +add_subdirectory("qcursor") +add_subdirectory("qdesktopservices") +add_subdirectory("qdesktopwidget") +add_subdirectory("qgraphicsitem") +add_subdirectory("qgraphicsitemgroup") +add_subdirectory("qgraphicslayout/flicker") +add_subdirectory("qhttpnetworkconnection") +add_subdirectory("qimagereader") +add_subdirectory("qlayout") +add_subdirectory("qlocale") +add_subdirectory("qmimedatabase") +add_subdirectory("qnetworkaccessmanager/qget") +add_subdirectory("qnetworkconfigurationmanager") +add_subdirectory("qnetworkconfiguration") +add_subdirectory("qnetworkreply") +add_subdirectory("qstorageinfo") +add_subdirectory("qscreen") +add_subdirectory("qssloptions") +add_subdirectory("qsslsocket") +add_subdirectory("qsysinfo") +add_subdirectory("qtabletevent") +add_subdirectory("qtexteditlist") +add_subdirectory("qtbug-8933") +add_subdirectory("qtbug-52641") +add_subdirectory("qtouchevent") +add_subdirectory("touch") +add_subdirectory("qwidget_zorder") +add_subdirectory("repaint") +add_subdirectory("socketengine") +add_subdirectory("textrendering") +add_subdirectory("widgets") +add_subdirectory("windowflags") +add_subdirectory("windowgeometry") +add_subdirectory("windowmodality") +add_subdirectory("widgetgrab") +add_subdirectory("xembed-raster") +add_subdirectory("xembed-widgets") +add_subdirectory("shortcuts") +add_subdirectory("dialogs") +add_subdirectory("windowtransparency") +add_subdirectory("unc") +add_subdirectory("qtabbar") + +if(NOT ${QT_FEATURE_openssl}) + ### remove_subdirectory("qssloptions") +endif() + +if(${QT_FEATURE_opengl}) + add_subdirectory("qopengltextureblitter") + + if(${QT_FEATURE_egl}) + add_subdirectory("qopenglcontext") + endif() +endif() + +if(WIN32) + ### remove_subdirectory("network_remote_stresstest") + ### remove_subdirectory("network_stresstest") +endif() + +if(lessThan(QT_MAJOR_VERSION, 5)) + ### remove_subdirectory("bearerex") + ### remove_subdirectory("lance") + ### remove_subdirectory("qnetworkaccessmanager/qget") + ### remove_subdirectory("qmimedatabase") + ### remove_subdirectory("qnetworkreply") + ### remove_subdirectory("qpainfo") + ### remove_subdirectory("qscreen") + ### remove_subdirectory("socketengine") + ### remove_subdirectory("xembed-raster") + ### remove_subdirectory("xembed-widgets") + ### remove_subdirectory("windowtransparency") + ### remove_subdirectory("embeddedintoforeignwindow") + ### remove_subdirectory("foreignwindows") +endif() + +if(${QT_FEATURE_vulkan}) + add_subdirectory("qvulkaninstance") +endif() diff --git a/tests/manual/qcursor/childwindow/CMakeLists.txt b/tests/manual/qcursor/childwindow/CMakeLists.txt new file mode 100644 index 0000000000..1f1001350b --- /dev/null +++ b/tests/manual/qcursor/childwindow/CMakeLists.txt @@ -0,0 +1,5 @@ +add_qt_test(childwindow SOURCES + main.cpp + INCLUDE_DIRECTORIES + . +) diff --git a/tests/manual/qmetatype/CMakeLists.txt b/tests/manual/qmetatype/CMakeLists.txt new file mode 100644 index 0000000000..5648a365f2 --- /dev/null +++ b/tests/manual/qmetatype/CMakeLists.txt @@ -0,0 +1,5 @@ +add_qt_test(tst_qmetatype_expect_fail SOURCES + declare_metatype_noninline.h + tst_qmetatype.cpp + declare_metatype_noninline.cpp +) diff --git a/tests/manual/qopenglwindow/multiwindow/CMakeLists.txt b/tests/manual/qopenglwindow/multiwindow/CMakeLists.txt new file mode 100644 index 0000000000..96e57b502c --- /dev/null +++ b/tests/manual/qopenglwindow/multiwindow/CMakeLists.txt @@ -0,0 +1,3 @@ +add_qt_test(multiwindow SOURCES + main.cpp +) diff --git a/util/cmake/Pipfile b/util/cmake/Pipfile new file mode 100644 index 0000000000..d7e1905378 --- /dev/null +++ b/util/cmake/Pipfile @@ -0,0 +1,14 @@ +[[source]] +url = "https://pypi.org/simple" +verify_ssl = true +name = "pypi" + +[packages] +pytest = "*" +mypy = "*" +pyparsing = "*" + +[dev-packages] + +[requires] +python_version = "3.7" diff --git a/util/cmake/cmakeconversionrate.py b/util/cmake/cmakeconversionrate.py new file mode 100755 index 0000000000..3496ed1b91 --- /dev/null +++ b/util/cmake/cmakeconversionrate.py @@ -0,0 +1,127 @@ +#!/usr/bin/env python3 +############################################################################# +## +## Copyright (C) 2018 The Qt Company Ltd. +## Contact: https://www.qt.io/licensing/ +## +## This file is part of the plugins 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$ +## +############################################################################# + +from argparse import ArgumentParser + +import os +import re +import subprocess +import sys +import typing + + +def _parse_commandline(): + parser = ArgumentParser(description='Calculate the conversion rate to cmake.') + parser.add_argument('--debug', dest='debug', action='store_true', + help='Turn on debug output') + parser.add_argument('source_directory', metavar='', type=str, + help='The Qt module source directory') + parser.add_argument('binary_directory', metavar='', type=str, + help='The CMake build directory (might be empty)') + + return parser.parse_args() + + +def calculate_baseline(source_directory: str, *, debug: bool=False) -> int: + if debug: + print('Scanning "{}" for qmake-based tests.'.format(source_directory)) + result = subprocess.run('/usr/bin/git grep -E "^\\s*CONFIG\\s*\\+?=.*\\btestcase\\b" | sort -u | wc -l', + shell=True, capture_output=True, cwd=source_directory) + return int(result.stdout) + + +def build(source_directory: str, binary_directory: str, *, debug=False) -> None: + abs_source = os.path.abspath(source_directory) + if not os.path.isdir(binary_directory): + os.makedirs(binary_directory) + if not os.path.exists(os.path.join(binary_directory, 'CMakeCache.txt')): + + if debug: + print('Running cmake in "{}".'.format(binary_directory)) + result = subprocess.run(['/usr/bin/cmake', '-GNinja', abs_source], cwd=binary_directory) + if debug: + print('CMake return code: {}.'.format(result.returncode)) + + assert result.returncode == 0 + + if debug: + print('Running ninja in "{}".'.format(binary_directory)) + result = subprocess.run('/usr/bin/ninja', cwd=binary_directory) + if debug: + print('Ninja return code: {}.'.format(result.returncode)) + + assert result.returncode == 0 + + +def test(binary_directory: str, *, debug=False) -> typing.Tuple[int, int]: + if debug: + print('Running ctest in "{}".'.format(binary_directory)) + result = subprocess.run('/usr/bin/ctest -j 250 | grep "tests passed, "', + shell=True, capture_output=True, cwd=binary_directory) + summary = result.stdout.decode('utf-8').replace('\n', '') + if debug: + print('Test summary: {} ({}).'.format(summary, result.returncode)) + + matches = re.fullmatch(r'\d+% tests passed, (\d+) tests failed out of (\d+)', summary) + if matches: + if debug: + print('Matches: failed {}, total {}.'.format(matches.group(1), matches.group(2))) + return (int(matches.group(2)), int(matches.group(2)) - int(matches.group(1)), ) + + return (0, 0,) + + +def main() -> int: + args = _parse_commandline() + + base_line = calculate_baseline(args.source_directory, debug=args.debug) + if base_line <= 0: + print('Could not find the qmake baseline in {}.'.format(args.source_directory)) + return 1 + + if args.debug: + print('qmake baseline: {} test binaries.'.format(base_line)) + + cmake_total = 0 + cmake_success = 0 + try: + build(args.source_directory, args.binary_directory, debug=args.debug) + (cmake_total, cmake_success, ) = test(args.binary_directory, debug=args.debug) + finally: + if cmake_total == 0: + print('\n\n\nCould not calculate the cmake state.') + return 2 + else: + print('\n\n\nCMake test conversion rate: {:.2%}.'.format(cmake_total / base_line)) + print('CMake test success rate : {:.2%}.'.format(cmake_success / base_line)) + return 0 + + +if __name__ == '__main__': + main() diff --git a/util/cmake/configurejson2cmake.py b/util/cmake/configurejson2cmake.py new file mode 100755 index 0000000000..4623e8d874 --- /dev/null +++ b/util/cmake/configurejson2cmake.py @@ -0,0 +1,860 @@ +#!/usr/bin/env python3 +############################################################################# +## +## Copyright (C) 2018 The Qt Company Ltd. +## Contact: https://www.qt.io/licensing/ +## +## This file is part of the plugins 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$ +## +############################################################################# + +import json +import os.path +import re +import sys +from typing import Set, Union, List, Dict + +from helper import map_qt_library, featureName, substitute_platform + +knownTests = set() # type: Set[str] + + +class LibraryMapping: + def __init__(self, package: str, resultVariable: str, appendFoundSuffix: bool = True) -> None: + self.package = package + self.resultVariable = resultVariable + self.appendFoundSuffix = appendFoundSuffix + + +def map_library(lib: str) -> Union[str, LibraryMapping, List[str]]: + libmap = { + 'zlib': 'ZLIB', + 'gbm': 'gbm', + 'host_dbus': None, + 'libdl': None, # handled by CMAKE_DL_LIBS + 'libatomic': 'Atomic', + 'double-conversion': 'WrapDoubleConversion', + 'gnu_iconv': None, + 'sun_iconv': None, + 'posix_iconv': None, + 'icu': ['ICU', 'COMPONENTS', 'i18n', 'uc', 'data'], + 'pcre2': ['PCRE2', 'REQUIRED'], + 'libpng': 'PNG', + 'libudev': 'Libudev', + 'udev': 'Libudev', + 'journald': 'Libsystemd', + 'vulkan': 'Vulkan', + 'glib': 'GLib', + 'harfbuzz': 'harfbuzz', + 'opengl': LibraryMapping(package="OpenGL", resultVariable="OpenGL_OpenGL"), + 'egl': LibraryMapping(package="OpenGL", resultVariable="OpenGL_EGL"), + 'openssl_headers': LibraryMapping(package="OpenSSL", resultVariable="OPENSSL_INCLUDE_DIR", appendFoundSuffix=False), + 'libpng': 'PNG', + 'libjpeg': 'JPEG', + 'freetype': 'Freetype', + 'fontconfig': LibraryMapping(package='Fontconfig', resultVariable="FONTCONFIG"), + 'libinput': 'Libinput', + 'xcb': ['XCB', '1.9'], + 'libproxy': 'libproxy', + 'drm': 'Libdrm', + 'xkbcommon': ['XKB', '0.4.1'], + 'xlib': 'X11', + 'xcb_xlib': 'X11_XCB', + 'xrender': LibraryMapping(package="XCB", resultVariable="XCB_RENDER"), + 'xcb_render': LibraryMapping(package="XCB", resultVariable="XCB_RENDER"), + 'xcb_glx': LibraryMapping(package="XCB", resultVariable="XCB_GLX"), + 'xcb_xkb': LibraryMapping(package="XCB", resultVariable="XCB_XKB"), + 'xcb_xinput': LibraryMapping(package="XCB", resultVariable="XCB_XINPUT"), + 'x11sm': LibraryMapping(package="X11", resultVariable="X11_SM"), + 'wayland_server': 'Wayland', + } # type: Dict[str, Union[str, List[str], LibraryMapping]] + if lib not in libmap: + raise Exception(' XXXX Unknown library "{}".'.format(lib)) + + return libmap[lib] + + +def map_tests(test: str) -> str: + testmap = { + 'c++11': '$', + 'c++14': '$', + 'c++1z': '$', + 'c99': '$', + 'c11': '$', + + 'x86SimdAlways': 'ON', # FIXME: Is this the right thing? + + 'aesni': 'TEST_subarch_aes', + 'avx': 'TEST_subarch_avx', + 'avx2': 'TEST_subarch_avx2', + 'avx512f': 'TEST_subarch_avx512f', + 'avx512cd': 'TEST_subarch_avx512cd', + 'avx512dq': 'TEST_subarch_avx512dq', + 'avx512bw': 'TEST_subarch_avx512bw', + 'avx512er': 'TEST_subarch_avx512er', + 'avx512pf': 'TEST_subarch_avx512pf', + 'avx512vl': 'TEST_subarch_avx512vl', + 'avx512ifma': 'TEST_subarch_avx512ifma', + 'avx512vbmi': 'TEST_subarch_avx512vbmi', + 'avx512vbmi2': 'TEST_subarch_avx512vbmi2', + 'avx512vpopcntdq': 'TEST_subarch_avx512vpopcntdq', + 'avx5124fmaps': 'TEST_subarch_avx5124fmaps', + 'avx5124vnniw': 'TEST_subarch_avx5124vnniw', + 'bmi': 'TEST_subarch_bmi', + 'bmi2': 'TEST_subarch_bmi2', + 'cx16': 'TEST_subarch_cx16', + 'f16c': 'TEST_subarch_c16c', + 'fma': 'TEST_subarch_fma', + 'fma4': 'TEST_subarch_fma4', + 'fsgsbase': 'TEST_subarch_fsgsbase', + 'gfni': 'TEST_subarch_gfni', + 'ibt': 'TEST_subarch_ibt', + 'lwp': 'TEST_subarch_lwp', + 'lzcnt': 'TEST_subarch_lzcnt', + 'mmx': 'TEST_subarch_mmx', + 'movbe': 'TEST_subarch_movbe', + 'mpx': 'TEST_subarch_mpx', + 'no-sahf': 'TEST_subarch_no_shaf', + 'pclmul': 'TEST_subarch_pclmul', + 'popcnt': 'TEST_subarch_popcnt', + 'prefetchwt1': 'TEST_subarch_prefetchwt1', + 'prfchw': 'TEST_subarch_prfchw', + 'pdpid': 'TEST_subarch_rdpid', + 'rdpid': 'TEST_subarch_rdpid', + 'rdseed': 'TEST_subarch_rdseed', + 'rdrnd': 'TEST_subarch_rdseed', # FIXME: Is this the right thing? + 'rtm': 'TEST_subarch_rtm', + 'shani': 'TEST_subarch_sha', + 'shstk': 'TEST_subarch_shstk', + 'sse2': 'TEST_subarch_sse2', + 'sse3': 'TEST_subarch_sse3', + 'ssse3': 'TEST_subarch_ssse3', + 'sse4a': 'TEST_subarch_sse4a', + 'sse4_1': 'TEST_subarch_sse4_1', + 'sse4_2': 'TEST_subarch_sse4_2', + 'tbm': 'TEST_subarch_tbm', + 'xop': 'TEST_subarch_xop', + + 'neon': 'TEST_subarch_neon', + 'iwmmxt': 'TEST_subarch_iwmmxt', + 'crc32': 'TEST_subarch_crc32', + + 'vis': 'TEST_subarch_vis', + 'vis2': 'TEST_subarch_vis2', + 'vis3': 'TEST_subarch_vis3', + + 'dsp': 'TEST_subarch_dsp', + 'dspr2': 'TEST_subarch_dspr2', + + 'altivec': 'TEST_subarch_altivec', + 'spe': 'TEST_subarch_spe', + 'vsx': 'TEST_subarch_vsx', + + 'posix-iconv': 'TEST_posix_iconv', + 'sun-iconv': 'TEST_sun_iconv', + + 'openssl11': '(OPENSSL_VERSION VERSION_GREATER_EQUAL "1.1.0")', + + 'reduce_exports': 'CMAKE_CXX_COMPILE_OPTIONS_VISIBILITY', + } + if test in testmap: + return testmap.get(test, None) + if test in knownTests: + return 'TEST_{}'.format(featureName(test)) + return None + + +def cm(ctx, *output): + txt = ctx['output'] + if txt != '' and not txt.endswith('\n'): + txt += '\n' + txt += '\n'.join(output) + + ctx['output'] = txt + return ctx + + +def readJsonFromDir(dir): + path = os.path.join(dir, 'configure.json') + + print('Reading {}...'.format(path)) + assert os.path.exists(path) + + with open(path, 'r') as fh: + return json.load(fh) + + +def processFiles(ctx, data): + print(' files:') + if 'files' in data: + for (k, v) in data['files'].items(): + ctx[k] = v + return ctx + +def parseLib(ctx, lib, data, cm_fh, cmake_find_packages_set): + extra = [] + try: + newlib = map_library(lib) + if isinstance(newlib, list): + extra = newlib[1:] + newlib = newlib[0] + elif isinstance(newlib, LibraryMapping): + newlib = newlib.package + except Exception: + return ctx + + if newlib is None: + print(' **** Skipping library "{}" -- was masked.'.format(lib)) + return + + print(' mapped library {} to {}.'.format(lib, newlib)) + + # Avoid duplicate find_package calls. + if newlib in cmake_find_packages_set: + return + + cmake_find_packages_set.add(newlib) + + isRequired = False + + if extra: + if "REQUIRED" in extra: + isRequired = True + extra.remove("REQUIRED") + + if extra: + cm_fh.write('find_package({} {})\n'.format(newlib, ' '.join(extra))) + else: + cm_fh.write('find_package({})\n'.format(newlib)) + + cm_fh.write('set_package_properties({} PROPERTIES TYPE {})\n' + .format(newlib, 'REQUIRED' if isRequired else 'OPTIONAL') + ) + +def lineify(label, value, quote=True): + if value: + if quote: + return ' {} "{}"\n'.format(label, value.replace('"', '\\"')) + return ' {} {}\n'.format(label, value) + return '' + +def map_condition(condition): + # Handle NOT: + if isinstance(condition, list): + condition = '(' + ') AND ('.join(condition) + ')' + if isinstance(condition, bool): + if condition: + return 'ON' + else: + return 'OFF' + assert isinstance(condition, str) + + mapped_features = { + "dlopen": "UNIX", + 'gbm': 'gbm_FOUND', + "sun-libiconv": "TEST_sun_iconv", + "system-xcb": "ON", + "system-freetype": "ON", + } + + # Turn foo != "bar" into (NOT foo STREQUAL 'bar') + condition = re.sub(r"(.+)\s*!=\s*('.+')", '(! \\1 == \\2)', condition) + + condition = condition.replace('!', 'NOT ') + condition = condition.replace('&&', ' AND ') + condition = condition.replace('||', ' OR ') + condition = condition.replace('==', ' STREQUAL ') + + # explicitly handle input.sdk == '': + condition = re.sub(r"input\.sdk\s*==\s*''", 'NOT INPUT_SDK', condition) + + last_pos = 0 + mapped_condition = '' + has_failed = False + for match in re.finditer(r'([a-zA-Z0-9_]+)\.([a-zA-Z0-9_+-]+)', condition): + substitution = None + appendFoundSuffix = True + if match.group(1) == 'libs': + try: + substitution = map_library(match.group(2)) + if isinstance(substitution, list): + substitution = substitution[0] + elif isinstance(substitution, LibraryMapping): + appendFoundSuffix = substitution.appendFoundSuffix + substitution = substitution.resultVariable + except Exception: + substitution = None + + if substitution is not None and appendFoundSuffix: + substitution += '_FOUND' + + elif match.group(1) == 'features': + feature = match.group(2) + if feature in mapped_features: + substitution = mapped_features.get(feature) + else: + substitution = 'QT_FEATURE_{}'.format(featureName(match.group(2))) + + elif match.group(1) == 'subarch': + substitution = 'TEST_subarch_{}'.format(match.group(2)) + + elif match.group(1) == 'call': + if match.group(2) == 'crossCompile': + substitution = 'CMAKE_CROSSCOMPILING' + + elif match.group(1) == 'tests': + substitution = map_tests(match.group(2)) + + elif match.group(1) == 'input': + substitution = 'INPUT_{}'.format(featureName(match.group(2))) + + elif match.group(1) == 'config': + substitution = substitute_platform(match.group(2)) + + elif match.group(1) == 'arch': + if match.group(2) == 'i386': + # FIXME: Does this make sense? + substitution = '(TEST_architecture_arch STREQUAL i386)' + elif match.group(2) == 'x86_64': + substitution = '(TEST_architecture_arch STREQUAL x86_64)' + elif match.group(2) == 'arm': + # FIXME: Does this make sense? + substitution = '(TEST_architecture_arch STREQUAL arm)' + elif match.group(2) == 'arm64': + # FIXME: Does this make sense? + substitution = '(TEST_architecture_arch STREQUAL arm64)' + elif match.group(2) == 'mips': + # FIXME: Does this make sense? + substitution = '(TEST_architecture_arch STREQUAL mips)' + + if substitution is None: + print(' XXXX Unknown condition "{}".'.format(match.group(0))) + has_failed = True + else: + mapped_condition += condition[last_pos:match.start(1)] + substitution + last_pos = match.end(2) + + mapped_condition += condition[last_pos:] + + # Space out '(' and ')': + mapped_condition = mapped_condition.replace('(', ' ( ') + mapped_condition = mapped_condition.replace(')', ' ) ') + + # Prettify: + condition = re.sub('\\s+', ' ', mapped_condition) + condition = condition.strip() + + if has_failed: + condition += ' OR FIXME' + + return condition + + +def parseInput(ctx, input, data, cm_fh): + skip_inputs = { + "prefix", "hostprefix", "extprefix", + + "archdatadir", "bindir", "datadir", "docdir", + "examplesdir", "external-hostbindir", "headerdir", + "hostbindir", "hostdatadir", "hostlibdir", + "importdir", "libdir", "libexecdir", + "plugindir", "qmldir", "settingsdir", + "sysconfdir", "testsdir", "translationdir", + + "android-arch", "android-ndk", "android-ndk-host", + "android-ndk-platform", "android-sdk", + "android-toolchain-version", "android-style-assets", + + "appstore-compliant", + + "avx", "avx2", "avx512", "c++std", "ccache", "commercial", + "compile-examples", "confirm-license", + "dbus", + "dbus-runtime", + + "debug", "debug-and-release", + + "developer-build", + + "device", "device-option", + + "f16c", + + "force-asserts", "force-debug-info", "force-pkg-config", + "framework", + + "gc-binaries", + + "gdb-index", + + "gcc-sysroot", + + "gcov", + + "gnumake", + + "gui", + + "headersclean", + + "incredibuild-xge", + + "libudev", + "ltcg", + "make", + "make-tool", + + "mips_dsp", + "mips_dspr2", + "mp", + + "nomake", + + "opensource", + + "optimize-debug", "optimize-size", "optimized-qmake", "optimized-tools", + + "pch", + + "pkg-config", + + "platform", + + "plugin-manifests", + "profile", + "qreal", + + "reduce-exports", "reduce-relocations", + + "release", + + "rpath", + + "sanitize", + + "sdk", + + "separate-debug-info", + + "shared", + + "silent", + + "qdbus", + + "sse2", + "sse3", + "sse4.1", + "sse4.2", + "ssse3", + "static", + "static-runtime", + "strip", + "syncqt", + "sysroot", + "testcocoon", + "use-gold-linker", + "warnings-are-errors", + "Werror", + "widgets", + "xplatform", + "zlib", + + "doubleconversion", + + "eventfd", + "glib", + "icu", + "inotify", + "journald", + "pcre", + "posix-ipc", + "pps", + "slog2", + "syslog", + + "sqlite", + } + + if input in skip_inputs: + print(' **** Skipping input {}: masked.'.format(input)) + return + + type = data + if isinstance(data, dict): + type = data["type"] + + if type == "boolean": + print(' **** Skipping boolean input {}: masked.'.format(input)) + return + + if type == "enum": + cm_fh.write("# input {}\n".format(input)) + cm_fh.write('set(INPUT_{} "undefined" CACHE STRING "")\n'.format(featureName(input))) + cm_fh.write('set_property(CACHE INPUT_{} PROPERTY STRINGS undefined {})\n\n'.format(featureName(input), " ".join(data["values"]))) + return + + print(' XXXX UNHANDLED INPUT TYPE {} in input description'.format(type)) + return + + +# "tests": { +# "cxx11_future": { +# "label": "C++11 ", +# "type": "compile", +# "test": { +# "include": "future", +# "main": [ +# "std::future f = std::async([]() { return 42; });", +# "(void)f.get();" +# ], +# "qmake": "unix:LIBS += -lpthread" +# } +# }, +def parseTest(ctx, test, data, cm_fh): + skip_tests = { + 'c11', 'c99', + 'c++11', 'c++14', 'c++1y', 'c++1z', + 'reduce_exports', + 'posix-iconv', "sun-iconv", + 'separate_debug_info', # FIXME: see if cmake can do this + 'gc_binaries', + } + + if test in skip_tests: + print(' **** Skipping features {}: masked.'.format(test)) + return + + if data["type"] == "compile": + knownTests.add(test) + + details = data["test"] + + if isinstance(details, str): + print(' XXXX UNHANDLED TEST SUB-TYPE {} in test description'.format(details)) + return + + head = details.get("head", "") + if isinstance(head, list): + head = "\n".join(head) + + sourceCode = head + '\n' + + include = details.get("include", "") + if isinstance(include, list): + include = '#include <' + '>\n#include <'.join(include) + '>' + elif include: + include = '#include <{}>'.format(include) + + sourceCode += include + '\n' + + tail = details.get("tail", "") + if isinstance(tail, list): + tail = "\n".join(tail) + + sourceCode += tail + '\n' + + sourceCode += "int main(int argc, char **argv)\n" + sourceCode += "{\n" + sourceCode += " (void)argc; (void)argv;\n" + sourceCode += " /* BEGIN TEST: */\n" + + main = details.get("main", "") + if isinstance(main, list): + main = "\n".join(main) + + sourceCode += main + '\n' + + sourceCode += " /* END TEST: */\n" + sourceCode += " return 0;\n" + sourceCode += "}\n" + + sourceCode = sourceCode.replace('"', '\\"') + + cm_fh.write("# {}\n".format(test)) + cm_fh.write("qt_config_compile_test({}\n".format(featureName(test))) + cm_fh.write(lineify("LABEL", data.get("label", ""))) + cm_fh.write('"' + sourceCode + '"') + if "qmake" in details: + cm_fh.write("# FIXME: qmake: {}\n".format(details["qmake"])) + cm_fh.write(")\n\n") + + elif data["type"] == "x86Simd": + knownTests.add(test) + + label = data["label"] + + cm_fh.write("# {}\n".format(test)) + cm_fh.write("qt_config_compile_test_x86simd({} \"{}\")\n".format(test, label)) + cm_fh.write("\n") + +# "features": { +# "android-style-assets": { +# "label": "Android Style Assets", +# "condition": "config.android", +# "output": [ "privateFeature" ], +# "comment": "This belongs into gui, but the license check needs it here already." +# }, + else: + print(' XXXX UNHANDLED TEST TYPE {} in test description'.format(data["type"])) + + +def parseFeature(ctx, feature, data, cm_fh): + skip_features = { + 'c++11', 'c++14', 'c++1y', 'c++1z', # C++ versions + 'c89', 'c99', 'c11', # C versions + 'stl', # Do we really need to test for this in 2018?! + 'rpath', 'rpath_dir', # rpath related + 'static', 'shared', # static/shared libs + 'debug', 'release', 'debug_and_release', 'build_all', 'optimize_debug', 'optimize_size', # build types + 'release_tools', 'gcov', 'silent', 'profile', + 'msvc_mp', 'static_runtime', 'incredibuild_xge', 'ccache', # compiler specific stuff + 'sanitize_address', 'sanitize_thread', 'sanitize_memory', # sanitizer + 'sanitize_undefined', 'sanitizer', + 'force_debug_info', 'separate_debug_info', 'warnings_are_errors', # FIXME: Do we need these? + 'strip', 'precompile_header', 'ltcg', 'enable_new_dtags', + 'enable_gdb_index', 'reduce_relocations', + 'stack-protector-strong', + 'host-dbus', # dbus related + 'cross_compile', 'gcc-sysroot', # cross compile related + 'gc_binaries', 'qmakeargs', 'use_gold_linker', 'pkg-config', 'verifyspec', # qmake stuff... + 'GNUmake', 'compiler-flags', + 'system-doubleconversion', 'system-pcre2', 'system-zlib', 'system-png', 'system-jpeg', 'system-freetype', 'system-xcb', 'xkbcommon-system', # system libraries + 'doubleconversion', + 'dlopen', # handled by CMAKE_DL_LIBS + 'alloc_stdlib_h', 'alloc_h', 'alloc_malloc_h', # handled by alloc target + 'posix_fallocate', # Only needed for sqlite, which we do not want to build + 'qpa_default_platform', # Not a bool! + 'sun-libiconv', # internal feature but not referenced in our system + } + if feature in skip_features: + print(' **** Skipping features {}: masked.'.format(feature)) + return + + disabled_features = set() + + override_condition = {} + + handled = { 'autoDetect', 'comment', 'condition', 'description', 'disable', 'emitIf', 'enable', 'label', 'output', 'purpose', 'section' } + label = data.get('label', '') + purpose = data.get('purpose', data.get('description', label)) + autoDetect = map_condition(data.get('autoDetect', '')) + condition = override_condition.get(feature, map_condition(data.get('condition', ''))) + output = data.get('output', []) + comment = data.get('comment', '') + section = data.get('section', '') + enable = map_condition(data.get('enable', '')) + disable = map_condition(data.get('disable', '')) + emitIf = map_condition(data.get('emitIf', '')) + + if feature in disabled_features: + condition = "FALSE" + + for k in [k for k in data.keys() if k not in handled]: + print(' XXXX UNHANDLED KEY {} in feature description'.format(k)) + + if not output: + # feature that is only used in the conditions of other features + output = ["internalFeature"] + + publicInfo = False + privateInfo = False + internalFeature = False + + for o in output: + outputType = o + outputArgs = {} + if isinstance(o, dict): + outputType = o['type'] + outputArgs = o + + if outputType in ['varAssign', 'varAppend', 'varRemove', 'publicQtConfig', 'privateConfig', 'publicConfig']: + continue + + elif outputType in ['feature', 'publicFeature', 'define']: + publicInfo = True + elif outputType == 'privateFeature': + privateInfo = True + elif outputType == 'internalFeature': + internalFeature = True + else: + print(' XXXX UNHANDLED OUTPUT TYPE {} in feature {}.'.format(outputType, feature)) + continue + + if not publicInfo and not privateInfo and not internalFeature: + print(' **** Skipping feature {}: Not relevant for C++.'.format(feature)) + return + + # write feature: + cxxFeature = featureName(feature) + if comment: + cm_fh.write('# {}\n'.format(comment)) + + cm_fh.write('qt_feature("{}"'.format(cxxFeature)) + if publicInfo: + cm_fh.write(' PUBLIC') + if privateInfo: + cm_fh.write(' PRIVATE') + cm_fh.write('\n') + + cm_fh.write(lineify('SECTION', section)) + cm_fh.write(lineify('LABEL', label)) + if purpose != label: + cm_fh.write(lineify('PURPOSE', purpose)) + cm_fh.write(lineify('AUTODETECT', autoDetect, quote=False)) + cm_fh.write(lineify('CONDITION', condition, quote=False)) + cm_fh.write(lineify('ENABLE', enable, quote=False)) + cm_fh.write(lineify('DISABLE', disable, quote=False)) + cm_fh.write(lineify('EMIT_IF', emitIf, quote=False)) + cm_fh.write(')\n') + + for o in output: + outputType = o + outputArgs = {} + if isinstance(o, dict): + outputType = o['type'] + outputArgs = o + + # Map feature to define: + if outputType == 'feature': + outputType = 'define' + outputArgs = {'name': 'QT_NO_{}'.format(cxxFeature.upper()), + 'negative': True, + 'value': 1, + 'type': 'define'} + + if outputType != 'define': + continue + + if outputArgs.get('name') is None: + print(' XXXX DEFINE output without name in feature {}.'.format(feature)) + continue + + cm_fh.write('qt_feature_definition("{}" "{}"'.format(cxxFeature, outputArgs.get('name'))) + if outputArgs.get('negative', False): + cm_fh.write(' NEGATE') + if outputArgs.get('value') is not None: + cm_fh.write(' VALUE "{}"'.format(outputArgs.get('value'))) + cm_fh.write(')\n') + + +def processInputs(ctx, data, cm_fh): + print(' inputs:') + if 'commandline' not in data: + return + + commandLine = data['commandline'] + if "options" not in commandLine: + return + + for input in commandLine['options']: + parseInput(ctx, input, commandLine['options'][input], cm_fh) + + +def processTests(ctx, data, cm_fh): + print(' tests:') + if 'tests' not in data: + return + + for test in data['tests']: + parseTest(ctx, test, data['tests'][test], cm_fh) + + +def processFeatures(ctx, data, cm_fh): + print(' features:') + if 'features' not in data: + return + + for feature in data['features']: + parseFeature(ctx, feature, data['features'][feature], cm_fh) + + +def processLibraries(ctx, data, cm_fh): + cmake_find_packages_set = set() + print(' libraries:') + if 'libraries' not in data: + return + + for lib in data['libraries']: + parseLib(ctx, lib, data['libraries'][lib], cm_fh, cmake_find_packages_set) + + +def processSubconfigs(dir, ctx, data): + assert ctx is not None + if 'subconfigs' in data: + for subconf in data['subconfigs']: + subconfDir = os.path.join(dir, subconf) + subconfData = readJsonFromDir(subconfDir) + subconfCtx = ctx + processJson(subconfDir, subconfCtx, subconfData) + + +def processJson(dir, ctx, data): + ctx['module'] = data.get('module', 'global') + + ctx = processFiles(ctx, data) + + with open(os.path.join(dir, "configure.cmake"), 'w') as cm_fh: + cm_fh.write("\n\n#### Inputs\n\n") + + processInputs(ctx, data, cm_fh) + + cm_fh.write("\n\n#### Libraries\n\n") + + processLibraries(ctx, data, cm_fh) + + cm_fh.write("\n\n#### Tests\n\n") + + processTests(ctx, data, cm_fh) + + cm_fh.write("\n\n#### Features\n\n") + + processFeatures(ctx, data, cm_fh) + + if ctx.get('module') == 'global': + cm_fh.write('\nqt_extra_definition("QT_VERSION_STR" "\\\"${PROJECT_VERSION}\\\"" PUBLIC)\n') + cm_fh.write('qt_extra_definition("QT_VERSION_MAJOR" ${PROJECT_VERSION_MAJOR} PUBLIC)\n') + cm_fh.write('qt_extra_definition("QT_VERSION_MINOR" ${PROJECT_VERSION_MINOR} PUBLIC)\n') + cm_fh.write('qt_extra_definition("QT_VERSION_PATCH" ${PROJECT_VERSION_PATCH} PUBLIC)\n') + + if ctx.get('module') == 'gui': + cm_fh.write('\nqt_extra_definition("QT_QPA_DEFAULT_PLATFORM" "${QT_QPA_DEFAULT_PLATFORM}" PUBLIC)\n') + + # do this late: + processSubconfigs(dir, ctx, data) + + +def main(): + if len(sys.argv) != 2: + print("This scripts needs one directory to process!") + quit(1) + + dir = sys.argv[1] + + print("Processing: {}.".format(dir)) + + data = readJsonFromDir(dir) + processJson(dir, {}, data) + + +if __name__ == '__main__': + main() diff --git a/util/cmake/generate_module_map.sh b/util/cmake/generate_module_map.sh new file mode 100755 index 0000000000..1ca0bfc43c --- /dev/null +++ b/util/cmake/generate_module_map.sh @@ -0,0 +1,38 @@ +#!/usr/bin/bash +############################################################################# +## +## Copyright (C) 2018 The Qt Company Ltd. +## Contact: https://www.qt.io/licensing/ +## +## This file is part of the plugins 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$ +## +############################################################################# + +pro_files=$(find . -name \*.pro) + +for f in ${pro_files}; do + if grep "^load(qt_module)" "${f}" > /dev/null ; then + target=$(grep "TARGET" "${f}" | cut -d'=' -f2 | sed -e "s/\s*//g") + module=$(basename ${f}) + echo "'${module%.pro}': '${target}'," + fi +done diff --git a/util/cmake/helper.py b/util/cmake/helper.py new file mode 100644 index 0000000000..2ddeee98c1 --- /dev/null +++ b/util/cmake/helper.py @@ -0,0 +1,206 @@ +############################################################################# +## +## Copyright (C) 2018 The Qt Company Ltd. +## Contact: https://www.qt.io/licensing/ +## +## This file is part of the plugins 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$ +## +############################################################################# + +import re + + +def featureName(input: str) -> str: + return re.sub(r'[^a-zA-Z0-9_]', '_', input) + + +def map_qt_base_library(lib: str) -> str: + library_map = { + 'global': 'Qt::Core', # manually added special case + 'accessibility_support': 'Qt::AccessibilitySupport', + 'androidextras': 'Qt::AndroidExtras', + 'animation': 'Qt::3DAnimation', + 'application-lib': 'Qt::AppManApplication', + 'bluetooth': 'Qt::Bluetooth', + 'bootstrap-dbus': 'Qt::BootstrapDBus', + 'bootstrap': 'Qt::Bootstrap', + 'client': 'Qt::WaylandClient', + 'clipboard_support': 'Qt::ClipboardSupport', + 'common-lib': 'Qt::AppManCommon', + 'compositor': 'Qt::WaylandCompositor', + 'concurrent': 'Qt::Concurrent', + 'container': 'Qt::AxContainer', + 'control': 'Qt::AxServer', + 'core_headers': 'Qt::WebEngineCore', + 'core': 'Qt::Core', + 'coretest': 'Qt::3DCoreTest', + 'crypto-lib': 'Qt::AppManCrypto', + 'dbus': 'Qt::DBus', + 'devicediscovery': 'Qt::DeviceDiscoverySupport', + 'edid': 'Qt::EdidSupport', + 'eglconvenience': 'Qt::EglSupport', + 'eglfsdeviceintegration': 'Qt::EglFSDeviceIntegration', + 'eglfs_kms_support': 'Qt::EglFsKmsSupport', + 'enginio_client': 'Enginio', + 'eventdispatchers': 'Qt::EventDispatcherSupport', + 'extras': 'Qt::3DExtras', + 'fbconvenience': 'Qt::FbSupport', + 'fontdatabase_support': 'Qt::FontDatabaseSupport', + 'gamepad': 'Qt::Gamepad', + 'glxconvenience': 'Qt::GlxSupport', + 'graphics_support': 'Qt::GraphicsSupport', + 'gsttools': 'Qt::MultimediaGstTools', + 'gui': 'Qt::Gui', + 'help': 'Qt::Help', + 'hunspellinputmethod': 'Qt::HunspellInputMethod', + 'input': 'Qt::InputSupport', + 'installer-lib': 'Qt::AppManInstaller', + 'kmsconvenience': 'Qt::KmsSupport', + 'launcher-lib': 'Qt::AppManLauncher', + 'lib': 'Qt::Designer', + 'linuxaccessibility': 'Qt::LinuxAccessibilitySupport', + 'location': 'Qt::Location', + 'logic': 'Qt::3DLogic', + 'macextras': 'Qt::MacExtras', + 'main-lib': 'Qt::AppManMain', + 'manager-lib': 'Qt::AppManManager', + 'monitor-lib': 'Qt::AppManMonitor', + 'multimedia': 'Qt::Multimedia', + 'multimediawidgets': 'Qt::MultimediaWidgets', + 'network': 'Qt::Network', + 'nfc': 'Qt::Nfc', + 'oauth': 'Qt::NetworkAuth', + 'openglextensions': 'Qt::OpenGLExtensions', + 'opengl': 'Qt::OpenGL', + 'package-lib': 'Qt::AppManPackage', + 'packetprotocol': 'Qt::PacketProtocol', + 'particles': 'Qt::QuickParticles', + 'platformcompositor': 'Qt::PlatformCompositorSupport', + 'plugin-interfaces': 'Qt::AppManPluginInterfaces', + 'positioning': 'Qt::Positioning', + 'positioningquick': 'Qt::PositioningQuick', + 'printsupport': 'Qt::PrintSupport', + 'purchasing': 'Qt::Purchasing', + 'qmldebug': 'Qt::QmlDebug', + 'qmldevtools': 'Qt::QmlDevTools', + 'qml': 'Qt::Qml', + 'qmltest': 'Qt::QuickTest', + 'qtmultimediaquicktools': 'Qt::MultimediaQuick', + 'qtzlib': 'Qt::Zlib', + 'quick3danimation': 'Qt::3DQuickAnimation', + 'quick3dextras': 'Qt::3DQuickExtras', + 'quick3dinput': 'Qt::3DQuickInput', + 'quick3d': 'Qt::3DQuick', + 'quick3drender': 'Qt::3DQuickRender', + 'quick3dscene2d': 'Qt::3DQuickScene2D', + 'quickcontrols2': 'Qt::QuickControls2', + 'quick': 'Qt::Quick', + 'quickshapes': 'Qt::QuickShapes', + 'quicktemplates2': 'Qt::QuickTemplates2', + 'quickwidgets': 'Qt::QuickWidgets', + 'render': 'Qt::3DRender', + 'script': 'Qt::Script', + 'scripttools': 'Qt::ScriptTools', + 'sensors': 'Qt::Sensors', + 'serialport': 'Qt::SerialPort', + 'services': 'Qt::ServiceSupport', + 'sql': 'Qt::Sql', + 'svg': 'Qt::Svg', + 'testlib': 'Qt::Test', + 'theme_support': 'Qt::ThemeSupport', + 'service_support': 'Qt::ServiceSupport', + 'eventdispatcher_support': 'Qt::EventDispatcherSupport', + 'edid_support': 'Qt::EdidSupport', + 'tts': 'Qt::TextToSpeech', + 'uiplugin': 'Qt::UiPlugin', + 'uitools': 'Qt::UiTools', + 'virtualkeyboard': 'Qt::VirtualKeyboard', + 'vkconvenience': 'Qt::VulkanSupport', + 'webchannel': 'Qt::WebChannel', + 'webengine': 'Qt::WebEngine', + 'webenginewidgets': 'Qt::WebEngineWidgets', + 'websockets': 'Qt::WebSockets', + 'webview': 'Qt::WebView', + 'widgets': 'Qt::Widgets', + 'window-lib': 'Qt::AppManWindow', + 'windowsuiautomation': 'Qt::WindowsUIAutomationSupport', + 'winextras': 'Qt::WinExtras', + 'x11extras': 'Qt::X11Extras', + 'xcb_qpa_lib': 'Qt::XcbQpa', + 'xmlpatterns': 'Qt::XmlPatterns', + 'xml': 'Qt::Xml', + } + return library_map.get(lib, lib) + + +def map_qt_library(lib: str) -> str: + private = False + if lib.endswith('-private'): + private = True + lib = lib[:-8] + mapped = map_qt_base_library(lib) + if private: + mapped += 'Private' + return mapped + + +platform_mapping = { + 'win32': 'WIN32', + 'unix': 'UNIX', + 'darwin': 'APPLE', + 'linux': 'LINUX', + 'integrity': 'INTEGRITY', + 'qnx': 'QNX', + 'vxworks': 'VXWORKS', + 'hpux': 'HPUX', + 'nacl': 'NACL', + 'android': 'ANDROID', + 'android-embedded': 'ANDROID_EMBEDDED', + 'uikit': 'APPLE_UIKIT', + 'tvos': 'APPLE_TVOS', + 'watchos': 'APPLE_WATCHOS', + 'winrt': 'WINRT', + 'wasm': 'WASM', + 'msvc': 'MSVC', + 'clang': 'CLANG', + 'gcc': 'GCC', + 'osx': 'APPLE_OSX', + 'freebsd': 'FREEBSD', + 'haiku': 'HAIKU', + 'netbsd': 'NETBSD', + 'mac': 'APPLE_OSX', +} + + +def substitute_platform(platform: str) -> str: + """ Return the qmake platform as cmake platform or the unchanged string. """ + return platform_mapping.get(platform, platform) + + +libray_mapping = { + 'zlib': 'ZLIB::ZLIB', + 'glib': 'PkgConfig::GLib', +} + + +def substitute_libs(lib: str) -> str: + return libray_mapping.get(lib, lib) diff --git a/util/cmake/pro2cmake.py b/util/cmake/pro2cmake.py new file mode 100755 index 0000000000..37364d63ad --- /dev/null +++ b/util/cmake/pro2cmake.py @@ -0,0 +1,736 @@ +#!/usr/bin/env python3 +############################################################################# +## +## Copyright (C) 2018 The Qt Company Ltd. +## Contact: https://www.qt.io/licensing/ +## +## This file is part of the plugins 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$ +## +############################################################################# + +from argparse import ArgumentParser +import os.path +import re +import sys +import io +from typing import IO, List, Dict, Union +import typing + +import pyparsing as pp + +from helper import map_qt_library, featureName, substitute_platform, substitute_libs + + +def _parse_commandline(): + parser = ArgumentParser(description='Generate CMakeLists.txt files from .pro files.') + parser.add_argument('--debug', dest='debug', action='store_true', + help='Turn on all debug output') + parser.add_argument('--debug-parser', dest='debug_parser', action='store_true', + help='Print debug output from qmake parser.') + parser.add_argument('--debug-parse-result', dest='debug_parse_result', action='store_true', + help='Dump the qmake parser result.') + parser.add_argument('--debug-parse-dictionary', dest='debug_parse_dictionary', action='store_true', + help='Dump the qmake parser result as dictionary.') + parser.add_argument('--debug-pro-structure', dest='debug_pro_structure', action='store_true', + help='Dump the structure of the qmake .pro-file.') + parser.add_argument('--debug-full-pro-structure', dest='debug_full_pro_structure', action='store_true', + help='Dump the full structure of the qmake .pro-file (with includes).') + parser.add_argument('files', metavar='<.pro/.pri file>', type=str, nargs='+', + help='The .pro/.pri file to process') + + return parser.parse_args() + + +def spaces(indent: int) -> str: + return ' ' * indent + + +def map_to_file(f: str, top_dir: str, current_dir: str, + want_absolute_path: bool = False) -> typing.Optional[str]: + if f == '$$NO_PCH_SOURCES': + return None + if f.startswith('$$PWD/') or f == '$$PWD': # INCLUDEPATH += $$PWD + return os.path.join(os.path.relpath(current_dir, top_dir), f[6:]) + if f.startswith('$$OUT_PWD/'): + return "${CMAKE_CURRENT_BUILD_DIR}/" + f[10:] + if f.startswith('$$QT_SOURCE_TREE'): + return "${PROJECT_SOURCE_DIR}/" + f[17:] + if f.startswith("./"): + return os.path.join(current_dir, f) + if want_absolute_path and not os.path.isabs(f): + return os.path.join(current_dir, f) + return f + + +def map_source_to_cmake(source: str) -> typing.Optional[str]: + if not source or source == '$$NO_PCH_SOURCES': + return None + if source.startswith('$$PWD/'): + return source[6:] + if source == '.': + return "${CMAKE_CURRENT_SOURCE_DIR}" + if source.startswith('$$QT_SOURCE_TREE/'): + return "${PROJECT_SOURCE_DIR}/" + source[17:] + return source + + +def map_source_to_fs(base_dir: str, file: str, source: str) -> typing.Optional[str]: + if source is None or source == '$$NO_PCH_SOURCES': + return None + if source.startswith('$$PWD/'): + return os.path.join(os.path.dirname(file), source[6:]) + if source.startswith('$$QT_SOURCE_TREE/'): + return os.path.join('.', source[17:]) + if source.startswith('${PROJECT_SOURCE_DIR}/'): + return os.path.join('.', source[22:]) + if source.startswith('${CMAKE_CURRENT_SOURCE_DIR}/'): + return os.path.join(base_dir, source[28:]) + return os.path.join(base_dir, source) + + +class Scope: + def __init__(self, file: typing.Optional[str]=None, condition: str='', base_dir: str='') -> None: + self._parent = None # type: Scope + self._basedir = base_dir + if file: + self._currentdir = os.path.dirname(file) + if not self._currentdir: + self._currentdir = '.' + if not self._basedir: + self._basedir = self._currentdir + + self._file = file + self._condition = map_condition(condition) + self._children = [] # type: List[Scope] + self._values = {} # type: Dict[str, List[str]] + + def merge(self, other: 'Scope') -> None: + for c in other._children: + self.add_child(c) + other.set_basedir(self._basedir) + + for k in self._values.keys(): + self.append_value(k, other.get(k, [])) + + for k in other._values.keys(): + if k not in self._values: + self.set_value(k, other.get(k)) + + def set_basedir(self, dir: str) -> None: + self._basedir = dir + for c in self._children: + c.set_basedir(dir) + + def basedir(self) -> str: + return self._basedir + + def currentdir(self) -> str: + return self._currentdir + + @staticmethod + def FromDict(file: str, statements, cond: str = '', base_dir: str = ''): + scope = Scope(file, cond, base_dir) + for statement in statements: + if isinstance(statement, list): # Handle skipped parts... + assert not statement + continue + + operation = statement.get('operation', None) + if operation: + key = statement.get('key', '') + value = statement.get('value', []) + assert key != '' + + if key in ('HEADERS', 'SOURCES', 'INCLUDEPATH') or key.endswith('_HEADERS') or key.endswith('_SOURCES'): + value = [map_to_file(v, scope.basedir(), scope.currentdir()) for v in value] + + if operation == '=': + scope.set_value(key, value) + elif operation == '-=': + scope.substract_value(key, value) + elif operation == '+=' or operation == '*=': + scope.append_value(key, value) + else: + print('Unexpected operation "{}" in scope with condition {}.'.format(operation, cond)) + assert(False) + + continue + + condition = statement.get('condition', None) + if condition: + child = Scope.FromDict(file, statement.get('statements'), condition, scope.basedir()) + scope.add_child(child) + + else_statements = statement.get('else_statements') + if else_statements: + child = Scope.FromDict(file, else_statements, 'NOT ' + condition, scope.basedir()) + scope.add_child(child) + continue + + loaded = statement.get('loaded', None) + if loaded: + scope.append_value('_LOADED', loaded) + continue + + option = statement.get('option', None) + if option: + scope.append_value('_OPTION', option) + continue + + included = statement.get('included', None) + if included: + scope.append_value('_INCLUDED', + map_to_file(included, scope.basedir(), scope.currentdir())) + continue + + return scope + + def file(self) -> str: + return self._file or '' + + def cMakeListsFile(self) -> str: + return os.path.join(self.basedir(), 'CMakeLists.txt') + + def condition(self) -> str: + return self._condition + + def _push_down_TEMPLATE(self, template: str) -> None: + if not self._rawTemplate(): + self.set_value('TEMPLATE', [template, ]) + for c in self._children: + c._push_down_TEMPLATE(template) + + def add_child(self, scope: 'Scope') -> None: + scope._parent = self + if not scope._rawTemplate(): + scope._push_down_TEMPLATE(self.getTemplate()) + self._children.append(scope) + + def set_value(self, key: str, value: List[str]) -> None: + self._values[key] = value + + def append_value(self, key: str, value: Union[str, List[str]]) -> None: + array = self._values.get(key, []) + if isinstance(value, str): + array.append(value) + elif isinstance(value, list): + array += value + else: + assert False + self._values[key] = array + + def substract_value(self, key: str, value: Union[str, List[str]]) -> None: + if isinstance(value, str): + to_remove = [value, ] + if isinstance(value, list): + to_remove = value + + self.append_value(key, ['-{}'.format(v) for v in to_remove]) + + def children(self) -> List['Scope']: + return self._children + + def dump(self, *, indent: int = 0) -> None: + ind = ' ' * indent + if self._condition == '': + print('{}Scope {} in {}.'.format(ind, self._file, self._basedir)) + else: + print('{}Scope {} in {} with condition: {}.'.format(ind, self._file, self._basedir, self._condition)) + print('{}Keys:'.format(ind)) + for k in sorted(self._values.keys()): + print('{} {} = "{}"'.format(ind, k, self._values[k])) + print('{}Children:'.format(ind)) + for c in self._children: + c.dump(indent=indent + 1) + + def get(self, key: str, default=None) -> List[str]: + default = default or [] + return self._values.get(key, default) + + def getString(self, key: str, default: str = '') -> str: + v = self.get(key) + if isinstance(v, list): + if len(v) == 0: + return default + assert len(v) == 1 + return v[0] + elif isinstance(v, str): + return v + else: + assert False + return default + + def getTemplate(self) -> str: + return self.getString('TEMPLATE', 'app') + + def _rawTemplate(self) -> str: + return self.getString('TEMPLATE') + + def getTarget(self) -> str: + return self.getString('TARGET') or os.path.splitext(os.path.basename(self.file()))[0] + + +class QmakeParser: + def __init__(self, *, debug: bool = False) -> None: + self._Grammar = self._generate_grammar(debug) + + def _generate_grammar(self, debug: bool): + # Define grammar: + pp.ParserElement.setDefaultWhitespaceChars(' \t') + + LC = pp.Suppress(pp.Literal('\\') + pp.LineEnd()) + EOL = pp.Suppress(pp.Optional(pp.pythonStyleComment()) + pp.LineEnd()) + + Identifier = pp.Word(pp.alphas + '_', bodyChars=pp.alphanums+'_./') + Substitution = pp.Combine(pp.Literal('$') + + (((pp.Literal('$') + Identifier + pp.Optional(pp.nestedExpr())) + | (pp.Literal('(') + Identifier + pp.Literal(')')) + | (pp.Literal('{') + Identifier + pp.Literal('}')) + | (pp.Literal('$') + pp.Literal('{') + Identifier + pp.Optional(pp.nestedExpr()) + pp.Literal('}')) + | (pp.Literal('$') + pp.Literal('[') + Identifier + pp.Literal(']')) + ))) + # Do not match word ending in '\' since that breaks line continuation:-/ + LiteralValuePart = pp.Word(pp.printables, excludeChars='$#{}()') + SubstitutionValue = pp.Combine(pp.OneOrMore(Substitution | LiteralValuePart | pp.Literal('$'))) + Value = (pp.QuotedString(quoteChar='"', escChar='\\') | SubstitutionValue) + + Values = pp.ZeroOrMore(Value)('value') + + Op = pp.Literal('=') | pp.Literal('-=') | pp.Literal('+=') | pp.Literal('*=') + + Operation = Identifier('key') + Op('operation') + Values('value') + Load = pp.Keyword('load') + pp.Suppress('(') + Identifier('loaded') + pp.Suppress(')') + Include = pp.Keyword('include') + pp.Suppress('(') + pp.CharsNotIn(':{=}#)\n')('included') + pp.Suppress(')') + Option = pp.Keyword('option') + pp.Suppress('(') + Identifier('option') + pp.Suppress(')') + DefineTest = pp.Suppress(pp.Keyword('defineTest') + pp.Suppress('(') + Identifier + pp.Suppress(')') + + pp.nestedExpr(opener='{', closer='}') + pp.LineEnd()) # ignore the whole thing... + FunctionCall = pp.Suppress(Identifier + pp.nestedExpr()) + + Scope = pp.Forward() + + Statement = pp.Group(Load | Include | Option | DefineTest | FunctionCall | Operation) + StatementLine = Statement + EOL + StatementGroup = pp.ZeroOrMore(Scope | EOL | StatementLine) + + Block = pp.Suppress('{') + pp.Optional(EOL) \ + + pp.ZeroOrMore(EOL | Statement + EOL | Scope) \ + + pp.Optional(Statement) + pp.Optional(EOL) \ + + pp.Suppress('}') + pp.Optional(EOL) + + Condition = pp.Optional(pp.White()) + pp.CharsNotIn(':{=}#\\\n') + Condition.setParseAction(lambda x: ' '.join(x).strip()) + + SingleLineScope = pp.Suppress(pp.Literal(':')) + pp.Group(Scope | Block | StatementLine)('statements') + MultiLineScope = Block('statements') + + SingleLineElse = pp.Suppress(pp.Literal(':')) + pp.Group(Scope | StatementLine)('else_statements') + MultiLineElse = pp.Group(Block)('else_statements') + Else = pp.Suppress(pp.Keyword('else')) + (SingleLineElse | MultiLineElse) + Scope <<= pp.Group(Condition('condition') + (SingleLineScope | MultiLineScope) + pp.Optional(Else)) + + if debug: + for ename in "EOL Identifier Substitution SubstitutionValue LiteralValuePart Value Values SingleLineScope MultiLineScope Scope SingleLineElse MultiLineElse Else Condition Block StatementGroup Statement Load Include Option DefineTest FunctionCall Operation".split(): + expr = locals()[ename] + expr.setName(ename) + expr.setDebug() + + Grammar = StatementGroup('statements') + Grammar.ignore(LC) + + return Grammar + + def parseFile(self, file: str): + print('Parsing \"{}\"...'.format(file)) + try: + result = self._Grammar.parseFile(file, parseAll=True) + except pp.ParseException as pe: + print(pe.line) + print(' '*(pe.col-1) + '^') + print(pe) + raise pe + return result + + +def parseProFile(file: str, *, debug=False): + parser = QmakeParser(debug=debug) + return parser.parseFile(file) + + +def map_condition(condition: str) -> str: + condition = condition.replace('!', 'NOT ') + condition = condition.replace('&&', ' AND ') + condition = condition.replace('|', ' OR ') + condition = condition.replace('==', ' STREQUAL ') + + cmake_condition = '' + for part in condition.split(): + # some features contain e.g. linux, that should not be turned upper case + feature = re.match(r"(qtConfig|qtHaveModule)\(([a-zA-Z0-9_-]+)\)", part) + if feature: + part = 'QT_FEATURE_' + featureName(feature.group(2)) + else: + part = substitute_platform(part) + + part = part.replace('true', 'ON') + part = part.replace('false', 'OFF') + cmake_condition += ' ' + part + + return cmake_condition.strip() + + +def handle_subdir(scope: Scope, cm_fh: IO[str], *, indent: int = 0) -> None: + assert scope.getTemplate() == 'subdirs' + ind = ' ' * indent + for sd in scope.get('SUBDIRS', []): + full_sd = os.path.join(scope.basedir(), sd) + if os.path.isdir(full_sd): + cm_fh.write('{}add_subdirectory({})\n'.format(ind, sd)) + elif os.path.isfile(full_sd): + subdir_result = parseProFile(full_sd, debug=False) + subdir_scope = Scope.FromDict(full_sd, subdir_result.asDict().get('statements'), + '', scope.basedir()) + + cmakeify_scope(subdir_scope, cm_fh, indent=indent + 1) + elif sd.startswith('-'): + cm_fh.write('{}### remove_subdirectory("{}")\n'.format(ind, sd[1:])) + else: + print(' XXXX: SUBDIR {} in {}: Not found.'.format(sd, scope.file())) + + for c in scope.children(): + cond = c.condition() + if cond == 'else': + cm_fh.write('\n{}else()\n'.format(ind)) + elif cond: + cm_fh.write('\n{}if({})\n'.format(ind, cond)) + + handle_subdir(c, cm_fh, indent=indent + 1) + + if cond: + cm_fh.write('{}endif()\n'.format(ind)) + + +def sort_sources(sources) -> List[str]: + to_sort = {} # type: Dict[str, List[str]] + for s in sources: + if s is None: + continue + + dir = os.path.dirname(s) + base = os.path.splitext(os.path.basename(s))[0] + if base.endswith('_p'): + base = base[:-2] + sort_name = os.path.join(dir, base) + + array = to_sort.get(sort_name, []) + array.append(s) + + to_sort[sort_name] = array + + lines = [] + for k in sorted(to_sort.keys()): + lines.append(' '.join(sorted(to_sort[k]))) + + return lines + + +def write_header(cm_fh: IO[str], name: str, typename: str, *, indent: int=0): + cm_fh.write('{}#####################################################################\n'.format(spaces(indent))) + cm_fh.write('{}## {} {}:\n'.format(spaces(indent), name, typename)) + cm_fh.write('{}#####################################################################\n\n'.format(spaces(indent))) + + +def write_scope_header(cm_fh: IO[str], *, indent: int=0): + cm_fh.write('\n{}## Scopes:\n'.format(spaces(indent))) + cm_fh.write('{}#####################################################################\n'.format(spaces(indent))) + + +def write_sources_section(cm_fh: IO[str], scope: Scope, *, indent: int=0, + known_libraries=set()) -> None: + ind = spaces(indent) + + plugin_type = scope.get('PLUGIN_TYPE') + if plugin_type: + cm_fh.write('{} TYPE {}\n'.format(ind, plugin_type[0])) + + sources = scope.get('SOURCES') + scope.get('HEADERS') + scope.get('OBJECTIVE_SOURCES') + scope.get('NO_PCH_SOURCES') + scope.get('FORMS') + resources = scope.get('RESOURCES') + if resources: + qrc_only = True + for r in resources: + if not r.endswith('.qrc'): + qrc_only = False + break + + if not qrc_only: + print(' XXXX Ignoring non-QRC file resources.') + else: + sources += resources + + sources = [map_source_to_cmake(s) for s in sources] + if sources: + cm_fh.write('{} SOURCES\n'.format(ind)) + for l in sort_sources(sources): + cm_fh.write('{} {}\n'.format(ind, l)) + + if scope.get('DEFINES'): + cm_fh.write('{} DEFINES\n'.format(ind)) + for d in scope.get('DEFINES'): + d = d.replace('=\\\\\\"$$PWD/\\\\\\"', '="${CMAKE_CURRENT_SOURCE_DIR}/"') + cm_fh.write('{} {}\n'.format(ind, d)) + if scope.get('INCLUDEPATH'): + cm_fh.write('{} INCLUDE_DIRECTORIES\n'.format(ind)) + for i in scope.get('INCLUDEPATH'): + cm_fh.write('{} {}\n'.format(ind, i)) + + dependencies = [map_qt_library(q) for q in scope.get('QT') if map_qt_library(q) not in known_libraries] + dependencies += [map_qt_library(q) for q in scope.get('QT_FOR_PRIVATE') if map_qt_library(q) not in known_libraries] + dependencies += scope.get('QMAKE_USE_PRIVATE') + scope.get('LIBS_PRIVATE') + scope.get('LIBS') + if dependencies: + cm_fh.write('{} LIBRARIES\n'.format(ind)) + is_framework = False + for d in dependencies: + if d == '-framework': + is_framework = True + continue + if is_framework: + d = '${FW%s}' % d + if d.startswith('-l'): + d = d[2:] + d = substitute_libs(d) + cm_fh.write('{} {}\n'.format(ind, d)) + is_framework = False + + +def write_extend_target(cm_fh: IO[str], target: str, scope: Scope, parent_condition: str='', + previous_conditon: str='', *, indent: int=0) -> str: + total_condition = scope.condition() + if total_condition == 'else': + assert previous_conditon, "Else branch without previous condition in: %s" % scope.file() + total_condition = 'NOT ({})'.format(previous_conditon) + if parent_condition: + total_condition = '({}) AND ({})'.format(parent_condition, total_condition) + + extend_qt_io_string = io.StringIO() + write_sources_section(extend_qt_io_string, scope) + extend_qt_string = extend_qt_io_string.getvalue() + + extend_scope = '\n{}extend_target({} CONDITION {}\n{})\n'.format(spaces(indent), target, total_condition, extend_qt_string) + + if not extend_qt_string: + # Comment out the generated extend_target call because there no sources were found, but keep it commented + # for informational purposes. + extend_scope = ''.join(['#' + line for line in extend_scope.splitlines(keepends=True)]) + cm_fh.write(extend_scope) + + children = scope.children() + if children: + prev_condition = '' + for c in children: + prev_condition = write_extend_target(cm_fh, target, c, total_condition, prev_condition) + + return total_condition + + +def write_main_part(cm_fh: IO[str], name: str, typename: str, + cmake_function: str, scope: Scope, *, + extra_lines: typing.List[str] = [], + indent: int=0, + **kwargs: typing.Any): + write_header(cm_fh, name, typename, indent=indent) + + cm_fh.write('{}{}({}\n'.format(spaces(indent), cmake_function, name)) + for extra_line in extra_lines: + cm_fh.write('{} {}\n'.format(spaces(indent), extra_line)) + + write_sources_section(cm_fh, scope, indent=indent, **kwargs) + + # Footer: + cm_fh.write('{})\n'.format(spaces(indent))) + + # Scopes: + if not scope.children(): + return + + write_scope_header(cm_fh, indent=indent) + + for c in scope.children(): + write_extend_target(cm_fh, name, c, '', indent=indent) + + + +def write_module(cm_fh: IO[str], scope: Scope, *, indent: int=0) -> None: + module_name = scope.getTarget() + assert module_name.startswith('Qt') + + extra = [] + if 'static' in scope.get('CONFIG'): + extra.append('STATIC') + if 'no_module_headers' in scope.get('CONFIG'): + extra.append('NO_MODULE_HEADERS') + + write_main_part(cm_fh, module_name[2:], 'Module', 'add_qt_module', scope, + extra_lines=extra, indent=indent, known_libraries={'Qt::Core', }) + + + if 'qt_tracepoints' in scope.get('CONFIG'): + tracepoints = map_to_file(scope.getString('TRACEPOINT_PROVIDER'), scope.basedir(), scope.currentdir()) + cm_fh.write('\n\n{}qt_create_tracepoints({} {})\n'.format(spaces(indent), module_name[2:], tracepoints)) + + +def write_tool(cm_fh: IO[str], scope: Scope, *, indent: int=0) -> None: + tool_name = scope.getTarget() + + write_main_part(cm_fh, tool_name, 'Tool', 'add_qt_tool', scope, + indent=indent, known_libraries={'Qt::Core', }) + + +def write_test(cm_fh: IO[str], scope: Scope, *, indent: int=0) -> None: + test_name = scope.getTarget() + assert test_name + + write_main_part(cm_fh, test_name, 'Test', 'add_qt_test', scope, + indent=indent, known_libraries={'Qt::Core', 'Qt::Test', }) + + +def write_binary(cm_fh: IO[str], scope: Scope, gui: bool=False, *, indent: int=0) -> None: + binary_name = scope.getTarget() + assert binary_name + + extra = ['GUI',] if gui else [] + write_main_part(cm_fh, binary_name, 'Binary', 'add_qt_executable', scope, + extra_lines=extra, indent=indent, known_libraries={'Qt::Core', }) + + +def write_plugin(cm_fh, scope, *, indent: int=0): + plugin_name = scope.getTarget() + assert plugin_name + + write_main_part(cm_fh, plugin_name, 'Plugin', 'add_qt_plugin', scope, + indent=indent, known_libraries={'QtCore', }) + + +def handle_app_or_lib(scope: Scope, cm_fh: IO[str], *, indent=0) -> None: + assert scope.getTemplate() in ('app', 'lib', None) + + is_lib = scope.getTemplate() == 'lib' + is_plugin = any('qt_plugin' == s for s in scope.get('_LOADED', [])) + + if is_lib or 'qt_module' in scope.get('_LOADED', []): + write_module(cm_fh, scope, indent=indent) + elif is_plugin: + write_plugin(cm_fh, scope, indent=indent) + elif 'qt_tool' in scope.get('_LOADED', []): + write_tool(cm_fh, scope, indent=indent) + else: + if 'testcase' in scope.get('CONFIG') or 'testlib' in scope.get('CONFIG'): + write_test(cm_fh, scope, indent=indent) + else: + gui = 'console' not in scope.get('CONFIG') + write_binary(cm_fh, scope, gui, indent=indent) + + docs = scope.getString("QMAKE_DOCS") + if docs: + cm_fh.write("\n{}add_qt_docs({})\n".format(spaces(indent), map_to_file(docs, scope.basedir(), scope.currentdir()))) + + +def handle_qt_for_config(scope: Scope, cm_fh: IO[str], *, indent: int=0) -> None: + for config in scope.get("QT_FOR_CONFIG") or []: + lib = map_qt_library(config) + if lib.endswith("Private"): + cm_fh.write('{}qt_pull_features_into_current_scope(PRIVATE_FEATURES {})\n'.format(spaces(indent), lib[:-len("Private")])) + else: + cm_fh.write('{}qt_pull_features_into_current_scope(PUBLIC_FEATURES {})\n'.format(spaces(indent), lib)) + + +def cmakeify_scope(scope: Scope, cm_fh: IO[str], *, indent: int=0) -> None: + template = scope.getTemplate() + handle_qt_for_config(scope, cm_fh) + if template == 'subdirs': + handle_subdir(scope, cm_fh, indent=indent) + elif template in ('app', 'lib', None): + handle_app_or_lib(scope, cm_fh, indent=indent) + else: + print(' XXXX: {}: Template type {} not yet supported.' + .format(scope.file(), template)) + + +def generate_cmakelists(scope: Scope) -> None: + with open(scope.cMakeListsFile(), 'w') as cm_fh: + assert scope.file() + cm_fh.write('# Generated from {}.\n\n'.format(os.path.basename(scope.file()))) + cmakeify_scope(scope, cm_fh) + + +def do_include(scope: Scope, *, debug: bool=False) -> None: + for i in scope.get('_INCLUDED', []): + dir = scope.basedir() + include_file = map_to_file(i, dir, scope.currentdir(), want_absolute_path=True) + if not os.path.isfile(include_file): + print(' XXXX: Failed to include {}.'.format(include_file)) + continue + + include_result = parseProFile(include_file, debug=debug) + include_scope = Scope.FromDict(include_file, include_result.asDict().get('statements'), + '', dir) + + do_include(include_scope) + + scope.merge(include_scope) + + for c in scope.children(): + do_include(c) + + +def main() -> None: + args = _parse_commandline() + + for file in args.files: + parseresult = parseProFile(file, debug=args.debug_parser or args.debug) + + if args.debug_parse_result or args.debug: + print('\n\n#### Parser result:') + print(parseresult) + print('\n#### End of parser result.\n') + if args.debug_parse_dictionary or args.debug: + print('\n\n####Parser result dictionary:') + print(parseresult.asDict()) + print('\n#### End of parser result dictionary.\n') + + file_scope = Scope.FromDict(file, parseresult.asDict().get('statements')) + + if args.debug_pro_structure or args.debug: + print('\n\n#### .pro/.pri file structure:') + print(file_scope.dump()) + print('\n#### End of .pro/.pri file structure.\n') + + do_include(file_scope) + + if args.debug_full_pro_structure or args.debug: + print('\n\n#### Full .pro/.pri file structure:') + print(file_scope.dump()) + print('\n#### End of full .pro/.pri file structure.\n') + + generate_cmakelists(file_scope) + + +if __name__ == '__main__': + main() diff --git a/util/cmake/run_pro2cmake.py b/util/cmake/run_pro2cmake.py new file mode 100755 index 0000000000..4340eab094 --- /dev/null +++ b/util/cmake/run_pro2cmake.py @@ -0,0 +1,44 @@ +#!/usr/bin/env python3 +############################################################################# +## +## Copyright (C) 2018 The Qt Company Ltd. +## Contact: https://www.qt.io/licensing/ +## +## This file is part of the plugins 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$ +## +############################################################################# + +import glob +import os +import subprocess +import sys + +script_path = os.path.dirname(os.path.abspath(__file__)) +base_path = os.path.dirname(script_path) +pro2cmake = script_path + '/pro2cmake.py' + +if len(sys.argv) > 1: + base_path = os.path.abspath(sys.argv[1]) + +for filename in glob.iglob(base_path + '/**/*.pro', recursive=True): + print('Converting:', filename) + subprocess.run([pro2cmake, filename]) diff --git a/util/cmake/tests/__init__.py b/util/cmake/tests/__init__.py new file mode 100644 index 0000000000..e69de29bb2 diff --git a/util/cmake/tests/data/complex_values.pro b/util/cmake/tests/data/complex_values.pro new file mode 100644 index 0000000000..4d747c1dd7 --- /dev/null +++ b/util/cmake/tests/data/complex_values.pro @@ -0,0 +1,22 @@ +linux:!static { + precompile_header { + # we'll get an error if we just use SOURCES += + no_pch_assembler.commands = $$QMAKE_CC -c $(CFLAGS) $(INCPATH) ${QMAKE_FILE_IN} -o ${QMAKE_FILE_OUT} + no_pch_assembler.dependency_type = TYPE_C + no_pch_assembler.output = ${QMAKE_VAR_OBJECTS_DIR}${QMAKE_FILE_BASE}$${first(QMAKE_EXT_OBJ)} + no_pch_assembler.input = NO_PCH_ASM + no_pch_assembler.name = compiling[no_pch] ${QMAKE_FILE_IN} + silent: no_pch_assembler.commands = @echo compiling[no_pch] ${QMAKE_FILE_IN} && $$no_pch_assembler.commands + CMAKE_ANGLE_GLES2_IMPLIB_RELEASE = libGLESv2.$${QMAKE_EXTENSION_STATICLIB} + HOST_BINS = $$[QT_HOST_BINS] + CMAKE_HOST_DATA_DIR = $$[QT_HOST_DATA/src]/ + TR_EXCLUDE += ../3rdparty/* + + QMAKE_EXTRA_COMPILERS += no_pch_assembler + NO_PCH_ASM += global/minimum-linux.S + } else { + SOURCES += global/minimum-linux.S + } + HEADERS += global/minimum-linux_p.h +} + diff --git a/util/cmake/tests/data/definetest.pro b/util/cmake/tests/data/definetest.pro new file mode 100644 index 0000000000..76b63d239f --- /dev/null +++ b/util/cmake/tests/data/definetest.pro @@ -0,0 +1,6 @@ +defineTest(pathIsAbsolute) { + p = $$clean_path($$1) + !isEmpty(p):isEqual(p, $$absolute_path($$p)): return(true) + return(false) +} + diff --git a/util/cmake/tests/data/else.pro b/util/cmake/tests/data/else.pro new file mode 100644 index 0000000000..bbf9c5ac9f --- /dev/null +++ b/util/cmake/tests/data/else.pro @@ -0,0 +1,6 @@ + +linux { + SOURCES += a.cpp +} else { + SOURCES += b.cpp +} diff --git a/util/cmake/tests/data/else2.pro b/util/cmake/tests/data/else2.pro new file mode 100644 index 0000000000..f2ef36ec28 --- /dev/null +++ b/util/cmake/tests/data/else2.pro @@ -0,0 +1,4 @@ + +osx: A = 1 +else: win32: B = 2 +else: C = 3 diff --git a/util/cmake/tests/data/else3.pro b/util/cmake/tests/data/else3.pro new file mode 100644 index 0000000000..0de9c2c1d9 --- /dev/null +++ b/util/cmake/tests/data/else3.pro @@ -0,0 +1,7 @@ +qtConfig(timezone) { + A = 1 +} else:win32 { + B = 2 +} else { + C = 3 +} diff --git a/util/cmake/tests/data/else4.pro b/util/cmake/tests/data/else4.pro new file mode 100644 index 0000000000..9ed676ccfa --- /dev/null +++ b/util/cmake/tests/data/else4.pro @@ -0,0 +1,6 @@ +qtConfig(timezone) { + A = 1 +} else:win32: B = 2 +else { + C = 3 +} diff --git a/util/cmake/tests/data/else5.pro b/util/cmake/tests/data/else5.pro new file mode 100644 index 0000000000..3de76af50a --- /dev/null +++ b/util/cmake/tests/data/else5.pro @@ -0,0 +1,10 @@ +# comments +qtConfig(timezone) { # bar + A = 1 +} else:win32 { + B = 2 # foo +} else { C = 3 +# baz + # foobar +} +# endcomment diff --git a/util/cmake/tests/data/else6.pro b/util/cmake/tests/data/else6.pro new file mode 100644 index 0000000000..9eaa834a19 --- /dev/null +++ b/util/cmake/tests/data/else6.pro @@ -0,0 +1,11 @@ +qtConfig(timezone) \ +{ + A = \ +1 +} \ +else:win32: \ +B = 2 +else: \ + C \ += 3 + diff --git a/util/cmake/tests/data/else7.pro b/util/cmake/tests/data/else7.pro new file mode 100644 index 0000000000..e663b1c05e --- /dev/null +++ b/util/cmake/tests/data/else7.pro @@ -0,0 +1,2 @@ +msvc:equals(QT_ARCH, i386): QMAKE_LFLAGS += /BASE:0x65000000 + diff --git a/util/cmake/tests/data/else8.pro b/util/cmake/tests/data/else8.pro new file mode 100644 index 0000000000..6d4d5f01ed --- /dev/null +++ b/util/cmake/tests/data/else8.pro @@ -0,0 +1,5 @@ +qtConfig(timezone) { A = 1 } else:win32: {\ +B = 2 \ +} else: \ + C \ += 3 \ diff --git a/util/cmake/tests/data/function_if.pro b/util/cmake/tests/data/function_if.pro new file mode 100644 index 0000000000..9af018f864 --- /dev/null +++ b/util/cmake/tests/data/function_if.pro @@ -0,0 +1,4 @@ +pathIsAbsolute($$CMAKE_HOST_DATA_DIR) { + CMAKE_HOST_DATA_DIR = $$[QT_HOST_DATA/src]/ +} + diff --git a/util/cmake/tests/data/include.pro b/util/cmake/tests/data/include.pro new file mode 100644 index 0000000000..22d8a40919 --- /dev/null +++ b/util/cmake/tests/data/include.pro @@ -0,0 +1,3 @@ +A = 42 +include(foo) # load foo +B=23 diff --git a/util/cmake/tests/data/load.pro b/util/cmake/tests/data/load.pro new file mode 100644 index 0000000000..c9717e9832 --- /dev/null +++ b/util/cmake/tests/data/load.pro @@ -0,0 +1,3 @@ +A = 42 +load(foo)# load foo +B=23 diff --git a/util/cmake/tests/data/quoted.pro b/util/cmake/tests/data/quoted.pro new file mode 100644 index 0000000000..61682aa0d0 --- /dev/null +++ b/util/cmake/tests/data/quoted.pro @@ -0,0 +1,5 @@ +if(linux*|hurd*):!cross_compile:!static:!*-armcc* { + prog=$$quote(if (/program interpreter: (.*)]/) { print $1; }) + DEFINES += ELF_INTERPRETER=\\\"$$system(LC_ALL=C readelf -l /bin/ls | perl -n -e \'$$prog\')\\\" +} + diff --git a/util/cmake/tests/data/unset.pro b/util/cmake/tests/data/unset.pro new file mode 100644 index 0000000000..7ffb0582f1 --- /dev/null +++ b/util/cmake/tests/data/unset.pro @@ -0,0 +1,2 @@ +unset(f16c_cxx) + diff --git a/util/cmake/tests/test_parsing.py b/util/cmake/tests/test_parsing.py new file mode 100755 index 0000000000..78ac7fed26 --- /dev/null +++ b/util/cmake/tests/test_parsing.py @@ -0,0 +1,162 @@ +#!/usr/bin/env python3 +############################################################################# +## +## Copyright (C) 2018 The Qt Company Ltd. +## Contact: https://www.qt.io/licensing/ +## +## This file is part of the plugins 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$ +## +############################################################################# + +import os +from pro2cmake import QmakeParser + + +_tests_path = os.path.dirname(os.path.abspath(__file__)) + + +def validate_op(key, op, value, to_validate): + assert key == to_validate['key'] + assert op == to_validate['operation'] + assert value == to_validate['value'] + + +def validate_single_op(key, op, value, to_validate): + assert len(to_validate) == 1 + validate_op(key, op, value, to_validate[0]) + + +def evaluate_condition(to_validate): + assert 'condition' in to_validate + assert 'statements' in to_validate + + return (to_validate['condition'], to_validate['statements'], to_validate.get('else_statements', {})) + + +def validate_default_else_test(file_name): + result = parse_file(file_name) + assert len(result) == 1 + + (cond, if_branch, else_branch) = evaluate_condition(result[0]) + assert cond == 'qtConfig(timezone)' + validate_single_op('A', '=', ['1'], if_branch) + + assert len(else_branch) == 1 + (cond2, if2_branch, else2_branch) = evaluate_condition(else_branch[0]) + assert cond2 == 'win32' + validate_single_op('B', '=', ['2'], if2_branch) + validate_single_op('C', '=', ['3'], else2_branch) + + +def parse_file(file): + p = QmakeParser(debug=True) + result = p.parseFile(file).asDict() + assert len(result) == 1 + + return result['statements'] + + +def test_else(): + result = parse_file(_tests_path + '/data/else.pro') + assert len(result) == 1 + + (cond, if_branch, else_branch) = evaluate_condition(result[0]) + + assert cond == 'linux' + validate_single_op('SOURCES', '+=', ['a.cpp'], if_branch) + validate_single_op('SOURCES', '+=', ['b.cpp'], else_branch) + + +def test_else2(): + result = parse_file(_tests_path + '/data/else2.pro') + assert len(result) == 1 + + (cond, if_branch, else_branch) = evaluate_condition(result[0]) + assert cond == 'osx' + validate_single_op('A', '=', ['1'], if_branch) + + assert len(else_branch) == 1 + (cond2, if2_branch, else2_branch) = evaluate_condition(else_branch[0]) + assert cond2 == 'win32' + validate_single_op('B', '=', ['2'], if2_branch) + + validate_single_op('C', '=', ['3'], else2_branch) + + +def test_else3(): + validate_default_else_test(_tests_path + '/data/else3.pro') + +def test_else4(): + validate_default_else_test(_tests_path + '/data/else4.pro') + +def test_else5(): + validate_default_else_test(_tests_path + '/data/else5.pro') + +def test_else6(): + validate_default_else_test(_tests_path + '/data/else6.pro') + +def test_else7(): + result = parse_file(_tests_path + '/data/else7.pro') + assert len(result) == 1 + +def test_else8(): + validate_default_else_test(_tests_path + '/data/else8.pro') + +def test_include(): + result = parse_file(_tests_path + '/data/include.pro') + assert len(result) == 3 + validate_op('A', '=', ['42'], result[0]) + include = result[1] + assert len(include) == 1 + assert include.get('included', '') == 'foo' + validate_op('B', '=', ['23'], result[2]) + +def test_load(): + result = parse_file(_tests_path + '/data/load.pro') + assert len(result) == 3 + validate_op('A', '=', ['42'], result[0]) + load = result[1] + assert len(load) == 1 + assert load.get('loaded', '') == 'foo' + validate_op('B', '=', ['23'], result[2]) + +def test_definetest(): + result = parse_file(_tests_path + '/data/definetest.pro') + assert len(result) == 1 + assert result[0] == [] + +def test_unset(): + result = parse_file(_tests_path + '/data/unset.pro') + assert len(result) == 1 + assert result[0] == [] + +def test_quoted(): + result = parse_file(_tests_path + '/data/quoted.pro') + assert len(result) == 1 + +def test_complex_values(): + result = parse_file(_tests_path + '/data/complex_values.pro') + assert len(result) == 1 + +def test_function_if(): + result = parse_file(_tests_path + '/data/function_if.pro') + assert len(result) == 1 -- cgit v1.2.3