summaryrefslogtreecommitdiffstats
path: root/src/tools
diff options
context:
space:
mode:
authorAlexandru Croitor <alexandru.croitor@qt.io>2020-01-31 11:43:22 +0100
committerSimon Hausmann <simon.hausmann@qt.io>2020-02-07 18:19:51 +0000
commit1c571e5fe7a31e7accb04b37a1d3bd7c8855d05c (patch)
tree65241f1258136d0c45bcaa3b51e1393a2f595e6a /src/tools
parent2145cdc54d5812793310f7e3b3709bfa2648bd50 (diff)
parent4e7af2061e8c323b2a21f0549643a2cfab191664 (diff)
Merge "Merge remote-tracking branch 'origin/wip/cmake' into dev"
Diffstat (limited to 'src/tools')
-rw-r--r--src/tools/CMakeLists.txt13
-rw-r--r--src/tools/androiddeployqt/.prev_CMakeLists.txt27
-rw-r--r--src/tools/androiddeployqt/CMakeLists.txt27
-rw-r--r--src/tools/androidtestrunner/CMakeLists.txt27
-rw-r--r--src/tools/androidtestrunner/main.cpp19
-rw-r--r--src/tools/bootstrap/.prev_CMakeLists.txt216
-rw-r--r--src/tools/bootstrap/CMakeLists.txt229
-rw-r--r--src/tools/cmake_automoc_parser/CMakeLists.txt18
-rw-r--r--src/tools/cmake_automoc_parser/main.cpp399
-rw-r--r--src/tools/moc/.prev_CMakeLists.txt35
-rw-r--r--src/tools/moc/CMakeLists.txt36
-rw-r--r--src/tools/qdbuscpp2xml/.prev_CMakeLists.txt49
-rw-r--r--src/tools/qdbuscpp2xml/CMakeLists.txt48
-rw-r--r--src/tools/qdbusxml2cpp/.prev_CMakeLists.txt36
-rw-r--r--src/tools/qdbusxml2cpp/CMakeLists.txt35
-rw-r--r--src/tools/qlalr/.prev_CMakeLists.txt26
-rw-r--r--src/tools/qlalr/CMakeLists.txt27
-rw-r--r--src/tools/qvkgen/.prev_CMakeLists.txt16
-rw-r--r--src/tools/qvkgen/CMakeLists.txt17
-rw-r--r--src/tools/rcc/.prev_CMakeLists.txt37
-rw-r--r--src/tools/rcc/CMakeLists.txt38
-rw-r--r--src/tools/tracegen/.prev_CMakeLists.txt20
-rw-r--r--src/tools/tracegen/CMakeLists.txt21
-rw-r--r--src/tools/uic/.prev_CMakeLists.txt44
-rw-r--r--src/tools/uic/CMakeLists.txt45
25 files changed, 1501 insertions, 4 deletions
diff --git a/src/tools/CMakeLists.txt b/src/tools/CMakeLists.txt
new file mode 100644
index 0000000000..425a99b552
--- /dev/null
+++ b/src/tools/CMakeLists.txt
@@ -0,0 +1,13 @@
+add_subdirectory(uic)
+if (QT_FEATURE_dbus)
+ add_subdirectory(qdbuscpp2xml)
+ add_subdirectory(qdbusxml2cpp)
+endif()
+add_subdirectory(qlalr)
+add_subdirectory(qvkgen)
+
+# Only include the following tools when performing a host build
+if(NOT CMAKE_CROSSCOMPILING)
+ add_subdirectory(androiddeployqt)
+ add_subdirectory(androidtestrunner)
+endif()
diff --git a/src/tools/androiddeployqt/.prev_CMakeLists.txt b/src/tools/androiddeployqt/.prev_CMakeLists.txt
new file mode 100644
index 0000000000..e445201b82
--- /dev/null
+++ b/src/tools/androiddeployqt/.prev_CMakeLists.txt
@@ -0,0 +1,27 @@
+# Generated from androiddeployqt.pro.
+
+#####################################################################
+## androiddeployqt Binary:
+#####################################################################
+
+qt_add_executable(androiddeployqt
+ SOURCES
+ main.cpp
+ DEFINES
+ QT_NO_CAST_FROM_ASCII
+ QT_NO_CAST_TO_ASCII
+ QT_NO_FOREACH
+ PUBLIC_LIBRARIES
+ Qt::Gui
+)
+
+#### Keys ignored in scope 1:.:.:androiddeployqt.pro:<TRUE>:
+# _OPTION = "host_build"
+
+## Scopes:
+#####################################################################
+
+qt_extend_target(androiddeployqt CONDITION windows
+ COMPILE_OPTIONS
+ -U__STRICT_ANSI__
+)
diff --git a/src/tools/androiddeployqt/CMakeLists.txt b/src/tools/androiddeployqt/CMakeLists.txt
new file mode 100644
index 0000000000..d47e10efd2
--- /dev/null
+++ b/src/tools/androiddeployqt/CMakeLists.txt
@@ -0,0 +1,27 @@
+# Generated from androiddeployqt.pro.
+
+#####################################################################
+## androiddeployqt Binary:
+#####################################################################
+
+qt_add_executable(androiddeployqt
+ SOURCES
+ main.cpp
+ DEFINES
+ QT_NO_CAST_FROM_ASCII
+ QT_NO_CAST_TO_ASCII
+ QT_NO_FOREACH
+ PUBLIC_LIBRARIES
+ Qt::Core # special case
+)
+
+#### Keys ignored in scope 1:.:.:androiddeployqt.pro:<TRUE>:
+# _OPTION = "host_build"
+
+## Scopes:
+#####################################################################
+
+qt_extend_target(androiddeployqt CONDITION windows
+ COMPILE_OPTIONS
+ -U__STRICT_ANSI__
+)
diff --git a/src/tools/androidtestrunner/CMakeLists.txt b/src/tools/androidtestrunner/CMakeLists.txt
new file mode 100644
index 0000000000..d7ec4a66fa
--- /dev/null
+++ b/src/tools/androidtestrunner/CMakeLists.txt
@@ -0,0 +1,27 @@
+# Generated from androidtestrunner.pro.
+
+#####################################################################
+## androidtestrunner Binary:
+#####################################################################
+
+qt_add_executable(androidtestrunner
+ SOURCES
+ main.cpp
+ DEFINES
+ QT_NO_CAST_FROM_ASCII
+ QT_NO_CAST_TO_ASCII
+ QT_NO_FOREACH
+ PUBLIC_LIBRARIES
+ Qt::Gui
+)
+
+#### Keys ignored in scope 1:.:.:androidtestrunner.pro:<TRUE>:
+# _OPTION = "host_build"
+
+## Scopes:
+#####################################################################
+
+qt_extend_target(androidtestrunner CONDITION windows
+ COMPILE_OPTIONS
+ -U__STRICT_ANSI__
+)
diff --git a/src/tools/androidtestrunner/main.cpp b/src/tools/androidtestrunner/main.cpp
index 5471db3afd..f25d2c2de9 100644
--- a/src/tools/androidtestrunner/main.cpp
+++ b/src/tools/androidtestrunner/main.cpp
@@ -51,6 +51,7 @@ struct Options
{
bool helpRequested = false;
bool verbose = false;
+ bool skipAddInstallRoot = false;
std::chrono::seconds timeout{300}; // 5minutes
QString androidDeployQtCommand;
QString buildPath;
@@ -233,6 +234,8 @@ static bool parseOptions()
g_options.helpRequested = true;
else
g_options.activity = arguments.at(++i);
+ } else if (argument.compare(QStringLiteral("--skip-install-root"), Qt::CaseInsensitive) == 0) {
+ g_options.skipAddInstallRoot = true;
} else if (argument.compare(QStringLiteral("--timeout"), Qt::CaseInsensitive) == 0) {
if (i + 1 == arguments.size())
g_options.helpRequested = true;
@@ -283,6 +286,7 @@ static void printHelp()
" If make is missing make sure the --path is set.\n"
" --apk <apk path>: If the apk is specified and if exists, we'll skip\n"
" the package building.\n"
+ " --skip-install-root: Do not append INSTALL_ROOT=... to the make command.\n"
" -- arguments that will be passed to the test application.\n"
" --verbose: Prints out information during processing.\n"
" --help: Displays this information.\n\n",
@@ -452,10 +456,17 @@ int main(int argc, char *argv[])
}
} else {
if (!g_options.makeCommand.isEmpty()) {
- // we need to run make INSTALL_ROOT=path install to install the application file(s) first
- if (!execCommand(QStringLiteral("%1 INSTALL_ROOT=%2 install")
- .arg(g_options.makeCommand, QDir::toNativeSeparators(g_options.buildPath)), nullptr, g_options.verbose)) {
- return 1;
+ if (!g_options.skipAddInstallRoot) {
+ // we need to run make INSTALL_ROOT=path install to install the application file(s) first
+ if (!execCommand(QStringLiteral("%1 INSTALL_ROOT=%2 install")
+ .arg(g_options.makeCommand, QDir::toNativeSeparators(g_options.buildPath)), nullptr, g_options.verbose)) {
+ return 1;
+ }
+ } else {
+ if (!execCommand(QStringLiteral("%1")
+ .arg(g_options.makeCommand), nullptr, g_options.verbose)) {
+ return 1;
+ }
}
}
diff --git a/src/tools/bootstrap/.prev_CMakeLists.txt b/src/tools/bootstrap/.prev_CMakeLists.txt
new file mode 100644
index 0000000000..e43c5eb350
--- /dev/null
+++ b/src/tools/bootstrap/.prev_CMakeLists.txt
@@ -0,0 +1,216 @@
+# Generated from bootstrap.pro.
+
+#####################################################################
+## Bootstrap Module:
+#####################################################################
+
+qt_add_module(Bootstrap
+ STATIC
+ INTERNAL_MODULE
+ NO_SYNC_QT
+ QMAKE_MODULE_CONFIG gc_binaries
+ SOURCES
+ ../../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/qfiledevice.cpp
+ ../../corelib/io/qfileinfo.cpp
+ ../../corelib/io/qfilesystemengine.cpp
+ ../../corelib/io/qfilesystementry.cpp
+ ../../corelib/io/qfsfileengine.cpp
+ ../../corelib/io/qfsfileengine_iterator.cpp
+ ../../corelib/io/qiodevice.cpp
+ ../../corelib/io/qipaddress.cpp
+ ../../corelib/io/qloggingcategory.cpp
+ ../../corelib/io/qloggingregistry.cpp
+ ../../corelib/io/qresource.cpp
+ ../../corelib/io/qsavefile.cpp
+ ../../corelib/io/qstandardpaths.cpp
+ ../../corelib/io/qtemporarydir.cpp
+ ../../corelib/io/qtemporaryfile.cpp
+ ../../corelib/io/qurl.cpp
+ ../../corelib/io/qurlidna.cpp
+ ../../corelib/io/qurlquery.cpp
+ ../../corelib/io/qurlrecode.cpp
+ ../../corelib/kernel/qcoreapplication.cpp
+ ../../corelib/kernel/qcoreglobaldata.cpp
+ ../../corelib/kernel/qmetatype.cpp
+ ../../corelib/kernel/qsharedmemory.cpp
+ ../../corelib/kernel/qsystemerror.cpp
+ ../../corelib/kernel/qsystemsemaphore.cpp
+ ../../corelib/kernel/qvariant.cpp
+ ../../corelib/plugin/quuid.cpp
+ ../../corelib/serialization/qcborcommon.cpp
+ ../../corelib/serialization/qcborstreamwriter.cpp
+ ../../corelib/serialization/qcborvalue.cpp
+ ../../corelib/serialization/qdatastream.cpp
+ ../../corelib/serialization/qjsonarray.cpp
+ ../../corelib/serialization/qjsoncbor.cpp
+ ../../corelib/serialization/qjsondocument.cpp
+ ../../corelib/serialization/qjsonobject.cpp
+ ../../corelib/serialization/qjsonparser.cpp
+ ../../corelib/serialization/qjsonvalue.cpp
+ ../../corelib/serialization/qjsonwriter.cpp
+ ../../corelib/serialization/qtextstream.cpp
+ ../../corelib/serialization/qxmlstream.cpp
+ ../../corelib/serialization/qxmlutils.cpp
+ ../../corelib/text/qbytearray.cpp
+ ../../corelib/text/qbytearraylist.cpp
+ ../../corelib/text/qbytearraymatcher.cpp
+ ../../corelib/text/qlocale.cpp
+ ../../corelib/text/qlocale_tools.cpp
+ ../../corelib/text/qregexp.cpp
+ ../../corelib/text/qstring.cpp
+ ../../corelib/text/qstring_compat.cpp
+ ../../corelib/text/qstringbuilder.cpp
+ ../../corelib/text/qstringlist.cpp
+ ../../corelib/text/qstringview.cpp
+ ../../corelib/text/qvsnprintf.cpp
+ ../../corelib/time/qcalendar.cpp
+ ../../corelib/time/qdatetime.cpp
+ ../../corelib/time/qgregoriancalendar.cpp
+ ../../corelib/time/qromancalendar.cpp
+ ../../corelib/tools/qarraydata.cpp
+ ../../corelib/tools/qbitarray.cpp
+ ../../corelib/tools/qcommandlineoption.cpp
+ ../../corelib/tools/qcommandlineparser.cpp
+ ../../corelib/tools/qcryptographichash.cpp
+ ../../corelib/tools/qhash.cpp
+ ../../corelib/tools/qline.cpp
+ ../../corelib/tools/qmap.cpp
+ ../../corelib/tools/qpoint.cpp
+ ../../corelib/tools/qrect.cpp
+ ../../corelib/tools/qringbuffer.cpp
+ ../../corelib/tools/qsize.cpp
+ ../../corelib/tools/qversionnumber.cpp
+ ../../xml/dom/qdom.cpp
+ ../../xml/sax/qxml.cpp
+ DEFINES
+ QT_BOOTSTRAPPED
+ QT_NO_CAST_FROM_ASCII
+ QT_NO_CAST_TO_ASCII
+ QT_NO_FOREACH
+ QT_VERSION_MAJOR=
+ QT_VERSION_MINOR=
+ QT_VERSION_PATCH=
+ QT_VERSION_STR=\"\"
+ INCLUDE_DIRECTORIES
+ ..
+ ../../3rdparty/tinycbor/src
+)
+
+#### Keys ignored in scope 1:.:.:bootstrap.pro:<TRUE>:
+# INSTALLS = "lib"
+# MODULE_CONFIG = "gc_binaries"
+# MODULE_INCNAME = "QtCore" "QtXml"
+# _OPTION = "host_build"
+# lib.CONFIG = "dummy_install"
+
+## Scopes:
+#####################################################################
+
+qt_extend_target(Bootstrap CONDITION UNIX
+ SOURCES
+ ../../corelib/io/qfilesystemengine_unix.cpp
+ ../../corelib/io/qfilesystemiterator_unix.cpp
+ ../../corelib/io/qfsfileengine_unix.cpp
+ ../../corelib/kernel/qcore_unix.cpp
+ ../../corelib/kernel/qsharedmemory_posix.cpp
+ ../../corelib/kernel/qsharedmemory_systemv.cpp
+ ../../corelib/kernel/qsharedmemory_unix.cpp
+ ../../corelib/kernel/qsystemsemaphore_posix.cpp
+ ../../corelib/kernel/qsystemsemaphore_systemv.cpp
+ ../../corelib/kernel/qsystemsemaphore_unix.cpp
+)
+
+qt_extend_target(Bootstrap CONDITION WIN32
+ SOURCES
+ ../../corelib/global/qoperatingsystemversion_win.cpp
+ ../../corelib/io/qfilesystemengine_win.cpp
+ ../../corelib/io/qfilesystemiterator_win.cpp
+ ../../corelib/io/qfsfileengine_win.cpp
+ ../../corelib/io/qstandardpaths_win.cpp
+ ../../corelib/kernel/qcoreapplication_win.cpp
+ ../../corelib/kernel/qsharedmemory_win.cpp
+ ../../corelib/kernel/qsystemsemaphore_win.cpp
+ ../../corelib/kernel/qwinregistry.cpp
+ ../../corelib/plugin/qsystemlibrary.cpp
+ PUBLIC_LIBRARIES
+ advapi32
+ netapi32
+ ole32
+ shell32
+ user32
+)
+
+qt_extend_target(Bootstrap CONDITION APPLE
+ SOURCES
+ ../../corelib/global/qoperatingsystemversion_darwin.mm
+ ../../corelib/kernel/qcore_foundation.mm
+ ../../corelib/kernel/qcore_mac.cpp
+ ../../corelib/kernel/qcore_mac_objc.mm
+ ../../corelib/kernel/qcoreapplication_mac.cpp
+ PUBLIC_LIBRARIES
+ ${FWFoundation}
+)
+
+qt_extend_target(Bootstrap CONDITION APPLE_OSX
+ SOURCES
+ ../../corelib/io/qstandardpaths_mac.mm
+ LIBRARIES
+ ${FWCoreServices}
+)
+
+qt_extend_target(Bootstrap CONDITION APPLE_UIKIT
+ LIBRARIES
+ ${FWUIKit}
+)
+
+qt_extend_target(Bootstrap CONDITION UNIX AND NOT APPLE_OSX
+ SOURCES
+ ../../corelib/io/qstandardpaths_unix.cpp
+)
+
+qt_extend_target(Bootstrap CONDITION CMAKE_CROSSCOMPILING
+ SOURCES
+ ../../3rdparty/zlib/src/adler32.c
+ ../../3rdparty/zlib/src/compress.c
+ ../../3rdparty/zlib/src/crc32.c
+ ../../3rdparty/zlib/src/deflate.c
+ ../../3rdparty/zlib/src/gzclose.c
+ ../../3rdparty/zlib/src/gzlib.c
+ ../../3rdparty/zlib/src/gzread.c
+ ../../3rdparty/zlib/src/gzwrite.c
+ ../../3rdparty/zlib/src/infback.c
+ ../../3rdparty/zlib/src/inffast.c
+ ../../3rdparty/zlib/src/inflate.c
+ ../../3rdparty/zlib/src/inftrees.c
+ ../../3rdparty/zlib/src/trees.c
+ ../../3rdparty/zlib/src/uncompr.c
+ ../../3rdparty/zlib/src/zutil.c
+ INCLUDE_DIRECTORIES
+ ../../3rdparty/zlib/src
+)
+
+qt_extend_target(Bootstrap CONDITION NOT CMAKE_CROSSCOMPILING
+ LIBRARIES
+ ZLIB::ZLIB
+)
+
+qt_extend_target(Bootstrap CONDITION WIN32 AND mingw
+ PUBLIC_LIBRARIES
+ uuid
+)
diff --git a/src/tools/bootstrap/CMakeLists.txt b/src/tools/bootstrap/CMakeLists.txt
new file mode 100644
index 0000000000..2121faae12
--- /dev/null
+++ b/src/tools/bootstrap/CMakeLists.txt
@@ -0,0 +1,229 @@
+# Generated from bootstrap.pro.
+
+#####################################################################
+## Bootstrap Module:
+#####################################################################
+
+# special case:
+add_library(Bootstrap STATIC)
+qt_extend_target(Bootstrap
+ SOURCES
+ ../../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/qfiledevice.cpp
+ ../../corelib/io/qfileinfo.cpp
+ ../../corelib/io/qfilesystemengine.cpp
+ ../../corelib/io/qfilesystementry.cpp
+ ../../corelib/io/qfsfileengine.cpp
+ ../../corelib/io/qfsfileengine_iterator.cpp
+ ../../corelib/io/qiodevice.cpp
+ ../../corelib/io/qipaddress.cpp
+ ../../corelib/io/qloggingcategory.cpp
+ ../../corelib/io/qloggingregistry.cpp
+ ../../corelib/io/qresource.cpp
+ ../../corelib/io/qsavefile.cpp
+ ../../corelib/io/qstandardpaths.cpp
+ ../../corelib/io/qtemporarydir.cpp
+ ../../corelib/io/qtemporaryfile.cpp
+ ../../corelib/io/qurl.cpp
+ ../../corelib/io/qurlidna.cpp
+ ../../corelib/io/qurlquery.cpp
+ ../../corelib/io/qurlrecode.cpp
+ ../../corelib/kernel/qcoreapplication.cpp
+ ../../corelib/kernel/qcoreglobaldata.cpp
+ ../../corelib/kernel/qmetatype.cpp
+ ../../corelib/kernel/qsharedmemory.cpp
+ ../../corelib/kernel/qsystemerror.cpp
+ ../../corelib/kernel/qsystemsemaphore.cpp
+ ../../corelib/kernel/qvariant.cpp
+ ../../corelib/plugin/quuid.cpp
+ ../../corelib/serialization/qcborcommon.cpp
+ ../../corelib/serialization/qcborstreamwriter.cpp
+ ../../corelib/serialization/qcborvalue.cpp
+ ../../corelib/serialization/qdatastream.cpp
+ ../../corelib/serialization/qjsonarray.cpp
+ ../../corelib/serialization/qjsoncbor.cpp
+ ../../corelib/serialization/qjsondocument.cpp
+ ../../corelib/serialization/qjsonobject.cpp
+ ../../corelib/serialization/qjsonparser.cpp
+ ../../corelib/serialization/qjsonvalue.cpp
+ ../../corelib/serialization/qjsonwriter.cpp
+ ../../corelib/serialization/qtextstream.cpp
+ ../../corelib/serialization/qxmlstream.cpp
+ ../../corelib/serialization/qxmlutils.cpp
+ ../../corelib/text/qbytearray.cpp
+ ../../corelib/text/qbytearraylist.cpp
+ ../../corelib/text/qbytearraymatcher.cpp
+ ../../corelib/text/qlocale.cpp
+ ../../corelib/text/qlocale_tools.cpp
+ ../../corelib/text/qregexp.cpp
+ ../../corelib/text/qstring.cpp
+ ../../corelib/text/qstring_compat.cpp
+ ../../corelib/text/qstringbuilder.cpp
+ ../../corelib/text/qstringlist.cpp
+ ../../corelib/text/qstringview.cpp
+ ../../corelib/text/qvsnprintf.cpp
+ ../../corelib/time/qcalendar.cpp
+ ../../corelib/time/qdatetime.cpp
+ ../../corelib/time/qgregoriancalendar.cpp
+ ../../corelib/time/qromancalendar.cpp
+ ../../corelib/tools/qarraydata.cpp
+ ../../corelib/tools/qbitarray.cpp
+ ../../corelib/tools/qcommandlineoption.cpp
+ ../../corelib/tools/qcommandlineparser.cpp
+ ../../corelib/tools/qcryptographichash.cpp
+ ../../corelib/tools/qhash.cpp
+ ../../corelib/tools/qline.cpp
+ ../../corelib/tools/qmap.cpp
+ ../../corelib/tools/qpoint.cpp
+ ../../corelib/tools/qrect.cpp
+ ../../corelib/tools/qringbuffer.cpp
+ ../../corelib/tools/qsize.cpp
+ ../../corelib/tools/qversionnumber.cpp
+ ../../xml/dom/qdom.cpp
+ ../../xml/sax/qxml.cpp
+ PUBLIC_DEFINES # special case
+ QT_VERSION_MAJOR=${PROJECT_VERSION_MAJOR} # special case
+ QT_VERSION_MINOR=${PROJECT_VERSION_MINOR} # special case
+ QT_VERSION_PATCH=${PROJECT_VERSION_PATCH} # special case
+ QT_VERSION_STR="${PROJECT_VERSION}" # special case
+ QT_USE_QSTRINGBUILDER # special case
+ QT_BOOTSTRAPPED
+ QT_NO_CAST_FROM_ASCII
+ QT_NO_CAST_TO_ASCII
+ QT_NO_FOREACH
+ INCLUDE_DIRECTORIES
+ ..
+ ../../3rdparty/tinycbor/src
+ PUBLIC_INCLUDE_DIRECTORIES # special case
+ $<TARGET_PROPERTY:Core,INCLUDE_DIRECTORIES>
+ $<TARGET_PROPERTY:Xml,INCLUDE_DIRECTORIES>
+ PUBLIC_LIBRARIES # special case
+ ZLIB::ZLIB
+ Qt::Platform
+)
+
+#### Keys ignored in scope 1:.:.:bootstrap.pro:<TRUE>:
+# INSTALLS = "lib"
+# MODULE_CONFIG = "gc_binaries"
+# MODULE_INCNAME = "QtCore" "QtXml"
+# _OPTION = "host_build"
+# lib.CONFIG = "dummy_install"
+
+## Scopes:
+#####################################################################
+
+qt_extend_target(Bootstrap CONDITION UNIX
+ SOURCES
+ ../../corelib/io/qfilesystemengine_unix.cpp
+ ../../corelib/io/qfilesystemiterator_unix.cpp
+ ../../corelib/io/qfsfileengine_unix.cpp
+ ../../corelib/kernel/qcore_unix.cpp
+ ../../corelib/kernel/qsharedmemory_posix.cpp
+ ../../corelib/kernel/qsharedmemory_systemv.cpp
+ ../../corelib/kernel/qsharedmemory_unix.cpp
+ ../../corelib/kernel/qsystemsemaphore_posix.cpp
+ ../../corelib/kernel/qsystemsemaphore_systemv.cpp
+ ../../corelib/kernel/qsystemsemaphore_unix.cpp
+)
+
+qt_extend_target(Bootstrap CONDITION WIN32
+ SOURCES
+ ../../corelib/global/qoperatingsystemversion_win.cpp
+ ../../corelib/io/qfilesystemengine_win.cpp
+ ../../corelib/io/qfilesystemiterator_win.cpp
+ ../../corelib/io/qfsfileengine_win.cpp
+ ../../corelib/io/qstandardpaths_win.cpp
+ ../../corelib/kernel/qcoreapplication_win.cpp
+ ../../corelib/kernel/qsharedmemory_win.cpp
+ ../../corelib/kernel/qsystemsemaphore_win.cpp
+ ../../corelib/kernel/qwinregistry.cpp
+ ../../corelib/plugin/qsystemlibrary.cpp
+ PUBLIC_LIBRARIES
+ advapi32
+ netapi32
+ ole32
+ shell32
+ user32
+)
+
+qt_extend_target(Bootstrap CONDITION APPLE
+ SOURCES
+ ../../corelib/global/qoperatingsystemversion_darwin.mm
+ ../../corelib/kernel/qcore_foundation.mm
+ ../../corelib/kernel/qcore_mac.cpp
+ ../../corelib/kernel/qcore_mac_objc.mm
+ ../../corelib/kernel/qcoreapplication_mac.cpp
+ PUBLIC_LIBRARIES
+ ${FWFoundation}
+)
+
+qt_extend_target(Bootstrap CONDITION APPLE_OSX
+ SOURCES
+ ../../corelib/io/qstandardpaths_mac.mm
+ LIBRARIES
+ ${FWCoreServices}
+)
+
+qt_extend_target(Bootstrap CONDITION APPLE_UIKIT
+ LIBRARIES
+ ${FWUIKit}
+)
+
+qt_extend_target(Bootstrap CONDITION UNIX AND NOT APPLE_OSX
+ SOURCES
+ ../../corelib/io/qstandardpaths_unix.cpp
+)
+
+# special case begin
+# These lines need to commented out. This will never get cross_compiled!
+#qt_extend_target(Bootstrap CONDITION CMAKE_CROSSCOMPILING
+# SOURCES
+# ../../3rdparty/zlib/src/adler32.c
+# ../../3rdparty/zlib/src/compress.c
+# ../../3rdparty/zlib/src/crc32.c
+# ../../3rdparty/zlib/src/deflate.c
+# ../../3rdparty/zlib/src/gzclose.c
+# ../../3rdparty/zlib/src/gzlib.c
+# ../../3rdparty/zlib/src/gzread.c
+# ../../3rdparty/zlib/src/gzwrite.c
+# ../../3rdparty/zlib/src/infback.c
+# ../../3rdparty/zlib/src/inffast.c
+# ../../3rdparty/zlib/src/inflate.c
+# ../../3rdparty/zlib/src/inftrees.c
+# ../../3rdparty/zlib/src/trees.c
+# ../../3rdparty/zlib/src/uncompr.c
+# ../../3rdparty/zlib/src/zutil.c
+# INCLUDE_DIRECTORIES
+# ../../3rdparty/zlib/src
+#)
+#
+#qt_extend_target(Bootstrap CONDITION NOT CMAKE_CROSSCOMPILING
+# LIBRARIES
+# ZLIB::ZLIB
+#)
+# special case end
+
+qt_extend_target(Bootstrap CONDITION WIN32 AND mingw
+ PUBLIC_LIBRARIES
+ uuid
+)
+
+# special case:
+qt_internal_add_link_flags_gc_sections(Bootstrap PUBLIC)
+set_target_properties(Bootstrap PROPERTIES AUTOMOC OFF AUTOUIC OFF AUTORCC OFF)
+qt_internal_add_target_aliases(Bootstrap)
diff --git a/src/tools/cmake_automoc_parser/CMakeLists.txt b/src/tools/cmake_automoc_parser/CMakeLists.txt
new file mode 100644
index 0000000000..73303215bb
--- /dev/null
+++ b/src/tools/cmake_automoc_parser/CMakeLists.txt
@@ -0,0 +1,18 @@
+#####################################################################
+## moc Tool:
+#####################################################################
+
+qt_add_tool(cmake_automoc_parser
+ BOOTSTRAP
+ TOOLS_TARGET Core # special case
+ SOURCES
+ main.cpp
+ DEFINES
+ QT_MOC
+ QT_NO_CAST_FROM_ASCII
+ QT_NO_CAST_FROM_BYTEARRAY
+ QT_NO_COMPRESS
+ QT_NO_FOREACH
+ INCLUDE_DIRECTORIES
+ ${CMAKE_CURRENT_SOURCE_DIR}
+)
diff --git a/src/tools/cmake_automoc_parser/main.cpp b/src/tools/cmake_automoc_parser/main.cpp
new file mode 100644
index 0000000000..60eb4b2977
--- /dev/null
+++ b/src/tools/cmake_automoc_parser/main.cpp
@@ -0,0 +1,399 @@
+/****************************************************************************
+**
+** Copyright (C) 2019 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the tools applications 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 <QtCore/qglobal.h>
+
+#include <cstdio>
+#include <cstdlib>
+
+#include <qfile.h>
+#include <qjsonarray.h>
+#include <qjsondocument.h>
+#include <qjsonobject.h>
+#include <qdir.h>
+#include <qstring.h>
+#include <qhash.h>
+#include <qvector.h>
+#include <qstack.h>
+#include <qdebug.h>
+#include <qset.h>
+#include <qmap.h>
+#include <qcoreapplication.h>
+#include <qcommandlineoption.h>
+#include <qcommandlineparser.h>
+
+QT_BEGIN_NAMESPACE
+
+using AutoGenHeaderMap = QMap<QString, QString>;
+using AutoGenSourcesList = QVector<QString>;
+
+static bool readAutogenInfoJson(AutoGenHeaderMap &headers, AutoGenSourcesList &sources,
+ QStringList &headerExts, const QString &autoGenInfoJsonPath)
+{
+ QFile file(autoGenInfoJsonPath);
+ if (!file.open(QIODevice::ReadOnly | QIODevice::Text)) {
+ fprintf(stderr, "Could not open: %s\n", qPrintable(autoGenInfoJsonPath));
+ return false;
+ }
+
+ const QByteArray contents = file.readAll();
+ file.close();
+
+ QJsonParseError error;
+ QJsonDocument doc = QJsonDocument::fromJson(contents, &error);
+
+ if (error.error != QJsonParseError::NoError) {
+ fprintf(stderr, "Failed to parse json file: %s\n", qPrintable(autoGenInfoJsonPath));
+ return false;
+ }
+
+ QJsonObject rootObject = doc.object();
+ QJsonValue headersValue = rootObject.value(QLatin1String("HEADERS"));
+ QJsonValue sourcesValue = rootObject.value(QLatin1String("SOURCES"));
+ QJsonValue headerExtValue = rootObject.value(QLatin1String("HEADER_EXTENSIONS"));
+
+ if (!headersValue.isArray() || !sourcesValue.isArray() || !headerExtValue.isArray()) {
+ fprintf(stderr,
+ "%s layout does not match the expected layout. This most likely means that file "
+ "format changed or this file is not a product of CMake's AutoGen process.\n",
+ qPrintable(autoGenInfoJsonPath));
+ return false;
+ }
+
+ QJsonArray headersArray = headersValue.toArray();
+ QJsonArray sourcesArray = sourcesValue.toArray();
+ QJsonArray headerExtArray = headerExtValue.toArray();
+
+ for (const auto &value : headersArray) {
+ QJsonArray entry_array = value.toArray();
+ if (entry_array.size() > 2) {
+ // Array[0] : header path
+ // Array[2] : Location of the generated moc file for this header
+ // if no source file includes it
+ headers.insert(entry_array[0].toString(), entry_array[2].toString());
+ }
+ }
+
+ sources.reserve(sourcesArray.size());
+ for (const auto &value : sourcesArray) {
+ QJsonArray entry_array = value.toArray();
+ if (entry_array.size() > 1) {
+ sources.push_back(entry_array[0].toString());
+ }
+ }
+
+ headerExts.reserve(headerExtArray.size());
+ for (const auto &value : headerExtArray) {
+ headerExts.push_back(value.toString());
+ }
+
+ return true;
+}
+
+struct ParseCacheEntry
+{
+ QStringList mocFiles;
+ QStringList mocIncludes;
+};
+
+using ParseCacheMap = QMap<QString, ParseCacheEntry>;
+
+static bool readParseCache(ParseCacheMap &entries, const QString &parseCacheFilePath)
+{
+
+ QFile file(parseCacheFilePath);
+ if (!file.open(QIODevice::ReadOnly | QIODevice::Text)) {
+ fprintf(stderr, "Could not open: %s\n", qPrintable(parseCacheFilePath));
+ return false;
+ }
+
+ QString source;
+ QStringList mocEntries;
+ QStringList mocIncludes;
+
+ // File format
+ // ....
+ // header/source path N
+ // mmc:Q_OBJECT| mcc:Q_GADGET # This file has been mocked
+ // miu:moc_....cpp # Path of the moc.cpp file generated for the above file
+ // relative to TARGET_BINARY_DIR/TARGET_autgen/include directory. Not
+ // present for headers.
+ // mid: ....moc # Path of .moc file generated for the above file relative
+ // to TARGET_BINARY_DIR/TARGET_autogen/include directory.
+ // uic: UI related info, ignored
+ // mdp: Moc dependencies, ignored
+ // udp: UI dependencies, ignored
+ // header/source path N + 1
+ // ....
+
+ QTextStream textStream(&file);
+ const QString mmcKey = QString(QLatin1String(" mmc:"));
+ const QString miuKey = QString(QLatin1String(" miu:"));
+ const QString uicKey = QString(QLatin1String(" uic:"));
+ const QString midKey = QString(QLatin1String(" mid:"));
+ const QString mdpKey = QString(QLatin1String(" mdp:"));
+ const QString udpKey = QString(QLatin1String(" udp:"));
+ QString line;
+ bool mmc_key_found = false;
+ while (textStream.readLineInto(&line)) {
+ if (!line.startsWith(QLatin1Char(' '))) {
+ if (!mocEntries.isEmpty() || mmc_key_found || !mocIncludes.isEmpty()) {
+ entries.insert(source,
+ ParseCacheEntry { std::move(mocEntries), std::move(mocIncludes) });
+ source.clear();
+ mmc_key_found = false;
+ }
+ source = line;
+ } else if (line.startsWith(mmcKey)) {
+ mmc_key_found = true;
+ } else if (line.startsWith(miuKey)) {
+ mocIncludes.push_back(line.right(line.size() - miuKey.size()));
+ } else if (line.startsWith(midKey)) {
+ mocEntries.push_back(line.right(line.size() - midKey.size()));
+ } else if (line.startsWith(uicKey) || line.startsWith(mdpKey) || line.startsWith(udpKey)) {
+ // nothing to do ignore
+ continue;
+ } else {
+ fprintf(stderr, "Unhandled line entry \"%s\" in %s\n", qPrintable(line),
+ qPrintable(parseCacheFilePath));
+ return false;
+ }
+ }
+
+ // Check if last entry has any data left to processed
+ if (!mocEntries.isEmpty() || !mocIncludes.isEmpty() || mmc_key_found) {
+ entries.insert(source, ParseCacheEntry { std::move(mocEntries), std::move(mocIncludes) });
+ }
+
+ file.close();
+ return true;
+}
+
+static bool readJsonFiles(QVector<QString> &entries, const QString &filePath)
+{
+
+ QFile file(filePath);
+ if (!file.open(QIODevice::ReadOnly | QIODevice::Text)) {
+ fprintf(stderr, "Could not open: %s\n", qPrintable(filePath));
+ return false;
+ }
+
+ QTextStream textStream(&file);
+ QString line;
+ while (textStream.readLineInto(&line)) {
+ entries.push_back(line);
+ }
+ file.close();
+ return true;
+}
+
+static bool writeJsonFiles(const QVector<QString> &fileList, const QString &fileListFilePath)
+{
+ QFile file(fileListFilePath);
+ if (!file.open(QIODevice::WriteOnly | QIODevice::Text)) {
+ fprintf(stderr, "Could not open: %s\n", qPrintable(fileListFilePath));
+ return false;
+ }
+
+ QTextStream textStream(&file);
+ for (const auto &file : fileList) {
+ textStream << file << Qt::endl;
+ }
+
+ file.close();
+ return true;
+}
+
+int main(int argc, char **argv)
+{
+
+ QCoreApplication app(argc, argv);
+ QCommandLineParser parser;
+ parser.setApplicationDescription(QStringLiteral("Qt CMake Autogen parser tool"));
+
+ parser.addHelpOption();
+ parser.setSingleDashWordOptionMode(QCommandLineParser::ParseAsLongOptions);
+
+ QCommandLineOption outputFileOption(QStringLiteral("output-file-path"));
+ outputFileOption.setDescription(
+ QStringLiteral("Output file where the meta type file list will be written."));
+ outputFileOption.setValueName(QStringLiteral("output file"));
+ parser.addOption(outputFileOption);
+
+ QCommandLineOption cmakeAutogenCacheFileOption(QStringLiteral("cmake-autogen-cache-file"));
+ cmakeAutogenCacheFileOption.setDescription(
+ QStringLiteral("Location of the CMake AutoGen ParseCache.txt file."));
+ cmakeAutogenCacheFileOption.setValueName(QStringLiteral("CMake AutoGen ParseCache.txt file"));
+ parser.addOption(cmakeAutogenCacheFileOption);
+
+ QCommandLineOption cmakeAutogenInfoFileOption(QStringLiteral("cmake-autogen-info-file"));
+ cmakeAutogenInfoFileOption.setDescription(
+ QStringLiteral("Location of the CMake AutoGen AutogenInfo.json file."));
+ cmakeAutogenInfoFileOption.setValueName(QStringLiteral("CMake AutoGen AutogenInfo.json file"));
+ parser.addOption(cmakeAutogenInfoFileOption);
+
+ QCommandLineOption cmakeAutogenIncludeDirOption(
+ QStringLiteral("cmake-autogen-include-dir-path"));
+ cmakeAutogenIncludeDirOption.setDescription(
+ QStringLiteral("Location of the CMake AutoGen include directory."));
+ cmakeAutogenIncludeDirOption.setValueName(QStringLiteral("CMake AutoGen include directory"));
+ parser.addOption(cmakeAutogenIncludeDirOption);
+
+ QCommandLineOption isMultiConfigOption(
+ QStringLiteral("cmake-multi-config"));
+ isMultiConfigOption.setDescription(
+ QStringLiteral("Set this option when using CMake with a multi-config generator"));
+ parser.addOption(isMultiConfigOption);
+
+ QStringList arguments = QCoreApplication::arguments();
+ parser.process(arguments);
+
+ if (!parser.isSet(outputFileOption) || !parser.isSet(cmakeAutogenInfoFileOption)
+ || !parser.isSet(cmakeAutogenCacheFileOption)
+ || !parser.isSet(cmakeAutogenIncludeDirOption)) {
+ parser.showHelp(1);
+ return EXIT_FAILURE;
+ }
+
+ // Read source files from AutogenInfo.json
+ AutoGenHeaderMap autoGenHeaders;
+ AutoGenSourcesList autoGenSources;
+ QStringList headerExtList;
+ if (!readAutogenInfoJson(autoGenHeaders, autoGenSources, headerExtList,
+ parser.value(cmakeAutogenInfoFileOption))) {
+ return EXIT_FAILURE;
+ }
+
+ ParseCacheMap parseCacheEntries;
+ if (!readParseCache(parseCacheEntries, parser.value(cmakeAutogenCacheFileOption))) {
+ return EXIT_FAILURE;
+ }
+
+ const QString cmakeIncludeDir = parser.value(cmakeAutogenIncludeDirOption);
+
+ // Algorithm description
+ // 1) For each source from the AutoGenSources list check if there is a parse
+ // cache entry.
+ // 1a) If an entry was wound there exists an moc_...cpp file somewhere.
+ // Remove the header file from the AutoGenHeader files
+ // 1b) For every matched source entry, check the moc includes as it is
+ // possible for a source file to include moc files from other headers.
+ // Remove the header from AutoGenHeaders
+ // 2) For every remaining header in AutoGenHeaders, check if there is an
+ // entry for it in the parse cache. Use the value for the location of the
+ // moc.json file
+
+ QVector<QString> jsonFileList;
+ QDir dir(cmakeIncludeDir);
+ jsonFileList.reserve(autoGenSources.size());
+
+ // 1) Process sources
+ for (const auto &source : autoGenSources) {
+ auto it = parseCacheEntries.find(source);
+ if (it == parseCacheEntries.end()) {
+ continue;
+ }
+
+ const QFileInfo fileInfo(source);
+ const QString base = fileInfo.path() + fileInfo.completeBaseName();
+ // 1a) erase header
+ for (const auto &ext : headerExtList) {
+ const QString headerPath = base + QLatin1Char('.') + ext;
+ auto it = autoGenHeaders.find(headerPath);
+ if (it != autoGenHeaders.end()) {
+ autoGenHeaders.erase(it);
+ break;
+ }
+ }
+ // Add extra moc files
+ for (const auto &mocFile : it.value().mocFiles) {
+ jsonFileList.push_back(dir.filePath(mocFile) + QLatin1String(".json"));
+ }
+ // Add main moc files
+ for (const auto &mocFile : it.value().mocIncludes) {
+ jsonFileList.push_back(dir.filePath(mocFile) + QLatin1String(".json"));
+ // 1b) Locate this header and delete it
+ constexpr int mocKeyLen = 4; // length of "moc_"
+ const QString headerBaseName =
+ QFileInfo(mocFile.right(mocFile.size() - mocKeyLen)).completeBaseName();
+ bool breakFree = false;
+ for (auto &ext : headerExtList) {
+ const QString headerSuffix = headerBaseName + QLatin1Char('.') + ext;
+ for (auto it = autoGenHeaders.begin(); it != autoGenHeaders.end(); ++it) {
+ if (it.key().endsWith(headerSuffix)
+ && QFileInfo(it.key()).completeBaseName() == headerBaseName) {
+ autoGenHeaders.erase(it);
+ breakFree = true;
+ break;
+ }
+ }
+ if (breakFree) {
+ break;
+ }
+ }
+ }
+ }
+
+ // 2) Process headers
+ const bool isMultiConfig = parser.isSet(isMultiConfigOption);
+ for (auto mapIt = autoGenHeaders.begin(); mapIt != autoGenHeaders.end(); ++mapIt) {
+ auto it = parseCacheEntries.find(mapIt.key());
+ if (it == parseCacheEntries.end()) {
+ continue;
+ }
+ const QString pathPrefix = !isMultiConfig
+ ? QStringLiteral("../")
+ : QString();
+ const QString jsonPath =
+ dir.filePath(pathPrefix + mapIt.value() + QLatin1String(".json"));
+ jsonFileList.push_back(jsonPath);
+ }
+
+ // Sort for consistent checks across runs
+ jsonFileList.sort();
+
+ // Read Previous file list (if any)
+ const QString fileListFilePath = parser.value(outputFileOption);
+ QVector<QString> previousList;
+ QFile prev_file(fileListFilePath);
+
+ // Only try to open file if it exists to avoid error messages
+ if (prev_file.exists()) {
+ (void)readJsonFiles(previousList, fileListFilePath);
+ }
+
+ if (previousList != jsonFileList || !QFile(fileListFilePath).exists()) {
+ if (!writeJsonFiles(jsonFileList, fileListFilePath)) {
+ return EXIT_FAILURE;
+ }
+ }
+
+ return EXIT_SUCCESS;
+}
+
+QT_END_NAMESPACE
diff --git a/src/tools/moc/.prev_CMakeLists.txt b/src/tools/moc/.prev_CMakeLists.txt
new file mode 100644
index 0000000000..ffadd2e2be
--- /dev/null
+++ b/src/tools/moc/.prev_CMakeLists.txt
@@ -0,0 +1,35 @@
+# Generated from moc.pro.
+
+#####################################################################
+## moc Tool:
+#####################################################################
+
+qt_add_tool(moc
+ BOOTSTRAP
+ SOURCES
+ cbordevice.h
+ collectjson.cpp collectjson.h
+ generator.cpp generator.h
+ main.cpp
+ moc.cpp moc.h
+ outputrevision.h
+ parser.cpp parser.h
+ preprocessor.cpp preprocessor.h
+ qdatetime_p.h
+ symbols.h
+ token.cpp token.h
+ utils.h
+ DEFINES
+ QT_MOC
+ QT_NO_CAST_FROM_ASCII
+ QT_NO_CAST_FROM_BYTEARRAY
+ QT_NO_COMPRESS
+ QT_NO_FOREACH
+ INCLUDE_DIRECTORIES
+ ${CMAKE_CURRENT_SOURCE_DIR}
+ ../../3rdparty/tinycbor/src
+)
+
+#### Keys ignored in scope 1:.:.:moc.pro:<TRUE>:
+# QMAKE_TARGET_DESCRIPTION = "Qt Meta Object Compiler"
+# _OPTION = "host_build"
diff --git a/src/tools/moc/CMakeLists.txt b/src/tools/moc/CMakeLists.txt
new file mode 100644
index 0000000000..c9786674f1
--- /dev/null
+++ b/src/tools/moc/CMakeLists.txt
@@ -0,0 +1,36 @@
+# Generated from moc.pro.
+
+#####################################################################
+## moc Tool:
+#####################################################################
+
+qt_add_tool(moc
+ BOOTSTRAP
+ TOOLS_TARGET Core # special case
+ SOURCES
+ cbordevice.h
+ collectjson.cpp collectjson.h
+ generator.cpp generator.h
+ main.cpp
+ moc.cpp moc.h
+ outputrevision.h
+ parser.cpp parser.h
+ preprocessor.cpp preprocessor.h
+ # qdatetime_p.h special case remove
+ symbols.h
+ token.cpp token.h
+ utils.h
+ DEFINES
+ QT_MOC
+ QT_NO_CAST_FROM_ASCII
+ QT_NO_CAST_FROM_BYTEARRAY
+ QT_NO_COMPRESS
+ QT_NO_FOREACH
+ INCLUDE_DIRECTORIES
+ ${CMAKE_CURRENT_SOURCE_DIR}
+ ../../3rdparty/tinycbor/src
+)
+
+#### Keys ignored in scope 1:.:.:moc.pro:<TRUE>:
+# QMAKE_TARGET_DESCRIPTION = "Qt Meta Object Compiler"
+# _OPTION = "host_build"
diff --git a/src/tools/qdbuscpp2xml/.prev_CMakeLists.txt b/src/tools/qdbuscpp2xml/.prev_CMakeLists.txt
new file mode 100644
index 0000000000..9d51b4eac9
--- /dev/null
+++ b/src/tools/qdbuscpp2xml/.prev_CMakeLists.txt
@@ -0,0 +1,49 @@
+# Generated from qdbuscpp2xml.pro.
+
+#####################################################################
+## qdbuscpp2xml Tool:
+#####################################################################
+
+qt_add_tool(qdbuscpp2xml
+ SOURCES
+ ../moc/cbordevice.h
+ ../moc/collectjson.cpp ../moc/collectjson.h
+ ../moc/generator.cpp ../moc/generator.h
+ ../moc/moc.cpp ../moc/moc.h
+ ../moc/outputrevision.h
+ ../moc/parser.cpp ../moc/parser.h
+ ../moc/preprocessor.cpp ../moc/preprocessor.h
+ ../moc/symbols.h
+ ../moc/token.cpp ../moc/token.h
+ ../moc/utils.h
+ qdbuscpp2xml.cpp
+ DEFINES
+ QT_NO_CAST_FROM_ASCII
+ QT_NO_FOREACH
+ INCLUDE_DIRECTORIES
+ ../moc
+ ../moc/../../3rdparty/tinycbor/src
+ LIBRARIES
+ Qt::CorePrivate
+)
+
+#### Keys ignored in scope 1:.:.:qdbuscpp2xml.pro:<TRUE>:
+# QMAKE_TARGET_DESCRIPTION = "Qt D-Bus C++ to XML Compiler"
+# _OPTION = "host_build"
+
+## Scopes:
+#####################################################################
+
+qt_extend_target(qdbuscpp2xml CONDITION force_bootstrap
+ LIBRARIES
+ bootstrap_dbusPrivate
+ PUBLIC_LIBRARIES
+ bootstrap_dbus
+)
+
+qt_extend_target(qdbuscpp2xml CONDITION NOT force_bootstrap
+ LIBRARIES
+ Qt::DBusPrivate
+ PUBLIC_LIBRARIES
+ Qt::DBus
+)
diff --git a/src/tools/qdbuscpp2xml/CMakeLists.txt b/src/tools/qdbuscpp2xml/CMakeLists.txt
new file mode 100644
index 0000000000..499e5fb6ae
--- /dev/null
+++ b/src/tools/qdbuscpp2xml/CMakeLists.txt
@@ -0,0 +1,48 @@
+# Generated from qdbuscpp2xml.pro.
+
+#####################################################################
+## qdbuscpp2xml Tool:
+#####################################################################
+
+qt_add_tool(qdbuscpp2xml
+ TOOLS_TARGET DBus # special case
+ SOURCES
+ ../moc/cbordevice.h
+ ../moc/collectjson.cpp ../moc/collectjson.h
+ ../moc/generator.cpp ../moc/generator.h
+ ../moc/moc.cpp ../moc/moc.h
+ ../moc/outputrevision.h
+ ../moc/parser.cpp ../moc/parser.h
+ ../moc/preprocessor.cpp ../moc/preprocessor.h
+ ../moc/symbols.h
+ ../moc/token.cpp ../moc/token.h
+ ../moc/utils.h
+ qdbuscpp2xml.cpp
+ DEFINES
+ QT_NO_CAST_FROM_ASCII
+ QT_NO_FOREACH
+ INCLUDE_DIRECTORIES
+ ../moc
+ ../moc/../../3rdparty/tinycbor/src
+ LIBRARIES
+ Qt::CorePrivate
+ Qt::DBusPrivate
+ # COMPILE_OPTIONS # special case
+ # "$$QT_HOST_CFLAGS_DBUS"
+ # QMAKE_TARGET_DESCRIPTION = "Qt D-Bus C++ to XML Compiler"
+ # _LOADED = "qt_tool"
+ # _OPTION = "host_build"
+)
+
+#### Keys ignored in scope 1:.:.:qdbuscpp2xml.pro:<TRUE>:
+# QMAKE_TARGET_DESCRIPTION = "Qt D-Bus C++ to XML Compiler"
+# _OPTION = "host_build"
+
+## Scopes:
+#####################################################################
+
+# special case begin
+# extend_target(qdbuscpp2xml CONDITION force_bootstrap [...])
+# extend_target(qdbuscpp2xml CONDITION NOT force_bootstrap [...])
+# special case end
+
diff --git a/src/tools/qdbusxml2cpp/.prev_CMakeLists.txt b/src/tools/qdbusxml2cpp/.prev_CMakeLists.txt
new file mode 100644
index 0000000000..202e751727
--- /dev/null
+++ b/src/tools/qdbusxml2cpp/.prev_CMakeLists.txt
@@ -0,0 +1,36 @@
+# Generated from qdbusxml2cpp.pro.
+
+#####################################################################
+## qdbusxml2cpp Tool:
+#####################################################################
+
+qt_add_tool(qdbusxml2cpp
+ SOURCES
+ qdbusxml2cpp.cpp
+ DEFINES
+ QT_NO_CAST_FROM_ASCII
+ QT_NO_FOREACH
+ LIBRARIES
+ Qt::CorePrivate
+)
+
+#### Keys ignored in scope 1:.:.:qdbusxml2cpp.pro:<TRUE>:
+# QMAKE_TARGET_DESCRIPTION = "Qt D-Bus XML to C++ Compiler"
+# _OPTION = "host_build"
+
+## Scopes:
+#####################################################################
+
+qt_extend_target(qdbusxml2cpp CONDITION NOT force_bootstrap
+ LIBRARIES
+ Qt::DBusPrivate
+ PUBLIC_LIBRARIES
+ Qt::DBus
+)
+
+qt_extend_target(qdbusxml2cpp CONDITION force_bootstrap
+ LIBRARIES
+ bootstrap_dbusPrivate
+ PUBLIC_LIBRARIES
+ bootstrap_dbus
+)
diff --git a/src/tools/qdbusxml2cpp/CMakeLists.txt b/src/tools/qdbusxml2cpp/CMakeLists.txt
new file mode 100644
index 0000000000..f97cbb1180
--- /dev/null
+++ b/src/tools/qdbusxml2cpp/CMakeLists.txt
@@ -0,0 +1,35 @@
+# Generated from qdbusxml2cpp.pro.
+
+#####################################################################
+## qdbusxml2cpp Tool:
+#####################################################################
+
+qt_add_tool(qdbusxml2cpp
+ TOOLS_TARGET DBus # special case
+ SOURCES
+ qdbusxml2cpp.cpp
+ DEFINES
+ QT_NO_CAST_FROM_ASCII
+ QT_NO_FOREACH
+ LIBRARIES
+ Qt::CorePrivate
+ Qt::DBusPrivate
+ # COMPILE_OPTIONS # special case
+ # "$$QT_HOST_CFLAGS_DBUS"
+ # QMAKE_TARGET_DESCRIPTION = "Qt D-Bus XML to C++ Compiler"
+ # _LOADED = "qt_tool"
+ # _OPTION = "host_build"
+)
+
+#### Keys ignored in scope 1:.:.:qdbusxml2cpp.pro:<TRUE>:
+# QMAKE_TARGET_DESCRIPTION = "Qt D-Bus XML to C++ Compiler"
+# _OPTION = "host_build"
+
+## Scopes:
+#####################################################################
+
+# special case begin
+# extend_target(qdbusxml2cpp CONDITION NOT force_bootstrap [...])
+# extend_target(qdbusxml2cpp CONDITION NOT QT_FEATURE_commandlineparser AND NOT force_bootstrap [...])
+# extend_target(qdbusxml2cpp CONDITION force_bootstrap [...])
+# special case end
diff --git a/src/tools/qlalr/.prev_CMakeLists.txt b/src/tools/qlalr/.prev_CMakeLists.txt
new file mode 100644
index 0000000000..9ff8a54ce4
--- /dev/null
+++ b/src/tools/qlalr/.prev_CMakeLists.txt
@@ -0,0 +1,26 @@
+# Generated from qlalr.pro.
+
+#####################################################################
+## qlalr Tool:
+#####################################################################
+
+qt_add_tool(qlalr
+ SOURCES
+ compress.cpp compress.h
+ cppgenerator.cpp cppgenerator.h
+ dotgraph.cpp dotgraph.h
+ grammar.cpp grammar_p.h
+ lalr.cpp lalr.h
+ main.cpp
+ parsetable.cpp parsetable.h
+ recognizer.cpp recognizer.h
+ DEFINES
+ QT_NO_FOREACH
+ PUBLIC_LIBRARIES
+ Qt::Gui
+)
+
+#### Keys ignored in scope 1:.:.:qlalr.pro:<TRUE>:
+# OTHER_FILES = "lalr.g"
+# QMAKE_TARGET_DESCRIPTION = "Qt Look Ahead LR Parser Generator"
+# _OPTION = "host_build"
diff --git a/src/tools/qlalr/CMakeLists.txt b/src/tools/qlalr/CMakeLists.txt
new file mode 100644
index 0000000000..437c8d918f
--- /dev/null
+++ b/src/tools/qlalr/CMakeLists.txt
@@ -0,0 +1,27 @@
+# Generated from qlalr.pro.
+
+#####################################################################
+## qlalr Tool:
+#####################################################################
+
+qt_add_tool(qlalr
+ TOOLS_TARGET Core # special case
+ SOURCES
+ compress.cpp compress.h
+ cppgenerator.cpp cppgenerator.h
+ dotgraph.cpp dotgraph.h
+ grammar.cpp grammar_p.h
+ lalr.cpp lalr.h
+ main.cpp
+ parsetable.cpp parsetable.h
+ recognizer.cpp recognizer.h
+ DEFINES
+ QT_NO_FOREACH
+ PUBLIC_LIBRARIES
+ Qt::Core # special case
+)
+
+#### Keys ignored in scope 1:.:.:qlalr.pro:<TRUE>:
+# OTHER_FILES = "lalr.g"
+# QMAKE_TARGET_DESCRIPTION = "Qt Look Ahead LR Parser Generator"
+# _OPTION = "host_build"
diff --git a/src/tools/qvkgen/.prev_CMakeLists.txt b/src/tools/qvkgen/.prev_CMakeLists.txt
new file mode 100644
index 0000000000..994b97a9f1
--- /dev/null
+++ b/src/tools/qvkgen/.prev_CMakeLists.txt
@@ -0,0 +1,16 @@
+# Generated from qvkgen.pro.
+
+#####################################################################
+## qvkgen Tool:
+#####################################################################
+
+qt_add_tool(qvkgen
+ SOURCES
+ qvkgen.cpp
+ PUBLIC_LIBRARIES
+ Qt::Gui
+)
+
+#### Keys ignored in scope 1:.:.:qvkgen.pro:<TRUE>:
+# QMAKE_TARGET_DESCRIPTION = "Qt Vulkan Header Generator"
+# _OPTION = "host_build"
diff --git a/src/tools/qvkgen/CMakeLists.txt b/src/tools/qvkgen/CMakeLists.txt
new file mode 100644
index 0000000000..0f72a8b633
--- /dev/null
+++ b/src/tools/qvkgen/CMakeLists.txt
@@ -0,0 +1,17 @@
+# Generated from qvkgen.pro.
+
+#####################################################################
+## qvkgen Tool:
+#####################################################################
+
+qt_add_tool(qvkgen
+ TOOLS_TARGET Gui # special case
+ SOURCES
+ qvkgen.cpp
+ PUBLIC_LIBRARIES
+ Qt::Core # special case
+)
+
+#### Keys ignored in scope 1:.:.:qvkgen.pro:<TRUE>:
+# QMAKE_TARGET_DESCRIPTION = "Qt Vulkan Header Generator"
+# _OPTION = "host_build"
diff --git a/src/tools/rcc/.prev_CMakeLists.txt b/src/tools/rcc/.prev_CMakeLists.txt
new file mode 100644
index 0000000000..307f08bfa7
--- /dev/null
+++ b/src/tools/rcc/.prev_CMakeLists.txt
@@ -0,0 +1,37 @@
+# Generated from rcc.pro.
+
+#####################################################################
+## rcc Tool:
+#####################################################################
+
+qt_add_tool(rcc
+ BOOTSTRAP
+ SOURCES
+ main.cpp
+ rcc.cpp rcc.h
+ DEFINES
+ QT_NO_CAST_FROM_ASCII
+ QT_NO_FOREACH
+ QT_RCC
+ INCLUDE_DIRECTORIES
+ ${CMAKE_CURRENT_SOURCE_DIR}
+)
+
+#### Keys ignored in scope 1:.:.:rcc.pro:<TRUE>:
+# QMAKE_TARGET_DESCRIPTION = "Qt Resource Compiler"
+# _OPTION = "host_build"
+
+## Scopes:
+#####################################################################
+
+qt_extend_target(rcc CONDITION QT_FEATURE_zstd AND NOT CMAKE_CROSSCOMPILING
+ DEFINES
+ QT_FEATURE_zstd=1
+ LIBRARIES
+ ZSTD::ZSTD
+)
+
+qt_extend_target(rcc CONDITION CMAKE_CROSSCOMPILING OR NOT QT_FEATURE_zstd
+ DEFINES
+ QT_FEATURE_zstd=-1
+)
diff --git a/src/tools/rcc/CMakeLists.txt b/src/tools/rcc/CMakeLists.txt
new file mode 100644
index 0000000000..e7f45314c3
--- /dev/null
+++ b/src/tools/rcc/CMakeLists.txt
@@ -0,0 +1,38 @@
+# Generated from rcc.pro.
+
+#####################################################################
+## rcc Tool:
+#####################################################################
+
+qt_add_tool(rcc
+ BOOTSTRAP
+ TOOLS_TARGET Core # special case
+ SOURCES
+ main.cpp
+ rcc.cpp rcc.h
+ DEFINES
+ QT_NO_CAST_FROM_ASCII
+ QT_NO_FOREACH
+ QT_RCC
+ INCLUDE_DIRECTORIES
+ ${CMAKE_CURRENT_SOURCE_DIR}
+)
+
+#### Keys ignored in scope 1:.:.:rcc.pro:<TRUE>:
+# QMAKE_TARGET_DESCRIPTION = "Qt Resource Compiler"
+# _OPTION = "host_build"
+
+## Scopes:
+#####################################################################
+
+qt_extend_target(rcc CONDITION QT_FEATURE_zstd AND NOT CMAKE_CROSSCOMPILING
+ DEFINES
+ QT_FEATURE_zstd=1
+ LIBRARIES
+ ZSTD::ZSTD
+)
+
+qt_extend_target(rcc CONDITION CMAKE_CROSSCOMPILING OR NOT QT_FEATURE_zstd
+ DEFINES
+ QT_FEATURE_zstd=-1
+)
diff --git a/src/tools/tracegen/.prev_CMakeLists.txt b/src/tools/tracegen/.prev_CMakeLists.txt
new file mode 100644
index 0000000000..87bcf362d6
--- /dev/null
+++ b/src/tools/tracegen/.prev_CMakeLists.txt
@@ -0,0 +1,20 @@
+# Generated from tracegen.pro.
+
+#####################################################################
+## tracegen Tool:
+#####################################################################
+
+qt_add_tool(tracegen
+ BOOTSTRAP
+ SOURCES
+ etw.cpp etw.h
+ helpers.cpp helpers.h
+ lttng.cpp lttng.h
+ panic.cpp panic.h
+ provider.cpp provider.h
+ qtheaders.cpp qtheaders.h
+ tracegen.cpp
+)
+
+#### Keys ignored in scope 1:.:.:tracegen.pro:<TRUE>:
+# _OPTION = "host_build"
diff --git a/src/tools/tracegen/CMakeLists.txt b/src/tools/tracegen/CMakeLists.txt
new file mode 100644
index 0000000000..0f12f823c4
--- /dev/null
+++ b/src/tools/tracegen/CMakeLists.txt
@@ -0,0 +1,21 @@
+# Generated from tracegen.pro.
+
+#####################################################################
+## tracegen Tool:
+#####################################################################
+
+qt_add_tool(tracegen
+ BOOTSTRAP
+ TOOLS_TARGET Core # special case
+ SOURCES
+ etw.cpp etw.h
+ helpers.cpp helpers.h
+ lttng.cpp lttng.h
+ panic.cpp panic.h
+ provider.cpp provider.h
+ qtheaders.cpp qtheaders.h
+ tracegen.cpp
+)
+
+#### Keys ignored in scope 1:.:.:tracegen.pro:<TRUE>:
+# _OPTION = "host_build"
diff --git a/src/tools/uic/.prev_CMakeLists.txt b/src/tools/uic/.prev_CMakeLists.txt
new file mode 100644
index 0000000000..4cd28d7070
--- /dev/null
+++ b/src/tools/uic/.prev_CMakeLists.txt
@@ -0,0 +1,44 @@
+# Generated from uic.pro.
+
+#####################################################################
+## uic Tool:
+#####################################################################
+
+qt_add_tool(uic
+ SOURCES
+ cpp/cppwritedeclaration.cpp cpp/cppwritedeclaration.h
+ cpp/cppwriteincludes.cpp cpp/cppwriteincludes.h
+ cpp/cppwriteinitialization.cpp cpp/cppwriteinitialization.h
+ customwidgetsinfo.cpp customwidgetsinfo.h
+ databaseinfo.cpp databaseinfo.h
+ driver.cpp driver.h
+ main.cpp
+ option.h
+ python/pythonwritedeclaration.cpp python/pythonwritedeclaration.h
+ python/pythonwriteimports.cpp python/pythonwriteimports.h
+ shared/language.cpp shared/language.h
+ treewalker.cpp treewalker.h
+ ui4.cpp ui4.h
+ uic.cpp uic.h
+ utils.h
+ validator.cpp validator.h
+ DEFINES
+ QT_NO_CAST_FROM_ASCII
+ QT_NO_FOREACH
+ QT_UIC
+ INCLUDE_DIRECTORIES
+ ${CMAKE_CURRENT_SOURCE_DIR}
+ ${PROJECT_BINARY_DIR}/src/tools/uic
+ cpp
+ python
+ shared
+ PUBLIC_LIBRARIES
+ Qt::Gui
+)
+
+#### Keys ignored in scope 1:.:.:uic.pro:<TRUE>:
+# QMAKE_TARGET_DESCRIPTION = "Qt User Interface Compiler"
+# _OPTION = "host_build"
+
+## Scopes:
+#####################################################################
diff --git a/src/tools/uic/CMakeLists.txt b/src/tools/uic/CMakeLists.txt
new file mode 100644
index 0000000000..21fd232349
--- /dev/null
+++ b/src/tools/uic/CMakeLists.txt
@@ -0,0 +1,45 @@
+# Generated from uic.pro.
+
+#####################################################################
+## uic Tool:
+#####################################################################
+
+qt_add_tool(uic
+ TOOLS_TARGET Widgets # special case
+ SOURCES
+ cpp/cppwritedeclaration.cpp cpp/cppwritedeclaration.h
+ cpp/cppwriteincludes.cpp cpp/cppwriteincludes.h
+ cpp/cppwriteinitialization.cpp cpp/cppwriteinitialization.h
+ customwidgetsinfo.cpp customwidgetsinfo.h
+ databaseinfo.cpp databaseinfo.h
+ driver.cpp driver.h
+ main.cpp
+ option.h
+ python/pythonwritedeclaration.cpp python/pythonwritedeclaration.h
+ python/pythonwriteimports.cpp python/pythonwriteimports.h
+ shared/language.cpp shared/language.h
+ treewalker.cpp treewalker.h
+ ui4.cpp ui4.h
+ uic.cpp uic.h
+ utils.h
+ validator.cpp validator.h
+ DEFINES
+ QT_NO_CAST_FROM_ASCII
+ QT_NO_FOREACH
+ QT_UIC
+ INCLUDE_DIRECTORIES
+ ${CMAKE_CURRENT_SOURCE_DIR}
+ # ${PROJECT_BINARY_DIR}/src/tools/uic # special case remove
+ cpp
+ python
+ shared
+ #PUBLIC_LIBRARIES # special case remove
+ #Qt::Gui # special case remove
+)
+
+#### Keys ignored in scope 1:.:.:uic.pro:<TRUE>:
+# QMAKE_TARGET_DESCRIPTION = "Qt User Interface Compiler"
+# _OPTION = "host_build"
+
+## Scopes:
+#####################################################################