summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.prev_configure.cmake62
-rw-r--r--CMakeLists.txt20
-rwxr-xr-xbin/fixqt4headers.pl179
-rw-r--r--bin/qt-cmake-private-install.cmake.in3
-rwxr-xr-xbin/qt-cmake-standalone-test.in2
-rwxr-xr-xbin/qt-internal-configure-tests.in3
-rw-r--r--cmake/FindGLESv2.cmake4
-rw-r--r--cmake/FindGSSAPI.cmake1
-rw-r--r--cmake/FindWrapAtomic.cmake6
-rw-r--r--cmake/FindWrapBacktrace.cmake17
-rw-r--r--cmake/FindWrapBrotli.cmake54
-rw-r--r--cmake/FindWrapOpenSSL.cmake2
-rw-r--r--cmake/FindWrapZLIB.cmake29
-rw-r--r--cmake/ModuleDescription.json.in2
-rw-r--r--cmake/Qt3rdPartyLibraryHelpers.cmake15
-rw-r--r--cmake/QtAndroidHelpers.cmake105
-rw-r--r--cmake/QtAppHelpers.cmake10
-rw-r--r--cmake/QtAutoDetect.cmake170
-rw-r--r--cmake/QtBaseConfigureTests.cmake34
-rw-r--r--cmake/QtBaseGlobalTargets.cmake57
-rw-r--r--cmake/QtBuild.cmake113
-rw-r--r--cmake/QtBuildInformation.cmake2
-rw-r--r--cmake/QtBuildInternals/QtBuildInternalsConfig.cmake116
-rw-r--r--cmake/QtBuildInternals/QtStandaloneTestTemplateProject/CMakeLists.txt19
-rw-r--r--cmake/QtBuildInternals/QtStandaloneTestTemplateProject/Main.cmake18
-rw-r--r--cmake/QtBuildInternalsExtra.cmake.in24
-rw-r--r--cmake/QtCMakeHelpers.cmake20
-rw-r--r--cmake/QtCMakeVersionHelpers.cmake11
-rw-r--r--cmake/QtCompilerOptimization.cmake9
-rw-r--r--cmake/QtConfig.cmake.in16
-rw-r--r--cmake/QtDocsHelpers.cmake28
-rw-r--r--cmake/QtExecutableHelpers.cmake85
-rw-r--r--cmake/QtFeature.cmake47
-rw-r--r--cmake/QtFindPackageHelpers.cmake14
-rw-r--r--cmake/QtFinishPrlFile.cmake6
-rw-r--r--cmake/QtFlagHandlingHelpers.cmake4
-rw-r--r--cmake/QtFrameworkHelpers.cmake2
-rw-r--r--cmake/QtHeadersClean.cmake2
-rw-r--r--cmake/QtInstallHelpers.cmake46
-rw-r--r--cmake/QtInternalTargets.cmake5
-rw-r--r--cmake/QtLoadFilePrintVars.cmake15
-rw-r--r--cmake/QtModuleConfig.cmake.in2
-rw-r--r--cmake/QtModuleDependencies.cmake.in12
-rw-r--r--cmake/QtModuleHelpers.cmake51
-rw-r--r--cmake/QtPlatformSupport.cmake7
-rw-r--r--cmake/QtPlatformTargetHelpers.cmake (renamed from cmake/QtPublicTargetsHelpers.cmake)5
-rw-r--r--cmake/QtPluginConfig.cmake.in9
-rw-r--r--cmake/QtPluginDependencies.cmake.in3
-rw-r--r--cmake/QtPluginHelpers.cmake273
-rw-r--r--cmake/QtPlugins.cmake.in138
-rw-r--r--cmake/QtPostProcess.cmake1
-rw-r--r--cmake/QtPostProcessHelpers.cmake52
-rw-r--r--cmake/QtPriHelpers.cmake7
-rw-r--r--cmake/QtPrlHelpers.cmake242
-rw-r--r--cmake/QtProcessConfigureArgs.cmake125
-rw-r--r--cmake/QtPublicPluginHelpers.cmake156
-rw-r--r--cmake/QtPublicTargetHelpers.cmake16
-rw-r--r--cmake/QtPublicWalkLibsHelpers.cmake293
-rw-r--r--cmake/QtQmakeHelpers.cmake34
-rw-r--r--cmake/QtResourceHelpers.cmake10
-rw-r--r--cmake/QtRpathHelpers.cmake2
-rw-r--r--cmake/QtSetup.cmake1
-rw-r--r--cmake/QtSimdHelpers.cmake38
-rw-r--r--cmake/QtSyncQtHelpers.cmake6
-rw-r--r--cmake/QtTargetHelpers.cmake86
-rw-r--r--cmake/QtTestHelpers.cmake34
-rw-r--r--cmake/QtToolHelpers.cmake25
-rw-r--r--cmake/QtToolchainHelpers.cmake58
-rw-r--r--cmake/QtWasmHelpers.cmake93
-rw-r--r--cmake/QtWrapperScriptHelpers.cmake32
-rw-r--r--cmake/ios/MacOSXBundleInfo.plist.in46
-rw-r--r--cmake/qt.toolchain.cmake.in5
-rw-r--r--coin/instructions/call_cmake_for_standalone_tests.yaml2
-rw-r--r--coin/instructions/cmake_build_and_upload_test_artifacts.yaml13
-rw-r--r--coin/instructions/cmake_regular_test_instructions_enforced.yaml4
-rw-r--r--coin/instructions/coin_module_build_template_v2.yaml34
-rw-r--r--coin/instructions/coin_qtbase_build_template_v2.yaml19
-rw-r--r--coin/instructions/prepare_building_env.yaml24
-rw-r--r--config.tests/cmake_zstd/check_zstd.cmake5
-rw-r--r--config_help.txt8
-rwxr-xr-xconfigure14
-rw-r--r--configure.bat17
-rw-r--r--configure.cmake119
-rw-r--r--configure.json39
-rw-r--r--doc/src/images/fetchmore-example.pngbin19169 -> 19872 bytes
-rw-r--r--examples/corelib/threads/mandelbrot/main.cpp34
-rw-r--r--examples/corelib/threads/mandelbrot/mandelbrotwidget.cpp16
-rw-r--r--examples/corelib/threads/mandelbrot/mandelbrotwidget.h4
-rw-r--r--examples/corelib/threads/mandelbrot/renderthread.cpp28
-rw-r--r--examples/corelib/threads/mandelbrot/renderthread.h7
-rw-r--r--examples/embedded/flickable/main.cpp2
-rw-r--r--examples/network/fortuneserver/server.cpp2
-rw-r--r--examples/network/threadedfortuneserver/fortuneserver.cpp2
-rw-r--r--examples/network/torrent/torrentclient.cpp16
-rw-r--r--examples/widgets/dialogs/standarddialogs/dialog.cpp8
-rw-r--r--examples/widgets/doc/src/addressbook-tutorial.qdoc6
-rw-r--r--examples/widgets/doc/src/fetchmore.qdoc17
-rw-r--r--examples/widgets/itemviews/editabletreemodel/mainwindow.cpp2
-rw-r--r--examples/widgets/itemviews/editabletreemodel/treemodel.cpp3
-rw-r--r--examples/widgets/itemviews/fetchmore/filelistmodel.cpp53
-rw-r--r--examples/widgets/itemviews/fetchmore/filelistmodel.h13
-rw-r--r--examples/widgets/itemviews/fetchmore/window.cpp48
-rw-r--r--examples/widgets/itemviews/fetchmore/window.h13
-rw-r--r--examples/widgets/mainwindows/mainwindow/toolbar.cpp2
-rw-r--r--examples/widgets/painting/affine/CMakeLists.txt2
-rw-r--r--examples/widgets/painting/composition/CMakeLists.txt2
-rw-r--r--examples/widgets/painting/deform/CMakeLists.txt2
-rw-r--r--examples/widgets/painting/gradients/CMakeLists.txt2
-rw-r--r--examples/widgets/painting/gradients/gradients.cpp2
-rw-r--r--examples/widgets/painting/pathstroke/CMakeLists.txt2
-rw-r--r--examples/widgets/painting/pathstroke/pathstroke.cpp24
-rw-r--r--examples/widgets/painting/shared/CMakeLists.txt8
-rw-r--r--examples/widgets/painting/shared/hoverpoints.cpp24
-rw-r--r--examples/widgets/painting/shared/use_lib.cmake13
-rw-r--r--examples/widgets/richtext/textedit/.prev_CMakeLists.txt2
-rw-r--r--examples/widgets/richtext/textedit/CMakeLists.txt2
-rw-r--r--examples/widgets/richtext/textedit/images/mac/textundercolor.pngbin0 -> 6916 bytes
-rw-r--r--examples/widgets/richtext/textedit/images/win/textundercolor.pngbin0 -> 6916 bytes
-rw-r--r--examples/widgets/richtext/textedit/textedit.cpp17
-rw-r--r--examples/widgets/richtext/textedit/textedit.h2
-rw-r--r--examples/widgets/richtext/textedit/textedit.qrc2
-rw-r--r--examples/widgets/tools/CMakeLists.txt6
-rw-r--r--examples/widgets/tools/plugandpaint/CMakeLists.txt16
-rw-r--r--examples/widgets/tools/plugandpaint/app/CMakeLists.txt56
-rw-r--r--examples/widgets/tools/plugandpaint/app/app.pro6
-rw-r--r--examples/widgets/tools/plugandpaint/plugins/basictools/CMakeLists.txt26
-rw-r--r--examples/widgets/tools/plugandpaint/plugins/extrafilters/CMakeLists.txt27
-rw-r--r--examples/widgets/tools/settingseditor/settingstree.cpp2
-rw-r--r--examples/widgets/touch/fingerpaint/scribblearea.cpp6
-rw-r--r--examples/widgets/touch/knobs/knob.cpp8
-rw-r--r--examples/widgets/touch/pinchzoom/graphicsview.cpp8
-rw-r--r--examples/widgets/widgets/calendarwidget/window.cpp17
-rw-r--r--examples/widgets/widgets/imageviewer/imageviewer.cpp9
-rw-r--r--examples/widgets/widgets/stylesheet/mainwindow.cpp6
-rw-r--r--examples/widgets/widgets/validators/localeselector.cpp10
-rw-r--r--libexec/qt-internal-configure-tests.bat.in9
-rwxr-xr-xlibexec/qt-internal-configure-tests.in5
-rwxr-xr-xlibexec/syncqt.pl (renamed from bin/syncqt.pl)0
-rw-r--r--mkspecs/common/macx.conf4
-rw-r--r--mkspecs/common/qnx/qplatformdefs.h2
-rw-r--r--mkspecs/features/android/android_deployment_settings.prf2
-rw-r--r--mkspecs/features/default_pre.prf15
-rw-r--r--mkspecs/features/mac/default_post.prf7
-rw-r--r--mkspecs/features/mac/sdk.mk8
-rw-r--r--mkspecs/features/qt.prf2
-rw-r--r--mkspecs/features/qt_module_headers.prf2
-rw-r--r--mkspecs/features/resources_functions.prf12
-rw-r--r--mkspecs/features/uikit/default_post.prf2
-rw-r--r--mkspecs/features/wasm/wasm.prf42
-rw-r--r--mkspecs/features/wayland-scanner.prf2
-rw-r--r--mkspecs/macx-ios-clang/qmake.conf2
-rw-r--r--mkspecs/macx-tvos-clang/qmake.conf2
-rw-r--r--mkspecs/macx-watchos-clang/qmake.conf2
-rw-r--r--mkspecs/unsupported/qnx-X11-g++/qplatformdefs.h2
-rw-r--r--mkspecs/wasm-emscripten/qmake.conf12
-rw-r--r--qmake/CMakeLists.txt81
-rw-r--r--qmake/cachekeys.h1
-rw-r--r--qmake/configure.cmake12
-rw-r--r--qmake/doc/src/qmake-manual.qdoc16
-rw-r--r--qmake/generators/mac/pbuilder_pbx.cpp17
-rw-r--r--qmake/library/qmakeglobals.cpp7
-rw-r--r--qmake/main.cpp19
-rw-r--r--qmake/option.cpp26
-rw-r--r--qmake/option.h2
-rw-r--r--qmake/project.cpp5
-rw-r--r--qmake/property.cpp131
-rw-r--r--qmake/property.h8
-rw-r--r--qmake/propertyprinter.cpp68
-rw-r--r--qmake/propertyprinter.h (renamed from src/network/ssl/qx509_schannel.cpp)29
-rw-r--r--qmake/qmakelibraryinfo.cpp215
-rw-r--r--qmake/qmakelibraryinfo.h23
-rw-r--r--qt_cmdline.cmake6
-rw-r--r--src/3rdparty/freetype/CMakeLists.txt2
-rw-r--r--src/3rdparty/gradle/gradle/wrapper/gradle-wrapper.jarbin54329 -> 59203 bytes
-rw-r--r--src/3rdparty/gradle/gradle/wrapper/gradle-wrapper.properties2
-rwxr-xr-xsrc/3rdparty/gradle/gradlew53
-rw-r--r--src/3rdparty/gradle/gradlew.bat43
-rw-r--r--src/3rdparty/gradle/qt_attribution.json4
-rw-r--r--src/3rdparty/harfbuzz-ng/CMakeLists.txt9
-rw-r--r--src/3rdparty/harfbuzz-ng/COPYING5
-rw-r--r--src/3rdparty/harfbuzz-ng/NEWS126
-rw-r--r--src/3rdparty/harfbuzz-ng/README.md7
-rw-r--r--src/3rdparty/harfbuzz-ng/import_from_tarball.sh100
-rw-r--r--src/3rdparty/harfbuzz-ng/qt_attribution.json2
-rw-r--r--src/3rdparty/harfbuzz-ng/src/dump-indic-data.cc43
-rw-r--r--src/3rdparty/harfbuzz-ng/src/dump-myanmar-data.cc43
-rw-r--r--src/3rdparty/harfbuzz-ng/src/harfbuzz-config.cmake.in86
-rw-r--r--src/3rdparty/harfbuzz-ng/src/harfbuzz-gobject.pc.in12
-rw-r--r--src/3rdparty/harfbuzz-ng/src/harfbuzz-icu.pc.in13
-rw-r--r--src/3rdparty/harfbuzz-ng/src/harfbuzz-subset.pc.in12
-rw-r--r--src/3rdparty/harfbuzz-ng/src/harfbuzz.cc4
-rw-r--r--src/3rdparty/harfbuzz-ng/src/harfbuzz.pc.in13
-rw-r--r--src/3rdparty/harfbuzz-ng/src/hb-aat-fdsc-table.hh126
-rw-r--r--src/3rdparty/harfbuzz-ng/src/hb-aat-layout-ankr-table.hh4
-rw-r--r--src/3rdparty/harfbuzz-ng/src/hb-aat-layout-bsln-table.hh2
-rw-r--r--src/3rdparty/harfbuzz-ng/src/hb-aat-layout-common.hh122
-rw-r--r--src/3rdparty/harfbuzz-ng/src/hb-aat-layout-feat-table.hh10
-rw-r--r--src/3rdparty/harfbuzz-ng/src/hb-aat-layout-just-table.hh44
-rw-r--r--src/3rdparty/harfbuzz-ng/src/hb-aat-layout-kerx-table.hh86
-rw-r--r--src/3rdparty/harfbuzz-ng/src/hb-aat-layout-lcar-table.hh162
-rw-r--r--src/3rdparty/harfbuzz-ng/src/hb-aat-layout-morx-table.hh46
-rw-r--r--src/3rdparty/harfbuzz-ng/src/hb-aat-layout-opbd-table.hh4
-rw-r--r--src/3rdparty/harfbuzz-ng/src/hb-aat-layout-trak-table.hh8
-rw-r--r--src/3rdparty/harfbuzz-ng/src/hb-aat-layout.cc105
-rw-r--r--src/3rdparty/harfbuzz-ng/src/hb-aat-layout.h315
-rw-r--r--src/3rdparty/harfbuzz-ng/src/hb-aat-layout.hh10
-rw-r--r--src/3rdparty/harfbuzz-ng/src/hb-aat-map.cc33
-rw-r--r--src/3rdparty/harfbuzz-ng/src/hb-aat-map.hh13
-rw-r--r--src/3rdparty/harfbuzz-ng/src/hb-algs.hh289
-rw-r--r--src/3rdparty/harfbuzz-ng/src/hb-array.hh88
-rw-r--r--src/3rdparty/harfbuzz-ng/src/hb-atomic.hh129
-rw-r--r--src/3rdparty/harfbuzz-ng/src/hb-bimap.hh4
-rw-r--r--src/3rdparty/harfbuzz-ng/src/hb-blob.cc157
-rw-r--r--src/3rdparty/harfbuzz-ng/src/hb-blob.h39
-rw-r--r--src/3rdparty/harfbuzz-ng/src/hb-blob.hh1
-rw-r--r--src/3rdparty/harfbuzz-ng/src/hb-buffer-deserialize-json.hh1146
-rw-r--r--src/3rdparty/harfbuzz-ng/src/hb-buffer-deserialize-json.rl132
-rw-r--r--src/3rdparty/harfbuzz-ng/src/hb-buffer-deserialize-text.hh1223
-rw-r--r--src/3rdparty/harfbuzz-ng/src/hb-buffer-deserialize-text.rl126
-rw-r--r--src/3rdparty/harfbuzz-ng/src/hb-buffer-serialize.cc543
-rw-r--r--src/3rdparty/harfbuzz-ng/src/hb-buffer.cc424
-rw-r--r--src/3rdparty/harfbuzz-ng/src/hb-buffer.h113
-rw-r--r--src/3rdparty/harfbuzz-ng/src/hb-buffer.hh138
-rw-r--r--src/3rdparty/harfbuzz-ng/src/hb-cff-interp-common.hh35
-rw-r--r--src/3rdparty/harfbuzz-ng/src/hb-cff-interp-cs-common.hh47
-rw-r--r--src/3rdparty/harfbuzz-ng/src/hb-cff-interp-dict-common.hh15
-rw-r--r--src/3rdparty/harfbuzz-ng/src/hb-cff2-interp-cs.hh15
-rw-r--r--src/3rdparty/harfbuzz-ng/src/hb-common.cc198
-rw-r--r--src/3rdparty/harfbuzz-ng/src/hb-common.h716
-rw-r--r--src/3rdparty/harfbuzz-ng/src/hb-config.hh3
-rw-r--r--src/3rdparty/harfbuzz-ng/src/hb-coretext.cc85
-rw-r--r--src/3rdparty/harfbuzz-ng/src/hb-coretext.h32
-rw-r--r--src/3rdparty/harfbuzz-ng/src/hb-debug.hh7
-rw-r--r--src/3rdparty/harfbuzz-ng/src/hb-deprecated.h93
-rw-r--r--src/3rdparty/harfbuzz-ng/src/hb-directwrite.cc15
-rw-r--r--src/3rdparty/harfbuzz-ng/src/hb-dispatch.hh4
-rw-r--r--src/3rdparty/harfbuzz-ng/src/hb-draw.cc261
-rw-r--r--src/3rdparty/harfbuzz-ng/src/hb-draw.h98
-rw-r--r--src/3rdparty/harfbuzz-ng/src/hb-draw.hh139
-rw-r--r--src/3rdparty/harfbuzz-ng/src/hb-face.cc197
-rw-r--r--src/3rdparty/harfbuzz-ng/src/hb-face.h21
-rw-r--r--src/3rdparty/harfbuzz-ng/src/hb-face.hh4
-rw-r--r--src/3rdparty/harfbuzz-ng/src/hb-font.cc1348
-rw-r--r--src/3rdparty/harfbuzz-ng/src/hb-font.h533
-rw-r--r--src/3rdparty/harfbuzz-ng/src/hb-font.hh5
-rw-r--r--src/3rdparty/harfbuzz-ng/src/hb-ft.cc220
-rw-r--r--src/3rdparty/harfbuzz-ng/src/hb-ft.h6
-rw-r--r--src/3rdparty/harfbuzz-ng/src/hb-gdi.cc12
-rw-r--r--src/3rdparty/harfbuzz-ng/src/hb-glib.cc190
-rw-r--r--src/3rdparty/harfbuzz-ng/src/hb-gobject-enums.cc.tmpl80
-rw-r--r--src/3rdparty/harfbuzz-ng/src/hb-gobject-enums.h.tmpl56
-rw-r--r--src/3rdparty/harfbuzz-ng/src/hb-gobject-structs.cc13
-rw-r--r--src/3rdparty/harfbuzz-ng/src/hb-gobject-structs.h34
-rw-r--r--src/3rdparty/harfbuzz-ng/src/hb-gobject.h2
-rw-r--r--src/3rdparty/harfbuzz-ng/src/hb-graphite2.cc25
-rw-r--r--src/3rdparty/harfbuzz-ng/src/hb-graphite2.h10
-rw-r--r--src/3rdparty/harfbuzz-ng/src/hb-icu.cc187
-rw-r--r--src/3rdparty/harfbuzz-ng/src/hb-iter.hh2
-rw-r--r--src/3rdparty/harfbuzz-ng/src/hb-kern.hh3
-rw-r--r--src/3rdparty/harfbuzz-ng/src/hb-machinery.hh27
-rw-r--r--src/3rdparty/harfbuzz-ng/src/hb-map.cc92
-rw-r--r--src/3rdparty/harfbuzz-ng/src/hb-map.h14
-rw-r--r--src/3rdparty/harfbuzz-ng/src/hb-map.hh23
-rw-r--r--src/3rdparty/harfbuzz-ng/src/hb-meta.hh27
-rw-r--r--src/3rdparty/harfbuzz-ng/src/hb-mutex.hh21
-rw-r--r--src/3rdparty/harfbuzz-ng/src/hb-null.hh13
-rw-r--r--src/3rdparty/harfbuzz-ng/src/hb-number-parser.hh43
-rw-r--r--src/3rdparty/harfbuzz-ng/src/hb-number-parser.rl139
-rw-r--r--src/3rdparty/harfbuzz-ng/src/hb-number.cc95
-rw-r--r--src/3rdparty/harfbuzz-ng/src/hb-object.hh21
-rw-r--r--src/3rdparty/harfbuzz-ng/src/hb-open-file.hh25
-rw-r--r--src/3rdparty/harfbuzz-ng/src/hb-open-type.hh115
-rw-r--r--src/3rdparty/harfbuzz-ng/src/hb-ot-cff-common.hh293
-rw-r--r--src/3rdparty/harfbuzz-ng/src/hb-ot-cff1-std-str.hh425
-rw-r--r--src/3rdparty/harfbuzz-ng/src/hb-ot-cff1-table.cc228
-rw-r--r--src/3rdparty/harfbuzz-ng/src/hb-ot-cff1-table.hh423
-rw-r--r--src/3rdparty/harfbuzz-ng/src/hb-ot-cff2-table.cc73
-rw-r--r--src/3rdparty/harfbuzz-ng/src/hb-ot-cff2-table.hh93
-rw-r--r--src/3rdparty/harfbuzz-ng/src/hb-ot-cmap-table.hh589
-rw-r--r--src/3rdparty/harfbuzz-ng/src/hb-ot-color-cbdt-table.hh640
-rw-r--r--src/3rdparty/harfbuzz-ng/src/hb-ot-color-colr-table.hh142
-rw-r--r--src/3rdparty/harfbuzz-ng/src/hb-ot-color-cpal-table.hh11
-rw-r--r--src/3rdparty/harfbuzz-ng/src/hb-ot-color-sbix-table.hh127
-rw-r--r--src/3rdparty/harfbuzz-ng/src/hb-ot-color-svg-table.hh2
-rw-r--r--src/3rdparty/harfbuzz-ng/src/hb-ot-color.cc11
-rw-r--r--src/3rdparty/harfbuzz-ng/src/hb-ot-color.h9
-rw-r--r--src/3rdparty/harfbuzz-ng/src/hb-ot-deprecated.h21
-rw-r--r--src/3rdparty/harfbuzz-ng/src/hb-ot-face-table-list.hh5
-rw-r--r--src/3rdparty/harfbuzz-ng/src/hb-ot-font.cc28
-rw-r--r--src/3rdparty/harfbuzz-ng/src/hb-ot-font.h2
-rw-r--r--src/3rdparty/harfbuzz-ng/src/hb-ot-gasp-table.hh4
-rw-r--r--src/3rdparty/harfbuzz-ng/src/hb-ot-glyf-table.hh753
-rw-r--r--src/3rdparty/harfbuzz-ng/src/hb-ot-hdmx-table.hh21
-rw-r--r--src/3rdparty/harfbuzz-ng/src/hb-ot-head-table.hh14
-rw-r--r--src/3rdparty/harfbuzz-ng/src/hb-ot-hhea-table.hh61
-rw-r--r--src/3rdparty/harfbuzz-ng/src/hb-ot-hmtx-table.hh88
-rw-r--r--src/3rdparty/harfbuzz-ng/src/hb-ot-kern-table.hh37
-rw-r--r--src/3rdparty/harfbuzz-ng/src/hb-ot-layout-base-table.hh18
-rw-r--r--src/3rdparty/harfbuzz-ng/src/hb-ot-layout-common.hh1053
-rw-r--r--src/3rdparty/harfbuzz-ng/src/hb-ot-layout-gdef-table.hh279
-rw-r--r--src/3rdparty/harfbuzz-ng/src/hb-ot-layout-gpos-table.hh1038
-rw-r--r--src/3rdparty/harfbuzz-ng/src/hb-ot-layout-gsub-table.hh171
-rw-r--r--src/3rdparty/harfbuzz-ng/src/hb-ot-layout-gsubgpos.hh917
-rw-r--r--src/3rdparty/harfbuzz-ng/src/hb-ot-layout-jstf-table.hh2
-rw-r--r--src/3rdparty/harfbuzz-ng/src/hb-ot-layout.cc310
-rw-r--r--src/3rdparty/harfbuzz-ng/src/hb-ot-layout.h86
-rw-r--r--src/3rdparty/harfbuzz-ng/src/hb-ot-layout.hh3
-rw-r--r--src/3rdparty/harfbuzz-ng/src/hb-ot-map.hh10
-rw-r--r--src/3rdparty/harfbuzz-ng/src/hb-ot-math-table.hh164
-rw-r--r--src/3rdparty/harfbuzz-ng/src/hb-ot-math.cc4
-rw-r--r--src/3rdparty/harfbuzz-ng/src/hb-ot-math.h85
-rw-r--r--src/3rdparty/harfbuzz-ng/src/hb-ot-maxp-table.hh7
-rw-r--r--src/3rdparty/harfbuzz-ng/src/hb-ot-meta-table.hh7
-rw-r--r--src/3rdparty/harfbuzz-ng/src/hb-ot-meta.cc6
-rw-r--r--src/3rdparty/harfbuzz-ng/src/hb-ot-meta.h3
-rw-r--r--src/3rdparty/harfbuzz-ng/src/hb-ot-metrics.cc40
-rw-r--r--src/3rdparty/harfbuzz-ng/src/hb-ot-metrics.h6
-rw-r--r--src/3rdparty/harfbuzz-ng/src/hb-ot-name-language-static.hh15
-rw-r--r--src/3rdparty/harfbuzz-ng/src/hb-ot-name-table.hh89
-rw-r--r--src/3rdparty/harfbuzz-ng/src/hb-ot-name.cc8
-rw-r--r--src/3rdparty/harfbuzz-ng/src/hb-ot-name.h5
-rw-r--r--src/3rdparty/harfbuzz-ng/src/hb-ot-os2-table.hh46
-rw-r--r--src/3rdparty/harfbuzz-ng/src/hb-ot-os2-unicode-ranges.hh24
-rw-r--r--src/3rdparty/harfbuzz-ng/src/hb-ot-post-table.hh16
-rw-r--r--src/3rdparty/harfbuzz-ng/src/hb-ot-shape-complex-arabic-fallback.hh8
-rw-r--r--src/3rdparty/harfbuzz-ng/src/hb-ot-shape-complex-arabic-joining-list.hh46
-rw-r--r--src/3rdparty/harfbuzz-ng/src/hb-ot-shape-complex-arabic-table.hh56
-rw-r--r--src/3rdparty/harfbuzz-ng/src/hb-ot-shape-complex-arabic-win1256.hh4
-rw-r--r--src/3rdparty/harfbuzz-ng/src/hb-ot-shape-complex-arabic.cc14
-rw-r--r--src/3rdparty/harfbuzz-ng/src/hb-ot-shape-complex-default.cc20
-rw-r--r--src/3rdparty/harfbuzz-ng/src/hb-ot-shape-complex-hangul.cc47
-rw-r--r--src/3rdparty/harfbuzz-ng/src/hb-ot-shape-complex-indic-machine.hh111
-rw-r--r--src/3rdparty/harfbuzz-ng/src/hb-ot-shape-complex-indic-machine.rl126
-rw-r--r--src/3rdparty/harfbuzz-ng/src/hb-ot-shape-complex-indic-table.cc64
-rw-r--r--src/3rdparty/harfbuzz-ng/src/hb-ot-shape-complex-indic.cc137
-rw-r--r--src/3rdparty/harfbuzz-ng/src/hb-ot-shape-complex-indic.hh23
-rw-r--r--src/3rdparty/harfbuzz-ng/src/hb-ot-shape-complex-khmer-machine.hh705
-rw-r--r--src/3rdparty/harfbuzz-ng/src/hb-ot-shape-complex-khmer-machine.rl113
-rw-r--r--src/3rdparty/harfbuzz-ng/src/hb-ot-shape-complex-khmer.cc116
-rw-r--r--src/3rdparty/harfbuzz-ng/src/hb-ot-shape-complex-khmer.hh2
-rw-r--r--src/3rdparty/harfbuzz-ng/src/hb-ot-shape-complex-myanmar-machine.hh89
-rw-r--r--src/3rdparty/harfbuzz-ng/src/hb-ot-shape-complex-myanmar-machine.rl127
-rw-r--r--src/3rdparty/harfbuzz-ng/src/hb-ot-shape-complex-myanmar.cc89
-rw-r--r--src/3rdparty/harfbuzz-ng/src/hb-ot-shape-complex-myanmar.hh2
-rw-r--r--src/3rdparty/harfbuzz-ng/src/hb-ot-shape-complex-syllabic.cc100
-rw-r--r--src/3rdparty/harfbuzz-ng/src/hb-ot-shape-complex-syllabic.hh (renamed from src/3rdparty/harfbuzz-ng/src/dump-khmer-data.cc)34
-rw-r--r--src/3rdparty/harfbuzz-ng/src/hb-ot-shape-complex-thai.cc15
-rw-r--r--src/3rdparty/harfbuzz-ng/src/hb-ot-shape-complex-use-machine.hh1181
-rw-r--r--src/3rdparty/harfbuzz-ng/src/hb-ot-shape-complex-use-machine.rl195
-rw-r--r--src/3rdparty/harfbuzz-ng/src/hb-ot-shape-complex-use-table.hh (renamed from src/3rdparty/harfbuzz-ng/src/hb-ot-shape-complex-use-table.cc)649
-rw-r--r--src/3rdparty/harfbuzz-ng/src/hb-ot-shape-complex-use.cc196
-rw-r--r--src/3rdparty/harfbuzz-ng/src/hb-ot-shape-complex-use.hh105
-rw-r--r--src/3rdparty/harfbuzz-ng/src/hb-ot-shape-complex-vowel-constraints.cc88
-rw-r--r--src/3rdparty/harfbuzz-ng/src/hb-ot-shape-complex.hh60
-rw-r--r--src/3rdparty/harfbuzz-ng/src/hb-ot-shape-fallback.cc8
-rw-r--r--src/3rdparty/harfbuzz-ng/src/hb-ot-shape-normalize.cc52
-rw-r--r--src/3rdparty/harfbuzz-ng/src/hb-ot-shape.cc174
-rw-r--r--src/3rdparty/harfbuzz-ng/src/hb-ot-shape.h2
-rw-r--r--src/3rdparty/harfbuzz-ng/src/hb-ot-shape.hh7
-rw-r--r--src/3rdparty/harfbuzz-ng/src/hb-ot-stat-table.hh74
-rw-r--r--src/3rdparty/harfbuzz-ng/src/hb-ot-tag-table.hh1488
-rw-r--r--src/3rdparty/harfbuzz-ng/src/hb-ot-tag.cc104
-rw-r--r--src/3rdparty/harfbuzz-ng/src/hb-ot-var-avar-table.hh9
-rw-r--r--src/3rdparty/harfbuzz-ng/src/hb-ot-var-fvar-table.hh200
-rw-r--r--src/3rdparty/harfbuzz-ng/src/hb-ot-var-gvar-table.hh388
-rw-r--r--src/3rdparty/harfbuzz-ng/src/hb-ot-var-hvar-table.hh329
-rw-r--r--src/3rdparty/harfbuzz-ng/src/hb-ot-var-mvar-table.hh4
-rw-r--r--src/3rdparty/harfbuzz-ng/src/hb-ot-var.cc115
-rw-r--r--src/3rdparty/harfbuzz-ng/src/hb-ot-var.h53
-rw-r--r--src/3rdparty/harfbuzz-ng/src/hb-ot-vorg-table.hh9
-rw-r--r--src/3rdparty/harfbuzz-ng/src/hb-pool.hh4
-rw-r--r--src/3rdparty/harfbuzz-ng/src/hb-sanitize.hh25
-rw-r--r--src/3rdparty/harfbuzz-ng/src/hb-serialize.hh166
-rw-r--r--src/3rdparty/harfbuzz-ng/src/hb-set.cc224
-rw-r--r--src/3rdparty/harfbuzz-ng/src/hb-set.h17
-rw-r--r--src/3rdparty/harfbuzz-ng/src/hb-set.hh211
-rw-r--r--src/3rdparty/harfbuzz-ng/src/hb-shape-plan.cc188
-rw-r--r--src/3rdparty/harfbuzz-ng/src/hb-shape-plan.h16
-rw-r--r--src/3rdparty/harfbuzz-ng/src/hb-shape.cc8
-rw-r--r--src/3rdparty/harfbuzz-ng/src/hb-shape.h2
-rw-r--r--src/3rdparty/harfbuzz-ng/src/hb-shaper.hh2
-rw-r--r--src/3rdparty/harfbuzz-ng/src/hb-static.cc36
-rw-r--r--src/3rdparty/harfbuzz-ng/src/hb-string-array.hh4
-rw-r--r--src/3rdparty/harfbuzz-ng/src/hb-style.cc136
-rw-r--r--src/3rdparty/harfbuzz-ng/src/hb-style.h (renamed from src/3rdparty/harfbuzz-ng/src/dump-use-data.cc)33
-rw-r--r--src/3rdparty/harfbuzz-ng/src/hb-subset-cff-common.cc8
-rw-r--r--src/3rdparty/harfbuzz-ng/src/hb-subset-cff-common.hh174
-rw-r--r--src/3rdparty/harfbuzz-ng/src/hb-subset-cff1.cc633
-rw-r--r--src/3rdparty/harfbuzz-ng/src/hb-subset-cff1.hh3
-rw-r--r--src/3rdparty/harfbuzz-ng/src/hb-subset-cff2.cc392
-rw-r--r--src/3rdparty/harfbuzz-ng/src/hb-subset-cff2.hh3
-rw-r--r--src/3rdparty/harfbuzz-ng/src/hb-subset-input.cc25
-rw-r--r--src/3rdparty/harfbuzz-ng/src/hb-subset-input.hh2
-rw-r--r--src/3rdparty/harfbuzz-ng/src/hb-subset-plan.cc160
-rw-r--r--src/3rdparty/harfbuzz-ng/src/hb-subset-plan.hh44
-rw-r--r--src/3rdparty/harfbuzz-ng/src/hb-subset.cc266
-rw-r--r--src/3rdparty/harfbuzz-ng/src/hb-subset.h9
-rw-r--r--src/3rdparty/harfbuzz-ng/src/hb-subset.hh12
-rw-r--r--src/3rdparty/harfbuzz-ng/src/hb-ucd-table.hh6248
-rw-r--r--src/3rdparty/harfbuzz-ng/src/hb-ucd.cc18
-rw-r--r--src/3rdparty/harfbuzz-ng/src/hb-unicode-emoji-table.hh8
-rw-r--r--src/3rdparty/harfbuzz-ng/src/hb-unicode.cc127
-rw-r--r--src/3rdparty/harfbuzz-ng/src/hb-unicode.h321
-rw-r--r--src/3rdparty/harfbuzz-ng/src/hb-unicode.hh6
-rw-r--r--src/3rdparty/harfbuzz-ng/src/hb-uniscribe.cc24
-rw-r--r--src/3rdparty/harfbuzz-ng/src/hb-vector.hh20
-rw-r--r--src/3rdparty/harfbuzz-ng/src/hb-version.h37
-rw-r--r--src/3rdparty/harfbuzz-ng/src/hb-version.h.in66
-rw-r--r--src/3rdparty/harfbuzz-ng/src/hb.h2
-rw-r--r--src/3rdparty/harfbuzz-ng/src/hb.hh236
-rw-r--r--src/3rdparty/harfbuzz-ng/src/main.cc408
-rw-r--r--src/3rdparty/harfbuzz-ng/src/test-array.cc76
-rw-r--r--src/3rdparty/harfbuzz-ng/src/test-buffer-serialize.cc4
-rw-r--r--src/3rdparty/harfbuzz-ng/src/test-gpos-size-params.cc2
-rw-r--r--src/3rdparty/harfbuzz-ng/src/test-gsub-would-substitute.cc2
-rw-r--r--src/3rdparty/harfbuzz-ng/src/test-iter.cc2
-rw-r--r--src/3rdparty/harfbuzz-ng/src/test-meta.cc5
-rw-r--r--src/3rdparty/harfbuzz-ng/src/test-number.cc29
-rw-r--r--src/3rdparty/harfbuzz-ng/src/test-ot-color.cc348
-rw-r--r--src/3rdparty/harfbuzz-ng/src/test-ot-glyphname.cc88
-rw-r--r--src/3rdparty/harfbuzz-ng/src/test-ot-meta.cc3
-rw-r--r--src/3rdparty/harfbuzz-ng/src/test-ot-name.cc3
-rw-r--r--src/3rdparty/harfbuzz-ng/src/test.cc4
-rw-r--r--src/3rdparty/libjpeg/LICENSE2
-rwxr-xr-xsrc/3rdparty/libjpeg/import_from_libjpeg_tarball.sh3
-rw-r--r--src/3rdparty/libjpeg/qt_attribution.json15
-rw-r--r--src/3rdparty/libjpeg/src/ChangeLog.md268
-rw-r--r--src/3rdparty/libjpeg/src/README.ijg37
-rw-r--r--src/3rdparty/libjpeg/src/README.md23
-rw-r--r--src/3rdparty/libjpeg/src/change.log31
-rw-r--r--src/3rdparty/libjpeg/src/jccolext.c18
-rw-r--r--src/3rdparty/libjpeg/src/jccolor.c12
-rw-r--r--src/3rdparty/libjpeg/src/jcdctmgr.c37
-rw-r--r--src/3rdparty/libjpeg/src/jchuff.c390
-rw-r--r--src/3rdparty/libjpeg/src/jcinit.c5
-rw-r--r--src/3rdparty/libjpeg/src/jconfig.h (renamed from src/3rdparty/libjpeg/jconfig.h)4
-rw-r--r--src/3rdparty/libjpeg/src/jconfig.h.in5
-rw-r--r--src/3rdparty/libjpeg/src/jconfigint.h (renamed from src/3rdparty/libjpeg/jconfigint.h)2
-rw-r--r--src/3rdparty/libjpeg/src/jcphuff.c29
-rw-r--r--src/3rdparty/libjpeg/src/jcsample.c63
-rw-r--r--src/3rdparty/libjpeg/src/jctrans.c5
-rw-r--r--src/3rdparty/libjpeg/src/jdapistd.c53
-rw-r--r--src/3rdparty/libjpeg/src/jdarith.c15
-rw-r--r--src/3rdparty/libjpeg/src/jdcoefct.c290
-rw-r--r--src/3rdparty/libjpeg/src/jdcoefct.h3
-rw-r--r--src/3rdparty/libjpeg/src/jdcol565.c96
-rw-r--r--src/3rdparty/libjpeg/src/jdcolext.c8
-rw-r--r--src/3rdparty/libjpeg/src/jdcolor.c23
-rw-r--r--src/3rdparty/libjpeg/src/jdhuff.c60
-rw-r--r--src/3rdparty/libjpeg/src/jdhuff.h13
-rw-r--r--src/3rdparty/libjpeg/src/jdmarker.c67
-rw-r--r--src/3rdparty/libjpeg/src/jdmaster.c15
-rw-r--r--src/3rdparty/libjpeg/src/jdmerge.c55
-rw-r--r--src/3rdparty/libjpeg/src/jdmerge.h47
-rw-r--r--src/3rdparty/libjpeg/src/jdmrg565.c78
-rw-r--r--src/3rdparty/libjpeg/src/jdmrgext.c40
-rw-r--r--src/3rdparty/libjpeg/src/jdphuff.c48
-rw-r--r--src/3rdparty/libjpeg/src/jdsample.c38
-rw-r--r--src/3rdparty/libjpeg/src/jdtrans.c5
-rw-r--r--src/3rdparty/libjpeg/src/jerror.h13
-rw-r--r--src/3rdparty/libjpeg/src/jfdctint.c4
-rw-r--r--src/3rdparty/libjpeg/src/jidctint.c12
-rw-r--r--src/3rdparty/libjpeg/src/jmorecfg.h43
-rw-r--r--src/3rdparty/libjpeg/src/jpegcomp.h3
-rw-r--r--src/3rdparty/libjpeg/src/jpegint.h5
-rw-r--r--src/3rdparty/libjpeg/src/jpeglib.h8
-rw-r--r--src/3rdparty/libjpeg/src/jquant1.c27
-rw-r--r--src/3rdparty/libjpeg/src/jquant2.c52
-rw-r--r--src/3rdparty/libjpeg/src/jsimd.h6
-rw-r--r--src/3rdparty/libjpeg/src/jsimd_none.c13
-rw-r--r--src/3rdparty/libjpeg/src/jversion.h22
-rw-r--r--src/3rdparty/libpng/CMakeLists.txt2
-rw-r--r--src/3rdparty/sqlite/qt_attribution.json4
-rw-r--r--src/3rdparty/sqlite/sqlite3.c11783
-rw-r--r--src/3rdparty/sqlite/sqlite3.h61
-rw-r--r--src/3rdparty/zlib/qtpatches.diff4
-rw-r--r--src/3rdparty/zlib/src/gzguts.h2
-rw-r--r--src/android/jar/src/org/qtproject/qt/android/CursorHandle.java12
-rw-r--r--src/android/jar/src/org/qtproject/qt/android/EditPopupMenu.java7
-rw-r--r--src/android/jar/src/org/qtproject/qt/android/QtActivityDelegate.java42
-rw-r--r--src/android/jar/src/org/qtproject/qt/android/QtInputConnection.java26
-rw-r--r--src/android/jar/src/org/qtproject/qt/android/QtNative.java50
-rw-r--r--src/android/jar/src/org/qtproject/qt/android/QtSurface.java5
-rw-r--r--src/android/jar/src/org/qtproject/qt/android/extras/QtAndroidBinder.java69
-rw-r--r--src/android/jar/src/org/qtproject/qt/android/extras/QtAndroidServiceConnection.java78
-rw-r--r--src/android/jar/src/org/qtproject/qt/android/extras/QtNative.java (renamed from src/network/ssl/qsslellipticcurve_dummy.cpp)42
-rw-r--r--src/android/java/src/org/qtproject/qt/android/bindings/QtActivity.java21
-rw-r--r--src/android/templates/AndroidManifest.xml2
-rw-r--r--src/android/templates/build.gradle4
-rw-r--r--src/concurrent/qtconcurrentiteratekernel.cpp2
-rw-r--r--src/concurrent/qtconcurrentrun.cpp9
-rw-r--r--src/concurrent/qtconcurrentthreadengine.h4
-rw-r--r--src/corelib/.prev_configure.cmake14
-rw-r--r--src/corelib/CMakeLists.txt136
-rw-r--r--src/corelib/Qt6AndroidMacros.cmake28
-rw-r--r--src/corelib/Qt6CTestMacros.cmake130
-rw-r--r--src/corelib/Qt6CoreConfigExtras.cmake.in4
-rw-r--r--src/corelib/Qt6CoreMacros.cmake386
-rw-r--r--src/corelib/Qt6WasmMacros.cmake31
-rw-r--r--src/corelib/animation/qabstractanimation.cpp68
-rw-r--r--src/corelib/animation/qabstractanimation.h19
-rw-r--r--src/corelib/animation/qabstractanimation_p.h56
-rw-r--r--src/corelib/animation/qpauseanimation.cpp8
-rw-r--r--src/corelib/animation/qpropertyanimation.cpp93
-rw-r--r--src/corelib/animation/qpropertyanimation.h8
-rw-r--r--src/corelib/animation/qpropertyanimation_p.h26
-rw-r--r--src/corelib/animation/qsequentialanimationgroup.cpp9
-rw-r--r--src/corelib/animation/qsequentialanimationgroup.h6
-rw-r--r--src/corelib/animation/qsequentialanimationgroup_p.h11
-rw-r--r--src/corelib/animation/qvariantanimation.cpp23
-rw-r--r--src/corelib/animation/qvariantanimation.h7
-rw-r--r--src/corelib/animation/qvariantanimation_p.h11
-rw-r--r--src/corelib/configure.cmake14
-rw-r--r--src/corelib/configure.json83
-rw-r--r--src/corelib/doc/include/jni.h62
-rw-r--r--src/corelib/doc/qtcore.qdocconf2
-rw-r--r--src/corelib/doc/snippets/code/src_corelib_global_qglobal.cpp6
-rw-r--r--src/corelib/doc/snippets/code/src_corelib_kernel_qdeadlinetimer.cpp2
-rw-r--r--src/corelib/doc/snippets/code/src_corelib_kernel_qproperty.cpp41
-rw-r--r--src/corelib/doc/snippets/code/src_corelib_text_qlocale.cpp4
-rw-r--r--src/corelib/doc/snippets/permissions/permissions.cpp141
-rw-r--r--src/corelib/doc/snippets/resource-system/CMakeLists.txt23
-rw-r--r--src/corelib/doc/src/cmake-macros.qdoc4
-rw-r--r--src/corelib/doc/src/cmake-properties.qdoc78
-rw-r--r--src/corelib/doc/src/external-resources.qdoc17
-rw-r--r--src/corelib/doc/src/json.qdoc4
-rw-r--r--src/corelib/doc/src/objectmodel/bindableproperties.qdoc113
-rw-r--r--src/corelib/doc/src/objectmodel/properties.qdoc3
-rw-r--r--src/corelib/doc/src/qt6-changes.qdoc18
-rw-r--r--src/corelib/doc/src/resource-system.qdoc24
-rw-r--r--src/corelib/global/qcompilerdetection.h17
-rw-r--r--src/corelib/global/qconfig-bootstrapped.h7
-rw-r--r--src/corelib/global/qconfig.cpp.in85
-rw-r--r--src/corelib/global/qflags.h84
-rw-r--r--src/corelib/global/qfloat16.h16
-rw-r--r--src/corelib/global/qfloat16_f16c.c11
-rw-r--r--src/corelib/global/qglobal.cpp230
-rw-r--r--src/corelib/global/qglobal.h137
-rw-r--r--src/corelib/global/qglobalstatic.h43
-rw-r--r--src/corelib/global/qhooks.cpp2
-rw-r--r--src/corelib/global/qlibraryinfo.cpp140
-rw-r--r--src/corelib/global/qlibraryinfo_p.h78
-rw-r--r--src/corelib/global/qlogging.cpp8
-rw-r--r--src/corelib/global/qnamespace.h4
-rw-r--r--src/corelib/global/qnamespace.qdoc2
-rw-r--r--src/corelib/global/qnativeinterface.h139
-rw-r--r--src/corelib/global/qoperatingsystemversion.cpp12
-rw-r--r--src/corelib/global/qoperatingsystemversion.h4
-rw-r--r--src/corelib/global/qrandom.cpp36
-rw-r--r--src/corelib/global/qrandom_p.h4
-rw-r--r--src/corelib/global/qsimd.cpp113
-rw-r--r--src/corelib/global/qsimd_p.h21
-rw-r--r--src/corelib/global/qt_pch.h4
-rw-r--r--src/corelib/global/qtypeinfo.h18
-rw-r--r--src/corelib/io/qdebug.h2
-rw-r--r--src/corelib/io/qdir.cpp74
-rw-r--r--src/corelib/io/qdiriterator.cpp6
-rw-r--r--src/corelib/io/qfile.cpp12
-rw-r--r--src/corelib/io/qfile_p.h4
-rw-r--r--src/corelib/io/qfiledevice.cpp4
-rw-r--r--src/corelib/io/qfileinfo.cpp6
-rw-r--r--src/corelib/io/qfilesystemengine_unix.cpp2
-rw-r--r--src/corelib/io/qfilesystemengine_win.cpp38
-rw-r--r--src/corelib/io/qfilesystementry.cpp10
-rw-r--r--src/corelib/io/qfilesystementry_p.h6
-rw-r--r--src/corelib/io/qfilesystemmetadata_p.h36
-rw-r--r--src/corelib/io/qfilesystemwatcher_inotify.cpp2
-rw-r--r--src/corelib/io/qfilesystemwatcher_kqueue_p.h6
-rw-r--r--src/corelib/io/qfsfileengine.cpp9
-rw-r--r--src/corelib/io/qfsfileengine_unix.cpp2
-rw-r--r--src/corelib/io/qfsfileengine_win.cpp52
-rw-r--r--src/corelib/io/qiodevice.cpp26
-rw-r--r--src/corelib/io/qiodevice.h6
-rw-r--r--src/corelib/io/qlockfile.cpp50
-rw-r--r--src/corelib/io/qlockfile.h15
-rw-r--r--src/corelib/io/qlockfile_unix.cpp6
-rw-r--r--src/corelib/io/qprocess.cpp14
-rw-r--r--src/corelib/io/qprocess_p.h4
-rw-r--r--src/corelib/io/qprocess_unix.cpp219
-rw-r--r--src/corelib/io/qprocess_win.cpp165
-rw-r--r--src/corelib/io/qresource.cpp11
-rw-r--r--src/corelib/io/qsavefile.cpp2
-rw-r--r--src/corelib/io/qstandardpaths_android.cpp4
-rw-r--r--src/corelib/io/qtemporaryfile.cpp2
-rw-r--r--src/corelib/io/qurl.h28
-rw-r--r--src/corelib/io/qwindowspipereader.cpp464
-rw-r--r--src/corelib/io/qwindowspipereader_p.h57
-rw-r--r--src/corelib/io/qwindowspipewriter.cpp346
-rw-r--r--src/corelib/io/qwindowspipewriter_p.h98
-rw-r--r--src/corelib/itemmodels/qabstractitemmodel.cpp2
-rw-r--r--src/corelib/itemmodels/qabstractitemmodel.h3
-rw-r--r--src/corelib/itemmodels/qabstractproxymodel.cpp37
-rw-r--r--src/corelib/itemmodels/qabstractproxymodel.h5
-rw-r--r--src/corelib/itemmodels/qabstractproxymodel_p.h80
-rw-r--r--src/corelib/itemmodels/qconcatenatetablesproxymodel.cpp7
-rw-r--r--src/corelib/itemmodels/qidentityproxymodel.cpp2
-rw-r--r--src/corelib/itemmodels/qitemselectionmodel.cpp94
-rw-r--r--src/corelib/itemmodels/qitemselectionmodel.h4
-rw-r--r--src/corelib/itemmodels/qitemselectionmodel_p.h12
-rw-r--r--src/corelib/itemmodels/qsortfilterproxymodel.cpp390
-rw-r--r--src/corelib/itemmodels/qsortfilterproxymodel.h53
-rw-r--r--src/corelib/itemmodels/qtransposeproxymodel.cpp5
-rw-r--r--src/corelib/kernel/qcore_mac_p.h8
-rw-r--r--src/corelib/kernel/qcoreapplication.cpp258
-rw-r--r--src/corelib/kernel/qcoreapplication.h20
-rw-r--r--src/corelib/kernel/qcoreapplication_android.cpp319
-rw-r--r--src/corelib/kernel/qcoreapplication_p.h17
-rw-r--r--src/corelib/kernel/qcoreapplication_platform.h5
-rw-r--r--src/corelib/kernel/qeventdispatcher_glib.cpp2
-rw-r--r--src/corelib/kernel/qeventdispatcher_unix.cpp2
-rw-r--r--src/corelib/kernel/qeventdispatcher_win.cpp6
-rw-r--r--src/corelib/kernel/qfunctions_winrt_p.h6
-rw-r--r--src/corelib/kernel/qjni.cpp4
-rw-r--r--src/corelib/kernel/qjnienvironment.cpp124
-rw-r--r--src/corelib/kernel/qjnienvironment.h24
-rw-r--r--src/corelib/kernel/qjnihelpers.cpp127
-rw-r--r--src/corelib/kernel/qjnihelpers_p.h7
-rw-r--r--src/corelib/kernel/qjniobject.cpp883
-rw-r--r--src/corelib/kernel/qjniobject.h707
-rw-r--r--src/corelib/kernel/qjnionload.cpp79
-rw-r--r--src/corelib/kernel/qmetacontainer.cpp8
-rw-r--r--src/corelib/kernel/qmetaobject.cpp44
-rw-r--r--src/corelib/kernel/qmetaobject.h1
-rw-r--r--src/corelib/kernel/qmetaobject_p.h8
-rw-r--r--src/corelib/kernel/qmetaobjectbuilder.cpp309
-rw-r--r--src/corelib/kernel/qmetaobjectbuilder_p.h10
-rw-r--r--src/corelib/kernel/qmetatype.cpp20
-rw-r--r--src/corelib/kernel/qmetatype.h10
-rw-r--r--src/corelib/kernel/qobject.cpp34
-rw-r--r--src/corelib/kernel/qobject.h4
-rw-r--r--src/corelib/kernel/qobject_p.h32
-rw-r--r--src/corelib/kernel/qobjectdefs.h2
-rw-r--r--src/corelib/kernel/qpermission.h78
-rw-r--r--src/corelib/kernel/qpermission.qdoc100
-rw-r--r--src/corelib/kernel/qproperty.cpp729
-rw-r--r--src/corelib/kernel/qproperty.h178
-rw-r--r--src/corelib/kernel/qproperty_p.h193
-rw-r--r--src/corelib/kernel/qpropertyprivate.h75
-rw-r--r--src/corelib/kernel/qsharedmemory_p.h10
-rw-r--r--src/corelib/kernel/qsharedmemory_systemv.cpp2
-rw-r--r--src/corelib/kernel/qtimer.cpp20
-rw-r--r--src/corelib/kernel/qtimerinfo_unix.cpp7
-rw-r--r--src/corelib/kernel/qvariant.h2
-rw-r--r--src/corelib/kernel/qwineventnotifier.cpp70
-rw-r--r--src/corelib/kernel/qwineventnotifier_p.h15
-rw-r--r--src/corelib/platform/android/qandroidextras.cpp1030
-rw-r--r--src/corelib/platform/android/qandroidextras_p.h262
-rw-r--r--src/corelib/platform/android/qandroidnativeinterface.cpp28
-rw-r--r--src/corelib/plugin/qlibrary.cpp4
-rw-r--r--src/corelib/plugin/qlibrary_unix.cpp2
-rw-r--r--src/corelib/serialization/qxmlstream.cpp5
-rw-r--r--src/corelib/serialization/qxmlstream.g2
-rw-r--r--src/corelib/serialization/qxmlstreamparser_p.h2
-rw-r--r--src/corelib/text/qanystringview.h8
-rw-r--r--src/corelib/text/qanystringview.qdoc8
-rw-r--r--src/corelib/text/qbytearray.cpp56
-rw-r--r--src/corelib/text/qbytearray.h7
-rw-r--r--src/corelib/text/qbytearrayview.h8
-rw-r--r--src/corelib/text/qbytearrayview.qdoc12
-rw-r--r--src/corelib/text/qchar.cpp1
-rw-r--r--src/corelib/text/qchar.h1
-rw-r--r--src/corelib/text/qlocale.cpp358
-rw-r--r--src/corelib/text/qlocale.h48
-rw-r--r--src/corelib/text/qlocale.qdoc106
-rw-r--r--src/corelib/text/qlocale_data_p.h906
-rw-r--r--src/corelib/text/qlocale_mac.mm4
-rw-r--r--src/corelib/text/qlocale_p.h30
-rw-r--r--src/corelib/text/qlocale_unix.cpp2
-rw-r--r--src/corelib/text/qlocale_win.cpp12
-rw-r--r--src/corelib/text/qstring.cpp108
-rw-r--r--src/corelib/text/qstring.h16
-rw-r--r--src/corelib/text/qstringalgorithms.h2
-rw-r--r--src/corelib/text/qstringconverter.cpp4
-rw-r--r--src/corelib/text/qstringview.cpp11
-rw-r--r--src/corelib/text/qstringview.h4
-rw-r--r--src/corelib/text/qtliterals.qdoc33
-rw-r--r--src/corelib/text/qunicodetables.cpp12570
-rw-r--r--src/corelib/text/qunicodetables_p.h5
-rw-r--r--src/corelib/text/qunicodetools.cpp181
-rw-r--r--src/corelib/text/qutf8stringview.h12
-rw-r--r--src/corelib/text/qutf8stringview.qdoc42
-rw-r--r--src/corelib/thread/qfutex_p.h46
-rw-r--r--src/corelib/thread/qfuture.h7
-rw-r--r--src/corelib/thread/qfuture.qdoc7
-rw-r--r--src/corelib/thread/qfuture_impl.h14
-rw-r--r--src/corelib/thread/qfutureinterface.cpp9
-rw-r--r--src/corelib/thread/qfutureinterface.h31
-rw-r--r--src/corelib/thread/qfutureinterface_p.h35
-rw-r--r--src/corelib/thread/qgenericatomic.h6
-rw-r--r--src/corelib/thread/qmutex.h5
-rw-r--r--src/corelib/thread/qsemaphore.cpp70
-rw-r--r--src/corelib/thread/qthread.h25
-rw-r--r--src/corelib/thread/qthreadpool.cpp55
-rw-r--r--src/corelib/thread/qthreadpool.h4
-rw-r--r--src/corelib/thread/qthreadpool_p.h6
-rw-r--r--src/corelib/time/qcalendar.cpp2
-rw-r--r--src/corelib/time/qcalendarbackend_p.h2
-rw-r--r--src/corelib/time/qdatetime.cpp333
-rw-r--r--src/corelib/time/qdatetime.h8
-rw-r--r--src/corelib/time/qdatetime_p.h15
-rw-r--r--src/corelib/time/qdatetimeparser.cpp22
-rw-r--r--src/corelib/time/qhijricalendar_data_p.h8
-rw-r--r--src/corelib/time/qjalalicalendar_data_p.h8
-rw-r--r--src/corelib/time/qromancalendar_data_p.h4
-rw-r--r--src/corelib/time/qtimezone.cpp111
-rw-r--r--src/corelib/time/qtimezone.h12
-rw-r--r--src/corelib/time/qtimezoneprivate.cpp54
-rw-r--r--src/corelib/time/qtimezoneprivate_android.cpp22
-rw-r--r--src/corelib/time/qtimezoneprivate_data_p.h1253
-rw-r--r--src/corelib/time/qtimezoneprivate_icu.cpp4
-rw-r--r--src/corelib/time/qtimezoneprivate_p.h27
-rw-r--r--src/corelib/time/qtimezoneprivate_tz.cpp343
-rw-r--r--src/corelib/time/qtimezoneprivate_win.cpp16
-rw-r--r--src/corelib/tools/qarraydata.cpp2
-rw-r--r--src/corelib/tools/qarraydata.h4
-rw-r--r--src/corelib/tools/qarraydataops.h290
-rw-r--r--src/corelib/tools/qarraydatapointer.h136
-rw-r--r--src/corelib/tools/qcontainerfwd.h3
-rw-r--r--src/corelib/tools/qcontainertools_impl.h124
-rw-r--r--src/corelib/tools/qcontiguouscache.h4
-rw-r--r--src/corelib/tools/qduplicatetracker_p.h3
-rw-r--r--src/corelib/tools/qhash.cpp158
-rw-r--r--src/corelib/tools/qhash.h4
-rw-r--r--src/corelib/tools/qhashfunctions.h5
-rw-r--r--src/corelib/tools/qlist.h54
-rw-r--r--src/corelib/tools/qmargins.cpp4
-rw-r--r--src/corelib/tools/qpoint.h4
-rw-r--r--src/corelib/tools/qscopedpointer.cpp13
-rw-r--r--src/corelib/tools/qscopedpointer.h12
-rw-r--r--src/corelib/tools/qsharedpointer_impl.h12
-rw-r--r--src/corelib/tools/qtimeline.cpp140
-rw-r--r--src/corelib/tools/qtimeline.h20
-rw-r--r--src/dbus/doc/src/qt6-changes.qdoc10
-rw-r--r--src/dbus/qdbusmetaobject.cpp9
-rw-r--r--src/dbus/qdbusservicewatcher.cpp81
-rw-r--r--src/dbus/qdbusservicewatcher.h7
-rw-r--r--src/entrypoint/CMakeLists.txt2
-rw-r--r--src/gui/.prev_configure.cmake42
-rw-r--r--src/gui/CMakeLists.txt30
-rw-r--r--src/gui/configure.cmake54
-rw-r--r--src/gui/configure.json2
-rw-r--r--src/gui/doc/snippets/clipboard/clipwindow.cpp7
-rw-r--r--src/gui/doc/src/qt6-changes.qdoc12
-rw-r--r--src/gui/image/qabstractfileiconprovider.cpp11
-rw-r--r--src/gui/image/qabstractfileiconprovider_p.h4
-rw-r--r--src/gui/image/qicon.cpp9
-rw-r--r--src/gui/image/qimage.cpp51
-rw-r--r--src/gui/image/qimage.h2
-rw-r--r--src/gui/image/qimageiohandler.h3
-rw-r--r--src/gui/image/qimagereader.cpp8
-rw-r--r--src/gui/image/qmovie.cpp7
-rw-r--r--src/gui/image/qpixmap.cpp22
-rw-r--r--src/gui/image/qpixmap.h1
-rw-r--r--src/gui/image/qpnghandler.cpp2
-rw-r--r--src/gui/image/qxpmhandler.cpp2
-rw-r--r--src/gui/itemmodels/qstandarditemmodel.cpp29
-rw-r--r--src/gui/kernel/qcursor.cpp5
-rw-r--r--src/gui/kernel/qevent.cpp81
-rw-r--r--src/gui/kernel/qevent.h13
-rw-r--r--src/gui/kernel/qguiapplication.cpp64
-rw-r--r--src/gui/kernel/qguiapplication.h2
-rw-r--r--src/gui/kernel/qguiapplication_p.h8
-rw-r--r--src/gui/kernel/qhighdpiscaling.cpp314
-rw-r--r--src/gui/kernel/qhighdpiscaling_p.h28
-rw-r--r--src/gui/kernel/qkeymapper.cpp13
-rw-r--r--src/gui/kernel/qkeymapper_p.h3
-rw-r--r--src/gui/kernel/qoffscreensurface.cpp17
-rw-r--r--src/gui/kernel/qoffscreensurface.h1
-rw-r--r--src/gui/kernel/qoffscreensurface_platform.h3
-rw-r--r--src/gui/kernel/qopenglcontext.cpp26
-rw-r--r--src/gui/kernel/qopenglcontext.h2
-rw-r--r--src/gui/kernel/qopenglcontext_platform.h14
-rw-r--r--src/gui/kernel/qplatformmenu_p.h2
-rw-r--r--src/gui/kernel/qplatformoffscreensurface.h8
-rw-r--r--src/gui/kernel/qplatformopenglcontext.h10
-rw-r--r--src/gui/kernel/qplatformscreen.cpp19
-rw-r--r--src/gui/kernel/qplatformscreen_p.h1
-rw-r--r--src/gui/kernel/qplatformtheme.cpp6
-rw-r--r--src/gui/kernel/qplatformtheme.h3
-rw-r--r--src/gui/kernel/qplatformwindow_p.h1
-rw-r--r--src/gui/kernel/qpointingdevice.cpp23
-rw-r--r--src/gui/kernel/qpointingdevice_p.h3
-rw-r--r--src/gui/kernel/qsurfaceformat.cpp9
-rw-r--r--src/gui/kernel/qsurfaceformat.h3
-rw-r--r--src/gui/kernel/qwindow.cpp56
-rw-r--r--src/gui/kernel/qwindow.h4
-rw-r--r--src/gui/kernel/qwindowsysteminterface.cpp25
-rw-r--r--src/gui/kernel/qwindowsysteminterface.h12
-rw-r--r--src/gui/kernel/qwindowsysteminterface_p.h7
-rw-r--r--src/gui/math3d/qquaternion.h2
-rw-r--r--src/gui/opengl/platform/egl/qeglplatformcontext.cpp11
-rw-r--r--src/gui/painting/qbackingstore.cpp4
-rw-r--r--src/gui/painting/qbezier.cpp12
-rw-r--r--src/gui/painting/qbrush.cpp81
-rw-r--r--src/gui/painting/qbrush.h10
-rw-r--r--src/gui/painting/qcolorspace.cpp29
-rw-r--r--src/gui/painting/qcolorspace.h3
-rw-r--r--src/gui/painting/qcolorspace_p.h1
-rw-r--r--src/gui/painting/qicc.cpp2
-rw-r--r--src/gui/painting/qimagescale.cpp2
-rw-r--r--src/gui/painting/qpagesize.h2
-rw-r--r--src/gui/painting/qpaintengine_raster.cpp16
-rw-r--r--src/gui/painting/qpaintengineex.cpp46
-rw-r--r--src/gui/painting/qpainter.cpp6
-rw-r--r--src/gui/painting/qpainterpath.cpp38
-rw-r--r--src/gui/painting/qpainterpath.h5
-rw-r--r--src/gui/painting/qpainterpath_p.h9
-rw-r--r--src/gui/painting/qpen.cpp4
-rw-r--r--src/gui/painting/qpixellayout.cpp22
-rw-r--r--src/gui/painting/qrasterizer.cpp6
-rw-r--r--src/gui/painting/qregion.cpp1
-rw-r--r--src/gui/painting/qstroker_p.h2
-rw-r--r--src/gui/painting/qtriangulatingstroker.cpp1
-rw-r--r--src/gui/painting/qtriangulator.cpp13
-rw-r--r--src/gui/platform/android/qandroidnativeinterface.cpp2
-rw-r--r--src/gui/platform/macos/qcocoanativeinterface.mm9
-rw-r--r--src/gui/platform/unix/dbusmenu/qdbusmenuconnection.cpp17
-rw-r--r--src/gui/platform/unix/dbusmenu/qdbusmenuconnection_p.h2
-rw-r--r--src/gui/platform/unix/dbustray/qdbustrayicon.cpp8
-rw-r--r--src/gui/platform/unix/qtx11extras.cpp548
-rw-r--r--src/gui/platform/unix/qtx11extras_p.h110
-rw-r--r--src/gui/platform/unix/qunixnativeinterface.cpp13
-rw-r--r--src/gui/platform/unix/qxkbcommon.cpp13
-rw-r--r--src/gui/platform/unix/qxkbcommon_p.h4
-rw-r--r--src/gui/platform/windows/qwindowsnativeinterface.cpp3
-rw-r--r--src/gui/qtgui.tracepoints4
-rw-r--r--src/gui/rhi/qrhi.cpp89
-rw-r--r--src/gui/rhi/qrhi_p.h10
-rw-r--r--src/gui/rhi/qrhi_p_p.h2
-rw-r--r--src/gui/rhi/qrhid3d11.cpp18
-rw-r--r--src/gui/rhi/qrhid3d11_p_p.h1
-rw-r--r--src/gui/rhi/qrhigles2.cpp102
-rw-r--r--src/gui/rhi/qrhigles2_p_p.h7
-rw-r--r--src/gui/rhi/qrhimetal.mm164
-rw-r--r--src/gui/rhi/qrhimetal_p_p.h1
-rw-r--r--src/gui/rhi/qrhinull.cpp12
-rw-r--r--src/gui/rhi/qrhinull_p_p.h1
-rw-r--r--src/gui/rhi/qrhivulkan.cpp151
-rw-r--r--src/gui/rhi/qrhivulkan_p_p.h2
-rw-r--r--src/gui/text/coretext/qfontengine_coretext.mm4
-rw-r--r--src/gui/text/freetype/qfontengine_ft.cpp3
-rw-r--r--src/gui/text/freetype/qfontengine_ft_p.h2
-rw-r--r--src/gui/text/qcssparser.cpp1
-rw-r--r--src/gui/text/qcssparser_p.h1
-rw-r--r--src/gui/text/qfont.cpp10
-rw-r--r--src/gui/text/qfont.h3
-rw-r--r--src/gui/text/qfontdatabase.cpp26
-rw-r--r--src/gui/text/qfontmetrics.cpp18
-rw-r--r--src/gui/text/qharfbuzzng.cpp15
-rw-r--r--src/gui/text/qrawfont.cpp14
-rw-r--r--src/gui/text/qtextdocument.cpp125
-rw-r--r--src/gui/text/qtextdocument.h11
-rw-r--r--src/gui/text/qtextdocument_p.cpp1
-rw-r--r--src/gui/text/qtextdocument_p.h3
-rw-r--r--src/gui/text/qtextdocumentwriter.cpp11
-rw-r--r--src/gui/text/qtextengine.cpp32
-rw-r--r--src/gui/text/qtextformat.cpp11
-rw-r--r--src/gui/text/qtextformat.h6
-rw-r--r--src/gui/text/qtexthtmlparser.cpp8
-rw-r--r--src/gui/text/qtextlayout.cpp23
-rw-r--r--src/gui/text/qtextlayout.h12
-rw-r--r--src/gui/text/qurlresourceprovider.cpp88
-rw-r--r--src/gui/text/qurlresourceprovider.h63
-rw-r--r--src/gui/text/windows/qwindowsfontdatabase.cpp10
-rw-r--r--src/gui/text/windows/qwindowsfontdatabase_ft.cpp6
-rw-r--r--src/gui/util/qedidparser.cpp83
-rw-r--r--src/gui/util/qedidparser_p.h9
-rw-r--r--src/gui/util/qedidvendortable_p.h312
-rw-r--r--src/gui/util/qktxhandler.cpp4
-rw-r--r--src/gui/vulkan/qvulkaninstance.cpp12
-rw-r--r--src/gui/vulkan/qvulkaninstance.h7
-rw-r--r--src/gui/vulkan/qvulkanwindow_p.h2
-rw-r--r--src/network/.prev_configure.cmake29
-rw-r--r--src/network/CMakeLists.txt89
-rw-r--r--src/network/access/qdecompresshelper.cpp8
-rw-r--r--src/network/access/qdecompresshelper_p.h2
-rw-r--r--src/network/access/qhttp2protocolhandler.cpp101
-rw-r--r--src/network/access/qhttpnetworkconnection.cpp61
-rw-r--r--src/network/access/qhttpnetworkconnectionchannel.cpp20
-rw-r--r--src/network/access/qhttpnetworkrequest.cpp4
-rw-r--r--src/network/access/qhttpnetworkrequest_p.h1
-rw-r--r--src/network/access/qhttpprotocolhandler.cpp2
-rw-r--r--src/network/access/qnetworkaccessmanager.cpp1
-rw-r--r--src/network/access/qnetworkcookie.cpp12
-rw-r--r--src/network/access/qnetworkcookie.h4
-rw-r--r--src/network/access/qnetworkdiskcache.cpp23
-rw-r--r--src/network/configure.cmake29
-rw-r--r--src/network/configure.json29
-rw-r--r--src/network/doc/src/qt6-changes.qdoc6
-rw-r--r--src/network/kernel/qdnslookup.cpp2
-rw-r--r--src/network/kernel/qhostaddress.cpp102
-rw-r--r--src/network/kernel/qhostaddress.h21
-rw-r--r--src/network/kernel/qhostinfo.cpp9
-rw-r--r--src/network/kernel/qnetworkinformation.cpp86
-rw-r--r--src/network/kernel/qnetworkinformation.h9
-rw-r--r--src/network/kernel/qnetworkinterface.cpp7
-rw-r--r--src/network/kernel/qnetworkinterface.h5
-rw-r--r--src/network/kernel/qnetworkinterface_p.h15
-rw-r--r--src/network/kernel/qnetworkinterface_unix.cpp10
-rw-r--r--src/network/kernel/qnetworkproxy_android.cpp3
-rw-r--r--src/network/kernel/qtnetworkglobal_p.h13
-rw-r--r--src/network/socket/qabstractsocket.cpp15
-rw-r--r--src/network/socket/qabstractsocket.h21
-rw-r--r--src/network/socket/qlocalserver.cpp15
-rw-r--r--src/network/socket/qlocalserver.h3
-rw-r--r--src/network/socket/qlocalserver_unix.cpp80
-rw-r--r--src/network/socket/qlocalsocket.cpp48
-rw-r--r--src/network/socket/qlocalsocket.h19
-rw-r--r--src/network/socket/qlocalsocket_p.h15
-rw-r--r--src/network/socket/qlocalsocket_unix.cpp122
-rw-r--r--src/network/socket/qlocalsocket_win.cpp179
-rw-r--r--src/network/socket/qnativesocketengine_unix.cpp4
-rw-r--r--src/network/socket/qnativesocketengine_win.cpp1
-rw-r--r--src/network/socket/qtcpsocket.h8
-rw-r--r--src/network/socket/qudpsocket.h7
-rw-r--r--src/network/ssl/qdtls.cpp418
-rw-r--r--src/network/ssl/qdtls_p.h92
-rw-r--r--src/network/ssl/qocspresponse.h6
-rw-r--r--src/network/ssl/qssl_p.h4
-rw-r--r--src/network/ssl/qsslcertificate.cpp309
-rw-r--r--src/network/ssl/qsslcertificate.h17
-rw-r--r--src/network/ssl/qsslcertificate_openssl.cpp799
-rw-r--r--src/network/ssl/qsslcertificate_p.h102
-rw-r--r--src/network/ssl/qsslcertificate_qt.cpp580
-rw-r--r--src/network/ssl/qsslcipher.cpp7
-rw-r--r--src/network/ssl/qsslcipher.h7
-rw-r--r--src/network/ssl/qsslconfiguration.h9
-rw-r--r--src/network/ssl/qsslconfiguration_p.h2
-rw-r--r--src/network/ssl/qssldiffiehellmanparameters.cpp26
-rw-r--r--src/network/ssl/qssldiffiehellmanparameters_p.h13
-rw-r--r--src/network/ssl/qsslellipticcurve.cpp60
-rw-r--r--src/network/ssl/qsslellipticcurve.h1
-rw-r--r--src/network/ssl/qsslellipticcurve_openssl.cpp177
-rw-r--r--src/network/ssl/qsslerror.cpp9
-rw-r--r--src/network/ssl/qsslerror.h5
-rw-r--r--src/network/ssl/qsslkey.h8
-rw-r--r--src/network/ssl/qsslkey_p.cpp48
-rw-r--r--src/network/ssl/qsslkey_p.h10
-rw-r--r--src/network/ssl/qsslpresharedkeyauthenticator.h4
-rw-r--r--src/network/ssl/qsslsocket.cpp393
-rw-r--r--src/network/ssl/qsslsocket.h5
-rw-r--r--src/network/ssl/qsslsocket_p.h150
-rw-r--r--src/network/ssl/qtlsbackend.cpp528
-rw-r--r--src/network/ssl/qtlsbackend_openssl.cpp184
-rw-r--r--src/network/ssl/qtlsbackend_p.h254
-rw-r--r--src/network/ssl/qtlsbackend_st.cpp108
-rw-r--r--src/opengl/doc/src/qt6-changes.qdoc2
-rw-r--r--src/opengl/qopenglpaintengine.cpp10
-rw-r--r--src/opengl/qopengltexture.cpp3
-rw-r--r--src/opengl/qopengltexture.h9
-rw-r--r--src/opengl/qtopengl.tracepoints15
-rw-r--r--src/plugins/CMakeLists.txt1
-rw-r--r--src/plugins/imageformats/jpeg/CMakeLists.txt8
-rw-r--r--src/plugins/imageformats/jpeg/qjpeghandler.cpp7
-rw-r--r--src/plugins/networkinformationbackends/networklistmanager/qnetworklistmanagernetworkinformationbackend.cpp18
-rw-r--r--src/plugins/platforminputcontexts/compose/qcomposeplatforminputcontext.h1
-rw-r--r--src/plugins/platforms/CMakeLists.txt4
-rw-r--r--src/plugins/platforms/android/androidcontentfileengine.cpp7
-rw-r--r--src/plugins/platforms/android/androidjniclipboard.cpp2
-rw-r--r--src/plugins/platforms/android/androidjniinput.cpp20
-rw-r--r--src/plugins/platforms/android/androidjniinput.h4
-rw-r--r--src/plugins/platforms/android/androidjnimain.cpp16
-rw-r--r--src/plugins/platforms/android/androidjnimain.h1
-rw-r--r--src/plugins/platforms/android/extract.cpp4
-rw-r--r--src/plugins/platforms/android/qandroidassetsfileenginehandler.cpp2
-rw-r--r--src/plugins/platforms/android/qandroidinputcontext.cpp123
-rw-r--r--src/plugins/platforms/android/qandroidinputcontext.h4
-rw-r--r--src/plugins/platforms/android/qandroidplatformintegration.cpp13
-rw-r--r--src/plugins/platforms/android/qandroidplatformmenu.cpp2
-rw-r--r--src/plugins/platforms/android/qandroidplatformopenglwindow.cpp6
-rw-r--r--src/plugins/platforms/android/qandroidplatformscreen.cpp72
-rw-r--r--src/plugins/platforms/android/qandroidplatformscreen.h8
-rw-r--r--src/plugins/platforms/android/qandroidplatformvulkanwindow.cpp2
-rw-r--r--src/plugins/platforms/cocoa/qcocoahelpers.h1
-rw-r--r--src/plugins/platforms/cocoa/qcocoahelpers.mm1
-rw-r--r--src/plugins/platforms/cocoa/qcocoamenu.mm11
-rw-r--r--src/plugins/platforms/cocoa/qcocoamenuitem.mm3
-rw-r--r--src/plugins/platforms/cocoa/qcocoanativeinterface.h5
-rw-r--r--src/plugins/platforms/cocoa/qcocoanativeinterface.mm14
-rw-r--r--src/plugins/platforms/cocoa/qcocoatheme.mm7
-rw-r--r--src/plugins/platforms/cocoa/qmacclipboard.mm81
-rw-r--r--src/plugins/platforms/cocoa/qnsview.mm2
-rw-r--r--src/plugins/platforms/cocoa/qnsview_dragging.mm4
-rw-r--r--src/plugins/platforms/cocoa/qnsview_gestures.mm2
-rw-r--r--src/plugins/platforms/cocoa/qnsview_keys.mm6
-rw-r--r--src/plugins/platforms/cocoa/qnsview_menus.mm9
-rw-r--r--src/plugins/platforms/cocoa/qnsview_mouse.mm23
-rw-r--r--src/plugins/platforms/eglfs/deviceintegration/eglfs_kms/qeglfskmsgbmscreen.cpp4
-rw-r--r--src/plugins/platforms/eglfs/deviceintegration/eglfs_kms/qeglfskmsgbmscreen_p.h2
-rw-r--r--src/plugins/platforms/eglfs/deviceintegration/eglfs_kms/qeglfskmsgbmwindow.cpp16
-rw-r--r--src/plugins/platforms/eglfs/deviceintegration/eglfs_kms_egldevice/qeglfskmsegldevice.cpp7
-rw-r--r--src/plugins/platforms/ios/qiosinputcontext.mm3
-rw-r--r--src/plugins/platforms/ios/qiosscreen.h2
-rw-r--r--src/plugins/platforms/ios/qiosscreen.mm2
-rw-r--r--src/plugins/platforms/ios/qiostextresponder.mm19
-rw-r--r--src/plugins/platforms/ios/qioswindow.mm1
-rw-r--r--src/plugins/platforms/ios/quiaccessibilityelement.mm13
-rw-r--r--src/plugins/platforms/offscreen/qoffscreenintegration_x11.cpp7
-rw-r--r--src/plugins/platforms/offscreen/qoffscreenintegration_x11.h6
-rw-r--r--src/plugins/platforms/qnx/.prev_CMakeLists.txt91
-rw-r--r--src/plugins/platforms/qnx/CMakeLists.txt92
-rw-r--r--src/plugins/platforms/qnx/qqnxscreeneventhandler.cpp4
-rw-r--r--src/plugins/platforms/qnx/qqnxwindow.cpp8
-rw-r--r--src/plugins/platforms/vnc/qvnc.cpp7
-rw-r--r--src/plugins/platforms/vnc/qvncclient.cpp2
-rw-r--r--src/plugins/platforms/wasm/CMakeLists.txt78
-rw-r--r--src/plugins/platforms/wasm/qwasmeventtranslator.cpp163
-rw-r--r--src/plugins/platforms/wasm/qwasmeventtranslator.h4
-rw-r--r--src/plugins/platforms/windows/qwindowscontext.cpp8
-rw-r--r--src/plugins/platforms/windows/qwindowsscreen.cpp1
-rw-r--r--src/plugins/platforms/windows/qwindowstheme.cpp11
-rw-r--r--src/plugins/platforms/windows/uiautomation/qwindowsuiamainprovider.cpp13
-rw-r--r--src/plugins/platforms/xcb/gl_integrations/xcb_egl/qxcbeglintegration.cpp6
-rw-r--r--src/plugins/platforms/xcb/gl_integrations/xcb_glx/qglxintegration.cpp7
-rw-r--r--src/plugins/platforms/xcb/gl_integrations/xcb_glx/qxcbglxintegration.cpp4
-rw-r--r--src/plugins/platforms/xcb/nativepainting/qpaintengine_x11.cpp12
-rw-r--r--src/plugins/platforms/xcb/qxcbconnection.cpp55
-rw-r--r--src/plugins/platforms/xcb/qxcbconnection.h3
-rw-r--r--src/plugins/platforms/xcb/qxcbconnection_screens.cpp1
-rw-r--r--src/plugins/platforms/xcb/qxcbconnection_xi2.cpp33
-rw-r--r--src/plugins/platforms/xcb/qxcbintegration.cpp2
-rw-r--r--src/plugins/platforms/xcb/qxcbintegration.h4
-rw-r--r--src/plugins/platforms/xcb/qxcbscreen.cpp23
-rw-r--r--src/plugins/platforms/xcb/qxcbscreen.h2
-rw-r--r--src/plugins/platforms/xcb/qxcbwindow.cpp4
-rw-r--r--src/plugins/platformthemes/xdgdesktopportal/qxdgdesktopportalfiledialog.cpp2
-rw-r--r--src/plugins/sqldrivers/CMakeLists.txt3
-rw-r--r--src/plugins/sqldrivers/db2/CMakeLists.txt2
-rw-r--r--src/plugins/sqldrivers/ibase/CMakeLists.txt2
-rw-r--r--src/plugins/sqldrivers/mysql/CMakeLists.txt2
-rw-r--r--src/plugins/sqldrivers/mysql/qsql_mysql.cpp89
-rw-r--r--src/plugins/sqldrivers/oci/CMakeLists.txt2
-rw-r--r--src/plugins/sqldrivers/odbc/CMakeLists.txt2
-rw-r--r--src/plugins/sqldrivers/psql/CMakeLists.txt2
-rw-r--r--src/plugins/sqldrivers/sqlite/CMakeLists.txt4
-rw-r--r--src/plugins/sqldrivers/sqlite/qsql_sqlite.cpp33
-rw-r--r--src/plugins/styles/android/qandroidstyle.cpp3
-rw-r--r--src/plugins/styles/mac/qmacstyle_mac.mm2
-rw-r--r--src/plugins/styles/windowsvista/qwindowsxpstyle.cpp2
-rw-r--r--src/plugins/tls/CMakeLists.txt13
-rw-r--r--src/plugins/tls/certonly/CMakeLists.txt16
-rw-r--r--src/plugins/tls/certonly/qtlsbackend_cert.cpp92
-rw-r--r--src/plugins/tls/certonly/qtlsbackend_cert_p.h (renamed from src/network/ssl/qtlsbackend_st_p.h)26
-rw-r--r--src/plugins/tls/openssl/CMakeLists.txt51
-rw-r--r--src/plugins/tls/openssl/qdtls_openssl.cpp (renamed from src/network/ssl/qdtls_openssl.cpp)241
-rw-r--r--src/plugins/tls/openssl/qdtls_openssl_p.h (renamed from src/network/ssl/qdtls_openssl_p.h)72
-rw-r--r--src/plugins/tls/openssl/qopenssl_p.h (renamed from src/network/ssl/qsslsocket_openssl_p.h)95
-rw-r--r--src/plugins/tls/openssl/qsslcontext_openssl.cpp (renamed from src/network/ssl/qsslcontext_openssl.cpp)142
-rw-r--r--src/plugins/tls/openssl/qsslcontext_openssl_p.h (renamed from src/network/ssl/qsslcontext_openssl_p.h)5
-rw-r--r--src/plugins/tls/openssl/qssldiffiehellmanparameters_openssl.cpp (renamed from src/network/ssl/qssldiffiehellmanparameters_openssl.cpp)103
-rw-r--r--src/plugins/tls/openssl/qsslsocket_openssl_android.cpp (renamed from src/network/ssl/qsslsocket_openssl_android.cpp)9
-rw-r--r--src/plugins/tls/openssl/qsslsocket_openssl_symbols.cpp (renamed from src/network/ssl/qsslsocket_openssl_symbols.cpp)31
-rw-r--r--src/plugins/tls/openssl/qsslsocket_openssl_symbols_p.h (renamed from src/network/ssl/qsslsocket_openssl_symbols_p.h)88
-rw-r--r--src/plugins/tls/openssl/qtls_openssl.cpp (renamed from src/network/ssl/qsslsocket_openssl.cpp)2359
-rw-r--r--src/plugins/tls/openssl/qtls_openssl_p.h170
-rw-r--r--src/plugins/tls/openssl/qtlsbackend_openssl.cpp637
-rw-r--r--src/plugins/tls/openssl/qtlsbackend_openssl_p.h141
-rw-r--r--src/plugins/tls/openssl/qtlskey_openssl.cpp (renamed from src/network/ssl/qtlskey_openssl.cpp)26
-rw-r--r--src/plugins/tls/openssl/qtlskey_openssl_p.h (renamed from src/network/ssl/qtlskey_openssl_p.h)13
-rw-r--r--src/plugins/tls/openssl/qwindowscarootfetcher.cpp (renamed from src/network/ssl/qwindowscarootfetcher.cpp)18
-rw-r--r--src/plugins/tls/openssl/qwindowscarootfetcher_p.h (renamed from src/network/ssl/qwindowscarootfetcher_p.h)14
-rw-r--r--src/plugins/tls/openssl/qx509_openssl.cpp (renamed from src/network/ssl/qx509_openssl.cpp)46
-rw-r--r--src/plugins/tls/openssl/qx509_openssl_p.h (renamed from src/network/ssl/qx509_openssl_p.h)22
-rw-r--r--src/plugins/tls/schannel/CMakeLists.txt30
-rw-r--r--src/plugins/tls/schannel/qtls_schannel.cpp (renamed from src/network/ssl/qsslsocket_schannel.cpp)702
-rw-r--r--src/plugins/tls/schannel/qtls_schannel_p.h (renamed from src/network/ssl/qsslsocket_schannel_p.h)46
-rw-r--r--src/plugins/tls/schannel/qtlsbackend_schannel_p.h (renamed from src/network/ssl/qtlsbackend_openssl_p.h)48
-rw-r--r--src/plugins/tls/schannel/qtlskey_schannel.cpp (renamed from src/network/ssl/qtlskey_schannel.cpp)32
-rw-r--r--src/plugins/tls/schannel/qtlskey_schannel_p.h (renamed from src/network/ssl/qtlskey_schannel_p.h)8
-rw-r--r--src/plugins/tls/schannel/qx509_schannel.cpp (renamed from src/network/ssl/qsslcertificate_schannel.cpp)48
-rw-r--r--src/plugins/tls/schannel/qx509_schannel_p.h (renamed from src/network/ssl/qx509_schannel_p.h)19
-rw-r--r--src/plugins/tls/securetransport/CMakeLists.txt33
-rw-r--r--src/plugins/tls/securetransport/qtls_st.cpp (renamed from src/network/ssl/qsslsocket_mac.cpp)829
-rw-r--r--src/plugins/tls/securetransport/qtls_st_p.h (renamed from src/network/ssl/qsslsocket_mac_p.h)51
-rw-r--r--src/plugins/tls/securetransport/qtlsbackend_st.cpp341
-rw-r--r--src/plugins/tls/securetransport/qtlsbackend_st_p.h (renamed from src/network/ssl/qtlsbackend_schannel_p.h)30
-rw-r--r--src/plugins/tls/securetransport/qtlskey_st.cpp (renamed from src/network/ssl/qtlskey_st.cpp)9
-rw-r--r--src/plugins/tls/securetransport/qtlskey_st_p.h (renamed from src/network/ssl/qtlskey_st_p.h)8
-rw-r--r--src/plugins/tls/securetransport/qx509_st.cpp (renamed from src/network/ssl/qx509_st.cpp)8
-rw-r--r--src/plugins/tls/securetransport/qx509_st_p.h (renamed from src/network/ssl/qx509_st_p.h)8
-rw-r--r--src/plugins/tls/shared/qasn1element.cpp (renamed from src/network/ssl/qasn1element.cpp)5
-rw-r--r--src/plugins/tls/shared/qasn1element_p.h (renamed from src/network/ssl/qasn1element_p.h)2
-rw-r--r--src/plugins/tls/shared/qdtls_base.cpp112
-rw-r--r--src/plugins/tls/shared/qdtls_base_p.h (renamed from src/network/ssl/qtls_utils_p.h)83
-rw-r--r--src/plugins/tls/shared/qsslsocket_mac_shared.cpp (renamed from src/network/ssl/qsslsocket_mac_shared.cpp)39
-rw-r--r--src/plugins/tls/shared/qsslsocket_qt.cpp (renamed from src/network/ssl/qsslsocket_qt.cpp)10
-rw-r--r--src/plugins/tls/shared/qtlskey_base.cpp (renamed from src/network/ssl/qtlskey_base.cpp)4
-rw-r--r--src/plugins/tls/shared/qtlskey_base_p.h (renamed from src/network/ssl/qtlskey_base_p.h)26
-rw-r--r--src/plugins/tls/shared/qtlskey_generic.cpp (renamed from src/network/ssl/qtlskey_generic.cpp)37
-rw-r--r--src/plugins/tls/shared/qtlskey_generic_p.h (renamed from src/network/ssl/qtlskey_generic_p.h)34
-rw-r--r--src/plugins/tls/shared/qwincrypt_p.h81
-rw-r--r--src/plugins/tls/shared/qx509_base.cpp (renamed from src/network/ssl/qx509_base.cpp)4
-rw-r--r--src/plugins/tls/shared/qx509_base_p.h (renamed from src/network/ssl/qx509_base_p.h)10
-rw-r--r--src/plugins/tls/shared/qx509_generic.cpp (renamed from src/network/ssl/qx509_generic.cpp)17
-rw-r--r--src/plugins/tls/shared/qx509_generic_p.h (renamed from src/network/ssl/qx509_generic_p.h)12
-rw-r--r--src/printsupport/dialogs/qprintdialog_mac.mm2
-rw-r--r--src/printsupport/dialogs/qprintdialog_unix.cpp11
-rw-r--r--src/printsupport/dialogs/qprintdialog_win.cpp6
-rw-r--r--src/printsupport/platform/macos/qprintengine_mac.mm8
-rw-r--r--src/sql/doc/src/qt6-changes.qdoc2
-rw-r--r--src/sql/kernel/qsqlerror.cpp8
-rw-r--r--src/sql/kernel/qsqlquery.cpp54
-rw-r--r--src/sql/kernel/qsqlquery.h23
-rw-r--r--src/sql/models/qsqlquerymodel.cpp31
-rw-r--r--src/sql/models/qsqlquerymodel.h4
-rw-r--r--src/sql/models/qsqltablemodel.cpp3
-rw-r--r--src/testlib/CMakeLists.txt11
-rw-r--r--src/testlib/doc/src/qt6-changes.qdoc2
-rw-r--r--src/testlib/qabstractitemmodeltester.cpp8
-rw-r--r--src/testlib/qpropertytesthelper_p.h446
-rw-r--r--src/testlib/qtestcase.cpp21
-rw-r--r--src/testlib/qtestcase.qdoc6
-rw-r--r--src/tools/CMakeLists.txt5
-rw-r--r--src/tools/androiddeployqt/main.cpp87
-rw-r--r--src/tools/bootstrap/CMakeLists.txt2
-rw-r--r--src/tools/moc/generator.cpp102
-rw-r--r--src/tools/moc/moc.cpp30
-rw-r--r--src/tools/qtpaths/CMakeLists.txt31
-rw-r--r--src/tools/qtpaths/qtpaths.cpp396
-rw-r--r--src/tools/rcc/rcc.cpp32
-rw-r--r--src/tools/uic/cpp/cppwriteinitialization.cpp6
-rw-r--r--src/tools/uic/python/pythonwriteimports.cpp6
-rw-r--r--src/tools/uic/qclass_lib_map.h165
-rw-r--r--src/tools/uic/shared/language.cpp6
-rw-r--r--src/tools/uic/shared/language.h2
-rw-r--r--src/widgets/CMakeLists.txt1
-rw-r--r--src/widgets/dialogs/qfiledialog.cpp15
-rw-r--r--src/widgets/dialogs/qfontdialog.cpp2
-rw-r--r--src/widgets/dialogs/qmessagebox.cpp12
-rw-r--r--src/widgets/dialogs/qmessagebox.h66
-rw-r--r--src/widgets/dialogs/qprogressdialog.cpp2
-rw-r--r--src/widgets/doc/snippets/qlistview-dnd/model.cpp2
-rw-r--r--src/widgets/doc/snippets/qlistview-dnd/model.h2
-rw-r--r--src/widgets/doc/snippets/snippets.pro3
-rw-r--r--src/widgets/doc/src/qt6-changes.qdoc14
-rw-r--r--src/widgets/doc/src/qtwidgets-index.qdoc2
-rw-r--r--src/widgets/doc/src/widgets-and-layouts/stylesheet.qdoc10
-rw-r--r--src/widgets/graphicsview/qgraphicsanchorlayout_p.cpp4
-rw-r--r--src/widgets/graphicsview/qgraphicsitem.cpp56
-rw-r--r--src/widgets/graphicsview/qgraphicsscene_bsp.cpp2
-rw-r--r--src/widgets/graphicsview/qgraphicswidget.cpp2
-rw-r--r--src/widgets/graphicsview/qgraphicswidget_p.cpp6
-rw-r--r--src/widgets/itemviews/qlistview.cpp25
-rw-r--r--src/widgets/itemviews/qtableview.cpp10
-rw-r--r--src/widgets/itemviews/qtablewidget.cpp9
-rw-r--r--src/widgets/itemviews/qtreeview.cpp6
-rw-r--r--src/widgets/itemviews/qtreewidget.cpp27
-rw-r--r--src/widgets/kernel/qapplication.cpp12
-rw-r--r--src/widgets/kernel/qapplication.h2
-rw-r--r--src/widgets/kernel/qboxlayout.cpp2
-rw-r--r--src/widgets/kernel/qgridlayout.cpp6
-rw-r--r--src/widgets/kernel/qlayout.cpp27
-rw-r--r--src/widgets/kernel/qlayout.h3
-rw-r--r--src/widgets/kernel/qlayoutitem.cpp30
-rw-r--r--src/widgets/kernel/qlayoutitem.h1
-rw-r--r--src/widgets/kernel/qwidget.cpp8
-rw-r--r--src/widgets/kernel/qwidget.h3
-rw-r--r--src/widgets/kernel/qwidget_p.h8
-rw-r--r--src/widgets/styles/qcommonstyle.cpp3
-rw-r--r--src/widgets/styles/qstyle.cpp3
-rw-r--r--src/widgets/styles/qstyle.h2
-rw-r--r--src/widgets/styles/qstylesheetstyle.cpp58
-rw-r--r--src/widgets/styles/qwindowsstyle.cpp3
-rw-r--r--src/widgets/util/qcolormap.cpp13
-rw-r--r--src/widgets/widgets/qcombobox.cpp2
-rw-r--r--src/widgets/widgets/qdial.cpp22
-rw-r--r--src/widgets/widgets/qdockarealayout.cpp4
-rw-r--r--src/widgets/widgets/qdockwidget.cpp22
-rw-r--r--src/widgets/widgets/qlabel.cpp4
-rw-r--r--src/widgets/widgets/qlabel.h6
-rw-r--r--src/widgets/widgets/qlabel_p.h2
-rw-r--r--src/widgets/widgets/qlineedit.cpp18
-rw-r--r--src/widgets/widgets/qlineedit_p.cpp14
-rw-r--r--src/widgets/widgets/qlineedit_p.h6
-rw-r--r--src/widgets/widgets/qmdisubwindow.cpp31
-rw-r--r--src/widgets/widgets/qmdisubwindow_p.h1
-rw-r--r--src/widgets/widgets/qmenu.cpp7
-rw-r--r--src/widgets/widgets/qplaintextedit.cpp22
-rw-r--r--src/widgets/widgets/qpushbutton.cpp14
-rw-r--r--src/widgets/widgets/qsizegrip.cpp14
-rw-r--r--src/widgets/widgets/qtextbrowser.cpp11
-rw-r--r--src/widgets/widgets/qtextedit.cpp16
-rw-r--r--src/widgets/widgets/qtoolbutton.cpp6
-rw-r--r--src/widgets/widgets/qwidgetlinecontrol.cpp16
-rw-r--r--src/widgets/widgets/qwidgetlinecontrol_p.h3
-rw-r--r--src/widgets/widgets/qwidgettextcontrol.cpp2
-rw-r--r--src/xml/dom/qdom.cpp6
-rw-r--r--tests/auto/CMakeLists.txt6
-rw-r--r--tests/auto/bic/data/QtConcurrent.6.0.0.linux-gcc-amd64.txt5073
-rw-r--r--tests/auto/bic/data/QtCore.6.0.0.linux-gcc-amd64.txt5026
-rw-r--r--tests/auto/bic/data/QtDBus.6.0.0.linux-gcc-amd64.txt5360
-rw-r--r--tests/auto/bic/data/QtGui.6.0.0.linux-gcc-amd64.txt8645
-rw-r--r--tests/auto/bic/data/QtNetwork.6.0.0.linux-gcc-amd64.txt5886
-rw-r--r--tests/auto/bic/data/QtOpenGL.6.0.0.linux-gcc-amd64.txt9326
-rw-r--r--tests/auto/bic/data/QtPrintSupport.6.0.0.linux-gcc-amd64.txt19498
-rw-r--r--tests/auto/bic/data/QtSql.6.0.0.linux-gcc-amd64.txt5458
-rw-r--r--tests/auto/bic/data/QtTest.6.0.0.linux-gcc-amd64.txt5129
-rw-r--r--tests/auto/bic/data/QtWidgets.6.0.0.linux-gcc-amd64.txt18995
-rw-r--r--tests/auto/bic/data/QtXml.6.0.0.linux-gcc-amd64.txt5128
-rw-r--r--tests/auto/cmake/CMakeLists.txt89
-rw-r--r--tests/auto/cmake/mockplugins/.cmake.conf1
-rw-r--r--tests/auto/cmake/mockplugins/CMakeLists.txt32
-rw-r--r--tests/auto/cmake/mockplugins/mock1plugin/CMakeLists.txt9
-rw-r--r--tests/auto/cmake/mockplugins/mock2plugin/CMakeLists.txt9
-rw-r--r--tests/auto/cmake/mockplugins/mock3plugin/CMakeLists.txt9
-rw-r--r--tests/auto/cmake/mockplugins/mock4plugin/CMakeLists.txt10
-rw-r--r--tests/auto/cmake/mockplugins/mock5plugin/CMakeLists.txt10
-rw-r--r--tests/auto/cmake/mockplugins/mock6plugin/CMakeLists.txt9
-rw-r--r--tests/auto/cmake/mockplugins/mockplugins1/CMakeLists.txt9
-rw-r--r--tests/auto/cmake/mockplugins/mockplugins1/configure.cmake2
-rw-r--r--tests/auto/cmake/mockplugins/mockplugins2/CMakeLists.txt8
-rw-r--r--tests/auto/cmake/mockplugins/mockplugins3/CMakeLists.txt9
-rw-r--r--tests/auto/cmake/mockplugins/mockplugins3/configure.cmake2
-rw-r--r--tests/auto/cmake/test_QFINDTESTDATA/tests/CMakeLists.txt2
-rw-r--r--tests/auto/cmake/test_QT_TESTCASE_BUILDDIR/CMakeLists.txt20
-rw-r--r--tests/auto/cmake/test_QT_TESTCASE_BUILDDIR/data/testdata.txt1
-rw-r--r--tests/auto/cmake/test_QT_TESTCASE_BUILDDIR/main.cpp57
-rw-r--r--tests/auto/cmake/test_QT_TESTCASE_BUILDDIR/testdata.txt1
-rw-r--r--tests/auto/cmake/test_import_plugins/CMakeLists.txt102
-rw-r--r--tests/auto/cmake/test_import_plugins/check.cpp.in2
-rw-r--r--tests/auto/cmake/test_import_plugins/main.cpp4
-rw-r--r--tests/auto/cmake/test_init_resources_static_plugin/CMakeLists.txt52
-rw-r--r--tests/auto/cmake/test_init_resources_static_plugin/pluginmain.cpp (renamed from src/network/ssl/qssldiffiehellmanparameters_dummy.cpp)31
-rw-r--r--tests/auto/cmake/test_init_resources_static_plugin/test_init_resources_static_plugin.cpp69
-rw-r--r--tests/auto/cmake/test_init_resources_static_plugin/testfile1.txt0
-rw-r--r--tests/auto/cmake/test_init_resources_static_plugin/testfile2.txt0
-rw-r--r--tests/auto/cmake/test_interface/CMakeLists.txt20
-rw-r--r--tests/auto/cmake/test_interface/widget_test/CMakeLists.txt12
-rw-r--r--tests/auto/cmake/test_interface/widget_test/main.cpp4
-rw-r--r--tests/auto/cmake/test_plugin_shared_static_flavor.cmake24
-rw-r--r--tests/auto/cmake/test_plugin_shared_static_flavor/CMakeLists.txt31
-rw-r--r--tests/auto/cmake/tst_qaddpreroutine/CMakeLists.txt48
-rw-r--r--tests/auto/cmake/tst_qaddpreroutine/plugin.cpp70
-rw-r--r--tests/auto/cmake/tst_qaddpreroutine/plugin.json3
-rw-r--r--tests/auto/cmake/tst_qaddpreroutine/tst_qaddpreroutine.cpp69
-rw-r--r--tests/auto/concurrent/qtconcurrentmap/tst_qtconcurrentmap.cpp2
-rw-r--r--tests/auto/corelib/CMakeLists.txt1
-rw-r--r--tests/auto/corelib/animation/qabstractanimation/CMakeLists.txt2
-rw-r--r--tests/auto/corelib/animation/qabstractanimation/tst_qabstractanimation.cpp91
-rw-r--r--tests/auto/corelib/animation/qpropertyanimation/CMakeLists.txt2
-rw-r--r--tests/auto/corelib/animation/qpropertyanimation/tst_qpropertyanimation.cpp25
-rw-r--r--tests/auto/corelib/animation/qsequentialanimationgroup/tst_qsequentialanimationgroup.cpp44
-rw-r--r--tests/auto/corelib/animation/qvariantanimation/CMakeLists.txt2
-rw-r--r--tests/auto/corelib/animation/qvariantanimation/tst_qvariantanimation.cpp29
-rw-r--r--tests/auto/corelib/global/qflags/tst_qflags.cpp58
-rw-r--r--tests/auto/corelib/global/qfloat16/CMakeLists.txt2
-rw-r--r--tests/auto/corelib/global/qfloat16/tst_qfloat16.cpp31
-rw-r--r--tests/auto/corelib/global/qglobal/tst_qglobal.cpp31
-rw-r--r--tests/auto/corelib/global/qglobalstatic/CMakeLists.txt1
-rw-r--r--tests/auto/corelib/global/qglobalstatic/tst_qglobalstatic.cpp5
-rw-r--r--tests/auto/corelib/global/qlogging/tst_qlogging.cpp6
-rw-r--r--tests/auto/corelib/global/qnumeric/tst_qnumeric.cpp38
-rw-r--r--tests/auto/corelib/global/qrandomgenerator/tst_qrandomgenerator.cpp16
-rw-r--r--tests/auto/corelib/io/qdir/tst_qdir.cpp4
-rw-r--r--tests/auto/corelib/io/qfile/tst_qfile.cpp8
-rw-r--r--tests/auto/corelib/io/qfilesystementry/tst_qfilesystementry.cpp13
-rw-r--r--tests/auto/corelib/io/qipaddress/tst_qipaddress.cpp2
-rw-r--r--tests/auto/corelib/io/qprocess/testExitCodes/CMakeLists.txt10
-rw-r--r--tests/auto/corelib/io/qprocess/testForwardingHelper/CMakeLists.txt10
-rw-r--r--tests/auto/corelib/io/qprocess/testProcessCrash/CMakeLists.txt10
-rw-r--r--tests/auto/corelib/io/qprocess/testProcessDeadWhileReading/CMakeLists.txt10
-rw-r--r--tests/auto/corelib/io/qprocess/testProcessEOF/CMakeLists.txt10
-rw-r--r--tests/auto/corelib/io/qprocess/testProcessEcho/CMakeLists.txt10
-rw-r--r--tests/auto/corelib/io/qprocess/testProcessEcho2/CMakeLists.txt10
-rw-r--r--tests/auto/corelib/io/qprocess/testProcessEcho3/CMakeLists.txt10
-rw-r--r--tests/auto/corelib/io/qprocess/testProcessEchoGui/CMakeLists.txt22
-rw-r--r--tests/auto/corelib/io/qprocess/testProcessEnvironment/CMakeLists.txt10
-rw-r--r--tests/auto/corelib/io/qprocess/testProcessHang/CMakeLists.txt10
-rw-r--r--tests/auto/corelib/io/qprocess/testProcessNormal/CMakeLists.txt8
-rw-r--r--tests/auto/corelib/io/qprocess/testProcessOutput/CMakeLists.txt8
-rw-r--r--tests/auto/corelib/io/qprocess/testProcessSpacesArgs/CMakeLists.txt41
-rw-r--r--tests/auto/corelib/io/qprocess/testSetNamedPipeHandleState/CMakeLists.txt11
-rw-r--r--tests/auto/corelib/io/qprocess/testSoftExit/CMakeLists.txt9
-rw-r--r--tests/auto/corelib/io/qprocess/testSpaceInName/CMakeLists.txt10
-rw-r--r--tests/auto/corelib/io/qprocess/tst_qprocess.cpp7
-rw-r--r--tests/auto/corelib/io/qsettings/tst_qsettings.cpp4
-rw-r--r--tests/auto/corelib/io/qtemporarydir/tst_qtemporarydir.cpp6
-rw-r--r--tests/auto/corelib/io/qtemporaryfile/tst_qtemporaryfile.cpp6
-rw-r--r--tests/auto/corelib/io/qurl/CMakeLists.txt1
-rw-r--r--tests/auto/corelib/io/qurl/tst_qurl.cpp4
-rw-r--r--tests/auto/corelib/itemmodels/qabstractproxymodel/CMakeLists.txt3
-rw-r--r--tests/auto/corelib/itemmodels/qabstractproxymodel/tst_qabstractproxymodel.cpp32
-rw-r--r--tests/auto/corelib/itemmodels/qconcatenatetablesproxymodel/tst_qconcatenatetablesproxymodel.cpp42
-rw-r--r--tests/auto/corelib/itemmodels/qitemselectionmodel/CMakeLists.txt3
-rw-r--r--tests/auto/corelib/itemmodels/qitemselectionmodel/tst_qitemselectionmodel.cpp26
-rw-r--r--tests/auto/corelib/itemmodels/qsortfilterproxymodel_common/tst_qsortfilterproxymodel.cpp164
-rw-r--r--tests/auto/corelib/itemmodels/qsortfilterproxymodel_common/tst_qsortfilterproxymodel.h13
-rw-r--r--tests/auto/corelib/itemmodels/qsortfilterproxymodel_regularexpression/CMakeLists.txt3
-rw-r--r--tests/auto/corelib/itemmodels/qsortfilterproxymodel_regularexpression/tst_qsortfilterproxymodel_regularexpression.cpp85
-rw-r--r--tests/auto/corelib/kernel/CMakeLists.txt2
-rw-r--r--tests/auto/corelib/kernel/qeventdispatcher/tst_qeventdispatcher.cpp27
-rw-r--r--tests/auto/corelib/kernel/qjnienvironment/testdata/src/org/qtproject/qt/android/testdata/QtJniEnvironmentTestClass.java5
-rw-r--r--tests/auto/corelib/kernel/qjnienvironment/tst_qjnienvironment.cpp80
-rw-r--r--tests/auto/corelib/kernel/qjniobject/testdata/src/org/qtproject/qt/android/testdata/QtJniObjectTestClass.java22
-rw-r--r--tests/auto/corelib/kernel/qjniobject/tst_qjniobject.cpp335
-rw-r--r--tests/auto/corelib/kernel/qmetamethod/tst_qmetamethod.cpp25
-rw-r--r--tests/auto/corelib/kernel/qmetaobject/tst_qmetaobject.cpp11
-rw-r--r--tests/auto/corelib/kernel/qmetaobjectbuilder/tst_qmetaobjectbuilder.cpp50
-rw-r--r--tests/auto/corelib/kernel/qmetatype/tst_qmetatype.cpp21
-rw-r--r--tests/auto/corelib/kernel/qobject/CMakeLists.txt3
-rw-r--r--tests/auto/corelib/kernel/qobject/tst_qobject.cpp76
-rw-r--r--tests/auto/corelib/kernel/qproperty/tst_qproperty.cpp534
-rw-r--r--tests/auto/corelib/kernel/qvariant/tst_qvariant.cpp6
-rw-r--r--tests/auto/corelib/kernel/qwineventnotifier/tst_qwineventnotifier.cpp2
-rw-r--r--tests/auto/corelib/platform/CMakeLists.txt3
-rw-r--r--tests/auto/corelib/platform/android/CMakeLists.txt21
-rw-r--r--tests/auto/corelib/platform/android/testdata/assets/test.txt1
-rw-r--r--tests/auto/corelib/platform/android/tst_android.cpp82
-rw-r--r--tests/auto/corelib/plugin/qlibrary/lib/CMakeLists.txt4
-rw-r--r--tests/auto/corelib/plugin/qlibrary/lib2/CMakeLists.txt6
-rw-r--r--tests/auto/corelib/plugin/qplugin/tst_qplugin.cpp3
-rw-r--r--tests/auto/corelib/serialization/qcborstreamwriter/tst_qcborstreamwriter.cpp4
-rw-r--r--tests/auto/corelib/serialization/qcborvalue/tst_qcborvalue.cpp4
-rw-r--r--tests/auto/corelib/serialization/qxmlstream/data/019.ref2
-rw-r--r--tests/auto/corelib/serialization/qxmlstream/data/024.ref4
-rw-r--r--tests/auto/corelib/serialization/qxmlstream/data/039.ref2
-rw-r--r--tests/auto/corelib/serialization/qxmlstream/data/041.ref2
-rw-r--r--tests/auto/corelib/serialization/qxmlstream/data/1.ref2
-rw-r--r--tests/auto/corelib/serialization/qxmlstream/data/2.ref2
-rw-r--r--tests/auto/corelib/serialization/qxmlstream/data/21.ref10
-rw-r--r--tests/auto/corelib/serialization/qxmlstream/data/namespaceCDATA.ref2
-rw-r--r--tests/auto/corelib/text/qbytearray/tst_qbytearray.cpp78
-rw-r--r--tests/auto/corelib/text/qcollator/tst_qcollator.cpp4
-rw-r--r--tests/auto/corelib/text/qlocale/tst_qlocale.cpp204
-rw-r--r--tests/auto/corelib/text/qstring/tst_qstring.cpp102
-rw-r--r--tests/auto/corelib/text/qtextboundaryfinder/data/GraphemeBreakTest.txt8
-rw-r--r--tests/auto/corelib/text/qtextboundaryfinder/data/GraphemeBreakTest.txt.full630
-rw-r--r--tests/auto/corelib/thread/qfuture/tst_qfuture.cpp23
-rw-r--r--tests/auto/corelib/thread/qpromise/tst_qpromise.cpp8
-rw-r--r--tests/auto/corelib/thread/qthreadpool/tst_qthreadpool.cpp24
-rw-r--r--tests/auto/corelib/time/qdatetime/tst_qdatetime.cpp35
-rw-r--r--tests/auto/corelib/time/qtimezone/tst_qtimezone.cpp81
-rw-r--r--tests/auto/corelib/tools/CMakeLists.txt2
-rw-r--r--tests/auto/corelib/tools/containerapisymmetry/tst_containerapisymmetry.cpp2
-rw-r--r--tests/auto/corelib/tools/qarraydata/simplevector.h17
-rw-r--r--tests/auto/corelib/tools/qarraydata/tst_qarraydata.cpp283
-rw-r--r--tests/auto/corelib/tools/qcache/tst_qcache.cpp1
-rw-r--r--tests/auto/corelib/tools/qhash/tst_qhash.cpp17
-rw-r--r--tests/auto/corelib/tools/qlist/tst_qlist.cpp1167
-rw-r--r--tests/auto/corelib/tools/qsharedpointer/CMakeLists.txt11
-rw-r--r--tests/auto/corelib/tools/qsharedpointer/tst_qsharedpointer.cpp21
-rw-r--r--tests/auto/corelib/tools/qtimeline/CMakeLists.txt2
-rw-r--r--tests/auto/corelib/tools/qtimeline/tst_qtimeline.cpp302
-rw-r--r--tests/auto/dbus/qdbusservicewatcher/CMakeLists.txt3
-rw-r--r--tests/auto/dbus/qdbusservicewatcher/tst_qdbusservicewatcher.cpp71
-rw-r--r--tests/auto/gui/CMakeLists.txt1
-rw-r--r--tests/auto/gui/image/qicon/tst_qicon.cpp7
-rw-r--r--tests/auto/gui/image/qimage/tst_qimage.cpp82
-rw-r--r--tests/auto/gui/image/qpixmap/tst_qpixmap.cpp10
-rw-r--r--tests/auto/gui/itemmodels/qstandarditemmodel/tst_qstandarditemmodel.cpp49
-rw-r--r--tests/auto/gui/kernel/noqteventloop/tst_noqteventloop.cpp42
-rw-r--r--tests/auto/gui/kernel/qclipboard/tst_qclipboard.cpp6
-rw-r--r--tests/auto/gui/kernel/qguiapplication/tst_qguiapplication.cpp6
-rw-r--r--tests/auto/gui/kernel/qhighdpi/tst_qhighdpi.cpp143
-rw-r--r--tests/auto/gui/kernel/qkeyevent/BLACKLIST6
-rw-r--r--tests/auto/gui/kernel/qshortcut/tst_qshortcut.cpp1
-rw-r--r--tests/auto/gui/kernel/qwindow/tst_qwindow.cpp2
-rw-r--r--tests/auto/gui/math3d/qquaternion/tst_qquaternion.cpp2
-rw-r--r--tests/auto/gui/painting/qbrush/tst_qbrush.cpp7
-rw-r--r--tests/auto/gui/painting/qcolor/tst_qcolor.cpp94
-rw-r--r--tests/auto/gui/painting/qcolorspace/tst_qcolorspace.cpp33
-rw-r--r--tests/auto/gui/painting/qpainter/BLACKLIST3
-rw-r--r--tests/auto/gui/painting/qpainterpath/tst_qpainterpath.cpp12
-rw-r--r--tests/auto/gui/platform/CMakeLists.txt3
-rw-r--r--tests/auto/gui/platform/qx11info/CMakeLists.txt7
-rw-r--r--tests/auto/gui/platform/qx11info/tst_qx11info.cpp390
-rw-r--r--tests/auto/gui/qopengl/tst_qopengl.cpp3
-rw-r--r--tests/auto/gui/rhi/qrhi/BLACKLIST4
-rw-r--r--tests/auto/gui/rhi/qrhi/tst_qrhi.cpp329
-rw-r--r--tests/auto/gui/text/qcssparser/tst_qcssparser.cpp4
-rw-r--r--tests/auto/gui/text/qfont/BLACKLIST2
-rw-r--r--tests/auto/gui/text/qfont/tst_qfont.cpp3
-rw-r--r--tests/auto/gui/text/qstatictext/tst_qstatictext.cpp6
-rw-r--r--tests/auto/gui/text/qtextdocument/tst_qtextdocument.cpp165
-rw-r--r--tests/auto/gui/text/qtextdocumentfragment/tst_qtextdocumentfragment.cpp32
-rw-r--r--tests/auto/network/access/http2/http2srv.cpp32
-rw-r--r--tests/auto/network/access/http2/http2srv.h7
-rw-r--r--tests/auto/network/access/http2/tst_http2.cpp98
-rw-r--r--tests/auto/network/access/qdecompresshelper/10K.gzbin0 -> 55 bytes
-rw-r--r--tests/auto/network/access/qdecompresshelper/BLACKLIST2
-rw-r--r--tests/auto/network/access/qdecompresshelper/tst_qdecompresshelper.cpp40
-rw-r--r--tests/auto/network/access/qnetworkcookie/tst_qnetworkcookie.cpp6
-rw-r--r--tests/auto/network/access/qnetworkreply/BLACKLIST3
-rw-r--r--tests/auto/network/access/qnetworkreply/tst_qnetworkreply.cpp110
-rw-r--r--tests/auto/network/kernel/CMakeLists.txt1
-rw-r--r--tests/auto/network/kernel/qhostaddress/tst_qhostaddress.cpp22
-rw-r--r--tests/auto/network/kernel/qnetworkinformation_appless/CMakeLists.txt6
-rw-r--r--tests/auto/network/kernel/qnetworkinformation_appless/tst_qnetworkinformation_appless.cpp67
-rw-r--r--tests/auto/network/socket/qlocalsocket/tst_qlocalsocket.cpp191
-rw-r--r--tests/auto/network/ssl/CMakeLists.txt2
-rw-r--r--tests/auto/network/ssl/qdtlscookie/tst_qdtlscookie.cpp2
-rw-r--r--tests/auto/network/ssl/qocsp/tst_qocsp.cpp21
-rw-r--r--tests/auto/network/ssl/qsslcertificate/tst_qsslcertificate.cpp31
-rw-r--r--tests/auto/network/ssl/qsslkey/tst_qsslkey.cpp148
-rw-r--r--tests/auto/network/ssl/qsslsocket/tst_qsslsocket.cpp304
-rw-r--r--tests/auto/other/CMakeLists.txt3
-rw-r--r--tests/auto/other/android/tst_android.cpp24
-rw-r--r--tests/auto/other/gestures/BLACKLIST15
-rw-r--r--tests/auto/other/lancelot/scripts/tinydashes.qps34
-rw-r--r--tests/auto/other/macgui/tst_macgui.cpp1
-rw-r--r--tests/auto/other/qaccessibility/tst_qaccessibility.cpp6
-rw-r--r--tests/auto/other/qprocess_and_guieventloop/write-read-write/CMakeLists.txt10
-rw-r--r--tests/auto/other/toolsupport/tst_toolsupport.cpp13
-rw-r--r--tests/auto/sql/kernel/qsqlquery/tst_qsqlquery.cpp6
-rw-r--r--tests/auto/sql/models/qsqlquerymodel/tst_qsqlquerymodel.cpp2
-rw-r--r--tests/auto/sql/models/qsqltablemodel/tst_qsqltablemodel.cpp99
-rw-r--r--tests/auto/testlib/qabstractitemmodeltester/tst_qabstractitemmodeltester.cpp17
-rw-r--r--tests/auto/testlib/selftests/benchliboptions/tst_benchliboptions.cpp6
-rw-r--r--tests/auto/testlib/selftests/catch_p_p.h8
-rw-r--r--tests/auto/testlib/selftests/commandlinedata/tst_commandlinedata.cpp2
-rw-r--r--tests/auto/testlib/selftests/keyboard/tst_keyboard.cpp11
-rw-r--r--tests/auto/tools/moc/CMakeLists.txt1
-rw-r--r--tests/auto/tools/moc/allmocs_baseline_in.json73
-rw-r--r--tests/auto/tools/moc/cxx-attributes.h1
-rw-r--r--tests/auto/tools/moc/cxx11-explicit-override-control.h5
-rw-r--r--tests/auto/tools/moc/cxx11-trailing-return.h68
-rw-r--r--tests/auto/tools/moc/tst_moc.cpp48
-rw-r--r--tests/auto/tools/uic/baseline/config.ui.py6
-rw-r--r--tests/auto/widgets/dialogs/qdialog/tst_qdialog.cpp3
-rw-r--r--tests/auto/widgets/dialogs/qfiledialog2/tst_qfiledialog2.cpp2
-rw-r--r--tests/auto/widgets/dialogs/qmessagebox/tst_qmessagebox.cpp9
-rw-r--r--tests/auto/widgets/dialogs/qprogressdialog/tst_qprogressdialog.cpp24
-rw-r--r--tests/auto/widgets/effects/qgraphicseffect/tst_qgraphicseffect.cpp1
-rw-r--r--tests/auto/widgets/itemviews/qlistview/tst_qlistview.cpp54
-rw-r--r--tests/auto/widgets/itemviews/qtreeview/tst_qtreeview.cpp24
-rw-r--r--tests/auto/widgets/itemviews/qtreewidget/tst_qtreewidget.cpp16
-rw-r--r--tests/auto/widgets/kernel/qgesturerecognizer/BLACKLIST3
-rw-r--r--tests/auto/widgets/kernel/qgridlayout/tst_qgridlayout.cpp51
-rw-r--r--tests/auto/widgets/kernel/qlayout/tst_qlayout.cpp41
-rw-r--r--tests/auto/widgets/kernel/qshortcut/CMakeLists.txt1
-rw-r--r--tests/auto/widgets/kernel/qshortcut/tst_qshortcut.cpp8
-rw-r--r--tests/auto/widgets/kernel/qwidget/BLACKLIST2
-rw-r--r--tests/auto/widgets/kernel/qwidget/tst_qwidget.cpp19
-rw-r--r--tests/auto/widgets/kernel/qwidget_window/tst_qwidget_window.cpp5
-rw-r--r--tests/auto/widgets/styles/qstylesheetstyle/tst_qstylesheetstyle.cpp67
-rw-r--r--tests/auto/widgets/widgets/qabstractbutton/BLACKLIST5
-rw-r--r--tests/auto/widgets/widgets/qdatetimeedit/tst_qdatetimeedit.cpp4
-rw-r--r--tests/auto/widgets/widgets/qdial/tst_qdial.cpp31
-rw-r--r--tests/auto/widgets/widgets/qdockwidget/tst_qdockwidget.cpp6
-rw-r--r--tests/auto/widgets/widgets/qdoublespinbox/tst_qdoublespinbox.cpp60
-rw-r--r--tests/auto/widgets/widgets/qgroupbox/BLACKLIST13
-rw-r--r--tests/auto/widgets/widgets/qlabel/tst_qlabel.cpp28
-rw-r--r--tests/auto/widgets/widgets/qmdiarea/tst_qmdiarea.cpp43
-rw-r--r--tests/auto/widgets/widgets/qmenu/BLACKLIST1
-rw-r--r--tests/auto/widgets/widgets/qmenu/tst_qmenu.cpp10
-rw-r--r--tests/auto/widgets/widgets/qmenubar/tst_qmenubar.cpp3
-rw-r--r--tests/auto/widgets/widgets/qpushbutton/BLACKLIST3
-rw-r--r--tests/auto/widgets/widgets/qpushbutton/tst_qpushbutton.cpp25
-rw-r--r--tests/auto/widgets/widgets/qspinbox/tst_qspinbox.cpp4
-rw-r--r--tests/auto/widgets/widgets/qtextbrowser/tst_qtextbrowser.cpp18
-rw-r--r--tests/benchmarks/corelib/CMakeLists.txt1
-rw-r--r--tests/benchmarks/corelib/io/qdir/10000/bench_qdir_10000.cpp4
-rw-r--r--tests/benchmarks/corelib/io/qprocess/testProcessLoopback/CMakeLists.txt10
-rw-r--r--tests/benchmarks/corelib/itemmodels/CMakeLists.txt1
-rw-r--r--tests/benchmarks/corelib/itemmodels/qsortfilterproxymodel/CMakeLists.txt6
-rw-r--r--tests/benchmarks/corelib/itemmodels/qsortfilterproxymodel/tst_qsortfilterproxymodel.cpp123
-rw-r--r--tests/benchmarks/corelib/kernel/qmetaobject/main.cpp7
-rw-r--r--tests/benchmarks/corelib/kernel/qmetatype/tst_qmetatype.cpp87
-rw-r--r--tests/benchmarks/corelib/kernel/qvariant/tst_qvariant.cpp4
-rw-r--r--tests/benchmarks/corelib/plugin/quuid/tst_quuid.cpp3
-rw-r--r--tests/benchmarks/corelib/text/qlocale/main.cpp28
-rw-r--r--tests/benchmarks/corelib/time/qdate/tst_bench_qdate.cpp10
-rw-r--r--tests/benchmarks/corelib/tools/containers-sequential/main.cpp8
-rw-r--r--tests/benchmarks/corelib/tools/qcryptographichash/main.cpp18
-rw-r--r--tests/benchmarks/corelib/tools/qlist/main.cpp169
-rw-r--r--tests/benchmarks/corelib/tools/qrect/main.cpp8
-rw-r--r--tests/benchmarks/gui/animation/qanimation/dummyanimation.h4
-rw-r--r--tests/benchmarks/gui/kernel/qguimetatype/tst_qguimetatype.cpp41
-rw-r--r--tests/benchmarks/gui/kernel/qguivariant/tst_qguivariant.cpp6
-rw-r--r--tests/benchmarks/gui/math3d/qmatrix4x4/tst_qmatrix4x4.cpp6
-rw-r--r--tests/benchmarks/gui/math3d/qquaternion/tst_qquaternion.cpp1
-rw-r--r--tests/benchmarks/gui/painting/qtbench/benchmarktests.h115
-rw-r--r--tests/benchmarks/gui/painting/qtbench/tst_qtbench.cpp2
-rw-r--r--tests/benchmarks/gui/painting/qtransform/tst_qtransform.cpp6
-rw-r--r--tests/benchmarks/network/access/qnetworkreply/tst_qnetworkreply.cpp3
-rw-r--r--tests/benchmarks/network/socket/CMakeLists.txt1
-rw-r--r--tests/benchmarks/network/socket/qlocalsocket/CMakeLists.txt14
-rw-r--r--tests/benchmarks/network/socket/qlocalsocket/tst_qlocalsocket.cpp225
-rw-r--r--tests/benchmarks/widgets/graphicsview/qgraphicsanchorlayout/tst_qgraphicsanchorlayout.cpp2
-rw-r--r--tests/benchmarks/widgets/graphicsview/qgraphicslayout/tst_qgraphicslayout.cpp4
-rw-r--r--tests/benchmarks/widgets/graphicsview/qgraphicslinearlayout/tst_qgraphicslinearlayout.cpp2
-rw-r--r--tests/benchmarks/widgets/graphicsview/qgraphicsscene/tst_qgraphicsscene.cpp1
-rw-r--r--tests/benchmarks/widgets/graphicsview/qgraphicsview/chiptester/chip.h12
-rw-r--r--tests/benchmarks/widgets/graphicsview/qgraphicsview/chiptester/chiptester.h4
-rw-r--r--tests/benchmarks/widgets/graphicsview/qgraphicsview/tst_qgraphicsview.cpp18
-rw-r--r--tests/benchmarks/widgets/itemviews/qtableview/tst_qtableview.cpp14
-rw-r--r--tests/benchmarks/widgets/kernel/qwidget/tst_qwidget.cpp2
-rw-r--r--tests/libfuzzer/corelib/time/qdatetime/fromstring/main.cpp15
-rw-r--r--tests/manual/highdpi/dprgadget/CMakeLists.txt1
-rw-r--r--tests/manual/highdpi/dprgadget/main.cpp161
-rw-r--r--tests/manual/highdpi/screengadget/CMakeLists.txt20
-rw-r--r--tests/manual/highdpi/screengadget/main.cpp244
-rw-r--r--tests/manual/highdpi/screengadget/screengadget.pro2
-rw-r--r--tests/manual/lance/interactivewidget.h2
-rw-r--r--tests/manual/lance/main.cpp2
-rw-r--r--tests/manual/lance/widgets.h12
-rw-r--r--tests/manual/qcursor/qcursorhighdpi/CMakeLists.txt2
-rw-r--r--tests/manual/qcursor/qcursorhighdpi/qcursorhighdpi.pro2
-rw-r--r--tests/manual/qlocale/info.cpp8
-rw-r--r--tests/manual/qlocale/info.h4
-rw-r--r--tests/manual/qlocale/languages.cpp2
-rw-r--r--tests/manual/qlocale/window.cpp10
-rw-r--r--tests/manual/touch/main.cpp4
-rw-r--r--util/cmake/helper.py17
-rwxr-xr-xutil/cmake/pro2cmake.py14
-rwxr-xr-xutil/edid/qedidvendortable.py8
-rw-r--r--util/locale_database/cldr.py4
-rw-r--r--util/locale_database/enumdata.py8
-rw-r--r--util/locale_database/qlocalexml.py6
-rwxr-xr-xutil/locale_database/qlocalexml2cpp.py24
-rw-r--r--util/locale_database/testlocales/localemodel.cpp8
-rw-r--r--util/unicode/README4
-rw-r--r--util/unicode/data/emoji-data.txt1261
-rw-r--r--util/unicode/main.cpp71
-rw-r--r--util/unicode/unicode.pro1
-rw-r--r--util/xkbdatagen/main.cpp4
1516 files changed, 168354 insertions, 45272 deletions
diff --git a/.prev_configure.cmake b/.prev_configure.cmake
index 02cd39e5a8..84741e4406 100644
--- a/.prev_configure.cmake
+++ b/.prev_configure.cmake
@@ -6,7 +6,7 @@
#### Libraries
-qt_find_package(ZLIB 1.0.8 PROVIDED_TARGETS ZLIB::ZLIB MODULE_NAME global QMAKE_LIB zlib)
+qt_find_package(WrapZLIB 1.0.8 PROVIDED_TARGETS WrapZLIB::WrapZLIB MODULE_NAME global QMAKE_LIB zlib)
qt_find_package(ZSTD 1.3 PROVIDED_TARGETS ZSTD::ZSTD MODULE_NAME global QMAKE_LIB zstd)
qt_find_package(WrapDBus1 1.2 PROVIDED_TARGETS dbus-1 MODULE_NAME global QMAKE_LIB dbus)
qt_find_package(Libudev PROVIDED_TARGETS PkgConfig::Libudev MODULE_NAME global QMAKE_LIB libudev)
@@ -133,7 +133,7 @@ qt_config_linker_supports_flag_test(gdb_index
qt_config_compile_test(reduce_relocations
LABEL "-Bsymbolic-functions support"
CODE
-"#if !(defined(__i386) || defined(__i386__) || defined(__x86_64) || defined(__x86_64__) || defined(__amd64))
+"#if !(defined(__i386) || defined(__i386__) || defined(__x86_64) || defined(__x86_64__) || defined(__amd64)) || defined(__sun)
# error Symbolic function binding on this architecture may be broken, disabling it (see QTBUG-36129).
#endif
@@ -341,7 +341,7 @@ qt_feature("android-style-assets" PRIVATE
)
qt_feature("shared" PUBLIC
LABEL "Building shared libraries"
- AUTODETECT NOT UIKIT
+ AUTODETECT NOT UIKIT AND NOT WASM
CONDITION BUILD_SHARED_LIBS
)
qt_feature_definition("shared" "QT_STATIC" NEGATE PREREQUISITE "!defined(QT_SHARED) && !defined(QT_STATIC)")
@@ -643,37 +643,37 @@ qt_feature("sse2" PRIVATE
)
qt_feature_definition("sse2" "QT_COMPILER_SUPPORTS_SSE2" VALUE "1")
qt_feature_config("sse2" QMAKE_PRIVATE_CONFIG)
-qt_feature("sse3"
+qt_feature("sse3" PRIVATE
LABEL "SSE3"
CONDITION QT_FEATURE_sse2 AND TEST_subarch_sse3
)
qt_feature_definition("sse3" "QT_COMPILER_SUPPORTS_SSE3" VALUE "1")
qt_feature_config("sse3" QMAKE_PRIVATE_CONFIG)
-qt_feature("ssse3"
+qt_feature("ssse3" PRIVATE
LABEL "SSSE3"
CONDITION QT_FEATURE_sse3 AND TEST_subarch_ssse3
)
qt_feature_definition("ssse3" "QT_COMPILER_SUPPORTS_SSSE3" VALUE "1")
qt_feature_config("ssse3" QMAKE_PRIVATE_CONFIG)
-qt_feature("sse4_1"
+qt_feature("sse4_1" PRIVATE
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_config("sse4_1" QMAKE_PRIVATE_CONFIG)
-qt_feature("sse4_2"
+qt_feature("sse4_2" PRIVATE
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_config("sse4_2" QMAKE_PRIVATE_CONFIG)
-qt_feature("avx"
+qt_feature("avx" PRIVATE
LABEL "AVX"
CONDITION QT_FEATURE_sse4_2 AND TEST_subarch_avx AND ( NOT ANDROID OR NOT ( TEST_architecture_arch STREQUAL x86_64 ) )
)
qt_feature_definition("avx" "QT_COMPILER_SUPPORTS_AVX" VALUE "1")
qt_feature_config("avx" QMAKE_PRIVATE_CONFIG)
-qt_feature("f16c"
+qt_feature("f16c" PRIVATE
LABEL "F16C"
CONDITION QT_FEATURE_avx AND TEST_subarch_f16c
)
@@ -685,79 +685,79 @@ qt_feature("avx2" PRIVATE
)
qt_feature_definition("avx2" "QT_COMPILER_SUPPORTS_AVX2" VALUE "1")
qt_feature_config("avx2" QMAKE_PRIVATE_CONFIG)
-qt_feature("avx512f"
+qt_feature("avx512f" PRIVATE
LABEL "F"
CONDITION QT_FEATURE_avx2 AND TEST_subarch_avx512f
)
qt_feature_definition("avx512f" "QT_COMPILER_SUPPORTS_AVX512F" VALUE "1")
qt_feature_config("avx512f" QMAKE_PRIVATE_CONFIG)
-qt_feature("avx512er"
+qt_feature("avx512er" PRIVATE
LABEL "ER"
CONDITION QT_FEATURE_avx512f AND TEST_subarch_avx512er
)
qt_feature_definition("avx512er" "QT_COMPILER_SUPPORTS_AVX512ER" VALUE "1")
qt_feature_config("avx512er" QMAKE_PRIVATE_CONFIG)
-qt_feature("avx512cd"
+qt_feature("avx512cd" PRIVATE
LABEL "CD"
CONDITION QT_FEATURE_avx512f AND TEST_subarch_avx512cd
)
qt_feature_definition("avx512cd" "QT_COMPILER_SUPPORTS_AVX512CD" VALUE "1")
qt_feature_config("avx512cd" QMAKE_PRIVATE_CONFIG)
-qt_feature("avx512pf"
+qt_feature("avx512pf" PRIVATE
LABEL "PF"
CONDITION QT_FEATURE_avx512f AND TEST_subarch_avx512pf
)
qt_feature_definition("avx512pf" "QT_COMPILER_SUPPORTS_AVX512PF" VALUE "1")
qt_feature_config("avx512pf" QMAKE_PRIVATE_CONFIG)
-qt_feature("avx512dq"
+qt_feature("avx512dq" PRIVATE
LABEL "DQ"
CONDITION QT_FEATURE_avx512f AND TEST_subarch_avx512dq
)
qt_feature_definition("avx512dq" "QT_COMPILER_SUPPORTS_AVX512DQ" VALUE "1")
qt_feature_config("avx512dq" QMAKE_PRIVATE_CONFIG)
-qt_feature("avx512bw"
+qt_feature("avx512bw" PRIVATE
LABEL "BW"
CONDITION QT_FEATURE_avx512f AND TEST_subarch_avx512bw
)
qt_feature_definition("avx512bw" "QT_COMPILER_SUPPORTS_AVX512BW" VALUE "1")
qt_feature_config("avx512bw" QMAKE_PRIVATE_CONFIG)
-qt_feature("avx512vl"
+qt_feature("avx512vl" PRIVATE
LABEL "VL"
CONDITION QT_FEATURE_avx512f AND TEST_subarch_avx512vl
)
qt_feature_definition("avx512vl" "QT_COMPILER_SUPPORTS_AVX512VL" VALUE "1")
qt_feature_config("avx512vl" QMAKE_PRIVATE_CONFIG)
-qt_feature("avx512ifma"
+qt_feature("avx512ifma" PRIVATE
LABEL "IFMA"
CONDITION QT_FEATURE_avx512f AND TEST_subarch_avx512ifma
)
qt_feature_definition("avx512ifma" "QT_COMPILER_SUPPORTS_AVX512IFMA" VALUE "1")
qt_feature_config("avx512ifma" QMAKE_PRIVATE_CONFIG)
-qt_feature("avx512vbmi"
+qt_feature("avx512vbmi" PRIVATE
LABEL "VBMI"
CONDITION QT_FEATURE_avx512f AND TEST_subarch_avx512vbmi
)
qt_feature_definition("avx512vbmi" "QT_COMPILER_SUPPORTS_AVX512VBMI" VALUE "1")
qt_feature_config("avx512vbmi" QMAKE_PRIVATE_CONFIG)
-qt_feature("aesni"
+qt_feature("aesni" PRIVATE
LABEL "AES"
CONDITION QT_FEATURE_sse2 AND TEST_subarch_aesni
)
qt_feature_definition("aesni" "QT_COMPILER_SUPPORTS_AES" VALUE "1")
qt_feature_config("aesni" QMAKE_PRIVATE_CONFIG)
-qt_feature("rdrnd"
+qt_feature("rdrnd" PRIVATE
LABEL "RDRAND"
CONDITION TEST_subarch_rdrnd
)
qt_feature_definition("rdrnd" "QT_COMPILER_SUPPORTS_RDRND" VALUE "1")
qt_feature_config("rdrnd" QMAKE_PRIVATE_CONFIG)
-qt_feature("rdseed"
+qt_feature("rdseed" PRIVATE
LABEL "RDSEED"
CONDITION TEST_subarch_rdseed
)
qt_feature_definition("rdseed" "QT_COMPILER_SUPPORTS_RDSEED" VALUE "1")
qt_feature_config("rdseed" QMAKE_PRIVATE_CONFIG)
-qt_feature("shani"
+qt_feature("shani" PRIVATE
LABEL "SHA"
CONDITION QT_FEATURE_sse2 AND TEST_subarch_shani
)
@@ -769,19 +769,19 @@ qt_feature("x86SimdAlways"
)
qt_feature_definition("x86SimdAlways" "QT_COMPILER_SUPPORTS_SIMD_ALWAYS" VALUE "1")
qt_feature_config("x86SimdAlways" QMAKE_PRIVATE_CONFIG)
-qt_feature("mips_dsp"
+qt_feature("mips_dsp" PRIVATE
LABEL "DSP"
CONDITION ( TEST_architecture_arch STREQUAL mips ) AND TEST_arch_${TEST_architecture_arch}_subarch_dsp
)
qt_feature_definition("mips_dsp" "QT_COMPILER_SUPPORTS_MIPS_DSP" VALUE "1")
qt_feature_config("mips_dsp" QMAKE_PRIVATE_CONFIG)
-qt_feature("mips_dspr2"
+qt_feature("mips_dspr2" PRIVATE
LABEL "DSPr2"
CONDITION ( TEST_architecture_arch STREQUAL mips ) AND TEST_arch_${TEST_architecture_arch}_subarch_dspr2
)
qt_feature_definition("mips_dspr2" "QT_COMPILER_SUPPORTS_MIPS_DSPR2" VALUE "1")
qt_feature_config("mips_dspr2" QMAKE_PRIVATE_CONFIG)
-qt_feature("neon"
+qt_feature("neon" PRIVATE
LABEL "NEON"
CONDITION ( ( TEST_architecture_arch STREQUAL arm ) OR ( TEST_architecture_arch STREQUAL arm64 ) ) AND TEST_arch_${TEST_architecture_arch}_subarch_neon
)
@@ -809,7 +809,7 @@ qt_feature("stack-protector-strong" PRIVATE
)
qt_feature("system-zlib" PRIVATE
LABEL "Using system zlib"
- CONDITION ZLIB_FOUND
+ CONDITION WrapZLIB_FOUND
)
qt_feature("zstd" PRIVATE
LABEL "Zstandard support"
@@ -837,7 +837,7 @@ qt_feature_definition("concurrent" "QT_NO_CONCURRENT" NEGATE VALUE "1")
qt_feature("dbus" PUBLIC PRIVATE
LABEL "Qt D-Bus"
AUTODETECT NOT UIKIT AND NOT ANDROID
- CONDITION QT_FEATURE_thread
+ CONDITION QT_FEATURE_thread AND NOT WASM
)
qt_feature_definition("dbus" "QT_NO_DBUS" NEGATE VALUE "1")
qt_feature("dbus-linked" PRIVATE
@@ -866,7 +866,7 @@ qt_feature("printsupport" PRIVATE
)
qt_feature("sql" PRIVATE
LABEL "Qt Sql"
- CONDITION QT_FEATURE_thread
+ CONDITION QT_FEATURE_thread AND NOT WASM
)
qt_feature("testlib" PRIVATE
LABEL "Qt Testlib"
@@ -1034,6 +1034,7 @@ qt_configure_add_summary_entry(ARGS "pkg-config")
qt_configure_add_summary_entry(ARGS "libudev")
qt_configure_add_summary_entry(ARGS "system-zlib")
qt_configure_add_summary_entry(ARGS "zstd")
+qt_configure_add_summary_entry(ARGS "thread")
qt_configure_end_summary_section() # end of "Support enabled for" section
qt_configure_add_report_entry(
TYPE NOTE
@@ -1041,6 +1042,11 @@ qt_configure_add_report_entry(
CONDITION NOT QT_FEATURE_shared
)
qt_configure_add_report_entry(
+ TYPE NOTE
+ MESSAGE "Using pthreads"
+ CONDITION QT_FEATURE_thread
+)
+qt_configure_add_report_entry(
TYPE ERROR
MESSAGE "Debug build wihtout Release build is not currently supported on ios see QTBUG-71990. Use -debug-and-release."
CONDITION IOS AND QT_FEATURE_debug AND NOT QT_FEATURE_debug_and_release
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 5fb65fbd28..45110a429b 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -25,7 +25,7 @@ qt_internal_check_for_suitable_cmake_version()
# Run auto detection routines, but not when doing standalone tests. In that case, the detection
# results are taken from either QtBuildInternals or the qt.toolchain.cmake file. Also, inhibit
# auto-detection in a top-level build, because the top-level project file already includes it.
-if(NOT QT_BUILD_STANDALONE_TESTS AND NOT QT_SUPER_BUILD)
+if(NOT QT_BUILD_STANDALONE_TESTS AND NOT QT_SUPERBUILD)
include(${CMAKE_CURRENT_SOURCE_DIR}/cmake/QtAutoDetect.cmake)
endif()
@@ -50,6 +50,9 @@ if(NOT QT_BUILD_STANDALONE_TESTS)
if(MACOS)
# Add module directory to pick up custom Info.plist template
list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake/macos")
+ elseif(IOS)
+ # Add module directory to pick up custom Info.plist template
+ list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake/ios")
endif()
## Find the build internals package.
@@ -71,9 +74,16 @@ if(NOT QT_BUILD_STANDALONE_TESTS)
option(BUILD_SHARED_LIBS "Build Qt statically or dynamically" ON)
set(QT_BUILD_SHARED_LIBS ${BUILD_SHARED_LIBS})
+ # This variable is also set in Qt6CoreConfigExtras.cmake, but it's not loaded when building
+ # qtbase. Set it here so qt_add_plugin can compute the proper plugin flavor.
+ set(QT6_IS_SHARED_LIBS_BUILD ${BUILD_SHARED_LIBS})
+
## Should this Qt be built with Werror?
option(WARNINGS_ARE_ERRORS "Build Qt with warnings as errors" ${FEATURE_developer_build})
+ ## Should this Qt create versioned hard link for some tools?
+ option(QT_CREATE_VERSIONED_HARD_LINK "Enable the use of versioned hard link" ON)
+
## QtBase specific configure tests:
include(QtBaseConfigureTests)
@@ -94,6 +104,12 @@ if(NOT QT_BUILD_STANDALONE_TESTS)
# Needed when building qtbase for android.
include(src/corelib/Qt6AndroidMacros.cmake)
+ if(WASM)
+ # Needed when building for WebAssembly.
+ include(cmake/QtWasmHelpers.cmake)
+ qt_internal_setup_wasm_target_properties(Platform)
+ endif()
+
# Set up optimization flags like in qmake.
# This function must be called after the global QT_FEATURE_xxx variables have been set up,
# aka after QtBaseGlobalTargets is processed.
@@ -116,7 +132,7 @@ if(QT_BUILD_TESTS)
endif()
if(NOT QT_BUILD_STANDALONE_TESTS)
- if(QT_WILL_BUILD_TOOLS)
+ if(QT_WILL_BUILD_TOOLS AND QT_FEATURE_settings)
add_subdirectory(qmake)
endif()
# As long as we use the mkspecs (for qplatformdefs.h), we need to always
diff --git a/bin/fixqt4headers.pl b/bin/fixqt4headers.pl
deleted file mode 100755
index b572f469dc..0000000000
--- a/bin/fixqt4headers.pl
+++ /dev/null
@@ -1,179 +0,0 @@
-#!/usr/bin/env perl
-#############################################################################
-##
-## Copyright (C) 2016 The Qt Company Ltd.
-## Contact: https://www.qt.io/licensing/
-##
-## This file is part of the porting tools of the Qt Toolkit.
-##
-## $QT_BEGIN_LICENSE:LGPL$
-## 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 Lesser General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU Lesser
-## General Public License version 3 as published by the Free Software
-## Foundation and appearing in the file LICENSE.LGPL3 included in the
-## packaging of this file. Please review the following information to
-## ensure the GNU Lesser General Public License version 3 requirements
-## will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
-##
-## GNU General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU
-## General Public License version 2.0 or (at your option) the GNU General
-## Public license version 3 or any later version approved by the KDE Free
-## Qt Foundation. The licenses are as published by the Free Software
-## Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
-## 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-2.0.html and
-## https://www.gnu.org/licenses/gpl-3.0.html.
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-
-use Cwd;
-use File::Find;
-use File::Spec;
-use IO::File;
-use Getopt::Long;
-use strict;
-use warnings;
-
-my $dry_run = 0;
-my $help = 0;
-my $stripModule = 0;
-my $fixedFileCount = 0;
-my $fileCount = 0;
-my $verbose = 0;
-my $qtdir;
-my $qtIncludeDir;
-
-my $USAGE=<<EOF;
-This script replaces all Qt 4 style includes with Qt 5 includes.
-
-Usage: $0 [options]
-
-Options:
- --dry-run : Do not replace anything, just print what would be replaced
- --strip-modules : Strip the module headers for writing portable code
- --verbose : Verbose
- --qtdir <directory> : Point to Qt 5's qtbase directory
-EOF
-
-if (!GetOptions('dry-run' => \$dry_run, 'help' => \$help,
- 'strip-modules' => \$stripModule, 'verbose' => \$verbose, 'qtdir:s' => \$qtdir)
- || $help) {
- print $USAGE;
- exit (1);
-}
-
-my %headerSubst = ();
-my $cwd = getcwd();
-
-sub fixHeaders
-{
- my $fileName = $File::Find::name;
- my $relFileName = File::Spec->abs2rel($fileName, $cwd);
-
- # only check sources, also ignore symbolic links and directories
- return unless -f $fileName && $fileName =~ /(\.h|\.cpp|\/C|\.cc|\.CC)$/;
-
- my $inFile = new IO::File('<' . $fileName) or die ('Unable to open ' . $fileName . ': ' . $!);
- $fileCount++;
- my @affectedClasses;
- my @outLines;
-
- while (my $line = <$inFile>) {
- if ($line =~ /^#(\s*)include(\s*)<.*?\/(.*?)>(.*)/) {
- my $newHeader = $headerSubst{$3};
- if ($newHeader) {
- $line = '#' . $1 . 'include' . $2 . '<' . $newHeader . '>' . $4 . "\n";
- push(@affectedClasses, $3);
- }
- } elsif ($line =~ /^#(\s*)include(\s*)<QtGui>(.*)/) {
- $line = '#' . $1 . 'include' . $2 . '<QtWidgets>' . $3 . "\n";
- push(@affectedClasses, 'QtGui');
- }
- push(@outLines, $line);
- }
- $inFile->close();
-
- if (scalar(@affectedClasses)) {
- $fixedFileCount++;
- print $relFileName, ': ', join(', ', @affectedClasses), "\n" if ($verbose || $dry_run);
- if (!$dry_run) {
- my $outFile = new IO::File('>' . $fileName) or die ('Unable to open ' . $fileName . ': ' . $!);
- map { print $outFile $_; } @outLines;
- $outFile->close();
- }
- } else {
- print $relFileName, ": no modification.\n" if ($verbose || $dry_run);
- }
-}
-
-sub findQtHeaders
-{
- my ($dirName,$includeDir) = @_;
-
- local (*DIR);
-
- my $moduleIncludeDir = $includeDir . '/' . $dirName;
- opendir(DIR, $moduleIncludeDir) || die ('Unable to open ' . $moduleIncludeDir . ': ' . $!);
- my @headers = readdir(DIR);
- closedir(DIR);
-
- foreach my $header (@headers) {
- next if (-d ($moduleIncludeDir . '/' . $header) || $header =~ /\.pri$/);
- $headerSubst{$header} = $stripModule ? $header : ($dirName . '/' . $header);
- }
-}
-
-# -------- MAIN
-
-if ($qtdir) {
- $qtIncludeDir = $qtdir . '/include';
-} else {
- $qtIncludeDir = `qmake -query QT_INSTALL_HEADERS`;
- chop($qtIncludeDir);
-}
-
-die "The location of the Qt 5 include files could not be determined.\n"
- ."Please ensure qmake can be found in PATH or pass the command line option --qtdir.\n"
- unless -d $qtIncludeDir;
-
-findQtHeaders('QtCore', $qtIncludeDir);
-findQtHeaders('QtConcurrent', $qtIncludeDir);
-findQtHeaders('QtWidgets', $qtIncludeDir);
-findQtHeaders('QtPrintSupport', $qtIncludeDir);
-
-if (-d $qtIncludeDir . '/include/QtMultimedia') {
- findQtHeaders('QtMultimedia', $qtIncludeDir);
- findQtHeaders('QtMultimediaWidgets', $qtIncludeDir);
-} elsif (-d $qtIncludeDir . '/../qtmultimedia' ) {
- # This is the case if QTDIR points to a source tree instead of an installed Qt
- findQtHeaders('QtMultimedia', $qtIncludeDir . '/../qtmultimedia');
- findQtHeaders('QtMultimediaWidgets', $qtIncludeDir . '/../qtmultimedia');
-}
-
-# Support porting from "Qt 4.99" QtDeclarative to QtQuick (QQuickItem et al)
-if (-d $qtIncludeDir . '/include/QtQuick') {
- findQtHeaders('QtQuick', $qtIncludeDir);
-} elsif (-d $qtIncludeDir . '/../qtdeclarative' ) {
- # This is the case if QTDIR points to a source tree instead of an installed Qt
- findQtHeaders('QtQuick', $qtIncludeDir . '/../qtdeclarative');
-}
-
-# special case
-$headerSubst{'QtGui'} = 'QtWidgets/QtWidgets';
-
-find({ wanted => \&fixHeaders, no_chdir => 1}, $cwd);
-
-print 'Done. ', ($dry_run ? 'Checked' : 'Modified'), ' ', $fixedFileCount, ' of ', $fileCount, " file(s).\n";
diff --git a/bin/qt-cmake-private-install.cmake.in b/bin/qt-cmake-private-install.cmake.in
index 845394d02e..19dddd4fcb 100644
--- a/bin/qt-cmake-private-install.cmake.in
+++ b/bin/qt-cmake-private-install.cmake.in
@@ -1,8 +1,9 @@
# Calls cmake --install ${QT_BUILD_DIR} --config <config> for each config
# with which Qt was built with.
# This is required to enable installation of all configurations of
-# a Qt built with Ninja Multi-Config until the following issue is fixed.
+# a Qt built with Ninja Multi-Config until the following issues are fixed:
# https://gitlab.kitware.com/cmake/cmake/-/issues/20713
+# https://gitlab.kitware.com/cmake/cmake/-/issues/21475
set(configs "@__qt_configured_configs@")
if(NOT QT_BUILD_DIR)
message(FATAL_ERROR "No QT_BUILD_DIR value provided to qt-cmake-private-install.")
diff --git a/bin/qt-cmake-standalone-test.in b/bin/qt-cmake-standalone-test.in
index d13c3eee40..b0fbea5ded 100755
--- a/bin/qt-cmake-standalone-test.in
+++ b/bin/qt-cmake-standalone-test.in
@@ -1,4 +1,4 @@
@__qt_cmake_standalone_test_os_prelude@
@__qt_cmake_standalone_test_script_relpath@
-@__qt_cmake_private_relpath@ @__qt_cmake_standalone_test_relpath@ -DQT_STANDALONE_TEST_PATH=@__qt_cmake_standalone_passed_args@
+@__qt_cmake_private_relpath@ @__qt_cmake_standalone_test_relpath@ -DQT_BUILD_STANDALONE_TESTS=ON -DQT_STANDALONE_TEST_PATH=@__qt_cmake_standalone_passed_args@
diff --git a/bin/qt-internal-configure-tests.in b/bin/qt-internal-configure-tests.in
deleted file mode 100755
index 396cda7bf8..0000000000
--- a/bin/qt-internal-configure-tests.in
+++ /dev/null
@@ -1,3 +0,0 @@
-@script_os_prelude@
-
-@qt_cmake_path@ @script_passed_args@
diff --git a/cmake/FindGLESv2.cmake b/cmake/FindGLESv2.cmake
index 56298c7773..8f3cbad5c1 100644
--- a/cmake/FindGLESv2.cmake
+++ b/cmake/FindGLESv2.cmake
@@ -60,9 +60,9 @@ find_package_handle_standard_args(GLESv2 DEFAULT_MSG ${package_args})
mark_as_advanced(${package_args})
if(GLESv2_FOUND AND NOT TARGET GLESv2::GLESv2)
- if(EMSCRIPTEN OR UIKIT)
+ if(EMSCRIPTEN OR IOS)
add_library(GLESv2::GLESv2 INTERFACE IMPORTED)
- if(UIKIT)
+ if(IOS)
# For simulator_and_device builds we can't specify the full library path, because
# it's specific to either the device or the simulator. Resort to passing a link
# flag instead.
diff --git a/cmake/FindGSSAPI.cmake b/cmake/FindGSSAPI.cmake
index 90f1c62c99..82c3952e24 100644
--- a/cmake/FindGSSAPI.cmake
+++ b/cmake/FindGSSAPI.cmake
@@ -9,6 +9,7 @@ find_path(GSSAPI_INCLUDE_DIRS
find_library(GSSAPI_LIBRARIES
NAMES
GSS # framework
+ gss # solaris
gssapi_krb5
HINTS ${PC_GSSAPILIBDIR}
)
diff --git a/cmake/FindWrapAtomic.cmake b/cmake/FindWrapAtomic.cmake
index 56aa7323bf..c2582bdd6b 100644
--- a/cmake/FindWrapAtomic.cmake
+++ b/cmake/FindWrapAtomic.cmake
@@ -30,10 +30,10 @@ int main(int, char **)
check_cxx_source_compiles("${atomic_test_sources}" HAVE_STDATOMIC)
if(NOT HAVE_STDATOMIC)
- set(_req_libraries "${CMAKE_REQUIRE_LIBRARIES}")
- set(CMAKE_REQUIRE_LIBRARIES "atomic")
+ set(_req_libraries "${CMAKE_REQUIRED_LIBRARIES}")
+ set(CMAKE_REQUIRED_LIBRARIES "atomic")
check_cxx_source_compiles("${atomic_test_sources}" HAVE_STDATOMIC_WITH_LIB)
- set(CMAKE_REQUIRE_LIBRARIES "${_req_libraries}")
+ set(CMAKE_REQUIRED_LIBRARIES "${_req_libraries}")
endif()
add_library(WrapAtomic::WrapAtomic INTERFACE IMPORTED)
diff --git a/cmake/FindWrapBacktrace.cmake b/cmake/FindWrapBacktrace.cmake
new file mode 100644
index 0000000000..6a6264099a
--- /dev/null
+++ b/cmake/FindWrapBacktrace.cmake
@@ -0,0 +1,17 @@
+if(TARGET WrapBacktrace::WrapBacktrace)
+ set(WrapBacktrace_FOUND ON)
+ return()
+endif()
+
+find_package(Backtrace)
+
+if(Backtrace_FOUND)
+ add_library(WrapBacktrace::WrapBacktrace INTERFACE IMPORTED)
+ target_link_libraries(WrapBacktrace::WrapBacktrace
+ INTERFACE ${Backtrace_LIBRARY})
+ target_include_directories(WrapBacktrace::WrapBacktrace
+ INTERFACE ${Backtrace_INCLUDE_DIR})
+ set(WrapBacktrace_FOUND ON)
+else()
+ set(WrapBacktrace_FOUND OFF)
+endif()
diff --git a/cmake/FindWrapBrotli.cmake b/cmake/FindWrapBrotli.cmake
index e01deee6e3..bc8e058f99 100644
--- a/cmake/FindWrapBrotli.cmake
+++ b/cmake/FindWrapBrotli.cmake
@@ -39,5 +39,59 @@ else()
target_link_libraries(WrapBrotli::WrapBrotliCommon INTERFACE PkgConfig::libbrotlicommon)
set(WrapBrotli_FOUND ON)
endif()
+ else()
+ find_path(BROTLI_INCLUDE_DIR NAMES "brotli/decode.h")
+
+ foreach(lib_name BrotliDec BrotliEnc BrotliCommon)
+ string(TOLOWER ${lib_name} lower_lib_name)
+
+ find_library(${lib_name}_LIBRARY_RELEASE
+ NAMES ${lower_lib_name} ${lower_lib_name}-static)
+
+ find_library(${lib_name}_LIBRARY_DEBUG
+ NAMES ${lower_lib_name}d ${lower_lib_name}-staticd
+ ${lower_lib_name} ${lower_lib_name}-static)
+
+ include(SelectLibraryConfigurations)
+ select_library_configurations(${lib_name})
+
+ if (BROTLI_INCLUDE_DIR AND ${lib_name}_LIBRARY)
+ set(${lib_name}_FOUND TRUE)
+ endif()
+
+ if (${lib_name}_FOUND AND NOT TARGET WrapBrotli::Wrap${lib_name})
+ add_library(WrapBrotli::Wrap${lib_name} UNKNOWN IMPORTED)
+ set_target_properties(WrapBrotli::Wrap${lib_name} PROPERTIES
+ INTERFACE_INCLUDE_DIRECTORIES "${BROTLI_INCLUDE_DIR}"
+ IMPORTED_LOCATION "${${lib_name}_LIBRARY}")
+
+ if(${lib_name}_LIBRARY_RELEASE)
+ foreach(config_name RELEASE RELWITHDEBINFO MINSIZEREL)
+ set_property(TARGET WrapBrotli::Wrap${lib_name} APPEND PROPERTY
+ IMPORTED_CONFIGURATIONS ${config_name})
+ set_target_properties(WrapBrotli::Wrap${lib_name} PROPERTIES
+ IMPORTED_LOCATION_${config_name} "${${lib_name}_LIBRARY_RELEASE}")
+ endforeach()
+ endif()
+
+ if(${lib_name}_LIBRARY_DEBUG)
+ set_property(TARGET WrapBrotli::Wrap${lib_name} APPEND PROPERTY
+ IMPORTED_CONFIGURATIONS DEBUG)
+ set_target_properties(WrapBrotli::Wrap${lib_name} PROPERTIES
+ IMPORTED_LOCATION_DEBUG "${${lib_name}_LIBRARY_DEBUG}")
+ endif()
+ endif()
+ endforeach()
+
+ include(FindPackageHandleStandardArgs)
+ find_package_handle_standard_args(WrapBrotli REQUIRED_VARS
+ BrotliDec_FOUND BrotliEnc_FOUND BrotliCommon_FOUND)
+
+ if (WrapBrotli_FOUND)
+ set_property(TARGET WrapBrotli::WrapBrotliDec APPEND PROPERTY
+ INTERFACE_LINK_LIBRARIES WrapBrotli::WrapBrotliCommon)
+ set_property(TARGET WrapBrotli::WrapBrotliEnc APPEND PROPERTY
+ INTERFACE_LINK_LIBRARIES WrapBrotli::WrapBrotliCommon)
+ endif()
endif()
endif()
diff --git a/cmake/FindWrapOpenSSL.cmake b/cmake/FindWrapOpenSSL.cmake
index a09aa99518..b4481f3c09 100644
--- a/cmake/FindWrapOpenSSL.cmake
+++ b/cmake/FindWrapOpenSSL.cmake
@@ -18,7 +18,7 @@ if(OpenSSL_FOUND)
else()
set(writableLib OpenSSL::Crypto)
endif()
- set_property(TARGET ${writableLib} APPEND PROPERTY INTERFACE_LINK_LIBRARIES Ws2_32 Crypt32)
+ set_property(TARGET ${writableLib} APPEND PROPERTY INTERFACE_LINK_LIBRARIES ws2_32 crypt32)
unset(libType)
unset(writableLib)
endif()
diff --git a/cmake/FindWrapZLIB.cmake b/cmake/FindWrapZLIB.cmake
new file mode 100644
index 0000000000..585dc5e95e
--- /dev/null
+++ b/cmake/FindWrapZLIB.cmake
@@ -0,0 +1,29 @@
+# We can't create the same interface imported target multiple times, CMake will complain if we do
+# that. This can happen if the find_package call is done in multiple different subdirectories.
+if(TARGET WrapZLIB::WrapZLIB)
+ set(WrapZLIB_FOUND ON)
+ return()
+endif()
+
+set(WrapZLIB_FOUND OFF)
+
+find_package(ZLIB ${WrapZLIB_FIND_VERSION})
+
+if(ZLIB_FOUND)
+ set(WrapZLIB_FOUND ON)
+
+ add_library(WrapZLIB::WrapZLIB INTERFACE IMPORTED)
+ if(APPLE)
+ # On Darwin platforms FindZLIB sets IMPORTED_LOCATION to the absolute path of the library
+ # within the framework. This ends up as an absolute path link flag, which we don't want,
+ # because that makes our .prl files un-relocatable and also breaks iOS simulator_and_device
+ # SDK switching in Xcode.
+ # Just pass a linker flag instead.
+ target_link_libraries(WrapZLIB::WrapZLIB INTERFACE "-lz")
+ else()
+ target_link_libraries(WrapZLIB::WrapZLIB INTERFACE ZLIB::ZLIB)
+ endif()
+endif()
+
+include(FindPackageHandleStandardArgs)
+find_package_handle_standard_args(WrapZLIB DEFAULT_MSG WrapZLIB_FOUND)
diff --git a/cmake/ModuleDescription.json.in b/cmake/ModuleDescription.json.in
index e29f3f176d..6aae9a4a59 100644
--- a/cmake/ModuleDescription.json.in
+++ b/cmake/ModuleDescription.json.in
@@ -1,6 +1,6 @@
{
"module_name": "${target}",
- "version": "${CMAKE_PROJECT_VERSION}",
+ "version": "${PROJECT_VERSION}",
"built_with": {
"compiler_id": "${CMAKE_CXX_COMPILER_ID}",
"compiler_target": "${CMAKE_CXX_COMPILER_TARGET}",
diff --git a/cmake/Qt3rdPartyLibraryHelpers.cmake b/cmake/Qt3rdPartyLibraryHelpers.cmake
index d144977c7f..27d615b2b4 100644
--- a/cmake/Qt3rdPartyLibraryHelpers.cmake
+++ b/cmake/Qt3rdPartyLibraryHelpers.cmake
@@ -19,7 +19,7 @@ function(qt_internal_add_cmake_library target)
set(is_static_lib 1)
elseif(${arg_SHARED})
add_library("${target}" SHARED)
- qt_internal_apply_win_prefix_and_suffix("${target}")
+ _qt_internal_apply_win_prefix_and_suffix("${target}")
elseif(${arg_MODULE})
add_library("${target}" MODULE)
set_property(TARGET ${name} PROPERTY C_VISIBILITY_PRESET default)
@@ -32,7 +32,7 @@ function(qt_internal_add_cmake_library target)
# but Qt plugins are actually suffixed with .dylib.
set_property(TARGET "${target}" PROPERTY SUFFIX ".dylib")
endif()
- qt_internal_apply_win_prefix_and_suffix("${target}")
+ _qt_internal_apply_win_prefix_and_suffix("${target}")
else()
add_library("${target}")
if(NOT BUILD_SHARED_LIBS)
@@ -175,17 +175,6 @@ function(qt_internal_add_3rdparty_library target)
qt_autogen_tools_initial_setup(${target})
endif()
- if(NOT arg_INTERFACE)
- # This property is used for super builds with static libraries. We use
- # it in QtPlugins.cmake.in to avoid "polluting" the dependency chain
- # for the target in it's project directory.
- # E.g: When we process find_package(Qt6 ... Gui) in QtDeclarative, the
- # rules in QtPugins.cmake add all the known Gui plugins as interface
- # dependencies. This in turn causes circular dependencies on every
- # plugin which links against Gui. Plugin A -> GUI -> Plugin A ....
- set_target_properties(${target} PROPERTIES QT_BUILD_PROJECT_NAME ${PROJECT_NAME})
- endif()
-
if(NOT arg_EXCEPTIONS AND NOT arg_INTERFACE)
qt_internal_set_exceptions_flags("${target}" FALSE)
elseif(arg_EXCEPTIONS)
diff --git a/cmake/QtAndroidHelpers.cmake b/cmake/QtAndroidHelpers.cmake
index 49fb0627ef..24233ac622 100644
--- a/cmake/QtAndroidHelpers.cmake
+++ b/cmake/QtAndroidHelpers.cmake
@@ -8,7 +8,7 @@ define_property(TARGET
BRIEF_DOCS
"Recorded install location for a Qt Module."
FULL_DOCS
- "Recorded install location for a Qt Module. Used by qt_android_dependencies()."
+ "Recorded install location for a Qt Module. Used by qt_internal_android_dependencies()."
)
@@ -75,15 +75,7 @@ define_property(TARGET
"Qt Module android feature list."
)
-# Generate Qt Module -android-dependencies.xml required by the
-# androiddeploytoolqt to successfully copy all the plugins and other dependent
-# items into tha APK
-function(qt_android_dependencies target)
- get_target_property(target_type "${target}" TYPE)
- if(target_type STREQUAL "INTERFACE_LIBRARY")
- return()
- endif()
-
+function(qt_internal_android_dependencies_content target file_content_out)
get_target_property(arg_JAR_DEPENDENCIES ${target} QT_ANDROID_JAR_DEPENDENCIES)
get_target_property(arg_BUNDLED_JAR_DEPENDENCIES ${target} QT_ANDROID_BUNDLED_JAR_DEPENDENCIES)
get_target_property(arg_LIB_DEPENDENCIES ${target} QT_ANDROID_LIB_DEPENDENCIES)
@@ -91,28 +83,18 @@ function(qt_android_dependencies target)
get_target_property(arg_BUNDLED_FILES ${target} QT_ANDROID_BUNDLED_FILES)
get_target_property(arg_PERMISSIONS ${target} QT_ANDROID_PERMISSIONS)
get_target_property(arg_FEATURES ${target} QT_ANDROID_FEATURES)
- get_target_property(module_plugins ${target} MODULE_PLUGIN_TYPES)
- if ((NOT module_plugins)
- AND (NOT arg_JAR_DEPENDENCIES)
- AND (NOT arg_LIB_DEPENDENCY_REPLACEMENTS)
- AND (NOT arg_LIB_DEPENDENCIES)
+ if ((NOT arg_JAR_DEPENDENCIES)
AND (NOT arg_BUNDLED_JAR_DEPENDENCIES)
+ AND (NOT arg_LIB_DEPENDENCIES)
+ AND (NOT arg_LIB_DEPENDENCY_REPLACEMENTS)
+ AND (NOT arg_BUNDLED_FILES)
AND (NOT arg_PERMISSIONS)
- AND (NOT arg_FEATURES)
- AND (NOT arg_BUNDLED_FILES))
+ AND (NOT arg_FEATURES))
# None of the values were set, so there's nothing to do
return()
endif()
-
- get_target_property(target_output_name ${target} OUTPUT_NAME)
- if (NOT target_output_name)
- set(target_name ${target})
- else()
- set(target_name ${target_output_name})
- endif()
-
# mimic qmake's section and string splitting from
# mkspecs/feature/qt_android_deps.prf
macro(section string delimiter first second)
@@ -127,10 +109,7 @@ function(qt_android_dependencies target)
endif()
endmacro()
- set(dependency_file "${QT_BUILD_DIR}/${INSTALL_LIBDIR}/${target_name}_${CMAKE_ANDROID_ARCH_ABI}-android-dependencies.xml")
-
- set(file_contents "<rules><dependencies>\n")
- string(APPEND file_contents "<lib name=\"${target_name}_${CMAKE_ANDROID_ARCH_ABI}\"><depends>\n")
+ set(file_contents "")
# Jar Dependencies
if(arg_JAR_DEPENDENCIES)
@@ -183,7 +162,6 @@ function(qt_android_dependencies target)
endforeach()
endif()
-
# Bundled files
if(arg_BUNDLED_FILES)
foreach(bundled_file IN LISTS arg_BUNDLED_FILES)
@@ -192,13 +170,6 @@ function(qt_android_dependencies target)
endforeach()
endif()
- # Module plugins
- if(module_plugins)
- foreach(plugin IN LISTS module_plugins)
- string(APPEND file_contents "<bundled file=\"plugins/${plugin}\" />\n")
- endforeach()
- endif()
-
# Android Permissions
if(arg_PERMISSIONS)
foreach(permission IN LISTS arg_PERMISSIONS)
@@ -213,13 +184,67 @@ function(qt_android_dependencies target)
endforeach()
endif()
- string(APPEND file_contents "</depends></lib>")
- string(APPEND file_contents "</dependencies></rules>\n")
+ set(${file_content_out} ${file_contents} PARENT_SCOPE)
+endfunction()
+
+# Generate Qt Module -android-dependencies.xml required by the
+# androiddeploytoolqt to successfully copy all the plugins and other dependent
+# items into the APK
+function(qt_internal_android_dependencies target)
+ get_target_property(target_type "${target}" TYPE)
+ if(target_type STREQUAL "INTERFACE_LIBRARY")
+ return()
+ endif()
+
+ # Get plugins for the current module
+ get_target_property(module_plugin_types ${target} MODULE_PLUGIN_TYPES)
+
+ # Get depends for the current module
+ qt_internal_android_dependencies_content(${target} file_contents)
+
+ # Get plugins from the module's plugin types and get their dependencies
+ foreach(plugin ${QT_KNOWN_PLUGINS})
+ get_target_property(iter_known_plugin_type ${plugin} QT_PLUGIN_TYPE)
+ foreach(plugin_type ${module_plugin_types})
+ if (plugin_type STREQUAL iter_known_plugin_type)
+ qt_internal_android_dependencies_content(${plugin} plugin_file_contents)
+ string(APPEND file_contents ${plugin_file_contents})
+ endif()
+ endforeach()
+ endforeach()
+
+ if ((NOT module_plugin_types)
+ AND (NOT file_contents))
+ # None of the values were set, so there's nothing to do
+ return()
+ endif()
+
+ get_target_property(target_output_name ${target} OUTPUT_NAME)
+ if (NOT target_output_name)
+ set(target_name ${target})
+ else()
+ set(target_name ${target_output_name})
+ endif()
+
+ string(PREPEND file_contents "<lib name=\"${target_name}_${CMAKE_ANDROID_ARCH_ABI}\"><depends>\n")
+ string(PREPEND file_contents "<rules><dependencies>\n")
+
+ # Module plugins
+ if(module_plugin_types)
+ foreach(plugin IN LISTS module_plugin_types)
+ string(APPEND file_contents "<bundled file=\"plugins/${plugin}\" />\n")
+ endforeach()
+ endif()
+
+ string(APPEND file_contents "</depends></lib>\n")
+ string(APPEND file_contents "</dependencies></rules>")
+
+ qt_path_join(dependency_file "${QT_BUILD_DIR}" "${INSTALL_LIBDIR}" "${target_name}_${CMAKE_ANDROID_ARCH_ABI}-android-dependencies.xml")
file(WRITE ${dependency_file} ${file_contents})
get_target_property(target_install_dir ${target} QT_ANDROID_MODULE_INSTALL_DIR)
if (NOT target_install_dir)
- message(SEND_ERROR "qt_android_dependencies: Target ${target} is either not a Qt Module or has no recorded install location")
+ message(SEND_ERROR "qt_internal_android_dependencies: Target ${target} is either not a Qt Module or has no recorded install location")
return()
endif()
diff --git a/cmake/QtAppHelpers.cmake b/cmake/QtAppHelpers.cmake
index ff32be0b89..c40488cc66 100644
--- a/cmake/QtAppHelpers.cmake
+++ b/cmake/QtAppHelpers.cmake
@@ -3,7 +3,7 @@
function(qt_internal_add_app target)
qt_parse_all_arguments(arg
"qt_internal_add_app"
- "NO_INSTALL"
+ "NO_INSTALL;INSTALL_VERSIONED_LINK"
"${__default_target_info_args}"
"${__default_private_args}"
${ARGN})
@@ -49,6 +49,14 @@ function(qt_internal_add_app target)
# if CONFIG += console was encountered during conversion.
set_target_properties("${target}" PROPERTIES WIN32_EXECUTABLE TRUE)
+ # Consider every app as user facing tool.
+ set_property(GLOBAL APPEND PROPERTY QT_USER_FACING_TOOL_TARGETS ${target})
+
+ # Install versioned link if requested.
+ if(NOT arg_NO_INSTALL AND arg_INSTALL_VERSIONED_LINK)
+ qt_internal_install_versioned_link("${INSTALL_BINDIR}" ${target})
+ endif()
+
qt_add_list_file_finalizer(qt_internal_finalize_app ${target})
endfunction()
diff --git a/cmake/QtAutoDetect.cmake b/cmake/QtAutoDetect.cmake
index 36761dba35..6a94515e60 100644
--- a/cmake/QtAutoDetect.cmake
+++ b/cmake/QtAutoDetect.cmake
@@ -5,6 +5,64 @@
# Make sure to not run detection when building standalone tests, because the detection was already
# done when initially configuring qtbase.
+
+function(qt_auto_detect_wasm)
+ if("${QT_QMAKE_TARGET_MKSPEC}" STREQUAL "wasm-emscripten" AND DEFINED ENV{EMSDK})
+ if(NOT DEFINED QT_AUTODETECT_WASM)
+ # detect EMSCRIPTEN_ROOT path
+ file(READ "$ENV{EMSDK}/.emscripten" ver)
+ string(REGEX MATCH "EMSCRIPTEN_ROOT.*$" EMROOT "${ver}")
+ string(REGEX MATCH "'([^' ]*)'" EMROOT2 "${EMROOT}")
+ string(REPLACE "'" "" EMROOT_PATH "${EMROOT2}")
+
+ # get emscripten version
+ if(CMAKE_HOST_SYSTEM_NAME STREQUAL "Windows")
+ set (EXECUTE_COMMANDPATH "$ENV{EMSDK}/${EMROOT_PATH}/emcc.bat")
+ else()
+ set (EXECUTE_COMMANDPATH "$ENV{EMSDK}/${EMROOT_PATH}/emcc")
+ endif()
+
+ file(TO_NATIVE_PATH "${EXECUTE_COMMANDPATH}" EXECUTE_COMMAND)
+ execute_process(COMMAND ${EXECUTE_COMMAND} --version
+ OUTPUT_VARIABLE emOutput
+ OUTPUT_STRIP_TRAILING_WHITESPACE
+ ERROR_VARIABLE emrun_error
+ RESULT_VARIABLE result)
+ if(NOT emOutput)
+ message(FATAL_ERROR
+ "Can't determine Emscripten version! Error: ${emrun_error}")
+ endif()
+ string(REGEX MATCH "[0-9]+\\.[0-9]+\\.[0-9]+" CMAKE_EMSDK_REGEX_VERSION "${emOutput}")
+ set(EMCC_VERSION "${CMAKE_EMSDK_REGEX_VERSION}" CACHE STRING INTERNAL FORCE)
+
+ # find toolchain file
+ if(NOT DEFINED CMAKE_TOOLCHAIN_FILE)
+ set(wasm_toolchain_file "$ENV{EMSDK}/${EMROOT_PATH}/cmake/Modules/Platform/Emscripten.cmake")
+ set(CMAKE_TOOLCHAIN_FILE "${wasm_toolchain_file}" CACHE STRING "" FORCE)
+ endif()
+
+ if(EXISTS "${CMAKE_TOOLCHAIN_FILE}")
+ message(STATUS "Emscripten ${CMAKE_EMSDK_REGEX_VERSION} toolchain file detected at ${CMAKE_TOOLCHAIN_FILE}")
+ else()
+ message(FATAL_ERROR "Cannot find the toolchain file Emscripten.cmake. "
+ "Please specify the toolchain file with -DCMAKE_TOOLCHAIN_FILE=<file>.")
+ endif()
+ set(QT_AUTODETECT_WASM TRUE CACHE BOOL "")
+
+ if(NOT DEFINED BUILD_SHARED_LIBS)
+ set(BUILD_SHARED_LIBS OFF CACHE BOOL "Build Qt statically or dynamically" FORCE)
+ endif()
+
+ if(BUILD_SHARED_LIBS)
+ message(FATAL_ERROR
+ "Building Qt for ${CMAKE_SYSTEM_NAME} as shared libraries is not supported.")
+ endif()
+ # this version of Qt needs this version of emscripten
+ set(QT_EMCC_RECOMMENDED_VERSION 2.0.14 CACHE STRING INTERNAL FORCE)
+ endif()
+ endif()
+endfunction()
+
function(qt_auto_detect_cmake_generator)
if(NOT CMAKE_GENERATOR MATCHES "Ninja" AND NOT QT_SILENCE_CMAKE_GENERATOR_WARNING)
message(WARNING
@@ -14,11 +72,61 @@ function(qt_auto_detect_cmake_generator)
endif()
endfunction()
+# Peek into CMAKE_TOOLCHAIN_FILE before it is actually loaded.
+#
+# Usage:
+# qt_autodetect_read_toolchain_file(tcf VARIABLES CMAKE_SYSTEM_NAME)
+# if(tcf_CMAKE_SYSTEM_NAME STREQUAL "Android")
+# ...we have detected Android
+# endif()
+#
+function(qt_auto_detect_read_toolchain_file prefix)
+ cmake_parse_arguments(arg "" "" "VARIABLES" ${ARGN})
+ set(script_path "${CMAKE_CURRENT_LIST_DIR}/QtLoadFilePrintVars.cmake")
+ execute_process(
+ COMMAND "${CMAKE_COMMAND}" "-DIN_FILE=${CMAKE_TOOLCHAIN_FILE}"
+ "-DVARIABLES=${arg_VARIABLES}" -P "${script_path}"
+ RESULT_VARIABLE exit_code
+ OUTPUT_VARIABLE output
+ ERROR_VARIABLE ignore)
+ if(NOT exit_code EQUAL 0)
+ message(FATAL_ERROR "Executing CMake script ${script_path} failed with code ${exit_code}.")
+ endif()
+ string(REGEX REPLACE "^.*---QtLoadFilePrintVars---\n" "" output "${output}")
+ string(REPLACE ";" "\;" output "${output}")
+ string(REPLACE "\n" ";" output "${output}")
+ foreach(line IN LISTS output)
+ string(REGEX MATCH "-- ([^ ]+) (.*)" m "${line}")
+ if(CMAKE_MATCH_1 IN_LIST arg_VARIABLES)
+ set(${prefix}_${CMAKE_MATCH_1} "${CMAKE_MATCH_2}" PARENT_SCOPE)
+ endif()
+ endforeach()
+endfunction()
+
function(qt_auto_detect_android)
# Auto-detect NDK root
- if(NOT DEFINED CMAKE_ANDROID_NDK_ROOT AND DEFINED ANDROID_SDK_ROOT)
- set(ndk_root "${ANDROID_SDK_ROOT}/ndk-bundle")
- if(IS_DIRECTORY "${ndk_root}")
+ if(NOT DEFINED ANDROID_NDK_ROOT AND DEFINED ANDROID_SDK_ROOT)
+ file(GLOB ndk_versions LIST_DIRECTORIES true RELATIVE "${ANDROID_SDK_ROOT}/ndk"
+ "${ANDROID_SDK_ROOT}/ndk/*")
+ unset(ndk_root)
+ if(NOT ndk_versions STREQUAL "")
+ # Use the NDK with the highest version number.
+ if(CMAKE_VERSION VERSION_LESS 3.18)
+ list(SORT ndk_versions)
+ list(REVERSE ndk_versions)
+ else()
+ list(SORT ndk_versions COMPARE NATURAL ORDER DESCENDING)
+ endif()
+ list(GET ndk_versions 0 ndk_root)
+ string(PREPEND ndk_root "${ANDROID_SDK_ROOT}/ndk/")
+ else()
+ # Fallback: use the deprecated "ndk-bundle" directory within the SDK root.
+ set(ndk_root "${ANDROID_SDK_ROOT}/ndk-bundle")
+ if(NOT IS_DIRECTORY "${ndk_root}")
+ unset(ndk_root)
+ endif()
+ endif()
+ if(DEFINED ndk_root)
message(STATUS "Android NDK detected: ${ndk_root}")
set(ANDROID_NDK_ROOT "${ndk_root}" CACHE STRING "")
endif()
@@ -36,11 +144,15 @@ function(qt_auto_detect_android)
endif()
endif()
- if(DEFINED CMAKE_TOOLCHAIN_FILE AND NOT DEFINED QT_AUTODETECT_ANDROID)
+ if("${CMAKE_TOOLCHAIN_FILE}" STREQUAL ""
+ AND (DEFINED ANDROID_ABI OR DEFINED ANDROID_NATIVE_API_LEVEL))
+ message(FATAL_ERROR "An Android build was requested, but no Android toolchain file was "
+ "specified nor detected.")
+ endif()
- file(READ ${CMAKE_TOOLCHAIN_FILE} toolchain_file_content OFFSET 0 LIMIT 80)
- string(FIND "${toolchain_file_content}" "The Android Open Source Project" find_result REVERSE)
- if (NOT ${find_result} EQUAL -1)
+ if(DEFINED CMAKE_TOOLCHAIN_FILE AND NOT DEFINED QT_AUTODETECT_ANDROID)
+ qt_auto_detect_read_toolchain_file(tcf VARIABLES CMAKE_SYSTEM_NAME)
+ if(tcf_CMAKE_SYSTEM_NAME STREQUAL "Android")
set(android_detected TRUE)
else()
set(android_detected FALSE)
@@ -268,11 +380,11 @@ function(qt_auto_detect_darwin)
# macOS
set(version "10.14")
elseif(CMAKE_SYSTEM_NAME STREQUAL iOS)
- set(version "12.0")
+ set(version "13.0")
elseif(CMAKE_SYSTEM_NAME STREQUAL watchOS)
- set(version "5.0")
+ set(version "6.0")
elseif(CMAKE_SYSTEM_NAME STREQUAL tvOS)
- set(version "12.0")
+ set(version "13.0")
endif()
if(version)
set(CMAKE_OSX_DEPLOYMENT_TARGET "${version}" CACHE STRING "${description}")
@@ -284,6 +396,32 @@ function(qt_auto_detect_darwin)
qt_internal_get_xcode_version(xcode_version)
set(QT_MAC_XCODE_VERSION "${xcode_version}" CACHE STRING "Xcode version.")
+
+ set(device_names "iOS" "watchOS" "tvOS")
+ list(LENGTH CMAKE_OSX_ARCHITECTURES arch_count)
+ if(NOT CMAKE_SYSTEM_NAME IN_LIST device_names AND arch_count GREATER 0)
+ foreach(arch ${CMAKE_OSX_ARCHITECTURES})
+ if(arch STREQUAL "arm64e")
+ message(WARNING "Applications built against an arm64e Qt architecture will "
+ "likely fail to run on Apple Silicon. Consider targeting "
+ "'arm64' instead.")
+ endif()
+ endforeach()
+ endif()
+ endif()
+endfunction()
+
+function(qt_auto_detect_macos_universal)
+ set(device_names "iOS" "watchOS" "tvOS")
+ if(APPLE AND NOT CMAKE_SYSTEM_NAME IN_LIST device_names)
+ list(LENGTH CMAKE_OSX_ARCHITECTURES arch_count)
+
+ set(is_universal "OFF")
+ if(arch_count GREATER 1)
+ set(is_universal "ON")
+ endif()
+
+ set(QT_IS_MACOS_UNIVERSAL "${is_universal}" CACHE INTERNAL "Build universal Qt for macOS")
endif()
endfunction()
@@ -303,11 +441,23 @@ function(qt_auto_detect_pch)
option(BUILD_WITH_PCH "Build Qt using precompiled headers?" "${default_value}")
endfunction()
+function(qt_auto_detect_win32_arm)
+ if("${QT_QMAKE_TARGET_MKSPEC}" STREQUAL "win32-arm64-msvc")
+ set(CMAKE_SYSTEM_NAME "Windows" CACHE STRING "")
+ set(CMAKE_SYSTEM_VERSION "10" CACHE STRING "")
+ set(CMAKE_SYSTEM_PROCESSOR "arm64" CACHE STRING "")
+ endif()
+endfunction()
+
+
qt_auto_detect_cmake_generator()
qt_auto_detect_cyclic_toolchain()
qt_auto_detect_cmake_config()
qt_auto_detect_darwin()
+qt_auto_detect_macos_universal()
qt_auto_detect_ios()
qt_auto_detect_android()
qt_auto_detect_vpckg()
qt_auto_detect_pch()
+qt_auto_detect_wasm()
+qt_auto_detect_win32_arm()
diff --git a/cmake/QtBaseConfigureTests.cmake b/cmake/QtBaseConfigureTests.cmake
index af18131fcd..15d506db16 100644
--- a/cmake/QtBaseConfigureTests.cmake
+++ b/cmake/QtBaseConfigureTests.cmake
@@ -9,23 +9,30 @@ function(qt_run_config_test_architecture)
qt_get_platform_try_compile_vars(platform_try_compile_vars)
list(APPEND flags ${platform_try_compile_vars})
+ list(TRANSFORM flags PREPEND " " OUTPUT_VARIABLE flags_indented)
+ list(JOIN flags_indented "\n" flags_indented)
+ message(STATUS
+ "Building architecture extraction project with the following CMake arguments:\n${flags_indented}")
+
try_compile(
_arch_result
"${CMAKE_CURRENT_BINARY_DIR}/config.tests/arch"
"${CMAKE_CURRENT_SOURCE_DIR}/config.tests/arch"
arch
CMAKE_FLAGS ${flags}
+ OUTPUT_VARIABLE arch_test_output
)
if (NOT _arch_result)
- message(FATAL_ERROR "Failed to compile architecture detection file.")
+ message(FATAL_ERROR
+ "Failed to build architecture extraction project. Build output:\n ${arch_test_output}")
endif()
set(_arch_file_suffix "${CMAKE_EXECUTABLE_SUFFIX}")
# With emscripten the application entry point is a .js file (to be run with node for example),
# but the real "data" is in the .wasm file, so that's where we need to look for the ABI, etc.
# information.
- if (EMSCRIPTEN)
+ if (WASM)
set(_arch_file_suffix ".wasm")
endif()
@@ -34,11 +41,17 @@ function(qt_run_config_test_architecture)
string(APPEND arch_test_location "/${QT_MULTI_CONFIG_FIRST_CONFIG}")
endif()
+ set(arch_dir "${CMAKE_CURRENT_BINARY_DIR}/${arch_test_location}")
+ file(GLOB arch_dir_globbed_files RELATIVE "${arch_dir}" "${arch_dir}/*")
+ list(JOIN arch_dir_globbed_files "\n" arch_dir_globbed_files)
+
set(_arch_file
"${CMAKE_CURRENT_BINARY_DIR}/${arch_test_location}/architecture_test${_arch_file_suffix}")
if (NOT EXISTS "${_arch_file}")
message(FATAL_ERROR
- "Failed to find compiled architecture detection executable at ${_arch_file}.")
+ "Failed to find compiled architecture detection executable at ${_arch_file}. \
+ The following files were found at: ${arch_dir} \
+ ${arch_dir_globbed_files}")
endif()
message(STATUS "Extracting architecture info from ${_arch_file}.")
@@ -66,7 +79,12 @@ function(qt_run_config_test_architecture)
endforeach()
if (NOT _architecture OR NOT _build_abi)
- message(FATAL_ERROR "Failed to extract architecture data from file.")
+ list(SUBLIST _arch_lines 0 5 arch_lines_fewer)
+ list(JOIN arch_lines_fewer "\n" arch_lines_output)
+
+ message(FATAL_ERROR
+ "Failed to extract architecture data from file. \
+ Here are the first few lines extracted:\n${arch_lines_output}")
endif()
set(TEST_architecture 1 CACHE INTERNAL "Ran the architecture test")
@@ -142,9 +160,17 @@ function(qt_internal_print_cmake_darwin_info)
message(STATUS "CMAKE_OSX_DEPLOYMENT_TARGET: \"${CMAKE_OSX_DEPLOYMENT_TARGET}\"")
message(STATUS "QT_MAC_SDK_VERSION: \"${QT_MAC_SDK_VERSION}\"")
message(STATUS "QT_MAC_XCODE_VERSION: \"${QT_MAC_XCODE_VERSION}\"")
+
+ if(DEFINED CACHE{QT_IS_MACOS_UNIVERSAL})
+ message(STATUS "QT_IS_MACOS_UNIVERSAL: \"${QT_IS_MACOS_UNIVERSAL}\"")
+ endif()
if(QT_UIKIT_SDK)
message(STATUS "QT_UIKIT_SDK: \"${QT_UIKIT_SDK}\"")
endif()
+ qt_internal_get_first_osx_arch(osx_first_arch)
+ if(osx_first_arch)
+ message(STATUS "Configure tests main architecture (in multi-arch build): \"${osx_first_arch}\"")
+ endif()
endif()
endfunction()
qt_internal_print_cmake_darwin_info()
diff --git a/cmake/QtBaseGlobalTargets.cmake b/cmake/QtBaseGlobalTargets.cmake
index 03f4b4d76a..54891f9206 100644
--- a/cmake/QtBaseGlobalTargets.cmake
+++ b/cmake/QtBaseGlobalTargets.cmake
@@ -3,6 +3,7 @@ qt_path_join(__GlobalConfig_build_dir ${QT_CONFIG_BUILD_DIR} ${__GlobalConfig_pa
qt_path_join(__GlobalConfig_install_dir ${QT_CONFIG_INSTALL_DIR} ${__GlobalConfig_path_suffix})
set(__GlobalConfig_install_dir_absolute "${__GlobalConfig_install_dir}")
set(__qt_bin_dir_absolute "${QT_INSTALL_DIR}/${INSTALL_BINDIR}")
+set(__qt_libexec_dir_absolute "${QT_INSTALL_DIR}/${INSTALL_LIBEXECDIR}")
if(QT_WILL_INSTALL)
# Need to prepend the install prefix when doing prefix builds, because the config install dir
# is relative then.
@@ -11,6 +12,8 @@ if(QT_WILL_INSTALL)
${__GlobalConfig_install_dir_absolute})
qt_path_join(__qt_bin_dir_absolute
${QT_BUILD_INTERNALS_RELOCATABLE_INSTALL_PREFIX} ${__qt_bin_dir_absolute})
+ qt_path_join(__qt_libexec_dir_absolute
+ ${QT_BUILD_INTERNALS_RELOCATABLE_INSTALL_PREFIX} ${__qt_libexec_dir_absolute})
endif()
# Compute relative path from $qt_prefix/bin dir to global CMake config install dir, to use in the
# unix-y qt-cmake shell script, to make it work even if the installed Qt is relocated.
@@ -91,13 +94,27 @@ include("${CMAKE_CURRENT_SOURCE_DIR}/configure.cmake")
# Do what mkspecs/features/uikit/default_pre.prf does, aka enable sse2 for
# simulator_and_device_builds.
-if(UIKIT AND NOT QT_UIKIT_SDK)
+
+qt_internal_get_first_osx_arch(__qt_osx_first_arch)
+set(__qt_apple_silicon_arches "arm64;arm64e")
+if((UIKIT AND NOT QT_UIKIT_SDK)
+ OR (MACOS AND QT_IS_MACOS_UNIVERSAL
+ AND __qt_osx_first_arch IN_LIST __qt_apple_silicon_arches))
+ set(QT_FORCE_FEATURE_sse2 ON CACHE INTERNAL "Force enable sse2 due to platform requirements.")
set(__QtFeature_custom_enabled_cache_variables
TEST_subarch_sse2
FEATURE_sse2
QT_FEATURE_sse2)
endif()
+if(MACOS AND QT_IS_MACOS_UNIVERSAL AND __qt_osx_first_arch STREQUAL "x86_64")
+ set(QT_FORCE_FEATURE_neon ON CACHE INTERNAL "Force enable neon due to platform requirements.")
+ set(__QtFeature_custom_enabled_cache_variables
+ TEST_subarch_neon
+ FEATURE_neon
+ QT_FEATURE_neon)
+endif()
+
qt_feature_module_end(GlobalConfig OUT_VAR_PREFIX "__GlobalConfig_")
qt_generate_global_config_pri_file()
@@ -117,7 +134,7 @@ target_include_directories(GlobalConfigPrivate INTERFACE
)
add_library(Qt::GlobalConfigPrivate ALIAS GlobalConfigPrivate)
-include(QtPublicTargetsHelpers)
+include(QtPlatformTargetHelpers)
qt_internal_setup_public_platform_target()
# defines PlatformCommonInternal PlatformModuleInternal PlatformPluginInternal PlatformToolInternal
@@ -142,7 +159,9 @@ qt_internal_export_modern_cmake_config_targets_file(TARGETS ${__export_targets}
CONFIG_INSTALL_DIR
${__GlobalConfig_install_dir})
-## Install some QtBase specific CMake files:
+# Install internal CMake files.
+# The functions defined inside can not be used in public projects.
+# They can only be used while building Qt itself.
qt_copy_or_install(FILES
cmake/ModuleDescription.json.in
cmake/Qt3rdPartyLibraryConfig.cmake.in
@@ -162,8 +181,6 @@ qt_copy_or_install(FILES
cmake/QtDbusHelpers.cmake
cmake/QtDocsHelpers.cmake
cmake/QtExecutableHelpers.cmake
- cmake/QtFeature.cmake
- cmake/QtFeatureCommon.cmake
cmake/QtFileConfigure.txt.in
cmake/QtFindPackageHelpers.cmake
cmake/QtFindWrapConfigExtra.cmake.in
@@ -197,7 +214,7 @@ qt_copy_or_install(FILES
cmake/QtPrecompiledHeadersHelpers.cmake
cmake/QtPriHelpers.cmake
cmake/QtPrlHelpers.cmake
- cmake/QtPublicTargetsHelpers.cmake
+ cmake/QtPlatformTargetHelpers.cmake
cmake/QtProcessConfigureArgs.cmake
cmake/QtQmakeHelpers.cmake
cmake/QtResourceHelpers.cmake
@@ -214,12 +231,33 @@ qt_copy_or_install(FILES
cmake/QtTestHelpers.cmake
cmake/QtToolchainHelpers.cmake
cmake/QtToolHelpers.cmake
+ cmake/QtWasmHelpers.cmake
cmake/QtWrapperScriptHelpers.cmake
cmake/QtWriteArgsFile.cmake
DESTINATION "${__GlobalConfig_install_dir}"
)
-file(COPY cmake/QtFeature.cmake DESTINATION "${__GlobalConfig_build_dir}")
+# Install public CMake files.
+# The functions defined inside can be used in both public projects and while building Qt.
+# Usually we put such functions into Qt6CoreMacros.cmake, but that's getting bloated.
+# These files will be included by Qt6Config.cmake.
+set(__public_cmake_helpers
+ cmake/QtFeature.cmake
+ cmake/QtFeatureCommon.cmake
+ cmake/QtPublicPluginHelpers.cmake
+ cmake/QtPublicTargetHelpers.cmake
+ cmake/QtPublicWalkLibsHelpers.cmake
+)
+
+qt_copy_or_install(FILES ${__public_cmake_helpers} DESTINATION "${__GlobalConfig_install_dir}")
+
+# In prefix builds we also need to copy the files into the build config directory, so that the
+# build-dir Qt6Config.cmake finds the files when building examples in-tree.
+if(QT_WILL_INSTALL)
+ foreach(_public_cmake_helper ${__public_cmake_helpers})
+ file(COPY "${_public_cmake_helper}" DESTINATION "${__GlobalConfig_build_dir}")
+ endforeach()
+endif()
# TODO: Check whether this is the right place to install these
qt_copy_or_install(DIRECTORY cmake/3rdparty DESTINATION "${__GlobalConfig_install_dir}")
@@ -238,6 +276,11 @@ if(MACOS)
cmake/macos/MacOSXBundleInfo.plist.in
DESTINATION "${__GlobalConfig_install_dir}/macos"
)
+elseif(IOS)
+ qt_copy_or_install(FILES
+ cmake/ios/MacOSXBundleInfo.plist.in
+ DESTINATION "${__GlobalConfig_install_dir}/ios"
+ )
endif()
# Install CI support files to libexec.
diff --git a/cmake/QtBuild.cmake b/cmake/QtBuild.cmake
index c328a738b1..d246685952 100644
--- a/cmake/QtBuild.cmake
+++ b/cmake/QtBuild.cmake
@@ -260,9 +260,24 @@ function(qt_setup_tool_path_command)
list(APPEND command COMMAND)
list(APPEND command set PATH=${bindir}$<SEMICOLON>%PATH%)
set(QT_TOOL_PATH_SETUP_COMMAND "${command}" CACHE INTERNAL "internal command prefix for tool invocations" FORCE)
+ # QT_TOOL_PATH_SETUP_COMMAND is deprecated. Please use _qt_internal_wrap_tool_command
+ # instead.
endfunction()
qt_setup_tool_path_command()
+function(qt_internal_generate_tool_command_wrapper)
+ if(NOT CMAKE_HOST_WIN32 OR DEFINED QT_TOOL_COMMAND_WRAPPER_PATH)
+ return()
+ endif()
+ set(bindir "${QT_BUILD_INTERNALS_RELOCATABLE_INSTALL_PREFIX}/${INSTALL_BINDIR}")
+ file(TO_NATIVE_PATH "${bindir}" bindir)
+ set(QT_TOOL_COMMAND_WRAPPER_PATH "${QT_BUILD_DIR}/${INSTALL_LIBEXECDIR}/qt_setup_tool_path.bat"
+ CACHE INTERNAL "Path to the wrapper of the tool commands")
+ file(GENERATE OUTPUT "${QT_TOOL_COMMAND_WRAPPER_PATH}" CONTENT
+ "@echo off\r\nset PATH=${bindir}$<SEMICOLON>%PATH%\r\n%*")
+endfunction()
+qt_internal_generate_tool_command_wrapper()
+
# Platform define path, etc.
if(WIN32)
set(QT_DEFAULT_PLATFORM_DEFINITIONS WIN32 _ENABLE_EXTENDED_ALIGNED_STORAGE)
@@ -302,7 +317,7 @@ elseif(IOS)
set(QT_DEFAULT_MKSPEC macx-ios-clang)
elseif(APPLE)
set(QT_DEFAULT_MKSPEC macx-clang)
-elseif(EMSCRIPTEN)
+elseif(WASM)
set(QT_DEFAULT_MKSPEC wasm-emscripten)
elseif(QNX)
# Certain POSIX defines are not set if we don't compile with -std=gnuXX
@@ -319,6 +334,30 @@ elseif(QNX)
set(QT_DEFAULT_MKSPEC qnx-${arch}-qcc)
endif()
endforeach()
+elseif(FREEBSD)
+ if(CLANG)
+ set(QT_DEFAULT_MKSPEC freebsd-clang)
+ elseif(GCC)
+ set(QT_DEFAULT_MKSPEC freebsd-g++)
+ endif()
+elseif(NETBSD)
+ set(QT_DEFAULT_MKSPEC netbsd-g++)
+elseif(OPENBSD)
+ set(QT_DEFAULT_MKSPEC openbsd-g++)
+elseif(SOLARIS)
+ if(GCC)
+ if(QT_64BIT)
+ set(QT_DEFAULT_MKSPEC solaris-g++-64)
+ else()
+ set(QT_DEFAULT_MKSPEC solaris-g++)
+ endif()
+ else()
+ if(QT_64BIT)
+ set(QT_DEFAULT_MKSPEC solaris-cc-64)
+ else()
+ set(QT_DEFAULT_MKSPEC solaris-cc)
+ endif()
+ endif()
endif()
if(NOT QT_QMAKE_TARGET_MKSPEC)
@@ -357,11 +396,6 @@ set(QT_PLATFORM_DEFINITION_DIR "${QT_DEFAULT_PLATFORM_DEFINITION_DIR}"
set(QT_PLATFORM_DEFINITION_DIR_ABSOLUTE "${QT_DEFAULT_PLATFORM_DEFINITION_DIR_ABSOLUTE}"
CACHE INTERNAL "Path to directory that contains qplatformdefs.h")
set(QT_NAMESPACE "" CACHE STRING "Qt Namespace")
-if(QT_NAMESPACE STREQUAL "")
- set(QT_HAS_NAMESPACE OFF)
-else()
- set(QT_HAS_NAMESPACE ON)
-endif()
include(QtGlobalStateHelpers)
@@ -448,29 +482,6 @@ set(__default_target_info_args
TARGET_COPYRIGHT
)
-# Collection of qt_add_plugin arguments so they can be shared across different
-# plugin type wrappers
-set(__qt_add_plugin_optional_args
- STATIC
- EXCEPTIONS
- ALLOW_UNDEFINED_SYMBOLS
-)
-set(__qt_add_plugin_single_args
- TYPE
- CLASS_NAME
- OUTPUT_DIRECTORY
- INSTALL_DIRECTORY
- ARCHIVE_INSTALL_DIRECTORY
- QML_TARGET_PATH
- OUTPUT_NAME
- ${__default_target_info_args}
-)
-set(__qt_add_plugin_multi_args
- ${__default_private_args}
- ${__default_public_args}
- DEFAULT_IF
-)
-
# Collection of arguments so they can be shared across qt_internal_add_executable
# and qt_internal_add_test_helper.
set(__qt_internal_add_executable_optional_args
@@ -496,6 +507,7 @@ set(__qt_internal_add_executable_multi_args
option(QT_CMAKE_DEBUG_EXTEND_TARGET "Debug extend_target calls in Qt's build system" OFF)
+# Internal helpers available only while building Qt itself.
include(Qt3rdPartyLibraryHelpers)
include(QtAppHelpers)
include(QtAutogenHelpers)
@@ -533,6 +545,49 @@ if(ANDROID)
include(QtAndroidHelpers)
endif()
+# Helpers that are available in public projects and while building Qt itself.
+include(QtPublicPluginHelpers)
+include(QtPublicTargetHelpers)
+include(QtPublicWalkLibsHelpers)
+
+
+# TODO: This block provides support for old variables. It should be removed once
+# we remove all references to these variables in other Qt module repos.
+# Prefer to use the provided commands to retrieve the relevant things instead.
+# We won't have the queried command when we get here for qtbase (it is
+# provided by the Core module), but we will for all other repos (which
+# is all we need).
+if(COMMAND _qt_internal_get_add_plugin_keywords)
+ _qt_internal_get_add_plugin_keywords(
+ __qt_public_add_plugin_option_args
+ __qt_public_add_plugin_single_args
+ __qt_public_add_plugin_multi_args
+ )
+ qt_internal_get_internal_add_plugin_keywords(
+ __qt_internal_add_plugin_option_args
+ __qt_internal_add_plugin_single_args
+ __qt_internal_add_plugin_multi_args
+ )
+ set(__qt_add_plugin_optional_args
+ ${__qt_public_add_plugin_option_args}
+ ${__qt_internal_add_plugin_option_args}
+ )
+ set(__qt_add_plugin_single_args
+ ${__qt_public_add_plugin_single_args}
+ ${__qt_internal_add_plugin_single_args}
+ )
+ set(__qt_add_plugin_multi_args
+ ${__qt_public_add_plugin_multi_args}
+ ${__qt_internal_add_plugin_multi_args}
+ )
+ unset(__qt_public_add_plugin_option_args)
+ unset(__qt_public_add_plugin_single_args)
+ unset(__qt_public_add_plugin_multi_args)
+ unset(__qt_internal_add_plugin_option_args)
+ unset(__qt_internal_add_plugin_single_args)
+ unset(__qt_internal_add_plugin_multi_args)
+endif()
+
# This sets up the poor man's scope finalizer mechanism.
# For newer CMake versions, we use cmake_language(DEFER CALL) instead.
if(CMAKE_VERSION VERSION_LESS "3.19.0")
diff --git a/cmake/QtBuildInformation.cmake b/cmake/QtBuildInformation.cmake
index 90e45b26dd..c010ff631d 100644
--- a/cmake/QtBuildInformation.cmake
+++ b/cmake/QtBuildInformation.cmake
@@ -261,6 +261,8 @@ function(qt_configure_process_add_summary_entry)
endif()
qt_configure_add_report_padded("${label}" "${value}")
+ elseif(arg_TYPE STREQUAL "message")
+ qt_configure_add_report_padded("${arg_ARGS}" "${arg_MESSAGE}")
endif()
endfunction()
diff --git a/cmake/QtBuildInternals/QtBuildInternalsConfig.cmake b/cmake/QtBuildInternals/QtBuildInternalsConfig.cmake
index 0afd9e7299..4928573349 100644
--- a/cmake/QtBuildInternals/QtBuildInternalsConfig.cmake
+++ b/cmake/QtBuildInternals/QtBuildInternalsConfig.cmake
@@ -1,11 +1,49 @@
# These values should be kept in sync with those in qtbase/.cmake.conf
cmake_minimum_required(VERSION 3.14...3.19)
-######################################
+###############################################
#
-# Macros for building Qt modules
+# Macros and functions for building Qt modules
#
-######################################
+###############################################
+
+# Recursively reads the dependencies section from dependencies.yaml in ${repo_dir} and returns the
+# list of dependencies, including transitive ones, in out_var.
+#
+# The returned dependencies are topologically sorted.
+#
+# Example output for qtimageformats:
+# qtbase;qtshadertools;qtsvg;qtdeclarative;qttools
+#
+function(qt_internal_read_repo_dependencies out_var repo_dir)
+ set(seen ${ARGN})
+ set(dependencies "")
+ set(in_dependencies_section FALSE)
+ set(dependencies_file "${repo_dir}/dependencies.yaml")
+ if(EXISTS "${dependencies_file}")
+ file(STRINGS "${dependencies_file}" lines)
+ foreach(line IN LISTS lines)
+ if(line MATCHES "^([^ ]+):")
+ if(CMAKE_MATCH_1 STREQUAL "dependencies")
+ set(in_dependencies_section TRUE)
+ else()
+ set(in_dependencies_section FALSE)
+ endif()
+ elseif(in_dependencies_section AND line MATCHES "^ (.+):$")
+ set(dependency "${CMAKE_MATCH_1}")
+ set(dependency_repo_dir "${repo_dir}/${dependency}")
+ string(REGEX MATCH "[^/]+$" dependency "${dependency}")
+ if(NOT dependency IN_LIST seen)
+ qt_internal_read_repo_dependencies(subdeps "${dependency_repo_dir}"
+ ${seen} ${dependency})
+ list(APPEND dependencies ${subdeps} ${dependency})
+ endif()
+ endif()
+ endforeach()
+ list(REMOVE_DUPLICATES dependencies)
+ endif()
+ set(${out_var} "${dependencies}" PARENT_SCOPE)
+endfunction()
set(QT_BACKUP_CMAKE_INSTALL_PREFIX_BEFORE_EXTRA_INCLUDE "${CMAKE_INSTALL_PREFIX}")
@@ -82,7 +120,7 @@ function(qt_build_internals_disable_pkg_config_if_needed)
set(pkg_config_enabled ON)
qt_build_internals_find_pkg_config_executable()
- if(APPLE OR WIN32 OR QNX OR ANDROID OR (NOT PKG_CONFIG_EXECUTABLE))
+ if(APPLE OR WIN32 OR QNX OR ANDROID OR WASM OR (NOT PKG_CONFIG_EXECUTABLE))
set(pkg_config_enabled OFF)
endif()
@@ -155,6 +193,7 @@ function(qt_build_internals_set_up_system_prefixes)
list(REMOVE_ITEM CMAKE_SYSTEM_PREFIX_PATH
"/usr/local" # Homebrew
+ "/opt/homebrew" # Apple Silicon Homebrew
"/usr/X11R6"
"/usr/pkg"
"/opt"
@@ -204,18 +243,19 @@ endmacro()
# find all targets defined in $subdir by recursing through all added subdirectories
# populates $qt_repo_targets with a ;-list of non-UTILITY targets
macro(qt_build_internals_get_repo_targets subdir)
+ get_directory_property(_targets DIRECTORY "${subdir}" BUILDSYSTEM_TARGETS)
+ if(_targets)
+ foreach(_target IN LISTS _targets)
+ get_target_property(_type ${_target} TYPE)
+ if(NOT (${_type} STREQUAL "UTILITY" OR ${_type} STREQUAL "INTERFACE"))
+ list(APPEND qt_repo_targets "${_target}")
+ endif()
+ endforeach()
+ endif()
+
get_directory_property(_directories DIRECTORY "${subdir}" SUBDIRECTORIES)
if (_directories)
foreach(_directory IN LISTS _directories)
- get_directory_property(_targets DIRECTORY "${_directory}" BUILDSYSTEM_TARGETS)
- if (_targets)
- foreach(_target IN LISTS _targets)
- get_target_property(_type ${_target} TYPE)
- if (NOT (${_type} STREQUAL "UTILITY" OR ${_type} STREQUAL "INTERFACE"))
- list(APPEND qt_repo_targets "${_target}")
- endif()
- endforeach()
- endif()
qt_build_internals_get_repo_targets("${_directory}")
endforeach()
endif()
@@ -369,7 +409,7 @@ macro(qt_build_repo_end)
qt_path_join(__qt_repo_install_dir ${QT_CONFIG_INSTALL_DIR} ${INSTALL_CMAKE_NAMESPACE})
if(NOT PROJECT_NAME STREQUAL "QtBase")
- if (EXISTS cmake)
+ if(IS_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/cmake")
qt_copy_or_install(DIRECTORY cmake/
DESTINATION "${__qt_repo_install_dir}"
FILES_MATCHING PATTERN "Find*.cmake"
@@ -392,32 +432,51 @@ endmacro()
macro(qt_build_repo)
qt_build_repo_begin(${ARGN})
+ qt_build_repo_impl_find_package_tests()
+ qt_build_repo_impl_src()
+ qt_build_repo_impl_tools()
+ qt_build_repo_impl_tests()
+
+ qt_build_repo_end()
+
+ qt_build_repo_impl_examples()
+endmacro()
+
+macro(qt_build_repo_impl_find_package_tests)
# If testing is enabled, try to find the qtbase Test package.
# Do this before adding src, because there might be test related conditions
# in source.
if (QT_BUILD_TESTS AND NOT QT_BUILD_STANDALONE_TESTS)
find_package(Qt6 ${PROJECT_VERSION} CONFIG REQUIRED COMPONENTS Test)
endif()
+endmacro()
+macro(qt_build_repo_impl_src)
if(NOT QT_BUILD_STANDALONE_TESTS)
if (EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/src/CMakeLists.txt")
add_subdirectory(src)
endif()
+ endif()
+endmacro()
+macro(qt_build_repo_impl_tools)
+ if(NOT QT_BUILD_STANDALONE_TESTS)
if (EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/tools/CMakeLists.txt")
add_subdirectory(tools)
endif()
endif()
+endmacro()
+macro(qt_build_repo_impl_tests)
if (QT_BUILD_TESTS AND EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/tests/CMakeLists.txt")
add_subdirectory(tests)
if(NOT QT_BUILD_TESTS_BY_DEFAULT)
set_property(DIRECTORY tests PROPERTY EXCLUDE_FROM_ALL TRUE)
endif()
endif()
+endmacro()
- qt_build_repo_end()
-
+macro(qt_build_repo_impl_examples)
if(QT_BUILD_EXAMPLES AND BUILD_SHARED_LIBS
AND EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/examples/CMakeLists.txt"
AND NOT QT_BUILD_STANDALONE_TESTS)
@@ -473,11 +532,13 @@ macro(qt_build_tests)
if(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/auto/CMakeLists.txt")
add_subdirectory(auto)
endif()
- if(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/benchmarks/CMakeLists.txt" AND QT_BUILD_BENCHMARKS)
- add_subdirectory(benchmarks)
- endif()
- if(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/manual/CMakeLists.txt" AND QT_BUILD_MANUAL_TESTS)
- add_subdirectory(manual)
+ if(NOT QT_BUILD_MINIMAL_STATIC_TESTS)
+ if(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/benchmarks/CMakeLists.txt" AND QT_BUILD_BENCHMARKS)
+ add_subdirectory(benchmarks)
+ endif()
+ if(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/manual/CMakeLists.txt" AND QT_BUILD_MANUAL_TESTS)
+ add_subdirectory(manual)
+ endif()
endif()
endmacro()
@@ -595,3 +656,16 @@ macro(qt_examples_build_end)
set(CMAKE_FIND_ROOT_PATH_MODE_PACKAGE ${BACKUP_CMAKE_FIND_ROOT_PATH_MODE_PACKAGE})
endmacro()
+
+if ("STANDALONE_TEST" IN_LIST Qt6BuildInternals_FIND_COMPONENTS)
+ include(${CMAKE_CURRENT_LIST_DIR}/QtStandaloneTestTemplateProject/Main.cmake)
+ if (NOT PROJECT_VERSION_MAJOR)
+ get_property(_qt_major_version TARGET ${QT_CMAKE_EXPORT_NAMESPACE}::Core PROPERTY INTERFACE_QT_MAJOR_VERSION)
+ set(PROJECT_VERSION ${Qt${_qt_major_version}Core_VERSION})
+
+ string(REPLACE "." ";" _qt_core_version_list ${PROJECT_VERSION})
+ list(GET _qt_core_version_list 0 PROJECT_VERSION_MAJOR)
+ list(GET _qt_core_version_list 1 PROJECT_VERSION_MINOR)
+ list(GET _qt_core_version_list 2 PROJECT_VERSION_PATCH)
+ endif()
+endif()
diff --git a/cmake/QtBuildInternals/QtStandaloneTestTemplateProject/CMakeLists.txt b/cmake/QtBuildInternals/QtStandaloneTestTemplateProject/CMakeLists.txt
index a84c567b5a..564ed610c8 100644
--- a/cmake/QtBuildInternals/QtStandaloneTestTemplateProject/CMakeLists.txt
+++ b/cmake/QtBuildInternals/QtStandaloneTestTemplateProject/CMakeLists.txt
@@ -3,19 +3,7 @@ project(qt_single_test VERSION 6.0.0 LANGUAGES C CXX ASM)
find_package(Qt6 REQUIRED COMPONENTS BuildInternals)
-# Includes QtSetup and friends for private CMake API.
-qt_build_internals_set_up_private_api()
-
-# Find all StandaloneTestsConfig.cmake files, and include them
-# This will find all Qt packages that are required for standalone tests.
-# It will find more packages that needed for a certain test, but will ensure any test can
-# be built.
-qt_get_standalone_tests_confg_files_path(standalone_tests_config_path)
-
-file(GLOB config_files "${standalone_tests_config_path}/*")
-foreach(file ${config_files})
- include("${file}")
-endforeach()
+include(${CMAKE_CURRENT_LIST_DIR}/Main.cmake)
# Get the absolute path of the passed-in project dir, relative to the current working directory
# of the calling script, rather than relative to this source directory.
@@ -27,10 +15,5 @@ else()
set(absolute_project_path "${QT_STANDALONE_TEST_PATH}")
endif()
-# Just before adding the test, change the local (non-cache) install prefix to something other than
-# the Qt install prefix, so that tests don't try to install and pollute the Qt install prefix.
-# Needs to be called after qt_get_standalone_tests_confg_files_path().
-qt_set_up_fake_standalone_tests_install_prefix()
-
# Add the test project path as a subdirectory project.
add_subdirectory("${absolute_project_path}" "build_dir")
diff --git a/cmake/QtBuildInternals/QtStandaloneTestTemplateProject/Main.cmake b/cmake/QtBuildInternals/QtStandaloneTestTemplateProject/Main.cmake
new file mode 100644
index 0000000000..38e1d75d87
--- /dev/null
+++ b/cmake/QtBuildInternals/QtStandaloneTestTemplateProject/Main.cmake
@@ -0,0 +1,18 @@
+# Includes QtSetup and friends for private CMake API.
+qt_build_internals_set_up_private_api()
+
+# Find all StandaloneTestsConfig.cmake files, and include them
+# This will find all Qt packages that are required for standalone tests.
+# It will find more packages that needed for a certain test, but will ensure any test can
+# be built.
+qt_get_standalone_tests_confg_files_path(standalone_tests_config_path)
+
+file(GLOB config_files "${standalone_tests_config_path}/*")
+foreach(file ${config_files})
+ include("${file}")
+endforeach()
+
+# Just before adding the test, change the local (non-cache) install prefix to something other than
+# the Qt install prefix, so that tests don't try to install and pollute the Qt install prefix.
+# Needs to be called after qt_get_standalone_tests_confg_files_path().
+qt_set_up_fake_standalone_tests_install_prefix()
diff --git a/cmake/QtBuildInternalsExtra.cmake.in b/cmake/QtBuildInternalsExtra.cmake.in
index 66f11a4364..b089f00fd6 100644
--- a/cmake/QtBuildInternalsExtra.cmake.in
+++ b/cmake/QtBuildInternalsExtra.cmake.in
@@ -21,9 +21,25 @@ get_filename_component(QT_BUILD_INTERNALS_RELOCATABLE_INSTALL_PREFIX
# This is an attempt to support Conan, aka handle installation of modules into a
# different installation prefix than the original one. Also allow to opt out via a special variable.
if(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT AND
- NOT QT_BUILD_INTERNALS_NO_FORCE_SET_INSTALL_PREFIX)
- set(CMAKE_INSTALL_PREFIX "@CMAKE_INSTALL_PREFIX@" CACHE PATH
+ NOT QT_BUILD_INTERNALS_NO_FORCE_SET_INSTALL_PREFIX)
+ set(qtbi_orig_prefix "@CMAKE_INSTALL_PREFIX@")
+ set(qtbi_new_prefix "${QT_BUILD_INTERNALS_RELOCATABLE_INSTALL_PREFIX}")
+ if(CMAKE_HOST_WIN32)
+ # Make sure we use exactly the original prefix if it points to the same directory as the new
+ # one. This is needed for the case where the original prefix is passed without drive letter
+ # to support installing with DESTDIR set.
+ get_filename_component(qtbi_real_orig_prefix "${qtbi_orig_prefix}" REALPATH)
+ get_filename_component(qtbi_real_new_prefix "${qtbi_new_prefix}" REALPATH)
+ if(qtbi_real_orig_prefix STREQUAL qtbi_real_new_prefix)
+ set(qtbi_new_prefix "${qtbi_orig_prefix}")
+ endif()
+ endif()
+ set(CMAKE_INSTALL_PREFIX "${qtbi_new_prefix}" CACHE PATH
"Install path prefix, prepended onto install directories." FORCE)
+ unset(qtbi_orig_prefix)
+ unset(qtbi_real_orig_prefix)
+ unset(qtbi_new_prefix)
+ unset(qtbi_real_new_prefix)
endif()
# Propagate developer builds to other modules via BuildInternals package.
@@ -49,5 +65,9 @@ set(QT_BUILD_EXAMPLES_BY_DEFAULT @QT_BUILD_EXAMPLES_BY_DEFAULT@ CACHE BOOL
# Propagate usage of ccache.
set(QT_USE_CCACHE @QT_USE_CCACHE@ CACHE BOOL "Enable the use of ccache")
+# Propagate usage of versioned hard link.
+set(QT_CREATE_VERSIONED_HARD_LINK "@QT_CREATE_VERSIONED_HARD_LINK@" CACHE BOOL
+ "Enable the use of versioned hard link")
+
# Extra set of exported variables
@QT_EXTRA_BUILD_INTERNALS_VARS@
diff --git a/cmake/QtCMakeHelpers.cmake b/cmake/QtCMakeHelpers.cmake
index 93513d4369..f9b03d628c 100644
--- a/cmake/QtCMakeHelpers.cmake
+++ b/cmake/QtCMakeHelpers.cmake
@@ -156,6 +156,26 @@ function(qt_re_escape out_var str)
set(${out_var} ${regex} PARENT_SCOPE)
endfunction()
+# Input: string
+# Output: regex string to match the string case insensitively
+# Example: "Release" -> "^([Rr][Ee][Ll][Ee][Aa][Ss][Ee])$"
+#
+# Regular expressions like this are used in cmake_install.cmake files for case-insensitive string
+# comparison.
+function(qt_create_case_insensitive_regex out_var input)
+ set(result "^(")
+ string(LENGTH "${input}" n)
+ math(EXPR n "${n} - 1")
+ foreach(i RANGE 0 ${n})
+ string(SUBSTRING "${input}" ${i} 1 c)
+ string(TOUPPER "${c}" uc)
+ string(TOLOWER "${c}" lc)
+ string(APPEND result "[${uc}${lc}]")
+ endforeach()
+ string(APPEND result ")$")
+ set(${out_var} "${result}" PARENT_SCOPE)
+endfunction()
+
# Gets a target property, and returns "" if the property was not found
function(qt_internal_get_target_property out_var target property)
get_target_property(result "${target}" "${property}")
diff --git a/cmake/QtCMakeVersionHelpers.cmake b/cmake/QtCMakeVersionHelpers.cmake
index 955d9044cb..4d4113bb43 100644
--- a/cmake/QtCMakeVersionHelpers.cmake
+++ b/cmake/QtCMakeVersionHelpers.cmake
@@ -116,6 +116,17 @@ function(qt_internal_warn_about_unsuitable_cmake_versions)
# https://gitlab.kitware.com/cmake/cmake/-/issues/21163
list(APPEND unsuitable_versions "3.18.2")
+ # Cyclic dependencies are created when mixing AUTOMOC/AUTOUIC with sources
+ # that have their SKIP_MOC or SKIP_UIC source file properties set to true.
+ # https://gitlab.kitware.com/cmake/cmake/-/issues/21977
+ list(APPEND unsuitable_versions "3.20.0")
+
+ # AUTOMOC can crash or hang when using a Qt that supports moc depfiles.
+ # Issues reported on Windows with Ninja and Makefiles, but it could be happening
+ # on other platforms too.
+ # https://gitlab.kitware.com/cmake/cmake/-/issues/22014
+ list(APPEND unsuitable_versions "3.20.1")
+
foreach(unsuitable_version ${unsuitable_versions})
if(CMAKE_VERSION VERSION_EQUAL unsuitable_version)
message(WARNING
diff --git a/cmake/QtCompilerOptimization.cmake b/cmake/QtCompilerOptimization.cmake
index ed6921da53..c8c3da78d5 100644
--- a/cmake/QtCompilerOptimization.cmake
+++ b/cmake/QtCompilerOptimization.cmake
@@ -136,7 +136,7 @@ endif()
# TODO: Missing mkspecs flags we don't handle below: win32-clang-g++, win32-clang-msvc, rtems-base
#
# gcc and clang base
-if(GCC OR CLANG)
+if(GCC OR CLANG AND NOT WASM)
set(QT_CFLAGS_OPTIMIZE "-O2")
set(QT_CFLAGS_OPTIMIZE_FULL "-O3")
set(QT_CFLAGS_OPTIMIZE_DEBUG "-Og")
@@ -187,3 +187,10 @@ if(ICC)
set(QT_CFLAGS_OPTIMIZE_SIZE "-Os")
endif()
endif()
+
+if(WASM)
+ set(QT_CFLAGS_OPTIMIZE "-O2")
+ set(QT_CFLAGS_OPTIMIZE_FULL "-O3")
+ set(QT_CFLAGS_OPTIMIZE_SIZE "-Os")
+ set(QT_CFLAGS_OPTIMIZE_DEBUG "-g2")
+endif()
diff --git a/cmake/QtConfig.cmake.in b/cmake/QtConfig.cmake.in
index 57c252091d..7708954b90 100644
--- a/cmake/QtConfig.cmake.in
+++ b/cmake/QtConfig.cmake.in
@@ -44,8 +44,21 @@ list(APPEND CMAKE_MODULE_PATH "${_qt_import_prefix}/3rdparty/kwin")
if(APPLE AND (NOT CMAKE_SYSTEM_NAME OR CMAKE_SYSTEM_NAME STREQUAL "Darwin"))
# Add module directory to pick up custom Info.plist template for macOS
list(APPEND CMAKE_MODULE_PATH "${_qt_import_prefix}/macos")
+elseif(APPLE AND CMAKE_SYSTEM_NAME STREQUAL "iOS")
+ # Add module directory to pick up custom Info.plist template for iOS
+ list(APPEND CMAKE_MODULE_PATH "${_qt_import_prefix}/ios")
endif()
+set(QT_ADDITIONAL_PACKAGES_PREFIX_PATH "" CACHE STRING "Additional directories where find(Qt6 ...) components are searched")
+file(TO_CMAKE_PATH "${QT_ADDITIONAL_PACKAGES_PREFIX_PATH}" _qt_additional_packages_prefix_path)
+file(TO_CMAKE_PATH "$ENV{QT_ADDITIONAL_PACKAGES_PREFIX_PATH}" _qt_additional_packages_prefix_path_env)
+
+# Public helpers available to all Qt packages.
+include("${CMAKE_CURRENT_LIST_DIR}/QtFeature.cmake")
+include("${CMAKE_CURRENT_LIST_DIR}/QtPublicPluginHelpers.cmake")
+include("${CMAKE_CURRENT_LIST_DIR}/QtPublicTargetHelpers.cmake")
+include("${CMAKE_CURRENT_LIST_DIR}/QtPublicWalkLibsHelpers.cmake")
+
# Find required dependencies, if any.
include(CMakeFindDependencyMacro)
if(EXISTS "${CMAKE_CURRENT_LIST_DIR}/@INSTALL_CMAKE_NAMESPACE@Dependencies.cmake")
@@ -68,7 +81,8 @@ foreach(module ${@INSTALL_CMAKE_NAMESPACE@_FIND_COMPONENTS})
${_@INSTALL_CMAKE_NAMESPACE@_FIND_PARTS_REQUIRED}
PATHS
${_qt_cmake_dir}
- ${QT_ADDITIONAL_PACKAGES_PREFIX_PATH}
+ ${_qt_additional_packages_prefix_path}
+ ${_qt_additional_packages_prefix_path_env}
${QT_EXAMPLES_CMAKE_PREFIX_PATH}
${__qt_use_no_default_path_for_qt_packages}
)
diff --git a/cmake/QtDocsHelpers.cmake b/cmake/QtDocsHelpers.cmake
index 593a72c90e..e2f75db213 100644
--- a/cmake/QtDocsHelpers.cmake
+++ b/cmake/QtDocsHelpers.cmake
@@ -31,7 +31,11 @@ function(qt_internal_add_docs)
return()
endif()
- if(QT_SUPERBUILD)
+ set(tool_dependencies_enabled TRUE)
+ if(NOT "${QT_HOST_PATH}" STREQUAL "")
+ set(tool_dependencies_enabled FALSE)
+ set(doc_tools_dir "${QT_HOST_PATH}/${QT${PROJECT_VERSION_MAJOR}_HOST_INFO_BINDIR}")
+ elseif(QT_SUPERBUILD)
set(doc_tools_dir "${QtBase_BINARY_DIR}/${INSTALL_BINDIR}")
else()
set(doc_tools_dir "${QT_BUILD_INTERNALS_RELOCATABLE_INSTALL_PREFIX}/${INSTALL_BINDIR}")
@@ -85,7 +89,6 @@ function(qt_internal_add_docs)
# qtattributionsscanner
add_custom_target(qattributionsscanner_${target}
- DEPENDS ${qattributionsscanner_bin}
COMMAND ${qtattributionsscanner_bin}
${PROJECT_SOURCE_DIR}
--filter "QDocModule=${doc_target}"
@@ -120,7 +123,6 @@ function(qt_internal_add_docs)
)
add_custom_target(prepare_docs_${target}
- DEPENDS ${qdoc_bin}
COMMAND ${CMAKE_COMMAND} -E env ${qdoc_env_args}
${qdoc_bin}
${prepare_qdoc_args}
@@ -139,8 +141,12 @@ function(qt_internal_add_docs)
)
foreach(target_prefix generate_top_level_docs generate_repo_docs generate_docs)
+ set(depends_arg "")
+ if(tool_dependencies_enabled)
+ set(depends_arg DEPENDS ${qdoc_bin})
+ endif()
add_custom_target(${target_prefix}_${target}
- DEPENDS ${qdoc_bin}
+ ${depends_arg}
COMMAND ${CMAKE_COMMAND} -E env ${qdoc_env_args} ${qdoc_bin} ${generate_qdocs_args})
endforeach()
@@ -158,8 +164,12 @@ function(qt_internal_add_docs)
set(qch_file_path ${qdoc_qch_output_dir}/${qch_file_name})
foreach(target_prefix qch_top_level_docs qch_repo_docs qch_docs)
+ set(depends_arg "")
+ if(tool_dependencies_enabled)
+ set(depends_arg DEPENDS ${qhelpgenerator_bin})
+ endif()
add_custom_target(${target_prefix}_${target}
- DEPENDS ${qhelpgenerator_bin}
+ ${depends_arg}
COMMAND ${qhelpgenerator_bin}
"${qdoc_output_dir}/${doc_target}.qhp"
-o "${qch_file_path}"
@@ -218,7 +228,9 @@ function(qt_internal_add_docs)
# Make sure that the necessary tools are built when running,
# for example 'cmake --build . --target generate_docs'.
- qt_internal_add_doc_tool_dependency(qattributionsscanner_${target} qtattributionsscanner)
- qt_internal_add_doc_tool_dependency(prepare_docs_${target} qdoc)
- qt_internal_add_doc_tool_dependency(qch_docs_${target} qhelpgenerator)
+ if(tool_dependencies_enabled)
+ qt_internal_add_doc_tool_dependency(qattributionsscanner_${target} qtattributionsscanner)
+ qt_internal_add_doc_tool_dependency(prepare_docs_${target} qdoc)
+ qt_internal_add_doc_tool_dependency(qch_docs_${target} qhelpgenerator)
+ endif()
endfunction()
diff --git a/cmake/QtExecutableHelpers.cmake b/cmake/QtExecutableHelpers.cmake
index c6ffd69fc2..e86a5d07ae 100644
--- a/cmake/QtExecutableHelpers.cmake
+++ b/cmake/QtExecutableHelpers.cmake
@@ -33,6 +33,9 @@ function(qt_internal_add_executable name)
PROPERTY EXCLUDE_FROM_ALL "$<NOT:$<CONFIG:${QT_MULTI_CONFIG_FIRST_CONFIG}>>")
endif()
+ if(WASM)
+ qt6_wasm_add_target_helpers("${name}")
+ endif()
if (arg_VERSION)
if(arg_VERSION MATCHES "[0-9]+\\.[0-9]+\\.[0-9]+\\.[0-9]+")
# nothing to do
@@ -174,4 +177,86 @@ function(qt_internal_add_executable name)
if("Qt::Gui" IN_LIST linked_libs AND TARGET qpa_default_plugins)
add_dependencies("${name}" qpa_default_plugins)
endif()
+
+ if(NOT BUILD_SHARED_LIBS)
+ # For static builds, we need to explicitly link to plugins we want to be
+ # loaded with the executable. User projects get that automatically, but
+ # for tools built as part of Qt, we can't use that mechanism because it
+ # would pollute the targets we export as part of an install and lead to
+ # circular dependencies. The logic here is a simpler equivalent of the
+ # more dynamic logic in QtPlugins.cmake.in, but restricted to only
+ # adding plugins that are provided by the same module as the module
+ # libraries the executable links to.
+ set(libs
+ ${arg_LIBRARIES}
+ ${arg_PUBLIC_LIBRARIES}
+ ${extra_libraries}
+ Qt::PlatformCommonInternal
+ )
+
+ set(deduped_libs "")
+ foreach(lib IN LISTS libs)
+ if(NOT TARGET "${lib}")
+ continue()
+ endif()
+
+ # Normalize module by stripping any leading "Qt::", because properties are set on the
+ # versioned target (either Gui when building the module, or Qt6::Gui when it's
+ # imported).
+ if(lib MATCHES "Qt::([-_A-Za-z0-9]+)")
+ set(new_lib "${QT_CMAKE_EXPORT_NAMESPACE}::${CMAKE_MATCH_1}")
+ if(TARGET "${new_lib}")
+ set(lib "${new_lib}")
+ endif()
+ endif()
+
+ # Unalias the target.
+ get_target_property(aliased_target ${lib} ALIASED_TARGET)
+ if(aliased_target)
+ set(lib ${aliased_target})
+ endif()
+
+ list(APPEND deduped_libs "${lib}")
+ endforeach()
+
+ list(REMOVE_DUPLICATES deduped_libs)
+
+ foreach(lib IN LISTS deduped_libs)
+ string(MAKE_C_IDENTIFIER "${name}_plugin_imports_${lib}" out_file)
+ string(APPEND out_file .cpp)
+
+ # Initialize plugins that are built in the same repository as the Qt module 'lib'.
+ set(class_names_regular
+ "$<GENEX_EVAL:$<TARGET_PROPERTY:${lib},_qt_initial_repo_plugin_class_names>>")
+
+ # Initialize plugins that are built in the current Qt repository, but are associated
+ # with a Qt module from a different repository (qtsvg's QSvgPlugin associated with
+ # qtbase's QtGui).
+ string(MAKE_C_IDENTIFIER "${PROJECT_NAME}" current_project_name)
+ set(prop_prefix "_qt_repo_${current_project_name}")
+ set(class_names_current_project
+ "$<GENEX_EVAL:$<TARGET_PROPERTY:${lib},${prop_prefix}_plugin_class_names>>")
+
+ # Only add separator if first list is not empty, so we don't trigger the file generation
+ # when all lists are empty.
+ set(class_names_separator "$<$<NOT:$<STREQUAL:${class_names_regular},>>:;>" )
+ set(class_names
+ "${class_names_regular}${class_names_separator}${class_names_current_project}")
+
+ file(GENERATE OUTPUT ${out_file} CONTENT
+"// This file is auto-generated. Do not edit.
+#include <QtPlugin>
+
+Q_IMPORT_PLUGIN($<JOIN:${class_names},)\nQ_IMPORT_PLUGIN(>)
+"
+ CONDITION "$<NOT:$<STREQUAL:${class_names},>>"
+ )
+ target_sources(${name} PRIVATE
+ "$<$<NOT:$<STREQUAL:${class_names},>>:${out_file}>"
+ )
+ target_link_libraries(${name} PRIVATE
+ "$<TARGET_PROPERTY:${lib},_qt_initial_repo_plugins>"
+ "$<TARGET_PROPERTY:${lib},${prop_prefix}_plugins>")
+ endforeach()
+ endif()
endfunction()
diff --git a/cmake/QtFeature.cmake b/cmake/QtFeature.cmake
index 6e8a653c19..7f4a9d8b52 100644
--- a/cmake/QtFeature.cmake
+++ b/cmake/QtFeature.cmake
@@ -227,13 +227,8 @@ function(_qt_internal_dump_expression_values expression_dump expression)
set(${expression_dump} "${${expression_dump}}" PARENT_SCOPE)
endfunction()
-function(qt_feature_set_cache_value resultVar feature emit_if condition calculated label)
+function(qt_feature_set_cache_value resultVar feature condition calculated label)
if (DEFINED "FEATURE_${feature}")
- # Must set up the cache
- if (NOT (emit_if))
- message(FATAL_ERROR "Sanity check failed: FEATURE_${feature} that was not emitted was found in the CMakeCache.")
- endif()
-
# Revisit value:
set(cache "${FEATURE_${feature}}")
@@ -257,12 +252,8 @@ meet its condition after reconfiguration.")
set("FEATURE_${feature}" "${cache}" CACHE BOOL "${label}" FORCE)
else()
# Initial setup:
- if (emit_if)
- set("FEATURE_${feature}" "${calculated}" CACHE BOOL "${label}")
- set(result "${calculated}")
- else()
- set(result OFF)
- endif()
+ set("FEATURE_${feature}" "${calculated}" CACHE BOOL "${label}")
+ set(result "${calculated}")
endif()
set("${resultVar}" "${result}" PARENT_SCOPE)
@@ -350,8 +341,17 @@ function(qt_evaluate_feature feature)
endif()
endif()
- qt_feature_set_cache_value(cache "${feature}" "${emit_if}" "${condition}" "${result}"
- "${arg_LABEL}")
+ if(NOT emit_if AND DEFINED FEATURE_${feature})
+ set(msg "")
+ string(APPEND msg
+ "Feature ${feature} is insignificant in this configuration, "
+ "ignoring related command line option(s).")
+ qt_configure_add_report_entry(TYPE WARNING MESSAGE "${msg}")
+ set(result OFF)
+ set(FEATURE_${feature} OFF)
+ endif()
+
+ qt_feature_set_cache_value(cache "${feature}" "${condition}" "${result}" "${arg_LABEL}")
qt_feature_set_value("${feature}" "${cache}" "${condition}" "${arg_LABEL}"
"${arg_CONDITION}")
@@ -544,10 +544,10 @@ function(qt_feature_module_end)
# Evaluate custom cache assignments.
foreach(cache_var_name ${__QtFeature_custom_enabled_cache_variables})
- set(${cache_var_name} ON CACHE BOOL "Force enabled by platform." FORCE)
+ set(${cache_var_name} ON CACHE BOOL "Force enabled by platform requirements." FORCE)
endforeach()
foreach(cache_var_name ${__QtFeature_custom_disabled_cache_variables})
- set(${cache_var_name} OFF CACHE BOOL "Force disabled by platform." FORCE)
+ set(${cache_var_name} OFF CACHE BOOL "Force disabled by platform requirements." FORCE)
endforeach()
set(enabled_public_features "")
@@ -890,9 +890,8 @@ function(qt_get_platform_try_compile_vars out_var)
# Pass darwin specific options.
# The architectures need to be passed explicitly to project-based try_compile calls even on
# macOS, so that arm64 compilation works on Apple silicon.
- if(CMAKE_OSX_ARCHITECTURES)
- list(GET CMAKE_OSX_ARCHITECTURES 0 osx_first_arch)
-
+ qt_internal_get_first_osx_arch(osx_first_arch)
+ if(osx_first_arch)
# Do what qmake does, aka when doing a simulator_and_device build, build the
# target architecture test only with the first given architecture, which should be the
# device architecture, aka some variation of "arm" (armv7, arm64).
@@ -909,6 +908,16 @@ function(qt_get_platform_try_compile_vars out_var)
set("${out_var}" "${flags_cmd_line}" PARENT_SCOPE)
endfunction()
+# Set out_var to the first value of CMAKE_OSX_ARCHITECTURES.
+# Sets an empty string if no architecture is present.
+function(qt_internal_get_first_osx_arch out_var)
+ set(value "")
+ if(CMAKE_OSX_ARCHITECTURES)
+ list(GET CMAKE_OSX_ARCHITECTURES 0 value)
+ endif()
+ set(${out_var} "${value}" PARENT_SCOPE)
+endfunction()
+
function(qt_config_compile_test_x86simd extension label)
if (DEFINED TEST_X86SIMD_${extension})
return()
diff --git a/cmake/QtFindPackageHelpers.cmake b/cmake/QtFindPackageHelpers.cmake
index 2ccd61c938..85dc1ff7db 100644
--- a/cmake/QtFindPackageHelpers.cmake
+++ b/cmake/QtFindPackageHelpers.cmake
@@ -7,10 +7,10 @@
# Only works if called from qt_find_package(), because the promotion needs to happen in the same
# directory scope where the imported target is first created.
#
-# Uses qt_internal_walk_libs.
+# Uses __qt_internal_walk_libs.
function(qt_find_package_promote_targets_to_global_scope target)
- qt_internal_walk_libs("${target}" _discarded_out_var _discarded_out_var_2
- "qt_find_package_targets_dict" "promote_global")
+ __qt_internal_walk_libs("${target}" _discarded_out_var _discarded_out_var_2
+ "qt_find_package_targets_dict" "promote_global")
endfunction()
macro(qt_find_package)
@@ -211,9 +211,9 @@ endfunction()
function(qt_record_extra_qt_package_dependency main_target_name dep_target_name
dep_package_version)
# EntryPoint -> Qt6EntryPoint.
- qt_internal_module_info(qtfied_target_name "${dep_target_name}")
- qt_record_extra_package_dependency("${main_target_name}" "${qtfied_target_name_versioned}"
- "${dep_package_version}")
+ qt_internal_qtfy_target(qtfied_target_name "${dep_target_name}")
+ qt_record_extra_package_dependency("${main_target_name}"
+ "${qtfied_target_name_versioned}" "${dep_package_version}")
endfunction()
# This function records a 'QtFooTools' package dependency for the ${main_target_name} target
@@ -249,7 +249,7 @@ function(qt_record_extra_qt_main_tools_package_dependency main_target_name
dep_non_versioned_package_name
dep_package_version)
# WaylandScannerTools -> Qt6WaylandScannerTools.
- qt_internal_module_info(qtfied_package_name "${dep_non_versioned_package_name}")
+ qt_internal_qtfy_target(qtfied_package_name "${dep_non_versioned_package_name}")
qt_record_extra_main_tools_package_dependency(
"${main_target_name}" "${qtfied_package_name_versioned}" "${dep_package_version}")
endfunction()
diff --git a/cmake/QtFinishPrlFile.cmake b/cmake/QtFinishPrlFile.cmake
index 7de3bd48f3..869770f535 100644
--- a/cmake/QtFinishPrlFile.cmake
+++ b/cmake/QtFinishPrlFile.cmake
@@ -10,9 +10,11 @@
# - Prepends '-l' to values that are not absolute paths, and don't start with a dash
# aka, '-lfoo', '-framework', '-pthread'.
#
+# The path to the final .prl file is stored in the input file as assignment to FINAL_PRL_FILE_PATH.
+#
# This file is to be used in CMake script mode with the following variables set:
-# IN_FILE: path to the preliminary .prl file
-# OUT_FILE: path to the final .prl file that's going to be installed
+# IN_FILE: path to the step 1 preliminary .prl file
+# OUT_FILE: path to the step 2 preliminary .prl file that is going to be created
# QT_LIB_DIRS: list of paths where Qt libraries are located.
# This includes the install prefix and the current repo build dir.
# These paths get replaced with relocatable paths or linker / framework flags.
diff --git a/cmake/QtFlagHandlingHelpers.cmake b/cmake/QtFlagHandlingHelpers.cmake
index 003e1a45ec..cbc39cbf1a 100644
--- a/cmake/QtFlagHandlingHelpers.cmake
+++ b/cmake/QtFlagHandlingHelpers.cmake
@@ -88,7 +88,7 @@ function(qt_internal_apply_gc_binaries target visibility)
message(FATAL_ERROR "Visibitily setting must be one of PRIVATE, INTERFACE or PUBLIC.")
endif()
- if ((GCC OR CLANG) AND NOT EMSCRIPTEN AND NOT UIKIT AND NOT MSVC)
+ if ((GCC OR CLANG) AND NOT WASM AND NOT UIKIT AND NOT MSVC)
if(APPLE)
set(gc_sections_flag "-Wl,-dead_strip")
elseif(SOLARIS)
@@ -101,7 +101,7 @@ function(qt_internal_apply_gc_binaries target visibility)
target_link_options("${target}" ${visibility} "${gc_sections_flag}")
endif()
- if((GCC OR CLANG OR ICC) AND NOT EMSCRIPTEN AND NOT UIKIT AND NOT MSVC)
+ if((GCC OR CLANG OR ICC) AND NOT WASM AND NOT UIKIT AND NOT MSVC)
set(split_sections_flags "-ffunction-sections" "-fdata-sections")
endif()
if(split_sections_flags)
diff --git a/cmake/QtFrameworkHelpers.cmake b/cmake/QtFrameworkHelpers.cmake
index 9e350c858d..6289ce98b1 100644
--- a/cmake/QtFrameworkHelpers.cmake
+++ b/cmake/QtFrameworkHelpers.cmake
@@ -23,7 +23,7 @@ macro(qt_find_apple_system_frameworks)
qt_internal_find_apple_system_framework(FWSystemConfiguration SystemConfiguration)
qt_internal_find_apple_system_framework(FWUIKit UIKit)
qt_internal_find_apple_system_framework(FWCoreLocation CoreLocation)
-
+ qt_internal_find_apple_system_framework(FWCoreMotion CoreMotion)
qt_internal_find_apple_system_framework(FWWatchKit WatchKit)
qt_internal_find_apple_system_framework(FWGameController GameController)
endif()
diff --git a/cmake/QtHeadersClean.cmake b/cmake/QtHeadersClean.cmake
index b6706f571d..d5d3f439ed 100644
--- a/cmake/QtHeadersClean.cmake
+++ b/cmake/QtHeadersClean.cmake
@@ -190,7 +190,7 @@ function(qt_internal_add_headers_clean_target
elseif ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "MSVC")
# -Za would enable strict standards behavior, but we can't add it because
# <windows.h> and <GL.h> violate the standards.
- set(hcleanFLAGS -std:c++17 -WX -W3)
+ set(hcleanFLAGS -std:c++latest -Zc:__cplusplus -WX -W3)
# cl.exe needs a source path
get_filename_component(source_path "${QT_MKSPECS_DIR}/features/data/dummy.cpp" REALPATH)
diff --git a/cmake/QtInstallHelpers.cmake b/cmake/QtInstallHelpers.cmake
index 5832df144c..9dbb22251d 100644
--- a/cmake/QtInstallHelpers.cmake
+++ b/cmake/QtInstallHelpers.cmake
@@ -125,3 +125,49 @@ function(qt_set_up_nonprefix_build)
qt_remove_install_target()
endif()
endfunction()
+
+# Create a versioned hard-link for the given target.
+# E.g. "bin/qmake6" -> "bin/qmake".
+# If no hard link can be created, make a copy instead.
+#
+# In a multi-config build, create the link for the main config only.
+function(qt_internal_install_versioned_link install_dir target)
+ if(NOT QT_WILL_INSTALL)
+ return()
+ endif()
+
+ if(NOT QT_CREATE_VERSIONED_HARD_LINK)
+ return()
+ endif()
+
+ qt_path_join(install_base_file_path "$\{qt_full_install_prefix}"
+ "${install_dir}" "$<TARGET_FILE_BASE_NAME:${target}>")
+ set(original "${install_base_file_path}$<TARGET_FILE_SUFFIX:${target}>")
+ set(linkname "${install_base_file_path}${PROJECT_VERSION_MAJOR}$<TARGET_FILE_SUFFIX:${target}>")
+ set(code "set(qt_full_install_prefix \"$\{CMAKE_INSTALL_PREFIX}\")"
+ " if(NOT \"$ENV\{DESTDIR}\" STREQUAL \"\")"
+ )
+ if(CMAKE_HOST_WIN32)
+ list(APPEND code
+ " if(qt_full_install_prefix MATCHES \"^[a-zA-Z]:\")"
+ " string(SUBSTRING \"$\{qt_full_install_prefix}\" 2 -1 qt_full_install_prefix)"
+ " endif()"
+ )
+ endif()
+ list(APPEND code
+ " string(PREPEND qt_full_install_prefix \"$ENV\{DESTDIR}\")"
+ " endif()"
+ " message(STATUS \"Creating hard link ${original} -> ${linkname}\")"
+ " file(CREATE_LINK \"${original}\" \"${linkname}\" COPY_ON_ERROR)")
+
+ if(QT_GENERATOR_IS_MULTI_CONFIG)
+ # Wrap the code in a configuration check,
+ # because install(CODE) does not support a CONFIGURATIONS argument.
+ qt_create_case_insensitive_regex(main_config_regex ${QT_MULTI_CONFIG_FIRST_CONFIG})
+ list(PREPEND code "if(\"\${CMAKE_INSTALL_CONFIG_NAME}\" MATCHES \"${main_config_regex}\")")
+ list(APPEND code "endif()")
+ endif()
+
+ list(JOIN code "\n" code)
+ install(CODE "${code}")
+endfunction()
diff --git a/cmake/QtInternalTargets.cmake b/cmake/QtInternalTargets.cmake
index 97386e22d8..006c0c0213 100644
--- a/cmake/QtInternalTargets.cmake
+++ b/cmake/QtInternalTargets.cmake
@@ -72,6 +72,7 @@ endfunction()
add_library(PlatformCommonInternal INTERFACE)
add_library(Qt::PlatformCommonInternal ALIAS PlatformCommonInternal)
+target_link_libraries(PlatformCommonInternal INTERFACE Platform)
add_library(PlatformModuleInternal INTERFACE)
add_library(Qt::PlatformModuleInternal ALIAS PlatformModuleInternal)
@@ -151,6 +152,7 @@ if(WIN32)
target_compile_definitions(PlatformCommonInternal INTERFACE "UNICODE;_UNICODE")
if(MSVC)
target_compile_definitions(PlatformCommonInternal INTERFACE
+ "_CRT_SECURE_NO_WARNINGS"
"$<$<STREQUAL:$<TARGET_PROPERTY:TYPE>,SHARED_LIBRARY>:_WINDLL>"
)
endif()
@@ -316,8 +318,5 @@ function(qt_handle_apple_app_extension_api_only)
target_link_options(PlatformPluginInternal INTERFACE ${flags})
endif()
endfunction()
-function(qt_disable_apple_app_extension_api_only target)
- set_target_properties("${target}" PROPERTIES QT_NO_APP_EXTENSION_ONLY_API TRUE)
-endfunction()
qt_handle_apple_app_extension_api_only()
diff --git a/cmake/QtLoadFilePrintVars.cmake b/cmake/QtLoadFilePrintVars.cmake
new file mode 100644
index 0000000000..fe0f3ee8d2
--- /dev/null
+++ b/cmake/QtLoadFilePrintVars.cmake
@@ -0,0 +1,15 @@
+# Load a file and print variables and their values
+#
+# IN_FILE: path to a file to be included
+# VARIABLES: list of variables to be printed
+
+cmake_minimum_required(VERSION 3.16)
+include("${IN_FILE}")
+
+# Print a magic comment that the caller must look for
+message(STATUS "---QtLoadFilePrintVars---")
+
+# Print the variables
+foreach(v IN LISTS VARIABLES)
+ message(STATUS "${v} ${${v}}")
+endforeach()
diff --git a/cmake/QtModuleConfig.cmake.in b/cmake/QtModuleConfig.cmake.in
index 0573256982..ee66f566fa 100644
--- a/cmake/QtModuleConfig.cmake.in
+++ b/cmake/QtModuleConfig.cmake.in
@@ -91,8 +91,6 @@ if (TARGET @QT_CMAKE_EXPORT_NAMESPACE@::@target@)
include("${CMAKE_CURRENT_LIST_DIR}/${extra_cmake_include}")
endforeach()
- include(${_qt_@PROJECT_VERSION_MAJOR@_config_cmake_dir}/QtFeature.cmake)
-
qt_make_features_available(@QT_CMAKE_EXPORT_NAMESPACE@::@target@)
if(EXISTS "${CMAKE_CURRENT_LIST_DIR}/@INSTALL_CMAKE_NAMESPACE@@target@Plugins.cmake")
diff --git a/cmake/QtModuleDependencies.cmake.in b/cmake/QtModuleDependencies.cmake.in
index 8f7960059a..5ec9345209 100644
--- a/cmake/QtModuleDependencies.cmake.in
+++ b/cmake/QtModuleDependencies.cmake.in
@@ -8,7 +8,8 @@ endif()
find_dependency(@INSTALL_CMAKE_NAMESPACE@ @PROJECT_VERSION@
PATHS
"${CMAKE_CURRENT_LIST_DIR}/.."
- ${QT_ADDITIONAL_PACKAGES_PREFIX_PATH}
+ ${_qt_additional_packages_prefix_path}
+ ${_qt_additional_packages_prefix_path_env}
${QT_EXAMPLES_CMAKE_PREFIX_PATH}
${__qt_use_no_default_path_for_qt_packages}
)
@@ -62,7 +63,11 @@ foreach(_target_dep ${_tool_deps})
if(${CMAKE_FIND_PACKAGE_NAME}_FIND_REQUIRED)
list(APPEND find_package_args REQUIRED)
endif()
- find_package(${pkg} ${version} ${find_package_args})
+ find_package(${pkg} ${version} ${find_package_args}
+ PATHS
+ ${_qt_additional_packages_prefix_path}
+ ${_qt_additional_packages_prefix_path_env}
+ )
if (NOT ${pkg}_FOUND)
if(NOT "${QT_HOST_PATH}" STREQUAL "")
set(CMAKE_PREFIX_PATH ${BACKUP_@target@_CMAKE_PREFIX_PATH})
@@ -86,7 +91,8 @@ foreach(_target_dep ${_target_deps})
find_dependency(${pkg} ${version}
PATHS
"${CMAKE_CURRENT_LIST_DIR}/.."
- ${QT_ADDITIONAL_PACKAGES_PREFIX_PATH}
+ ${_qt_additional_packages_prefix_path}
+ ${_qt_additional_packages_prefix_path_env}
${QT_EXAMPLES_CMAKE_PREFIX_PATH}
${__qt_use_no_default_path_for_qt_packages}
)
diff --git a/cmake/QtModuleHelpers.cmake b/cmake/QtModuleHelpers.cmake
index 597895b7b6..86408eca8d 100644
--- a/cmake/QtModuleHelpers.cmake
+++ b/cmake/QtModuleHelpers.cmake
@@ -17,9 +17,10 @@
function(qt_internal_add_module target)
qt_internal_module_info(module "${target}")
+ # TODO: Remove GENERATE_METATYPES once it's not used anymore.
# Process arguments:
qt_parse_all_arguments(arg "qt_add_module"
- "NO_MODULE_HEADERS;STATIC;DISABLE_TOOLS_EXPORT;EXCEPTIONS;INTERNAL_MODULE;NO_SYNC_QT;NO_PRIVATE_MODULE;HEADER_MODULE;GENERATE_METATYPES;NO_CONFIG_HEADER_FILE;SKIP_DEPENDS_INCLUDE;NO_ADDITIONAL_TARGET_INFO"
+ "NO_MODULE_HEADERS;STATIC;DISABLE_TOOLS_EXPORT;EXCEPTIONS;INTERNAL_MODULE;NO_SYNC_QT;NO_PRIVATE_MODULE;HEADER_MODULE;GENERATE_METATYPES;NO_GENERATE_METATYPES;NO_CONFIG_HEADER_FILE;SKIP_DEPENDS_INCLUDE;NO_ADDITIONAL_TARGET_INFO"
"MODULE_INCLUDE_NAME;CONFIG_MODULE_NAME;PRECOMPILED_HEADER;CONFIGURE_FILE_PATH;${__default_target_info_args}"
"${__default_private_args};${__default_public_args};${__default_private_module_args};QMAKE_MODULE_CONFIG;EXTRA_CMAKE_FILES;EXTRA_CMAKE_INCLUDES;NO_PCH_SOURCES" ${ARGN})
@@ -166,7 +167,7 @@ function(qt_internal_add_module target)
)
endif()
- qt_internal_apply_win_prefix_and_suffix("${target}")
+ _qt_internal_apply_win_prefix_and_suffix("${target}")
if (WIN32 AND BUILD_SHARED_LIBS)
_qt_internal_generate_win32_rc_file(${target})
@@ -241,15 +242,6 @@ function(qt_internal_add_module target)
endif()
if(NOT arg_HEADER_MODULE)
- # This property is used for super builds with static libraries. We use
- # it in QtPlugins.cmake.in to avoid "polluting" the dependency chain
- # for the target in it's project directory.
- # E.g: When we process find_package(Qt6 ... Gui) in QtDeclarative, the
- # rules in QtPugins.cmake add all the known Gui plugins as interface
- # dependencies. This in turn causes circular dependencies on every
- # plugin which links against Gui. Plugin A -> GUI -> Plugin A ....
-
- set_target_properties(${target} PROPERTIES QT_BUILD_PROJECT_NAME ${PROJECT_NAME})
# Plugin types associated to a module
if(NOT "x${arg_PLUGIN_TYPES}" STREQUAL "x")
# Reset the variable containing the list of plugins for the given plugin type
@@ -366,10 +358,6 @@ function(qt_internal_add_module target)
)
endif()
- if(MSVC)
- list(APPEND defines_for_extend_target _CRT_SECURE_NO_WARNINGS)
- endif()
-
qt_internal_extend_target("${target}"
${header_module}
SOURCES ${arg_SOURCES}
@@ -507,17 +495,24 @@ set(QT_CMAKE_EXPORT_NAMESPACE ${QT_CMAKE_EXPORT_NAMESPACE})")
endif()
# Generate metatypes
- set(QT_MODULE_HAS_META_TYPES_FILE FALSE)
- if (${arg_GENERATE_METATYPES})
- set(QT_MODULE_HAS_META_TYPES_FILE TRUE)
- set(metatypes_install_dir ${INSTALL_LIBDIR}/metatypes)
- set(args)
- if (NOT QT_WILL_INSTALL)
- set(args COPY_OVER_INSTALL INSTALL_DIR "${QT_BUILD_DIR}/${metatypes_install_dir}")
- else()
- set(args INSTALL_DIR "${metatypes_install_dir}")
+ if(${arg_GENERATE_METATYPES})
+ # No mention of NO_GENERATE_METATYPES. You should not use it.
+ message(WARNING "GENERATE_METATYPES is on by default for Qt modules. Please remove the manual specification.")
+ endif()
+ if (NOT ${arg_NO_GENERATE_METATYPES})
+ get_target_property(target_type ${target} TYPE)
+ if (NOT target_type STREQUAL "INTERFACE_LIBRARY")
+ set(metatypes_install_dir ${INSTALL_LIBDIR}/metatypes)
+ set(args)
+ if (NOT QT_WILL_INSTALL)
+ set(args COPY_OVER_INSTALL INSTALL_DIR "${QT_BUILD_DIR}/${metatypes_install_dir}")
+ else()
+ set(args INSTALL_DIR "${metatypes_install_dir}")
+ endif()
+ qt6_extract_metatypes(${target} ${args})
+ elseif(${arg_GENERATE_METATYPES})
+ message(FATAL_ERROR "Meta types generation does not work on interface libraries")
endif()
- qt6_extract_metatypes(${target} ${args})
endif()
qt_internal_get_min_new_policy_cmake_version(min_new_policy_version)
qt_internal_get_max_new_policy_cmake_version(max_new_policy_version)
@@ -563,11 +558,13 @@ set(QT_CMAKE_EXPORT_NAMESPACE ${QT_CMAKE_EXPORT_NAMESPACE})")
PRIVATE_HEADER DESTINATION ${INSTALL_INCLUDEDIR}/${module_include_name}/${PROJECT_VERSION}/${module}/private
)
- qt_apply_rpaths(TARGET "${target}" INSTALL_PATH "${INSTALL_LIBDIR}" RELATIVE_RPATH)
+ if(BUILD_SHARED_LIBS)
+ qt_apply_rpaths(TARGET "${target}" INSTALL_PATH "${INSTALL_LIBDIR}" RELATIVE_RPATH)
+ endif()
if (ANDROID AND NOT arg_HEADER_MODULE)
# Record install library location so it can be accessed by
- # qt_android_dependencies without having to specify it again.
+ # qt_internal_android_dependencies without having to specify it again.
set_target_properties(${target} PROPERTIES
QT_ANDROID_MODULE_INSTALL_DIR ${INSTALL_LIBDIR})
endif()
diff --git a/cmake/QtPlatformSupport.cmake b/cmake/QtPlatformSupport.cmake
index 1c428afe73..e4c8ca123b 100644
--- a/cmake/QtPlatformSupport.cmake
+++ b/cmake/QtPlatformSupport.cmake
@@ -16,7 +16,8 @@ qt_set01(QNX CMAKE_SYSTEM_NAME STREQUAL "QNX") # FIXME: How to identify this?
qt_set01(OPENBSD CMAKE_SYSTEM_NAME STREQUAL "OpenBSD") # FIXME: How to identify this?
qt_set01(FREEBSD CMAKE_SYSTEM_NAME STREQUAL "FreeBSD") # FIXME: How to identify this?
qt_set01(NETBSD CMAKE_SYSTEM_NAME STREQUAL "NetBSD") # FIXME: How to identify this?
-qt_set01(WASM CMAKE_SYSTEM_NAME STREQUAL "Emscripten")
+qt_set01(WASM CMAKE_SYSTEM_NAME STREQUAL "Emscripten" OR EMSCRIPTEN)
+qt_set01(SOLARIS CMAKE_SYSTEM_NAME STREQUAL "SunOS")
qt_set01(BSD APPLE OR OPENBSD OR FREEBSD OR NETBSD)
@@ -31,8 +32,8 @@ qt_set01(MACOS APPLE AND NOT UIKIT)
qt_set01(GCC CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
qt_set01(CLANG CMAKE_CXX_COMPILER_ID MATCHES "Clang")
qt_set01(APPLECLANG CMAKE_CXX_COMPILER_ID MATCHES "AppleClang")
-qt_set01(ICC CMAKE_C_COMPILER MATCHES "icc|icl")
-qt_set01(QCC CMAKE_C_COMPILER MATCHES "qcc") # FIXME: How to identify this?
+qt_set01(ICC CMAKE_CXX_COMPILER_ID STREQUAL "Intel")
+qt_set01(QCC CMAKE_CXX_COMPILER_ID STREQUAL "QCC") # CMP0047
if(CMAKE_SIZEOF_VOID_P EQUAL 8)
set(QT_64BIT TRUE)
diff --git a/cmake/QtPublicTargetsHelpers.cmake b/cmake/QtPlatformTargetHelpers.cmake
index 2e5eb564f4..68ff8a3ea0 100644
--- a/cmake/QtPublicTargetsHelpers.cmake
+++ b/cmake/QtPlatformTargetHelpers.cmake
@@ -1,9 +1,10 @@
-# Defines the public Qt::Platform target, which is used by both internal Qt builds as well as
-# public Qt consuming projects.
+# Defines the public Qt::Platform target, which serves as a dependency for all internal Qt target
+# as well as user projects consuming Qt.
function(qt_internal_setup_public_platform_target)
## QtPlatform Target:
add_library(Platform INTERFACE)
add_library(Qt::Platform ALIAS Platform)
+ add_library(${INSTALL_CMAKE_NAMESPACE}::Platform ALIAS Platform)
target_include_directories(Platform
INTERFACE
$<BUILD_INTERFACE:${QT_PLATFORM_DEFINITION_DIR_ABSOLUTE}>
diff --git a/cmake/QtPluginConfig.cmake.in b/cmake/QtPluginConfig.cmake.in
index 25ad75ce71..7bd9a1d579 100644
--- a/cmake/QtPluginConfig.cmake.in
+++ b/cmake/QtPluginConfig.cmake.in
@@ -1,5 +1,14 @@
include_guard(DIRECTORY)
+if(DEFINED QT_REPO_DEPENDENCIES AND NOT QT_BUILD_STANDALONE_TESTS)
+ # We're building a Qt repository.
+ # Skip this plugin if it has not been provided by one of this repo's dependencies.
+ string(TOLOWER "@PROJECT_NAME@" lower_case_project_name)
+ if(NOT lower_case_project_name IN_LIST QT_REPO_DEPENDENCIES)
+ return()
+ endif()
+endif()
+
@PACKAGE_INIT@
cmake_minimum_required(VERSION @min_new_policy_version@...@max_new_policy_version@)
diff --git a/cmake/QtPluginDependencies.cmake.in b/cmake/QtPluginDependencies.cmake.in
index 42365b4296..7bd1eef9aa 100644
--- a/cmake/QtPluginDependencies.cmake.in
+++ b/cmake/QtPluginDependencies.cmake.in
@@ -42,7 +42,8 @@ foreach(_target_dep ${_target_deps})
find_dependency(${pkg} ${version}
PATHS
@find_dependency_paths@
- ${QT_ADDITIONAL_PACKAGES_PREFIX_PATH}
+ ${_qt_additional_packages_prefix_path}
+ ${_qt_additional_packages_prefix_path_env}
${QT_EXAMPLES_CMAKE_PREFIX_PATH}
${__qt_use_no_default_path_for_qt_packages}
)
diff --git a/cmake/QtPluginHelpers.cmake b/cmake/QtPluginHelpers.cmake
index a90bd995bb..2368531d99 100644
--- a/cmake/QtPluginHelpers.cmake
+++ b/cmake/QtPluginHelpers.cmake
@@ -1,15 +1,48 @@
+# Note that these are only the keywords that are unique to qt_internal_add_plugin().
+# That function also supports the keywords defined by _qt_internal_get_add_plugin_keywords().
+macro(qt_internal_get_internal_add_plugin_keywords option_args single_args multi_args)
+ set(${option_args}
+ EXCEPTIONS
+ ALLOW_UNDEFINED_SYMBOLS
+ SKIP_INSTALL
+ )
+ set(${single_args}
+ OUTPUT_DIRECTORY
+ INSTALL_DIRECTORY
+ ARCHIVE_INSTALL_DIRECTORY
+ ${__default_target_info_args}
+ )
+ set(${multi_args}
+ ${__default_private_args}
+ ${__default_public_args}
+ DEFAULT_IF
+ )
+endmacro()
+
# This is the main entry point for defining Qt plugins.
# A CMake target is created with the given target. The TYPE parameter is needed to place the
# plugin into the correct plugins/ sub-directory.
function(qt_internal_add_plugin target)
- qt_internal_module_info(module "${target}")
-
qt_internal_set_qt_known_plugins("${QT_KNOWN_PLUGINS}" "${target}")
+ _qt_internal_get_add_plugin_keywords(
+ public_option_args
+ public_single_args
+ public_multi_args
+ )
+ qt_internal_get_internal_add_plugin_keywords(
+ internal_option_args
+ internal_single_args
+ internal_multi_args
+ )
+ set(option_args ${public_option_args} ${internal_option_args})
+ set(single_args ${public_single_args} ${internal_single_args})
+ set(multi_args ${public_multi_args} ${internal_multi_args})
+
qt_parse_all_arguments(arg "qt_internal_add_plugin"
- "${__qt_add_plugin_optional_args};SKIP_INSTALL"
- "${__qt_add_plugin_single_args}"
- "${__qt_add_plugin_multi_args}"
+ "${option_args}"
+ "${single_args}"
+ "${multi_args}"
"${ARGN}"
)
@@ -30,28 +63,25 @@ function(qt_internal_add_plugin target)
endforeach()
endif()
+ qt_remove_args(plugin_args
+ ARGS_TO_REMOVE
+ ${internal_option_args}
+ ${internal_single_args}
+ ${internal_multi_args}
+ ALL_ARGS
+ ${option_args}
+ ${single_args}
+ ${multi_args}
+ ARGS
+ ${ARGN}
+ )
+ qt6_add_plugin(${target} ${plugin_args})
+
qt_get_sanitized_plugin_type("${arg_TYPE}" plugin_type_escaped)
set(output_directory_default "${QT_BUILD_DIR}/${INSTALL_PLUGINSDIR}/${arg_TYPE}")
set(install_directory_default "${INSTALL_PLUGINSDIR}/${arg_TYPE}")
- if (arg_QML_TARGET_PATH)
- set(target_path "${arg_QML_TARGET_PATH}")
- set(output_directory_default "${QT_BUILD_DIR}/${INSTALL_QMLDIR}/${target_path}")
- set(install_directory_default "${INSTALL_QMLDIR}/${target_path}")
- endif()
-
- # Derive the class name from the target name if it's not explicitly specified.
- # Don't set it for qml plugins though.
- set(plugin_class_name "")
- if (NOT "${plugin_type_escaped}" STREQUAL "qml_plugin")
- if (NOT arg_CLASS_NAME)
- set(plugin_class_name "${target}")
- else()
- set(plugin_class_name "${arg_CLASS_NAME}")
- endif()
- endif()
-
qt_internal_check_directory_or_type(OUTPUT_DIRECTORY "${arg_OUTPUT_DIRECTORY}" "${arg_TYPE}"
"${output_directory_default}" output_directory)
if (NOT arg_SKIP_INSTALL)
@@ -63,42 +93,28 @@ function(qt_internal_add_plugin target)
endif()
endif()
- if(arg_STATIC OR NOT BUILD_SHARED_LIBS)
- add_library("${target}" STATIC)
- else()
- add_library("${target}" MODULE)
- if(APPLE)
- # CMake defaults to using .so extensions for loadable modules, aka plugins,
- # but Qt plugins are actually suffixed with .dylib.
- set_property(TARGET "${target}" PROPERTY SUFFIX ".dylib")
- endif()
- qt_internal_apply_win_prefix_and_suffix("${target}")
- endif()
-
qt_set_common_target_properties(${target})
qt_set_target_info_properties(${target} ${ARGN} TARGET_VERSION "${arg_VERSION}")
+ # Override the OUTPUT_NAME that qt6_add_plugin() set, we need to account for
+ # QT_LIBINFIX, which is specific to building Qt.
# Make sure the Qt6 plugin library names are like they were in Qt5 qmake land.
# Whereas the Qt6 CMake target names are like the Qt5 CMake target names.
- set(output_name "${target}")
- if(arg_OUTPUT_NAME)
- set(output_name "${arg_OUTPUT_NAME}")
- endif()
+ get_target_property(output_name ${target} OUTPUT_NAME)
set_property(TARGET "${target}" PROPERTY OUTPUT_NAME "${output_name}${QT_LIBINFIX}")
# Add a custom target with the Qt5 qmake name for a more user friendly ninja experience.
if(arg_OUTPUT_NAME AND NOT TARGET "${output_name}")
- add_custom_target("${output_name}")
- add_dependencies("${output_name}" "${target}")
+ # But don't create such a target if it would just differ in case from "${target}"
+ # and we're not using Ninja. See https://gitlab.kitware.com/cmake/cmake/-/issues/21915
+ string(TOUPPER "${output_name}" uc_output_name)
+ string(TOUPPER "${target}" uc_target)
+ if(NOT uc_output_name STREQUAL uc_target OR CMAKE_GENERATOR MATCHES "^Ninja")
+ add_custom_target("${output_name}")
+ add_dependencies("${output_name}" "${target}")
+ endif()
endif()
- if (ANDROID)
- qt_android_apply_arch_suffix("${target}")
- set_target_properties(${target}
- PROPERTIES
- LIBRARY_OUTPUT_NAME "plugins_${arg_TYPE}_${output_name}"
- )
- endif()
qt_internal_add_target_aliases("${target}")
qt_skip_warnings_are_errors_when_repo_unclean("${target}")
_qt_internal_apply_strict_cpp("${target}")
@@ -114,28 +130,116 @@ function(qt_internal_add_plugin target)
QT_PLUGIN_TYPE "${plugin_type_escaped}"
# Save the non-sanitized plugin type values for qmake consumption via .pri files.
QT_QMAKE_PLUGIN_TYPE "${arg_TYPE}"
- QT_PLUGIN_CLASS_NAME "${plugin_class_name}")
- qt_handle_multi_config_output_dirs("${target}")
+ )
+
+ qt_handle_multi_config_output_dirs("${target}")
qt_internal_library_deprecation_level(deprecation_define)
qt_autogen_tools_initial_setup(${target})
- set(static_plugin_define "")
- if (arg_STATIC OR NOT QT_BUILD_SHARED_LIBS)
- set(static_plugin_define "QT_STATICPLUGIN")
+ unset(plugin_install_package_suffix)
+
+ # The generic plugins should be enabled by default.
+ # But platform plugins should always be disabled by default, and only one is enabled
+ # based on the platform (condition specified in arg_DEFAULT_IF).
+ if(plugin_type_escaped STREQUAL "platforms")
+ set(_default_plugin 0)
+ else()
+ set(_default_plugin 1)
+ endif()
+
+ if(DEFINED arg_DEFAULT_IF)
+ if(${arg_DEFAULT_IF})
+ set(_default_plugin 1)
+ else()
+ set(_default_plugin 0)
+ endif()
endif()
- # Save the Qt module in the plug-in's properties
+ # Save the Qt module in the plug-in's properties and vice versa
if(NOT plugin_type_escaped STREQUAL "qml_plugin")
qt_internal_get_module_for_plugin("${target}" "${plugin_type_escaped}" qt_module)
+
+ set(qt_module_target "${QT_CMAKE_EXPORT_NAMESPACE}::${qt_module}")
+ if(NOT TARGET "${qt_module_target}")
+ message(FATAL_ERROR "Failed to associate Qt plugin with Qt module. ${qt_module_target} is not a known CMake target")
+ endif()
+
set_target_properties("${target}" PROPERTIES QT_MODULE "${qt_module}")
set(plugin_install_package_suffix "${qt_module}")
- endif()
- # Add the plug-in to the list of plug-ins of this module
- if(TARGET "${qt_module}")
- set_property(TARGET "${qt_module}" APPEND PROPERTY QT_PLUGINS "${target}")
+
+ get_target_property(aliased_target ${qt_module_target} ALIASED_TARGET)
+ if(aliased_target)
+ set(qt_module_target ${aliased_target})
+ endif()
+ get_target_property(is_imported_qt_module ${qt_module_target} IMPORTED)
+
+ # Associate plugin with its Qt module when both are both built in the same repository.
+ # Check that by comparing the PROJECT_NAME of each.
+ # This covers auto-linking of the majority of plugins to executables and in-tree tests.
+ # Linking of plugins in standalone tests (when the Qt module will be an imported target)
+ # is handled instead by the complicated genex logic in QtModulePlugins.cmake.in.
+ set(is_plugin_and_module_in_same_project FALSE)
+ if(NOT is_imported_qt_module)
+ # This QT_PLUGINS assignment is only used by QtPostProcessHelpers to decide if a
+ # QtModulePlugins.cmake file should be generated (which only happens in static builds).
+ set_property(TARGET "${qt_module_target}" APPEND PROPERTY QT_PLUGINS "${target}")
+
+ get_target_property(module_source_dir ${qt_module_target} SOURCE_DIR)
+ get_directory_property(module_project_name
+ DIRECTORY ${module_source_dir}
+ DEFINITION PROJECT_NAME
+ )
+ if(module_project_name STREQUAL PROJECT_NAME)
+ set(is_plugin_and_module_in_same_project TRUE)
+ endif()
+
+ # When linking static plugins with the special logic in qt_internal_add_executable,
+ # make sure to skip non-default plugins.
+ if(is_plugin_and_module_in_same_project AND _default_plugin)
+ set_property(TARGET ${qt_module_target} APPEND PROPERTY
+ _qt_initial_repo_plugins
+ "${target}")
+ set_property(TARGET ${qt_module_target} APPEND PROPERTY
+ _qt_initial_repo_plugin_class_names
+ "$<TARGET_PROPERTY:${target},QT_PLUGIN_CLASS_NAME>"
+ )
+ endif()
+ endif()
+
+ # Associate plugin with its Qt module when the plugin is built in the current repository
+ # but the module is built in a different repository (qtsvg's QSvgPlugin associated with
+ # qtbase's QtGui).
+ # The association is done in a separate property, to ensure that reconfiguring in-tree tests
+ # in qtbase doesn't accidentally cause linking to a plugin from a previously built qtsvg.
+ # Needed for in-tree tests like in qtsvg, qtimageformats.
+ # This is done for each Qt module regardless if it's an imported target or not, to handle
+ # both per-repo and top-level builds (in per-repo build of qtsvg QtGui is imported, in a
+ # top-level build Gui is not imported, but in both cases qtsvg tests need to link to
+ # QSvgPlugin).
+ #
+ # TODO: Top-level in-tree tests and qdeclarative per-repo in-tree tests that depend on
+ # static Qml plugins won't work due to the requirement of running qmlimportscanner
+ # at configure time, but qmlimportscanner is not built at that point. Moving the
+ # execution of qmlimportscanner to build time is non-trivial because qmlimportscanner
+ # not only generates a cpp file to compile but also outputs a list of static plugins
+ # that should be linked and there is no straightforward way to tell CMake to link
+ # against a list of libraries that was discovered at build time (apart from
+ # response files, which apparently might not work on all platforms).
+ # qmake doesn't have this problem because each project is configured separately so
+ # qmlimportscanner is always built by the time it needs to be run for a test.
+ if(NOT is_plugin_and_module_in_same_project AND _default_plugin)
+ string(MAKE_C_IDENTIFIER "${PROJECT_NAME}" current_project_name)
+ set(prop_prefix "_qt_repo_${current_project_name}")
+ set_property(TARGET ${qt_module_target} APPEND PROPERTY
+ ${prop_prefix}_plugins "${target}")
+ set_property(TARGET ${qt_module_target} APPEND PROPERTY
+ ${prop_prefix}_plugin_class_names
+ "$<TARGET_PROPERTY:${target},QT_PLUGIN_CLASS_NAME>"
+ )
+ endif()
endif()
# Change the configuration file install location for qml plugins into the Qml package location.
@@ -144,34 +248,21 @@ function(qt_internal_add_plugin target)
endif()
# Save the install package suffix as a property, so that the Dependencies file is placed
- # in the current location.
+ # in the correct location.
if(plugin_install_package_suffix)
set_target_properties("${target}" PROPERTIES
_qt_plugin_install_package_suffix "${plugin_install_package_suffix}")
endif()
- # The generic plugins should be enabled by default.
- # But platform plugins should always be disabled by default, and only one is enabled
- # based on the platform (condition specified in arg_DEFAULT_IF).
- if(plugin_type_escaped STREQUAL "platforms")
- set(_default_plugin 0)
- else()
- set(_default_plugin 1)
- endif()
-
- if (DEFINED arg_DEFAULT_IF)
- if (NOT ${arg_DEFAULT_IF})
- set(_default_plugin 0)
- else()
- set(_default_plugin 1)
- endif()
+ if(TARGET qt_plugins)
+ add_dependencies(qt_plugins "${target}")
endif()
-
- add_dependencies(qt_plugins "${target}")
if(arg_TYPE STREQUAL "platforms")
- add_dependencies(qpa_plugins "${target}")
+ if(TARGET qpa_plugins)
+ add_dependencies(qpa_plugins "${target}")
+ endif()
- if(_default_plugin)
+ if(_default_plugin AND TARGET qpa_default_plugins)
add_dependencies(qpa_default_plugins "${target}")
endif()
endif()
@@ -183,7 +274,7 @@ function(qt_internal_add_plugin target)
"${CMAKE_CURRENT_SOURCE_DIR}"
"${CMAKE_CURRENT_BINARY_DIR}"
# For the syncqt headers
- "$<BUILD_INTERFACE:${module_repo_include_dir}>"
+ "$<BUILD_INTERFACE:${QT_BUILD_DIR}/include>"
${arg_INCLUDE_DIRECTORIES}
)
@@ -201,10 +292,7 @@ function(qt_internal_add_plugin target)
PUBLIC_LIBRARIES ${arg_PUBLIC_LIBRARIES}
DEFINES
${arg_DEFINES}
- QT_DEPRECATED_WARNINGS
${deprecation_define}
- "${static_plugin_define}"
- QT_PLUGIN
PUBLIC_DEFINES
${arg_PUBLIC_DEFINES}
FEATURE_DEPENDENCIES ${arg_FEATURE_DEPENDENCIES}
@@ -294,7 +382,9 @@ function(qt_internal_add_plugin target)
NAMESPACE ${QT_CMAKE_EXPORT_NAMESPACE}::
DESTINATION "${config_install_dir}"
)
- qt_apply_rpaths(TARGET "${target}" INSTALL_PATH "${install_directory}" RELATIVE_RPATH)
+ if(BUILD_SHARED_LIBS)
+ qt_apply_rpaths(TARGET "${target}" INSTALL_PATH "${install_directory}" RELATIVE_RPATH)
+ endif()
endif()
if (NOT arg_ALLOW_UNDEFINED_SYMBOLS)
@@ -304,20 +394,29 @@ function(qt_internal_add_plugin target)
endif()
qt_internal_add_linker_version_script(${target})
- qt_add_list_file_finalizer(qt_finalize_plugin ${target} "${install_directory}")
+ set(finalizer_extra_args "")
+ if(NOT arg_SKIP_INSTALL)
+ list(APPEND finalizer_extra_args INSTALL_PATH "${install_directory}")
+ endif()
+ qt_add_list_file_finalizer(qt_finalize_plugin ${target} ${finalizer_extra_args})
- qt_enable_separate_debug_info(${target} "${install_directory}")
- qt_internal_install_pdb_files(${target} "${install_directory}")
+ if(NOT arg_SKIP_INSTALL)
+ qt_enable_separate_debug_info(${target} "${install_directory}")
+ qt_internal_install_pdb_files(${target} "${install_directory}")
+ endif()
endfunction()
-function(qt_finalize_plugin target install_directory)
+function(qt_finalize_plugin target)
+ cmake_parse_arguments(arg "" "INSTALL_PATH" "" ${ARGN})
if(WIN32 AND BUILD_SHARED_LIBS)
_qt_internal_generate_win32_rc_file("${target}")
endif()
# Generate .prl files for plugins of static Qt builds.
if(NOT BUILD_SHARED_LIBS)
- qt_generate_prl_file(${target} "${install_directory}")
+ if(arg_INSTALL_PATH)
+ qt_generate_prl_file(${target} "${arg_INSTALL_PATH}")
+ endif()
endif()
endfunction()
diff --git a/cmake/QtPlugins.cmake.in b/cmake/QtPlugins.cmake.in
index 6df9541e18..3a7b8ab30d 100644
--- a/cmake/QtPlugins.cmake.in
+++ b/cmake/QtPlugins.cmake.in
@@ -19,7 +19,9 @@ function(__qt_internal_add_static_plugins_once)
foreach(_config_file ${_qt_plugin_config_files})
string(REGEX REPLACE "^.*/@INSTALL_CMAKE_NAMESPACE@(.*Plugin)Config.cmake$" "\\1" _qt_plugin "${_config_file}")
include("${_config_file}")
- list(APPEND _qt_plugins ${_qt_plugin})
+ if(TARGET "@INSTALL_CMAKE_NAMESPACE@::${_qt_plugin}")
+ list(APPEND _qt_plugins ${_qt_plugin})
+ endif()
endforeach()
set_property(TARGET ${_module_target} PROPERTY QT_PLUGINS ${_qt_plugins})
@@ -28,131 +30,29 @@ function(__qt_internal_add_static_plugins_once)
return()
endif()
- set(_default_plugins_are_enabled "$<NOT:$<STREQUAL:$<GENEX_EVAL:$<TARGET_PROPERTY:QT_DEFAULT_PLUGINS>>,0>>")
- # Make sure to boolify the result of the expression, in case if the returned property value
- # is empty.
- set(_default_plugins_are_enabled_wrapped "$<BOOL:${_default_plugins_are_enabled}>")
- set(_manual_plugins_genex "$<GENEX_EVAL:$<TARGET_PROPERTY:QT_PLUGINS>>")
- set(_no_plugins_genex "$<GENEX_EVAL:$<TARGET_PROPERTY:QT_NO_PLUGINS>>")
-
- # Plugin genex marker for prl processing.
- set(_is_plugin_marker_genex "$<BOOL:QT_IS_PLUGIN_GENEX>")
-
- # In super builds the rules below pollute the dependency rule for the
- # plugin target when it's being build, causing cyclic dependencies.
- # to overcome this, we check if the current target where this rule evaluates
- # has a QT_BUILD_PROJECT_NAME equal to the current PROJECT_NAME.
- # If so we disable the injection of plugin link rules to avoid cyclic
- # dependencies.
- if (@QT_SUPERBUILD@)
- set(_build_allow_plugin_link_rules_genex "$<NOT:$<STREQUAL:$<TARGET_PROPERTY:QT_BUILD_PROJECT_NAME>,@PROJECT_NAME@>>")
- else()
- set(_build_allow_plugin_link_rules_genex 1)
- endif()
-
- # The code in here uses the properties defined in qt_import_plugins (Qt6CoreMacros.cmake)
- foreach(target ${_qt_plugins})
- set(_plugin_target "@INSTALL_CMAKE_NAMESPACE@::${target}")
- set(_plugin_target_versionless "Qt::${target}")
- get_target_property(_classname "${_plugin_target}" QT_PLUGIN_CLASS_NAME)
- if(NOT _classname)
- message("Warning: plugin ${_plugin_target} has no class name, skipping.")
- continue()
+ foreach(plugin_target ${_qt_plugins})
+ __qt_internal_plugin_get_plugin_type("${plugin_target}" __has_plugin_type __plugin_type)
+ if(NOT __has_plugin_type)
+ continue()
endif()
- get_target_property(_plugin_type "${_plugin_target}" QT_PLUGIN_TYPE)
- if(NOT _plugin_type)
- message("Warning: plugin ${_plugin_target} has no type ('${_plugin_type}'), skipping.")
- continue()
+ __qt_internal_plugin_has_class_name("${plugin_target}" __has_class_name)
+ if(NOT __has_class_name)
+ continue()
endif()
- list(APPEND "QT_ALL_PLUGINS_FOUND_BY_FIND_PACKAGE_${_plugin_type}" "${target}")
- set("QT_ALL_PLUGINS_FOUND_BY_FIND_PACKAGE_${_plugin_type}"
- "${QT_ALL_PLUGINS_FOUND_BY_FIND_PACKAGE_${_plugin_type}}"
- PARENT_SCOPE
- )
-
- set(_plugin_is_default "$<TARGET_PROPERTY:${_plugin_target},QT_DEFAULT_PLUGIN>")
-
- # INCLUDE
- set(_plugin_is_whitelisted "$<IN_LIST:${_plugin_target},${_manual_plugins_genex}>")
- set(_plugin_versionless_is_whitelisted
- "$<IN_LIST:${_plugin_target_versionless},${_manual_plugins_genex}>")
+ list(APPEND "QT_ALL_PLUGINS_FOUND_BY_FIND_PACKAGE_${__plugin_type}" "${plugin_target}")
- # Note: qt_import_plugins sets the QT_PLUGINS_${_plugin_type} to "-"
- # when excluding it with EXCLUDE_BY_TYPE,
- # which ensures that no plug-in will be supported unless explicitly re-added afterwards.
- string(CONCAT _plugin_is_not_blacklisted
- "$<AND:"
- "$<NOT:" # EXCLUDE
- "$<IN_LIST:${_plugin_target},${_no_plugins_genex}>"
- ">,"
- "$<NOT:"
- "$<IN_LIST:${_plugin_target_versionless},${_no_plugins_genex}>"
- ">,"
- # Excludes both plugins targeted by EXCLUDE_BY_TYPE and not included in
- # INCLUDE_BY_TYPE.
- "$<STREQUAL:,$<GENEX_EVAL:$<TARGET_PROPERTY:QT_PLUGINS_${_plugin_type}>>>"
- ">"
- )
-
- # Support INCLUDE_BY_TYPE
- string(CONCAT _plugin_is_in_type_whitelist
- "$<IN_LIST:"
- "${_plugin_target},"
- "$<GENEX_EVAL:"
- "$<TARGET_PROPERTY:QT_PLUGINS_${_plugin_type}>"
- ">"
- ">"
- )
- string(CONCAT _plugin_versionless_is_in_type_whitelist
- "$<IN_LIST:"
- "${_plugin_target_versionless},"
- "$<GENEX_EVAL:"
- "$<TARGET_PROPERTY:QT_PLUGINS_${_plugin_type}>"
- ">"
- ">"
- )
-
- # Complete condition that defines whether a static plugin is linked
- string(CONCAT _plugin_condition
- "$<BOOL:$<AND:"
- "${_is_plugin_marker_genex},"
- "${_build_allow_plugin_link_rules_genex},"
- "$<OR:"
- "${_plugin_is_whitelisted},"
- "${_plugin_versionless_is_whitelisted},"
- "${_plugin_is_in_type_whitelist},"
- "${_plugin_versionless_is_in_type_whitelist},"
- "$<AND:"
- "${_default_plugins_are_enabled_wrapped},"
- "${_plugin_is_default},"
- "${_plugin_is_not_blacklisted}"
- ">"
- ">"
- ">>"
- )
-
- # If this condition is true, we link against the plug-in
- set(_plugin_genex "$<${_plugin_condition}:${_plugin_target}>")
- target_link_libraries(${_module_target} INTERFACE "${_plugin_genex}")
-
- set(_generated_qt_plugin_file_name
- "${CMAKE_CURRENT_BINARY_DIR}/qt_@QT_MODULE@_${target}.cpp")
- set(_generated_qt_plugin_file_name_template "${_generated_qt_plugin_file_name}.in")
- set(_generated_qt_plugin_file_content "#include <QtPlugin>\nQ_IMPORT_PLUGIN(${_classname})")
-
- # Generate a source file to import that plug-in. Has to be done with configure_file,
- # because file(GENERATE) and target_sources has issues with scopes.
- file(WRITE "${_generated_qt_plugin_file_name_template}"
- "${_generated_qt_plugin_file_content}")
- configure_file("${_generated_qt_plugin_file_name_template}"
- "${_generated_qt_plugin_file_name}")
-
- target_sources(${_module_target} INTERFACE
- "$<${_plugin_condition}:${_generated_qt_plugin_file_name}>")
+ __qt_internal_add_static_plugin_linkage("${plugin_target}" "${_module_target}")
+ __qt_internal_add_static_plugin_import_macro(
+ "${plugin_target}" ${_module_target} "@QT_MODULE@")
endforeach()
+ set("QT_ALL_PLUGINS_FOUND_BY_FIND_PACKAGE_${__plugin_type}"
+ "${QT_ALL_PLUGINS_FOUND_BY_FIND_PACKAGE_${__plugin_type}}"
+ PARENT_SCOPE
+ )
+
set_target_properties(${_module_target} PROPERTIES __qt_internal_plugins_added TRUE)
endfunction()
diff --git a/cmake/QtPostProcess.cmake b/cmake/QtPostProcess.cmake
index 7ee5e933e0..0cb0edf1c6 100644
--- a/cmake/QtPostProcess.cmake
+++ b/cmake/QtPostProcess.cmake
@@ -13,3 +13,4 @@ if (ANDROID)
endif()
qt_internal_install_prl_files()
+qt_internal_generate_user_facing_tools_info()
diff --git a/cmake/QtPostProcessHelpers.cmake b/cmake/QtPostProcessHelpers.cmake
index 9a36e2ada4..c8d310d93d 100644
--- a/cmake/QtPostProcessHelpers.cmake
+++ b/cmake/QtPostProcessHelpers.cmake
@@ -36,7 +36,7 @@ macro(qt_collect_third_party_deps target)
endif()
# Strip any directory scope tokens.
- qt_internal_strip_target_directory_scope_token("${dep}" dep)
+ __qt_internal_strip_target_directory_scope_token("${dep}" dep)
if(TARGET ${dep})
list(FIND third_party_deps_seen ${dep} dep_seen)
@@ -525,6 +525,11 @@ endif()\n")
"set(BUILD_WITH_PCH \"${BUILD_WITH_PCH}\" CACHE STRING \"\")\n")
endif()
+ if(DEFINED QT_IS_MACOS_UNIVERSAL)
+ string(APPEND QT_EXTRA_BUILD_INTERNALS_VARS
+ "set(QT_IS_MACOS_UNIVERSAL \"${QT_IS_MACOS_UNIVERSAL}\" CACHE BOOL \"\")\n")
+ endif()
+
if(CMAKE_CROSSCOMPILING AND QT_BUILD_TOOLS_WHEN_CROSSCOMPILING)
string(APPEND QT_EXTRA_BUILD_INTERNALS_VARS
"set(QT_BUILD_TOOLS_WHEN_CROSSCOMPILING \"TRUE\" CACHE BOOL \"\" FORCE)\n")
@@ -619,6 +624,19 @@ endif()
string(APPEND QT_EXTRA_BUILD_INTERNALS_VARS "${install_prefix_content}")
+ if(NOT BUILD_SHARED_LIBS)
+ # The top-level check needs to happen inside QtBuildInternals, because it's possible
+ # to configure a top-level build with a few repos and then configure another repo
+ # using qt-configure-module in a separate build dir, where QT_SUPERBUILD will not
+ # be set anymore.
+ string(APPEND QT_EXTRA_BUILD_INTERNALS_VARS
+ "
+if(DEFINED QT_REPO_MODULE_VERSION AND NOT DEFINED QT_REPO_DEPENDENCIES AND NOT QT_SUPERBUILD)
+ qt_internal_read_repo_dependencies(QT_REPO_DEPENDENCIES \"$\{PROJECT_SOURCE_DIR}\")
+endif()
+")
+ endif()
+
qt_compute_relative_path_from_cmake_config_dir_to_prefix()
configure_file(
"${CMAKE_CURRENT_LIST_DIR}/QtBuildInternalsExtra.cmake.in"
@@ -633,7 +651,7 @@ endfunction()
function(qt_modules_process_android_dependencies)
qt_internal_get_qt_repo_known_modules(repo_known_modules)
foreach (target ${repo_known_modules})
- qt_android_dependencies(${target})
+ qt_internal_android_dependencies(${target})
endforeach()
endfunction()
@@ -698,12 +716,38 @@ function(qt_internal_create_config_file_for_standalone_tests)
endfunction()
function(qt_internal_install_prl_files)
- # Install prl files
+ # Get locations relative to QT_BUILD_DIR from which prl files should be installed.
get_property(prl_install_dirs GLOBAL PROPERTY QT_PRL_INSTALL_DIRS)
+
+ # Clear the list of install dirs so the previous values don't pollute the list of install dirs
+ # for the next repository in a top-level build.
+ set_property(GLOBAL PROPERTY QT_PRL_INSTALL_DIRS "")
+
foreach(prl_install_dir ${prl_install_dirs})
- qt_install(DIRECTORY "${PROJECT_BINARY_DIR}/${prl_install_dir}/"
+ qt_install(DIRECTORY "${QT_BUILD_DIR}/${prl_install_dir}/"
DESTINATION ${prl_install_dir}
FILES_MATCHING PATTERN "*.prl"
)
endforeach()
endfunction()
+
+function(qt_internal_generate_user_facing_tools_info)
+ if("${INSTALL_PUBLICBINDIR}" STREQUAL "")
+ return()
+ endif()
+ get_property(user_facing_tool_targets GLOBAL PROPERTY QT_USER_FACING_TOOL_TARGETS)
+ set(lines "")
+ foreach(target ${user_facing_tool_targets})
+ get_target_property(filename ${target} OUTPUT_NAME)
+ if(NOT filename)
+ set(filename ${target})
+ endif()
+ qt_path_join(tool_target_path "${CMAKE_INSTALL_PREFIX}" "${INSTALL_BINDIR}" "${filename}")
+ qt_path_join(tool_link_path "${INSTALL_PUBLICBINDIR}" "${filename}${PROJECT_VERSION_MAJOR}")
+ list(APPEND lines "${tool_target_path} ${tool_link_path}")
+ endforeach()
+ string(REPLACE ";" "\n" content "${lines}")
+ string(APPEND content "\n")
+ set(out_file "${PROJECT_BINARY_DIR}/user_facing_tool_links.txt")
+ file(WRITE "${out_file}" "${content}")
+endfunction()
diff --git a/cmake/QtPriHelpers.cmake b/cmake/QtPriHelpers.cmake
index 47be8a6194..36f455bfa1 100644
--- a/cmake/QtPriHelpers.cmake
+++ b/cmake/QtPriHelpers.cmake
@@ -454,7 +454,7 @@ function(qt_generate_plugin_pri_file target pri_file_var)
get_target_property(plugin_class_name ${target} QT_PLUGIN_CLASS_NAME)
set(plugin_extends "")
- if(NOT default_plugin AND (plugin_type STREQUAL "generic" OR plugin_type STREQUAL "platforms"))
+ if(NOT default_plugin)
set(plugin_extends "-")
endif()
@@ -563,7 +563,6 @@ QT_PATCH_VERSION = ${PROJECT_VERSION_PATCH}
list(APPEND extra_statements "QT_LIBINFIX = ${QT_LIBINFIX}")
endif()
- # TODO: Add QT_EMCC_VERSION when WASM is ported over.
if(APPLECLANG)
set(compiler_version_major_var_name "QT_APPLE_CLANG_MAJOR_VERSION")
set(compiler_version_minor_var_name "QT_APPLE_CLANG_MINOR_VERSION")
@@ -603,6 +602,10 @@ QT_PATCH_VERSION = ${PROJECT_VERSION_PATCH}
list(APPEND extra_statements "QT_EDITION = Open Source")
+ if(WASM)
+ list(APPEND extra_statements
+ "QT_EMCC_VERSION = ${EMCC_VERSION}")
+ endif()
if(extra_statements)
string(REPLACE ";" "\n" extra_statements "${extra_statements}")
string(APPEND content "\n${extra_statements}\n")
diff --git a/cmake/QtPrlHelpers.cmake b/cmake/QtPrlHelpers.cmake
index 0c0b7a2aec..86555dbb65 100644
--- a/cmake/QtPrlHelpers.cmake
+++ b/cmake/QtPrlHelpers.cmake
@@ -1,247 +1,15 @@
-# Add libraries to variable ${out_libs_var} in a way that duplicates
-# are added at the end. This ensures the library order needed for the
-# linker.
-function(qt_merge_libs out_libs_var)
- foreach(dep ${ARGN})
- list(REMOVE_ITEM ${out_libs_var} ${dep})
- list(APPEND ${out_libs_var} ${dep})
- endforeach()
- set(${out_libs_var} ${${out_libs_var}} PARENT_SCOPE)
-endfunction()
-
# Collects the library dependencies of a target.
# As well as rcc object file dependencies.
# This takes into account transitive usage requirements.
function(qt_collect_libs target libs_out_var rcc_objects_out_var)
- qt_internal_walk_libs("${target}" "${libs_out_var}"
- "${rcc_objects_out_var}" "qt_collect_libs_dict" "collect_libs")
+ __qt_internal_walk_libs("${target}" "${libs_out_var}"
+ "${rcc_objects_out_var}" "qt_collect_libs_dict" "collect_libs")
set("${libs_out_var}" "${${libs_out_var}}" PARENT_SCOPE)
set(${rcc_objects_out_var} "${${rcc_objects_out_var}}" PARENT_SCOPE)
endfunction()
-# Extracts value from per-target dict key and assigns it to out_var.
-# Assumes dict_name to be an existing INTERFACE target.
-function(qt_internal_get_dict_key_values out_var target_infix dict_name dict_key)
- get_target_property(values "${dict_name}" "INTERFACE_${target_infix}_${dict_key}")
- set(${out_var} "${values}" PARENT_SCOPE)
-endfunction()
-
-# Assigns 'values' to per-target dict key, including for aliases of the target.
-# Assumes dict_name to be an existing INTERFACE target.
-function(qt_internal_memoize_values_in_dict target dict_name dict_key values)
- # Memoize the computed values for the target as well as its aliases.
- #
- # Aka assigns the contents of ${values} to INTERFACE_Core, INTERFACE_Qt::Core,
- # INTERFACE_Qt6::Core.
- #
- # Yes, i know it's crazy that target names are legal property names.
- #
- # Assigning for library aliases is needed to avoid multiple recomputation of values.
- # Scenario in the context of qt_internal_walk_libs:
- # 'values' are computed for Core target and memoized to INTERFACE_Core.
- # When processing Gui, it depends on Qt::Core, but there are no values for INTERFACE_Qt::Core.
- set_target_properties(${dict_name} PROPERTIES INTERFACE_${target}_${dict_key} "${values}")
-
- get_target_property(versionless_alias "${target}" "_qt_versionless_alias")
- if(versionless_alias)
- qt_internal_get_dict_key_values(
- versionless_values "${versionless_alias}" "${dict_name}" "${dict_key}")
- if(versionless_values MATCHES "-NOTFOUND$")
- set_target_properties(${dict_name}
- PROPERTIES INTERFACE_${versionless_alias}_${dict_key} "${values}")
- endif()
- endif()
-
- get_target_property(versionfull_alias "${target}" "_qt_versionfull_alias")
- if(versionfull_alias)
- qt_internal_get_dict_key_values(
- versionfull_values "${versionfull_alias}" "${dict_name}" "${dict_key}")
- if(versionfull_values MATCHES "-NOTFOUND$")
- set_target_properties(${dict_name}
- PROPERTIES INTERFACE_${versionfull_alias}_${dict_key} "${values}")
- endif()
- endif()
-endfunction()
-
-# Walks a target's link libraries recursively, and performs some actions (poor man's polypmorphism)
-#
-# out_var is the name of the variable where the result will be assigned. The result is a list of
-# libraries, mostly in generator expression form.
-# rcc_objects_out_var is the name of the variable where the collected rcc object files will be
-# assigned (for the initial target and its dependencies)
-# dict_name is used for caching the results, and preventing the same target from being processed
-# twice
-# operation is a string to tell the function what additional behaviors to execute.
-function(qt_internal_walk_libs
- target out_var rcc_objects_out_var dict_name operation)
- set(collected ${ARGN})
- if(target IN_LIST collected)
- return()
- endif()
- list(APPEND collected ${target})
-
- if(target STREQUAL "${QT_CMAKE_EXPORT_NAMESPACE}::EntryPoint")
- # We can't (and don't need to) process EntryPoint because it brings in $<TARGET_PROPERTY:prop>
- # genexes which get replaced with $<TARGET_PROPERTY:EntryPoint,prop> genexes in the code below
- # and that causes 'INTERFACE_LIBRARY targets may only have whitelisted properties.' errors
- # with CMake versions equal to or lower than 3.18. These errors are super unintuitive to
- # debug because there's no mention that it's happening during a file(GENERATE) call.
- return()
- endif()
-
- if(NOT TARGET ${dict_name})
- add_library(${dict_name} INTERFACE IMPORTED GLOBAL)
- endif()
- qt_internal_get_dict_key_values(libs "${target}" "${dict_name}" "libs")
- qt_internal_get_dict_key_values(rcc_objects "${target}" "${dict_name}" "rcc_objects")
-
- if(libs MATCHES "-NOTFOUND$")
- unset(libs)
- unset(rcc_objects)
- get_target_property(target_libs ${target} INTERFACE_LINK_LIBRARIES)
- if(NOT target_libs)
- unset(target_libs)
- endif()
- get_target_property(target_type ${target} TYPE)
- if(target_type STREQUAL "STATIC_LIBRARY")
- get_target_property(link_libs ${target} LINK_LIBRARIES)
- if(link_libs)
- list(APPEND target_libs ${link_libs})
- endif()
- endif()
-
- # Need to record the rcc object file info not only for dependencies, but also for
- # the current target too. Otherwise the saved information is incomplete for prl static
- # build purposes.
- get_target_property(main_target_rcc_objects ${target} _qt_rcc_objects)
- if(main_target_rcc_objects)
- qt_merge_libs(rcc_objects ${main_target_rcc_objects})
- endif()
-
- foreach(lib ${target_libs})
- # Cannot use $<TARGET_POLICY:...> in add_custom_command.
- # Check the policy now, and replace the generator expression with the value.
- while(lib MATCHES "\\$<TARGET_POLICY:([^>]+)>")
- cmake_policy(GET ${CMAKE_MATCH_1} value)
- if(value STREQUAL "NEW")
- set(value "TRUE")
- else()
- set(value "FALSE")
- endif()
- string(REPLACE "${CMAKE_MATCH_0}" "${value}" lib "${lib}")
- endwhile()
-
- # Fix up $<TARGET_PROPERTY:FOO> expressions that refer to the "current" target.
- # Those cannot be used with add_custom_command.
- while(lib MATCHES "\\$<TARGET_PROPERTY:([^,>]+)>")
- string(REPLACE "${CMAKE_MATCH_0}" "$<TARGET_PROPERTY:${target},${CMAKE_MATCH_1}>"
- lib "${lib}")
- endwhile()
-
- # Skip static plugins.
- set(_is_plugin_marker_genex "\\$<BOOL:QT_IS_PLUGIN_GENEX>")
- if(lib MATCHES "${_is_plugin_marker_genex}")
- continue()
- endif()
-
- # Strip any directory scope tokens.
- qt_internal_strip_target_directory_scope_token("${lib}" lib)
-
- if(lib MATCHES "^\\$<TARGET_OBJECTS:")
- # Skip object files.
- continue()
- elseif(lib MATCHES "^\\$<LINK_ONLY:(.*)>$")
- set(lib_target ${CMAKE_MATCH_1})
- else()
- set(lib_target ${lib})
- endif()
-
- # Skip CMAKE_DIRECTORY_ID_SEP. If a target_link_libraries is applied to a target
- # that was defined in a different scope, CMake appends and prepends a special directory
- # id separator. Filter those out.
- if(lib_target MATCHES "^::@")
- continue()
- elseif(TARGET ${lib_target})
- if ("${lib_target}" MATCHES "^Qt::(.*)")
- # If both, Qt::Foo and Foo targets exist, prefer the target name without
- # namespace. Which one is preferred doesn't really matter. This code exists to
- # avoid ending up with both, Qt::Foo and Foo in our dependencies.
- set(namespaceless_lib_target "${CMAKE_MATCH_1}")
- if(TARGET namespaceless_lib_target)
- set(lib_target ${namespaceless_lib_target})
- endif()
- endif()
- get_target_property(lib_target_type ${lib_target} TYPE)
- if(lib_target_type STREQUAL "INTERFACE_LIBRARY")
- qt_internal_walk_libs(
- ${lib_target}
- lib_libs_${target}
- lib_rcc_objects_${target}
- "${dict_name}" "${operation}" ${collected})
- if(lib_libs_${target})
- qt_merge_libs(libs ${lib_libs_${target}})
- set(is_module 0)
- endif()
- if(lib_rcc_objects_${target})
- qt_merge_libs(rcc_objects ${lib_rcc_objects_${target}})
- endif()
- else()
- qt_merge_libs(libs "$<TARGET_LINKER_FILE:${lib_target}>")
-
- get_target_property(target_rcc_objects "${lib_target}" _qt_rcc_objects)
- if(target_rcc_objects)
- qt_merge_libs(rcc_objects ${target_rcc_objects})
- endif()
-
- qt_internal_walk_libs(
- ${lib_target}
- lib_libs_${target}
- lib_rcc_objects_${target}
- "${dict_name}" "${operation}" ${collected})
- if(lib_libs_${target})
- qt_merge_libs(libs ${lib_libs_${target}})
- endif()
- if(lib_rcc_objects_${target})
- qt_merge_libs(rcc_objects ${lib_rcc_objects_${target}})
- endif()
- endif()
- if(operation STREQUAL "promote_global")
- set(lib_target_unaliased "${lib_target}")
- get_target_property(aliased_target ${lib_target} ALIASED_TARGET)
- if(aliased_target)
- set(lib_target_unaliased ${aliased_target})
- endif()
-
- get_property(is_imported TARGET ${lib_target_unaliased} PROPERTY IMPORTED)
- get_property(is_global TARGET ${lib_target_unaliased} PROPERTY IMPORTED_GLOBAL)
-
- # Allow opting out of promotion. This is useful in certain corner cases
- # like with WrapLibClang and Threads in qttools.
- qt_internal_should_not_promote_package_target_to_global(
- "${lib_target_unaliased}" should_not_promote)
- if(NOT is_global AND is_imported AND NOT should_not_promote)
- set_property(TARGET ${lib_target_unaliased} PROPERTY IMPORTED_GLOBAL TRUE)
- endif()
- endif()
- else()
- set(final_lib_name_to_merge "${lib_target}")
- if(lib_target MATCHES "/([^/]+).framework$")
- set(final_lib_name_to_merge "-framework ${CMAKE_MATCH_1}")
- endif()
- qt_merge_libs(libs "${final_lib_name_to_merge}")
- endif()
- endforeach()
- qt_internal_memoize_values_in_dict("${target}" "${dict_name}" "libs" "${libs}")
- qt_internal_memoize_values_in_dict("${target}" "${dict_name}"
- "rcc_objects" "${rcc_objects}")
-
- endif()
- set(${out_var} ${libs} PARENT_SCOPE)
- set(${rcc_objects_out_var} ${rcc_objects} PARENT_SCOPE)
-endfunction()
-
# Generate a qmake .prl file for the given target.
# The install_dir argument is a relative path, for example "lib".
function(qt_generate_prl_file target install_dir)
@@ -326,7 +94,11 @@ function(qt_generate_prl_file target install_dir)
"${prl_meta_info_name_prefix}$<CONFIG>${prl_meta_info_name_suffix}")
# The final prl file name that will be embedded in the file above.
- set(final_prl_file_name "${prefix_for_final_prl_name}$<TARGET_FILE_BASE_NAME:${target}>.prl")
+ set(final_prl_file_name "${prefix_for_final_prl_name}$<TARGET_FILE_BASE_NAME:${target}>")
+ if(ANDROID)
+ string(APPEND final_prl_file_name "_${CMAKE_ANDROID_ARCH_ABI}")
+ endif()
+ string(APPEND final_prl_file_name ".prl")
qt_path_join(final_prl_file_path "${QT_BUILD_DIR}/${install_dir}" "${final_prl_file_name}")
# Generate the prl content and its final file name into configuration specific files
diff --git a/cmake/QtProcessConfigureArgs.cmake b/cmake/QtProcessConfigureArgs.cmake
index 07ac50e000..24e8c64dc6 100644
--- a/cmake/QtProcessConfigureArgs.cmake
+++ b/cmake/QtProcessConfigureArgs.cmake
@@ -28,8 +28,10 @@ endmacro()
if("${MODULE_ROOT}" STREQUAL "")
# If MODULE_ROOT is not set, assume that we want to build qtbase or top-level.
get_filename_component(MODULE_ROOT ".." ABSOLUTE BASE_DIR "${CMAKE_CURRENT_LIST_DIR}")
+ set(qtbase_or_top_level_build TRUE)
else()
file(TO_CMAKE_PATH "${MODULE_ROOT}" MODULE_ROOT)
+ set(qtbase_or_top_level_build FALSE)
endif()
set(configure_filename "configure.cmake")
set(commandline_filename "qt_cmdline.cmake")
@@ -43,19 +45,25 @@ else()
set(commandline_files "${MODULE_ROOT}/${commandline_filename}")
endif()
file(STRINGS "${OPTFILE}" configure_args)
+
+# list(TRANSFORM ...) unexpectedly removes semicolon escaping in list items. So the list arguments
+# seem to be broken. The 'bracket argument' suppresses this behavior. Right before forwarding
+# command line arguments to the cmake call, 'bracket arguments' are replaced by escaped semicolons
+# back.
+list(TRANSFORM configure_args REPLACE ";" "[[;]]")
+
list(FILTER configure_args EXCLUDE REGEX "^[ \t]*$")
list(TRANSFORM configure_args STRIP)
list(TRANSFORM configure_args REPLACE "\\\\" "\\\\\\\\")
unset(generator)
-set(auto_detect_generator TRUE)
set(auto_detect_compiler TRUE)
+set(auto_detect_generator ${qtbase_or_top_level_build})
unset(device_options)
+unset(options_json_file)
set_property(GLOBAL PROPERTY UNHANDLED_ARGS "")
while(NOT "${configure_args}" STREQUAL "")
list(POP_FRONT configure_args arg)
- if(arg STREQUAL "-cmake")
- # ignore
- elseif(arg STREQUAL "-cmake-generator")
+ if(arg STREQUAL "-cmake-generator")
list(POP_FRONT configure_args generator)
elseif(arg STREQUAL "-cmake-use-default-generator")
set(auto_detect_generator FALSE)
@@ -63,6 +71,8 @@ while(NOT "${configure_args}" STREQUAL "")
set(auto_detect_compiler FALSE)
elseif(arg STREQUAL "-list-features")
set(list_features TRUE)
+ elseif(arg STREQUAL "-write-options-for-conan")
+ list(POP_FRONT configure_args options_json_file)
elseif(arg STREQUAL "-skip")
list(POP_FRONT configure_args qtrepo)
push("-DBUILD_${qtrepo}=OFF")
@@ -81,11 +91,19 @@ while(NOT "${configure_args}" STREQUAL "")
string(APPEND path "/mkspecs")
endif()
push("-DINSTALL_MKSPECSDIR=${path}")
+ elseif(arg STREQUAL "-developer-build")
+ set(developer_build TRUE)
+ # Treat this argument as "unhandled" to process it further.
+ set_property(GLOBAL APPEND PROPERTY UNHANDLED_ARGS "${arg}")
+ elseif(arg STREQUAL "-cmake-file-api")
+ set(cmake_file_api TRUE)
+ elseif(arg STREQUAL "-no-cmake-file-api")
+ set(cmake_file_api FALSE)
elseif(arg MATCHES "^-host.*dir")
message(FATAL_ERROR "${arg} is not supported anymore.")
elseif(arg STREQUAL "--")
# Everything after this argument will be passed to CMake verbatim.
- push(${configure_args})
+ list(APPEND cmake_args "${configure_args}")
break()
else()
set_property(GLOBAL APPEND PROPERTY UNHANDLED_ARGS "${arg}")
@@ -109,6 +127,11 @@ function(qt_feature feature)
set_property(GLOBAL PROPERTY COMMANDLINE_FEATURE_SECTION_${feature} "${arg_SECTION}")
endfunction()
+function(find_package)
+ message(FATAL_ERROR "find_package must not be used directly in configure.cmake. "
+ "Use qt_find_package or guard the call with an if(NOT QT_CONFIGURE_RUNNING) block.")
+endfunction()
+
macro(defstub name)
function(${name})
endfunction()
@@ -133,12 +156,14 @@ defstub(qt_feature_definition)
defstub(qt_find_package)
defstub(set_package_properties)
defstub(qt_qml_find_python)
+defstub(qt_set01)
####################################################################################################
# Define functions/macros that are called in qt_cmdline.cmake files
####################################################################################################
+unset(commandline_known_options)
unset(commandline_custom_handlers)
set(commandline_nr_of_prefixes 0)
set(commandline_nr_of_assignments 0)
@@ -157,6 +182,7 @@ function(qt_commandline_option name)
set(multiValueArgs VALUES MAPPING)
cmake_parse_arguments(arg "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN})
+ set(commandline_known_options "${commandline_known_options};${name}" PARENT_SCOPE)
set(commandline_option_${name} "${arg_TYPE}" PARENT_SCOPE)
if(NOT "${arg_NAME}" STREQUAL "")
set(commandline_option_${name}_variable "${arg_NAME}" PARENT_SCOPE)
@@ -185,6 +211,10 @@ function(qt_commandline_assignment var internal_var)
set(commandline_nr_of_assignments ${n} PARENT_SCOPE)
endfunction()
+# Check the following variable in configure.cmake files to guard code that is not covered by the
+# stub functions above.
+set(QT_CONFIGURE_RUNNING ON)
+
####################################################################################################
# Load qt_cmdline.cmake files
@@ -437,6 +467,76 @@ if(list_features)
return()
endif()
+function(write_options_json_file)
+ if(qtbase_or_top_level_build)
+ # Add options that are handled directly by this script.
+ qt_commandline_option(qt-host-path TYPE string)
+ qt_commandline_option(no-guess-compiler TYPE void)
+ endif()
+
+ set(indent " ")
+ set(content
+ "{"
+ "${indent}\"options\": {")
+ string(APPEND indent " ")
+ list(LENGTH commandline_known_options commandline_known_options_length)
+ set(i 1)
+ foreach(opt ${commandline_known_options})
+ list(APPEND content "${indent}\"${opt}\": {")
+ string(APPEND indent " ")
+ list(APPEND content "${indent}\"type\": \"${commandline_option_${opt}}\",")
+ if(NOT "${commandline_option_${opt}_values}" STREQUAL "")
+ set(values "${commandline_option_${opt}_values}")
+ list(TRANSFORM values PREPEND "\"")
+ list(TRANSFORM values APPEND "\"")
+ list(JOIN values ", " values)
+ list(APPEND content "${indent}\"values\": [${values}]")
+ elseif(NOT "${commandline_option_${opt}_mapping}" STREQUAL "")
+ list(LENGTH commandline_option_${opt}_mapping last)
+ math(EXPR last "${last} - 1")
+ set(values "")
+ list(APPEND content "${indent}\"values\": [")
+ foreach(k RANGE 0 "${last}" 2)
+ list(GET commandline_option_${opt}_mapping ${k} value)
+ list(APPEND values ${value})
+ endforeach()
+ list(TRANSFORM values PREPEND "\"")
+ list(TRANSFORM values APPEND "\"")
+ list(JOIN values ", " values)
+ list(APPEND content
+ "${indent} ${values}"
+ "${indent}]")
+ else()
+ list(APPEND content "${indent}\"values\": []")
+ endif()
+ string(SUBSTRING "${indent}" 4 -1 indent)
+ math(EXPR i "${i} + 1")
+ if(i LESS commandline_known_options_length)
+ list(APPEND content "${indent}},")
+ else()
+ list(APPEND content "${indent}}")
+ endif()
+ endforeach()
+ string(SUBSTRING "${indent}" 4 -1 indent)
+
+ set(features ${commandline_known_features})
+ list(TRANSFORM features PREPEND "\"")
+ list(TRANSFORM features APPEND "\"")
+ list(JOIN features ", " features)
+
+ list(APPEND content
+ "${indent}},"
+ "${indent}\"features\": [${features}]"
+ "}")
+ string(REPLACE ";" "\n" content "${content}")
+ file(WRITE "${options_json_file}" "${content}")
+endfunction()
+
+if(options_json_file)
+ write_options_json_file()
+ return()
+endif()
+
while(1)
qtConfHasNextCommandlineArg(has_next)
if(NOT has_next)
@@ -581,7 +681,7 @@ endmacro()
macro(translate_list_input name cmake_var)
if(DEFINED INPUT_${name})
- list(JOIN INPUT_${name} "\\;" value)
+ list(JOIN INPUT_${name} "[[;]]" value)
list(APPEND cmake_args "-D${cmake_var}=${value}")
drop_input(${name})
endif()
@@ -647,7 +747,7 @@ function(check_qt_build_parts type)
set(buildFlag "FALSE")
endif()
- list(APPEND knownParts "tests" "examples" "benchmarks")
+ list(APPEND knownParts "tests" "examples" "benchmarks" "manual-tests" "minimal-static-tests")
foreach(part ${${input}})
if(part IN_LIST knownParts)
@@ -748,7 +848,7 @@ if(nr_of_build_configs EQUAL 1)
push("-DCMAKE_BUILD_TYPE=${build_configs}")
elseif(nr_of_build_configs GREATER 1)
set(multi_config ON)
- string(REPLACE ";" "\\;" escaped_build_configs "${build_configs}")
+ string(REPLACE ";" "[[;]]" escaped_build_configs "${build_configs}")
# We must not use the push macro here to avoid variable expansion.
# That would destroy our escaping.
list(APPEND cmake_args "-DCMAKE_CONFIGURATION_TYPES=${escaped_build_configs}")
@@ -771,6 +871,12 @@ translate_list_input(includes QT_EXTRA_INCLUDEPATHS)
translate_list_input(lpaths QT_EXTRA_LIBDIRS)
translate_list_input(rpaths QT_EXTRA_RPATHS)
+if(cmake_file_api OR (developer_build AND NOT DEFINED cmake_file_api))
+ foreach(file cache-v2 cmakeFiles-v1 codemodel-v2 toolchains-v1)
+ file(WRITE "${CMAKE_BINARY_DIR}/.cmake/api/v1/query/${file}" "")
+ endforeach()
+endif()
+
foreach(input ${config_inputs})
qt_feature_normalize_name("${input}" cmake_input)
push("-DINPUT_${cmake_input}=${INPUT_${input}}")
@@ -816,6 +922,9 @@ endif()
push("${MODULE_ROOT}")
+# Restore the escaped semicolons in arguments that are lists
+list(TRANSFORM cmake_args REPLACE "\\[\\[;\\]\\]" "\\\\;")
+
execute_process(COMMAND "${CMAKE_COMMAND}" ${cmake_args}
COMMAND_ECHO STDOUT
RESULT_VARIABLE exit_code)
diff --git a/cmake/QtPublicPluginHelpers.cmake b/cmake/QtPublicPluginHelpers.cmake
new file mode 100644
index 0000000000..889e764d40
--- /dev/null
+++ b/cmake/QtPublicPluginHelpers.cmake
@@ -0,0 +1,156 @@
+function(__qt_internal_plugin_get_plugin_type
+ plugin_target
+ out_var_has_plugin_type
+ out_var_plugin_type)
+ set(has_plugin_type TRUE)
+
+ set(plugin_target_versioned "${QT_CMAKE_EXPORT_NAMESPACE}::${plugin_target}")
+
+ get_target_property(_plugin_type "${plugin_target_versioned}" QT_PLUGIN_TYPE)
+ if(NOT _plugin_type)
+ message("Warning: plugin ${plugin_target_versioned} has no plugin type set, skipping.")
+ set(has_plugin_type FALSE)
+ else()
+ set(${out_var_plugin_type} "${_plugin_type}" PARENT_SCOPE)
+ endif()
+
+ set(${out_var_has_plugin_type} "${has_plugin_type}" PARENT_SCOPE)
+endfunction()
+
+function(__qt_internal_plugin_has_class_name plugin_target out_var)
+
+ set(plugin_target_versioned "${QT_CMAKE_EXPORT_NAMESPACE}::${plugin_target}")
+
+ get_target_property(classname "${plugin_target_versioned}" QT_PLUGIN_CLASS_NAME)
+ if(NOT classname)
+ message("Warning: plugin ${plugin_target_versioned} has no class name, skipping.")
+ endif()
+
+ # If unset, it will be -NOTFOUND and still evaluate to false.
+ set(${out_var} "${classname}" PARENT_SCOPE)
+endfunction()
+
+function(__qt_internal_get_static_plugin_condition_genex
+ plugin_target_unprefixed
+ out_var)
+
+ set(plugin_target "${QT_CMAKE_EXPORT_NAMESPACE}::${plugin_target_unprefixed}")
+ set(plugin_target_versionless "Qt::${plugin_target_unprefixed}")
+
+ get_target_property(_plugin_type "${plugin_target}" QT_PLUGIN_TYPE)
+
+ set(_default_plugins_are_enabled
+ "$<NOT:$<STREQUAL:$<GENEX_EVAL:$<TARGET_PROPERTY:QT_DEFAULT_PLUGINS>>,0>>")
+ set(_manual_plugins_genex "$<GENEX_EVAL:$<TARGET_PROPERTY:QT_PLUGINS>>")
+ set(_no_plugins_genex "$<GENEX_EVAL:$<TARGET_PROPERTY:QT_NO_PLUGINS>>")
+
+ # Plugin genex marker for prl processing.
+ set(_is_plugin_marker_genex "$<BOOL:QT_IS_PLUGIN_GENEX>")
+
+ # The code in here uses the properties defined in qt_import_plugins (Qt6CoreMacros.cmake)
+ set(_plugin_is_default "$<TARGET_PROPERTY:${plugin_target},QT_DEFAULT_PLUGIN>")
+
+ # INCLUDE
+ set(_plugin_is_whitelisted "$<IN_LIST:${plugin_target},${_manual_plugins_genex}>")
+ set(_plugin_versionless_is_whitelisted
+ "$<IN_LIST:${plugin_target_versionless},${_manual_plugins_genex}>")
+
+ # Note: qt_import_plugins sets the QT_PLUGINS_${_plugin_type} to "-"
+ # when excluding it with EXCLUDE_BY_TYPE,
+ # which ensures that no plug-in will be supported unless explicitly re-added afterwards.
+ string(CONCAT _plugin_is_not_blacklisted
+ "$<AND:"
+ "$<NOT:" # EXCLUDE
+ "$<IN_LIST:${plugin_target},${_no_plugins_genex}>"
+ ">,"
+ "$<NOT:"
+ "$<IN_LIST:${plugin_target_versionless},${_no_plugins_genex}>"
+ ">,"
+ # Excludes both plugins targeted by EXCLUDE_BY_TYPE and not included in
+ # INCLUDE_BY_TYPE.
+ "$<STREQUAL:,$<GENEX_EVAL:$<TARGET_PROPERTY:QT_PLUGINS_${_plugin_type}>>>"
+ ">"
+ )
+
+ # Support INCLUDE_BY_TYPE
+ string(CONCAT _plugin_is_in_type_whitelist
+ "$<IN_LIST:"
+ "${plugin_target},"
+ "$<GENEX_EVAL:"
+ "$<TARGET_PROPERTY:QT_PLUGINS_${_plugin_type}>"
+ ">"
+ ">"
+ )
+ string(CONCAT _plugin_versionless_is_in_type_whitelist
+ "$<IN_LIST:"
+ "${plugin_target_versionless},"
+ "$<GENEX_EVAL:"
+ "$<TARGET_PROPERTY:QT_PLUGINS_${_plugin_type}>"
+ ">"
+ ">"
+ )
+
+ # Complete condition that defines whether a static plugin is linked
+ string(CONCAT _plugin_condition
+ "$<BOOL:$<AND:"
+ "${_is_plugin_marker_genex},"
+ "$<OR:"
+ "${_plugin_is_whitelisted},"
+ "${_plugin_versionless_is_whitelisted},"
+ "${_plugin_is_in_type_whitelist},"
+ "${_plugin_versionless_is_in_type_whitelist},"
+ "$<AND:"
+ "${_default_plugins_are_enabled},"
+ "${_plugin_is_default},"
+ "${_plugin_is_not_blacklisted}"
+ ">"
+ ">"
+ ">>"
+ )
+
+ set(${out_var} "${_plugin_condition}" PARENT_SCOPE)
+endfunction()
+
+function(__qt_internal_add_static_plugin_linkage plugin_target qt_module_target)
+ __qt_internal_get_static_plugin_condition_genex("${plugin_target}" plugin_condition)
+
+ set(plugin_target "${QT_CMAKE_EXPORT_NAMESPACE}::${plugin_target}")
+
+ # If this condition is true, we link against the plug-in
+ set(plugin_genex "$<${plugin_condition}:${plugin_target}>")
+ target_link_libraries(${qt_module_target} INTERFACE "${plugin_genex}")
+endfunction()
+
+function(__qt_internal_add_static_plugin_import_macro
+ plugin_target
+ qt_module_target
+ qt_module_unprefixed)
+ set(_generated_qt_plugin_file_name
+ "${CMAKE_CURRENT_BINARY_DIR}/.qt_plugins/qt_${qt_module_unprefixed}_${plugin_target}.cpp")
+
+ set(plugin_target_versioned "${QT_CMAKE_EXPORT_NAMESPACE}::${plugin_target}")
+ get_target_property(class_name "${plugin_target_versioned}" QT_PLUGIN_CLASS_NAME)
+
+ set(_generated_qt_plugin_file_content "#include <QtPlugin>\nQ_IMPORT_PLUGIN(${class_name})")
+
+ # Generate a source file to import that plug-in. Be careful not to
+ # update the timestamp of the generated file if we are not going to
+ # change anything. Otherwise we will trigger CMake's autogen to re-run
+ # and executables will then need to at least relink.
+ set(need_write TRUE)
+ if(EXISTS ${_generated_qt_plugin_file_name})
+ file(READ ${_generated_qt_plugin_file_name} old_contents)
+ if(old_contents STREQUAL "${_generated_qt_plugin_file_content}")
+ set(need_write FALSE)
+ endif()
+ endif()
+ if(need_write)
+ file(WRITE "${_generated_qt_plugin_file_name}"
+ "${_generated_qt_plugin_file_content}")
+ endif()
+
+ __qt_internal_get_static_plugin_condition_genex("${plugin_target}" plugin_condition)
+
+ target_sources(${qt_module_target} INTERFACE
+ "$<${plugin_condition}:${_generated_qt_plugin_file_name}>")
+endfunction()
diff --git a/cmake/QtPublicTargetHelpers.cmake b/cmake/QtPublicTargetHelpers.cmake
new file mode 100644
index 0000000000..9ce8cbf700
--- /dev/null
+++ b/cmake/QtPublicTargetHelpers.cmake
@@ -0,0 +1,16 @@
+function(__qt_internal_strip_target_directory_scope_token target out_var)
+ # In CMake versions earlier than CMake 3.18, a subdirectory scope id is appended to the
+ # target name if the target is referenced in a target_link_libraries command from a
+ # different directory scope than where the target was created.
+ # Strip it.
+ #
+ # For informational purposes, in CMake 3.18, the target name looks as follows:
+ # ::@(0x5604cb3f6b50);Threads::Threads;::@
+ # This case doesn't have to be stripped (at least for now), because when we iterate over
+ # link libraries, the tokens appear as separate target names.
+ #
+ # Example: Threads::Threads::@<0x5604cb3f6b50>
+ # Output: Threads::Threads
+ string(REGEX REPLACE "::@<.+>$" "" target "${target}")
+ set("${out_var}" "${target}" PARENT_SCOPE)
+endfunction()
diff --git a/cmake/QtPublicWalkLibsHelpers.cmake b/cmake/QtPublicWalkLibsHelpers.cmake
new file mode 100644
index 0000000000..038d5d0625
--- /dev/null
+++ b/cmake/QtPublicWalkLibsHelpers.cmake
@@ -0,0 +1,293 @@
+# Add libraries to variable ${out_libs_var} in a way that duplicates
+# are added at the end. This ensures the library order needed for the
+# linker.
+function(__qt_internal_merge_libs out_libs_var)
+ foreach(dep ${ARGN})
+ list(REMOVE_ITEM ${out_libs_var} ${dep})
+ list(APPEND ${out_libs_var} ${dep})
+ endforeach()
+ set(${out_libs_var} ${${out_libs_var}} PARENT_SCOPE)
+endfunction()
+
+
+# Extracts value from per-target dict key and assigns it to out_var.
+# Assumes dict_name to be an existing INTERFACE target.
+function(__qt_internal_get_dict_key_values out_var target_infix dict_name dict_key)
+ get_target_property(values "${dict_name}" "INTERFACE_${target_infix}_${dict_key}")
+ set(${out_var} "${values}" PARENT_SCOPE)
+endfunction()
+
+
+# Assigns 'values' to per-target dict key, including for aliases of the target.
+# Assumes dict_name to be an existing INTERFACE target.
+function(__qt_internal_memoize_values_in_dict target dict_name dict_key values)
+ # Memoize the computed values for the target as well as its aliases.
+ #
+ # Aka assigns the contents of ${values} to INTERFACE_Core, INTERFACE_Qt::Core,
+ # INTERFACE_Qt6::Core.
+ #
+ # Yes, i know it's crazy that target names are legal property names.
+ #
+ # Assigning for library aliases is needed to avoid multiple recomputation of values.
+ # Scenario in the context of __qt_internal_walk_libs:
+ # 'values' are computed for Core target and memoized to INTERFACE_Core.
+ # When processing Gui, it depends on Qt::Core, but there are no values for INTERFACE_Qt::Core.
+ set_target_properties(${dict_name} PROPERTIES INTERFACE_${target}_${dict_key} "${values}")
+
+ get_target_property(versionless_alias "${target}" "_qt_versionless_alias")
+ if(versionless_alias)
+ __qt_internal_get_dict_key_values(
+ versionless_values "${versionless_alias}" "${dict_name}" "${dict_key}")
+ if(versionless_values MATCHES "-NOTFOUND$")
+ set_target_properties(${dict_name}
+ PROPERTIES INTERFACE_${versionless_alias}_${dict_key} "${values}")
+ endif()
+ endif()
+
+ get_target_property(versionfull_alias "${target}" "_qt_versionfull_alias")
+ if(versionfull_alias)
+ __qt_internal_get_dict_key_values(
+ versionfull_values "${versionfull_alias}" "${dict_name}" "${dict_key}")
+ if(versionfull_values MATCHES "-NOTFOUND$")
+ set_target_properties(${dict_name}
+ PROPERTIES INTERFACE_${versionfull_alias}_${dict_key} "${values}")
+ endif()
+ endif()
+endfunction()
+
+
+# Walks a target's public link libraries recursively, and performs some actions (poor man's
+# polypmorphism)
+#
+# Walks INTERFACE_LINK_LIBRARIES for all target types, as well as LINK_LIBRARIES for static
+# library targets.
+#
+# out_var: the name of the variable where the result will be assigned. The result is a list of
+# libraries, mostly in generator expression form.
+# rcc_objects_out_var: the name of the variable where the collected rcc object files will be
+# assigned (for the initial target and its dependencies)
+# dict_name: used for caching the results, and preventing the same target from being processed
+# twice
+# operation: a string to tell the function what additional behaviors to execute.
+# 'collect_libs' (default) operation is to collect linker file paths and flags.
+# Used for prl file generation.
+# 'promote_global' promotes walked imported targets to global scope.
+# 'collect_targets' collects all target names (discards framework or link flags)
+#
+#
+function(__qt_internal_walk_libs
+ target out_var rcc_objects_out_var dict_name operation)
+ set(collected ${ARGN})
+ if(target IN_LIST collected)
+ return()
+ endif()
+ list(APPEND collected ${target})
+
+ if(target STREQUAL "${QT_CMAKE_EXPORT_NAMESPACE}::EntryPoint")
+ # We can't (and don't need to) process EntryPoint because it brings in $<TARGET_PROPERTY:prop>
+ # genexes which get replaced with $<TARGET_PROPERTY:EntryPoint,prop> genexes in the code below
+ # and that causes 'INTERFACE_LIBRARY targets may only have whitelisted properties.' errors
+ # with CMake versions equal to or lower than 3.18. These errors are super unintuitive to
+ # debug because there's no mention that it's happening during a file(GENERATE) call.
+ return()
+ endif()
+
+ if(NOT TARGET ${dict_name})
+ add_library(${dict_name} INTERFACE IMPORTED GLOBAL)
+ endif()
+ __qt_internal_get_dict_key_values(libs "${target}" "${dict_name}" "libs")
+ __qt_internal_get_dict_key_values(rcc_objects "${target}" "${dict_name}" "rcc_objects")
+
+ if(libs MATCHES "-NOTFOUND$")
+ unset(libs)
+ unset(rcc_objects)
+ get_target_property(target_libs ${target} INTERFACE_LINK_LIBRARIES)
+ if(NOT target_libs)
+ unset(target_libs)
+ endif()
+ get_target_property(target_type ${target} TYPE)
+ if(target_type STREQUAL "STATIC_LIBRARY")
+ get_target_property(link_libs ${target} LINK_LIBRARIES)
+ if(link_libs)
+ list(APPEND target_libs ${link_libs})
+ endif()
+ endif()
+
+ # Need to record the rcc object file info not only for dependencies, but also for
+ # the current target too. Otherwise the saved information is incomplete for prl static
+ # build purposes.
+ get_target_property(main_target_rcc_objects ${target} _qt_rcc_objects)
+ if(main_target_rcc_objects)
+ __qt_internal_merge_libs(rcc_objects ${main_target_rcc_objects})
+ endif()
+
+ foreach(lib ${target_libs})
+ # Cannot use $<TARGET_POLICY:...> in add_custom_command.
+ # Check the policy now, and replace the generator expression with the value.
+ while(lib MATCHES "\\$<TARGET_POLICY:([^>]+)>")
+ cmake_policy(GET ${CMAKE_MATCH_1} value)
+ if(value STREQUAL "NEW")
+ set(value "TRUE")
+ else()
+ set(value "FALSE")
+ endif()
+ string(REPLACE "${CMAKE_MATCH_0}" "${value}" lib "${lib}")
+ endwhile()
+
+ # Fix up $<TARGET_PROPERTY:FOO> expressions that refer to the "current" target.
+ # Those cannot be used with add_custom_command.
+ while(lib MATCHES "\\$<TARGET_PROPERTY:([^,>]+)>")
+ string(REPLACE "${CMAKE_MATCH_0}" "$<TARGET_PROPERTY:${target},${CMAKE_MATCH_1}>"
+ lib "${lib}")
+ endwhile()
+
+ # Skip static plugins.
+ set(_is_plugin_marker_genex "\\$<BOOL:QT_IS_PLUGIN_GENEX>")
+ if(lib MATCHES "${_is_plugin_marker_genex}")
+ continue()
+ endif()
+
+ # Strip any directory scope tokens.
+ __qt_internal_strip_target_directory_scope_token("${lib}" lib)
+
+ if(lib MATCHES "^\\$<TARGET_OBJECTS:")
+ # Skip object files.
+ continue()
+ elseif(lib MATCHES "^\\$<LINK_ONLY:(.*)>$")
+ set(lib_target ${CMAKE_MATCH_1})
+ else()
+ set(lib_target ${lib})
+ endif()
+
+ # Skip CMAKE_DIRECTORY_ID_SEP. If a target_link_libraries is applied to a target
+ # that was defined in a different scope, CMake appends and prepends a special directory
+ # id separator. Filter those out.
+ if(lib_target MATCHES "^::@")
+ continue()
+ elseif(TARGET ${lib_target})
+ if ("${lib_target}" MATCHES "^Qt::(.*)")
+ # If both, Qt::Foo and Foo targets exist, prefer the target name without
+ # namespace. Which one is preferred doesn't really matter. This code exists to
+ # avoid ending up with both, Qt::Foo and Foo in our dependencies.
+ set(namespaceless_lib_target "${CMAKE_MATCH_1}")
+ if(TARGET namespaceless_lib_target)
+ set(lib_target ${namespaceless_lib_target})
+ endif()
+ endif()
+ get_target_property(lib_target_type ${lib_target} TYPE)
+ if(lib_target_type STREQUAL "INTERFACE_LIBRARY")
+ __qt_internal_walk_libs(
+ ${lib_target}
+ lib_libs_${target}
+ lib_rcc_objects_${target}
+ "${dict_name}" "${operation}" ${collected})
+ if(lib_libs_${target})
+ __qt_internal_merge_libs(libs ${lib_libs_${target}})
+ set(is_module 0)
+ endif()
+ if(lib_rcc_objects_${target})
+ __qt_internal_merge_libs(rcc_objects ${lib_rcc_objects_${target}})
+ endif()
+ elseif(NOT lib_target_type STREQUAL "OBJECT_LIBRARY")
+
+ if(operation STREQUAL "collect_targets")
+ __qt_internal_merge_libs(libs ${lib_target})
+ else()
+ __qt_internal_merge_libs(libs "$<TARGET_LINKER_FILE:${lib_target}>")
+ endif()
+
+ get_target_property(target_rcc_objects "${lib_target}" _qt_rcc_objects)
+ if(target_rcc_objects)
+ __qt_internal_merge_libs(rcc_objects ${target_rcc_objects})
+ endif()
+
+ __qt_internal_walk_libs(
+ ${lib_target}
+ lib_libs_${target}
+ lib_rcc_objects_${target}
+ "${dict_name}" "${operation}" ${collected})
+ if(lib_libs_${target})
+ __qt_internal_merge_libs(libs ${lib_libs_${target}})
+ endif()
+ if(lib_rcc_objects_${target})
+ __qt_internal_merge_libs(rcc_objects ${lib_rcc_objects_${target}})
+ endif()
+ endif()
+ if(operation STREQUAL "promote_global")
+ set(lib_target_unaliased "${lib_target}")
+ get_target_property(aliased_target ${lib_target} ALIASED_TARGET)
+ if(aliased_target)
+ set(lib_target_unaliased ${aliased_target})
+ endif()
+
+ get_property(is_imported TARGET ${lib_target_unaliased} PROPERTY IMPORTED)
+ get_property(is_global TARGET ${lib_target_unaliased} PROPERTY IMPORTED_GLOBAL)
+
+ # Allow opting out of promotion. This is useful in certain corner cases
+ # like with WrapLibClang and Threads in qttools.
+ qt_internal_should_not_promote_package_target_to_global(
+ "${lib_target_unaliased}" should_not_promote)
+ if(NOT is_global AND is_imported AND NOT should_not_promote)
+ set_property(TARGET ${lib_target_unaliased} PROPERTY IMPORTED_GLOBAL TRUE)
+ endif()
+ endif()
+ elseif("${lib_target}" MATCHES "^Qt::(.*)")
+ message(FATAL_ERROR "The ${CMAKE_MATCH_1} target is mentioned as a dependency for \
+${target}, but not declared.")
+ else()
+ if(NOT operation STREQUAL "collect_targets")
+ set(final_lib_name_to_merge "${lib_target}")
+ if(lib_target MATCHES "/([^/]+).framework$")
+ set(final_lib_name_to_merge "-framework ${CMAKE_MATCH_1}")
+ endif()
+ __qt_internal_merge_libs(libs "${final_lib_name_to_merge}")
+ endif()
+ endif()
+ endforeach()
+ __qt_internal_memoize_values_in_dict("${target}" "${dict_name}" "libs" "${libs}")
+ __qt_internal_memoize_values_in_dict("${target}" "${dict_name}"
+ "rcc_objects" "${rcc_objects}")
+
+ endif()
+ set(${out_var} ${libs} PARENT_SCOPE)
+ set(${rcc_objects_out_var} ${rcc_objects} PARENT_SCOPE)
+endfunction()
+
+
+# Given ${target}, collect all its private dependencies that are CMake targets.
+#
+# Discards non-CMake-target dependencies like linker flags or file paths.
+# Does nothing when given an interface library.
+#
+# To be used to extract the full list of target dependencies of a library or executable.
+function(__qt_internal_collect_all_target_dependencies target out_var)
+ set(dep_targets "")
+
+ get_target_property(target_type ${target} TYPE)
+
+ if(NOT target_type STREQUAL "INTERFACE_LIBRARY")
+ get_target_property(link_libs ${target} LINK_LIBRARIES)
+ if(link_libs)
+ foreach(lib ${link_libs})
+ if(TARGET "${lib}")
+ list(APPEND dep_targets "${lib}")
+
+ __qt_internal_walk_libs(
+ "${lib}"
+ lib_walked_targets
+ _discarded_out_var
+ "qt_private_link_library_targets"
+ "collect_targets")
+
+ if(lib_walked_targets)
+ list(APPEND dep_targets ${lib_walked_targets})
+ endif()
+ endif()
+ endforeach()
+ endif()
+ endif()
+
+ list(REMOVE_DUPLICATES dep_targets)
+
+ set(${out_var} "${dep_targets}" PARENT_SCOPE)
+endfunction()
diff --git a/cmake/QtQmakeHelpers.cmake b/cmake/QtQmakeHelpers.cmake
index fcfee7c301..0a2c5b1531 100644
--- a/cmake/QtQmakeHelpers.cmake
+++ b/cmake/QtQmakeHelpers.cmake
@@ -49,23 +49,6 @@ function(qt_generate_qconfig_cpp in_file out_file)
set(QT_CONFIG_STR_OFFSETS_FIRST "${QT_CONFIG_STR_OFFSETS}")
set(QT_CONFIG_STRS_FIRST "${QT_CONFIG_STRS}")
- # Start second part.
- set(QT_CONFIG_STR_OFFSETS "")
- set(QT_CONFIG_STRS "")
-
- qt_add_string_to_qconfig_cpp("") # config.input.sysroot
- qt_add_string_to_qconfig_cpp("false") # qmake_sysrootify
- qt_add_string_to_qconfig_cpp("${INSTALL_BINDIR}")
- qt_add_string_to_qconfig_cpp("${INSTALL_LIBEXECDIR}")
- qt_add_string_to_qconfig_cpp("${INSTALL_LIBDIR}")
- qt_add_string_to_qconfig_cpp("${hostdatadir}")
- qt_add_string_to_qconfig_cpp("${QT_QMAKE_TARGET_MKSPEC}")
- qt_add_string_to_qconfig_cpp("${QT_QMAKE_HOST_MKSPEC}")
-
- # Save second part.
- set(QT_CONFIG_STR_OFFSETS_SECOND "${QT_CONFIG_STR_OFFSETS}")
- set(QT_CONFIG_STRS_SECOND "${QT_CONFIG_STRS}")
-
# Settings path / sysconf dir.
set(QT_SYS_CONF_DIR "${INSTALL_SYSCONFDIR}")
@@ -83,6 +66,23 @@ function(qt_generate_qconfig_cpp in_file out_file)
"${lib_location_absolute_path}" "${QT_BUILD_INTERNALS_RELOCATABLE_INSTALL_PREFIX}")
set(QT_CONFIGURE_LIBLOCATION_TO_PREFIX_PATH "${from_lib_location_to_prefix}")
+ # Ensure Windows drive letter is prepended to the install prefix hardcoded
+ # into qconfig.cpp, otherwise qmake can't find Qt modules in a static Qt
+ # build if there's no qt.conf. Mostly relevant for CI.
+ # Given input like
+ # \work/qt/install
+ # or
+ # \work\qt\install
+ # Expected output is something like
+ # C:/work/qt/install
+ # so it includes a drive letter and forward slashes.
+ set(QT_CONFIGURE_PREFIX_PATH_STR "${QT_BUILD_INTERNALS_RELOCATABLE_INSTALL_PREFIX}")
+ if(WIN32)
+ get_filename_component(
+ QT_CONFIGURE_PREFIX_PATH_STR
+ "${QT_CONFIGURE_PREFIX_PATH_STR}" REALPATH)
+ endif()
+
configure_file(${in_file} ${out_file} @ONLY)
endfunction()
diff --git a/cmake/QtResourceHelpers.cmake b/cmake/QtResourceHelpers.cmake
index 1c18de41fd..3c719d1dd0 100644
--- a/cmake/QtResourceHelpers.cmake
+++ b/cmake/QtResourceHelpers.cmake
@@ -23,13 +23,13 @@ function(qt_internal_add_resource target resourceName)
)
qt_internal_record_rcc_object_files("${target}" "${out_targets}"
- INSTALL_LOCATION "${INSTALL_LIBDIR}")
+ INSTALL_DIRECTORY "${INSTALL_LIBDIR}")
endif()
endfunction()
function(qt_internal_record_rcc_object_files target resource_targets)
set(args_optional "")
- set(args_single INSTALL_LOCATION)
+ set(args_single INSTALL_DIRECTORY)
set(args_multi "")
cmake_parse_arguments(arg
@@ -48,7 +48,7 @@ function(qt_internal_record_rcc_object_files target resource_targets)
# Compute the install location of a resource object file in a prefix build.
# It's comprised of thee following path parts:
#
- # part (1) INSTALL_LOCATION.
+ # part (1) INSTALL_DIRECTORY.
# A usual value is '${INSTALL_LIBDIR}/' for libraries
# and '${INSTALL_QMLDIR}/foo/bar/' for qml plugin resources.
#
@@ -70,9 +70,9 @@ function(qt_internal_record_rcc_object_files target resource_targets)
set(object_file_name "${generated_cpp_file_relative_path}${CMAKE_CXX_OUTPUT_EXTENSION}")
qt_path_join(rcc_object_file_path
"objects-$<CONFIG>" ${out_target} "${object_file_name}")
- if(arg_INSTALL_LOCATION)
+ if(arg_INSTALL_DIRECTORY)
qt_path_join(rcc_object_file_path
- "${arg_INSTALL_LOCATION}" "${rcc_object_file_path}")
+ "${arg_INSTALL_DIRECTORY}" "${rcc_object_file_path}")
else()
message(FATAL_ERROR "No install location given for object files to be installed"
" for the following resource target: '${out_target}'")
diff --git a/cmake/QtRpathHelpers.cmake b/cmake/QtRpathHelpers.cmake
index 126ed2c50f..bae222d813 100644
--- a/cmake/QtRpathHelpers.cmake
+++ b/cmake/QtRpathHelpers.cmake
@@ -20,7 +20,7 @@ function(qt_compute_relative_rpath_base rpath install_location out_var)
# needed in the .prf files, but for CMake we need to prepend them ourselves.
if(APPLE)
set(rpath_rel_base "@loader_path")
- elseif(LINUX)
+ elseif(LINUX OR SOLARIS OR FREEBSD)
set(rpath_rel_base "$ORIGIN")
else()
message(WARNING "No known RPATH_REL_BASE for target platform.")
diff --git a/cmake/QtSetup.cmake b/cmake/QtSetup.cmake
index bd81da9eb1..83e932da55 100644
--- a/cmake/QtSetup.cmake
+++ b/cmake/QtSetup.cmake
@@ -164,6 +164,7 @@ option(QT_BUILD_EXAMPLES "Build Qt examples" OFF)
option(QT_BUILD_EXAMPLES_BY_DEFAULT "Should examples be built as part of the default 'all' target." ON)
option(QT_BUILD_MANUAL_TESTS "Build Qt manual tests" OFF)
+option(QT_BUILD_MINIMAL_STATIC_TESTS "Build minimal subset of tests for static Qt builds" OFF)
## Find host tools (if non native):
set(QT_HOST_PATH "" CACHE PATH "Installed Qt host directory path, used for cross compiling.")
diff --git a/cmake/QtSimdHelpers.cmake b/cmake/QtSimdHelpers.cmake
index dbbd4b7da0..3e5fea11c8 100644
--- a/cmake/QtSimdHelpers.cmake
+++ b/cmake/QtSimdHelpers.cmake
@@ -1,9 +1,20 @@
# Handle files that need special SIMD-related flags.
-# This creates an object library and makes target link
-# to it (privately).
+#
+# This function adds the passed source files to the given target only if the SIMD specific condition
+# evaluates to true. It also adds the SIMD architecture specific flags as compile options to those
+# source files.
+#
+# Arguments
+# NAME: is deprecated, don't use it.
+# SIMD: name of the simd architecture, e.g. sse2, avx, neon. A Qt feature named QT_FEATURE_foo
+# should exist, as well as QT_CFLAGS_foo assignment in QtCompilerOptimization.cmake.
+# COMPILE_FLAGS: extra compile flags to set for the passed source files
+# EXCLUDE_OSX_ARCHITECTURES: On apple platforms, specifies which architectures should not get the
+# SIMD compiler flags. This is mostly relevant for fat / universal builds
+#
function(qt_internal_add_simd_part target)
- qt_parse_all_arguments(arg "qt_add_simd_part" "" ""
- "NAME;SIMD;${__default_private_args};COMPILE_FLAGS" ${ARGN})
+ qt_parse_all_arguments(arg "qt_add_simd_part" "" "NAME;SIMD"
+ "${__default_private_args};COMPILE_FLAGS;EXCLUDE_OSX_ARCHITECTURES" ${ARGN})
if ("x${arg_SIMD}" STREQUAL x)
message(FATAL_ERROR "qt_add_simd_part needs a SIMD type to be set.")
endif()
@@ -49,11 +60,6 @@ function(qt_internal_add_simd_part target)
list(REMOVE_DUPLICATES simd_flags_expanded)
endif()
- set(name "${arg_NAME}")
- if("x${name}" STREQUAL x)
- set(name "${target}_simd_${arg_SIMD}")
- endif()
-
qt_evaluate_config_expression(result ${condition})
if(${result})
if(QT_CMAKE_DEBUG_EXTEND_TARGET)
@@ -64,6 +70,20 @@ function(qt_internal_add_simd_part target)
set(simd_flags_expanded "${${simd_flags_var_name}}")
endif()
+ # If requested, don't pass the simd specific flags to excluded arches on apple platforms.
+ # Mostly important for universal / fat builds.
+ get_target_property(osx_architectures ${target} OSX_ARCHITECTURES)
+ if(simd_flags_expanded AND osx_architectures AND arg_EXCLUDE_OSX_ARCHITECTURES)
+ list(REMOVE_ITEM osx_architectures ${arg_EXCLUDE_OSX_ARCHITECTURES})
+
+ # Assumes that simd_flags_expanded contains only one item on apple platforms.
+ list(TRANSFORM osx_architectures
+ REPLACE "^(.+)$" "-Xarch_\\1;${simd_flags_expanded}"
+ OUTPUT_VARIABLE simd_flags_expanded)
+ endif()
+
+ # The manual loop is done on purpose. Check Gerrit comments for
+ # 1b7008a3d784f3f266368f824cb43d473a301ba1.
foreach(source IN LISTS arg_SOURCES)
set_property(SOURCE "${source}" APPEND
PROPERTY COMPILE_OPTIONS
diff --git a/cmake/QtSyncQtHelpers.cmake b/cmake/QtSyncQtHelpers.cmake
index 91ed7f2832..2014405017 100644
--- a/cmake/QtSyncQtHelpers.cmake
+++ b/cmake/QtSyncQtHelpers.cmake
@@ -15,7 +15,7 @@ function(qt_ensure_sync_qt)
endif()
# When building qtbase, use the source syncqt, otherwise use the installed one.
- set(SYNCQT_FROM_SOURCE "${QtBase_SOURCE_DIR}/bin/syncqt.pl")
+ set(SYNCQT_FROM_SOURCE "${QtBase_SOURCE_DIR}/libexec/syncqt.pl")
if(NOT ("${QtBase_SOURCE_DIR}" STREQUAL "") AND EXISTS "${SYNCQT_FROM_SOURCE}")
set(QT_SYNCQT "${SYNCQT_FROM_SOURCE}" CACHE FILEPATH "syncqt script")
message(STATUS "Using source syncqt found at: ${QT_SYNCQT}")
@@ -23,10 +23,6 @@ function(qt_ensure_sync_qt)
qt_path_join(syncqt_install_dir ${QT_INSTALL_DIR} ${INSTALL_LIBEXECDIR})
qt_copy_or_install(PROGRAMS "${SYNCQT_FROM_SOURCE}"
DESTINATION "${syncqt_install_dir}")
-
- qt_path_join(syncqt_install_dir ${QT_INSTALL_DIR} ${INSTALL_BINDIR})
- qt_copy_or_install(PROGRAMS "${SYNCQT_FROM_SOURCE}"
- DESTINATION "${syncqt_install_dir}")
elseif(NOT "${QT_HOST_PATH}" STREQUAL "")
get_filename_component(syncqt_absolute_path
"${QT_HOST_PATH}/${QT${PROJECT_VERSION_MAJOR}_HOST_INFO_LIBEXECDIR}/syncqt.pl"
diff --git a/cmake/QtTargetHelpers.cmake b/cmake/QtTargetHelpers.cmake
index 0caff0e484..cc8bfde85f 100644
--- a/cmake/QtTargetHelpers.cmake
+++ b/cmake/QtTargetHelpers.cmake
@@ -264,60 +264,6 @@ function(qt_internal_check_directory_or_type name dir type default result_var)
endif()
endfunction()
-function(qt_internal_apply_win_prefix_and_suffix target)
- if(WIN32)
- # Table of prefix / suffixes for MSVC libraries as qmake expects them to be created.
- # static - Qt6EdidSupport.lib (platform support libraries / or static QtCore, etc)
- # shared - Qt6Core.dll
- # shared import library - Qt6Core.lib
- # module aka Qt plugin - qwindows.dll
- # module import library - qwindows.lib
- #
- # The CMake defaults are fine for us.
-
- # Table of prefix / suffixes for MinGW libraries as qmake expects them to be created.
- # static - libQt6EdidSupport.a (platform support libraries / or static QtCore, etc)
- # shared - Qt6Core.dll
- # shared import library - libQt6Core.a
- # module aka Qt plugin - qwindows.dll
- # module import library - libqwindows.a
- #
- # CMake for Windows-GNU platforms defaults the prefix to "lib".
- # CMake for Windows-GNU platforms defaults the import suffix to ".dll.a".
- # These CMake defaults are not ok for us.
-
- # This should cover both MINGW with GCC and CLANG.
- if(NOT MSVC)
- set_property(TARGET "${target}" PROPERTY IMPORT_SUFFIX ".a")
-
- get_target_property(target_type ${target} TYPE)
- if(target_type STREQUAL "STATIC_LIBRARY")
- set_property(TARGET "${target}" PROPERTY PREFIX "lib")
- else()
- set_property(TARGET "${target}" PROPERTY PREFIX "")
- set_property(TARGET "${target}" PROPERTY IMPORT_PREFIX "lib")
- endif()
- endif()
- endif()
-endfunction()
-
-function(qt_internal_strip_target_directory_scope_token target out_var)
- # In CMake versions earlier than CMake 3.18, a subdirectory scope id is appended to the
- # target name if the target is referenced in a target_link_libraries command from a
- # different directory scope than where the target was created.
- # Strip it.
- #
- # For informational purposes, in CMake 3.18, the target name looks as follows:
- # ::@(0x5604cb3f6b50);Threads::Threads;::@
- # This case doesn't have to be stripped (at least for now), because when we iterate over
- # link libraries, the tokens appear as separate target names.
- #
- # Example: Threads::Threads::@<0x5604cb3f6b50>
- # Output: Threads::Threads
- string(REGEX REPLACE "::@<.+>$" "" target "${target}")
- set("${out_var}" "${target}" PARENT_SCOPE)
-endfunction()
-
# Create a Qt*AdditionalTargetInfo.cmake file that is included by Qt*Config.cmake
# and sets IMPORTED_*_<CONFIG> properties on the exported targets.
#
@@ -595,3 +541,35 @@ function(qt_internal_install_pdb_files target install_dir_path)
endif()
endif()
endfunction()
+
+# Certain targets might have dependencies on libraries that don't have an Apple Silicon arm64
+# slice. When doing a universal macOS build, force those targets to be built only for the
+# Intel x86_64 arch.
+# This behavior can be disabled for all targets by setting the QT_FORCE_MACOS_ALL_ARCHES cache
+# variable to TRUE or by setting the target specific cache variable
+# QT_FORCE_MACOS_ALL_ARCHES_${target} to TRUE.
+#
+# TODO: Ideally we'd use something like _apple_resolve_supported_archs_for_sdk_from_system_lib
+# from CMake's codebase to parse which architectures are available in a library, but it's
+# not straightforward to extract the library absolute file path from a CMake target. Furthermore
+# Apple started using a built-in dynamic linker cache of all system-provided libraries as per
+# https://gitlab.kitware.com/cmake/cmake/-/issues/20863
+# so if the target is a library in the dynamic cache, that might further complicate how to get
+# the list of arches in it.
+function(qt_internal_force_macos_intel_arch target)
+ if(MACOS AND QT_IS_MACOS_UNIVERSAL AND NOT QT_FORCE_MACOS_ALL_ARCHES
+ AND NOT QT_FORCE_MACOS_ALL_ARCHES_${target})
+ set(arches "x86_64")
+ set_target_properties(${target} PROPERTIES OSX_ARCHITECTURES "${arches}")
+ endif()
+endfunction()
+
+function(qt_disable_apple_app_extension_api_only target)
+ set_target_properties("${target}" PROPERTIES QT_NO_APP_EXTENSION_ONLY_API TRUE)
+endfunction()
+
+# Common function to add Qt prefixes to the target name
+function(qt_internal_qtfy_target out_var target)
+ set(${out_var} "Qt${target}" PARENT_SCOPE)
+ set(${out_var}_versioned "Qt${PROJECT_VERSION_MAJOR}${target}" PARENT_SCOPE)
+endfunction()
diff --git a/cmake/QtTestHelpers.cmake b/cmake/QtTestHelpers.cmake
index 09b8776588..c2a9d71780 100644
--- a/cmake/QtTestHelpers.cmake
+++ b/cmake/QtTestHelpers.cmake
@@ -51,8 +51,10 @@ function(qt_internal_add_benchmark target)
add_dependencies("${target}_benchmark" "${target}")
- #Add benchmark to meta target.
- add_dependencies("benchmark" "${target}_benchmark")
+ # Add benchmark to meta target if it exists.
+ if (TARGET benchmark)
+ add_dependencies("benchmark" "${target}_benchmark")
+ endif()
endfunction()
# Simple wrapper around qt_internal_add_executable for manual tests which insure that
@@ -219,8 +221,6 @@ function(qt_internal_add_test name)
INCLUDE_DIRECTORIES
${private_includes}
DEFINES
- QT_TESTCASE_BUILDDIR="${CMAKE_CURRENT_BINARY_DIR}"
- QT_TESTCASE_SOURCEDIR="${CMAKE_CURRENT_SOURCE_DIR}"
${arg_DEFINES}
PUBLIC_LIBRARIES ${QT_CMAKE_EXPORT_NAMESPACE}::Core ${QT_CMAKE_EXPORT_NAMESPACE}::Test ${arg_PUBLIC_LIBRARIES}
LIBRARIES ${arg_LIBRARIES}
@@ -378,18 +378,20 @@ function(qt_internal_add_test name)
"${CMAKE_CURRENT_SOURCE_DIR}")
qt_path_join(testdata_install_dir ${QT_INSTALL_DIR}
"${relative_path_to_test_project}")
- foreach(testdata IN LISTS arg_TESTDATA)
- set(testdata "${CMAKE_CURRENT_SOURCE_DIR}/${testdata}")
- if (IS_DIRECTORY "${testdata}")
- qt_install(
- DIRECTORY "${testdata}"
- DESTINATION "${testdata_install_dir}")
- else()
- qt_install(
- FILES "${testdata}"
- DESTINATION "${testdata_install_dir}")
- endif()
- endforeach()
+ if (testdata_install_dir)
+ foreach(testdata IN LISTS arg_TESTDATA)
+ set(testdata "${CMAKE_CURRENT_SOURCE_DIR}/${testdata}")
+ if (IS_DIRECTORY "${testdata}")
+ qt_install(
+ DIRECTORY "${testdata}"
+ DESTINATION "${testdata_install_dir}")
+ else()
+ qt_install(
+ FILES "${testdata}"
+ DESTINATION "${testdata_install_dir}")
+ endif()
+ endforeach()
+ endif()
endif()
endfunction()
diff --git a/cmake/QtToolHelpers.cmake b/cmake/QtToolHelpers.cmake
index 869a6e3300..21687f5ec1 100644
--- a/cmake/QtToolHelpers.cmake
+++ b/cmake/QtToolHelpers.cmake
@@ -2,12 +2,20 @@
# The BOOTSTRAP option allows building it as standalone program, otherwise
# it will be linked against QtCore.
#
+# USER_FACING can be passed to mark the tool as a program that is supposed to be
+# started directly by users.
+#
# We must pass this function a target name obtained from
# qt_get_tool_target_name like this:
# qt_get_tool_target_name(target_name my_tool)
-# qt_add_tool(${target_name})
+# qt_internal_add_tool(${target_name})
+#
+# Option Arguments:
+# INSTALL_VERSIONED_LINK
+# Prefix build only. On installation, create a versioned hard-link of the installed file.
+# E.g. create a link of "bin/qmake6" to "bin/qmake".
#
-# Arguments:
+# One-value Arguments:
# EXTRA_CMAKE_FILES
# List of additional CMake files that will be installed alongside the tool's exported CMake
# files.
@@ -20,9 +28,10 @@
#
function(qt_internal_add_tool target_name)
qt_tool_target_to_name(name ${target_name})
+ set(option_keywords BOOTSTRAP NO_INSTALL USER_FACING INSTALL_VERSIONED_LINK)
set(one_value_keywords TOOLS_TARGET EXTRA_CMAKE_FILES INSTALL_DIR
${__default_target_info_args})
- qt_parse_all_arguments(arg "qt_add_tool" "BOOTSTRAP;NO_INSTALL"
+ qt_parse_all_arguments(arg "qt_internal_add_tool" "${option_keywords}"
"${one_value_keywords}"
"${__default_private_args}" ${ARGN})
@@ -36,7 +45,7 @@ function(qt_internal_add_tool target_name)
if(CMAKE_CROSSCOMPILING AND QT_BUILD_TOOLS_WHEN_CROSSCOMPILING AND (name STREQUAL target_name))
message(FATAL_ERROR
- "qt_add_tool must be passed a target obtained from qt_get_tool_target_name.")
+ "qt_internal_add_tool must be passed a target obtained from qt_get_tool_target_name.")
endif()
set(full_name "${QT_CMAKE_EXPORT_NAMESPACE}::${name}")
@@ -175,6 +184,10 @@ function(qt_internal_add_tool target_name)
)
endif()
+ if(arg_USER_FACING)
+ set_property(GLOBAL APPEND PROPERTY QT_USER_FACING_TOOL_TARGETS ${target_name})
+ endif()
+
# If building with a multi-config configuration, the main configuration tool will be placed in
# ./bin, while the rest will be in <CONFIG> specific subdirectories.
qt_get_tool_cmake_configuration(tool_cmake_configuration)
@@ -217,6 +230,10 @@ function(qt_internal_add_tool target_name)
unset(install_initial_call_args)
endforeach()
+ if(arg_INSTALL_VERSIONED_LINK)
+ qt_internal_install_versioned_link("${install_dir}" "${target_name}")
+ endif()
+
qt_apply_rpaths(TARGET "${target_name}" INSTALL_PATH "${install_dir}" RELATIVE_RPATH)
endif()
diff --git a/cmake/QtToolchainHelpers.cmake b/cmake/QtToolchainHelpers.cmake
index 5495cbf6c5..3d9de3ecdd 100644
--- a/cmake/QtToolchainHelpers.cmake
+++ b/cmake/QtToolchainHelpers.cmake
@@ -46,6 +46,12 @@ function(qt_internal_create_toolchain_file)
"set(VCPKG_TARGET_TRIPLET \"${VCPKG_TARGET_TRIPLET}\" CACHE STRING \"\")")
endif()
+ if(CMAKE_SYSTEM_NAME STREQUAL "Windows" AND CMAKE_SYSTEM_PROCESSOR STREQUAL "arm64" AND CMAKE_SYSTEM_VERSION STREQUAL "10")
+ list(APPEND init_platform "set(CMAKE_SYSTEM_NAME Windows CACHE STRING \"\")")
+ list(APPEND init_platform "set(CMAKE_SYSTEM_VERSION 10 CACHE STRING \"\")")
+ list(APPEND init_platform "set(CMAKE_SYSTEM_PROCESSOR arm64 CACHE STRING \"\")")
+ endif()
+
# By default we don't want to allow mixing compilers for building different repositories, so we
# embed the initially chosen compilers into the toolchain.
# This is because on Windows compilers aren't easily mixed.
@@ -112,15 +118,55 @@ function(qt_internal_create_toolchain_file)
"set(CMAKE_OSX_DEPLOYMENT_TARGET \"${CMAKE_OSX_DEPLOYMENT_TARGET}\" CACHE STRING \"\")")
endif()
+ # Save list of initial architectures Qt was configured with.
+ set(_qt_osx_architectures_escaped "${CMAKE_OSX_ARCHITECTURES}")
+ string(REPLACE ";" "LITERAL_SEMICOLON"
+ _qt_osx_architectures_escaped "${_qt_osx_architectures_escaped}")
+ set(docstring "List of architectures Qt was built with")
+ list(APPEND init_platform
+ "set(QT_OSX_ARCHITECTURES \"${_qt_osx_architectures_escaped}\" CACHE STRING \"${docstring}\")")
+ list(APPEND init_platform "")
+
+ # When building another qt repo, ensure the same list of architectures is used by default.
+ # Detection of a qt repo is done by checking for QT_REPO_MODULE_VERSION which is set in
+ # the repo's .cmake.conf file.
+ # Most standalone tests will also be built with multiple architectures.
+ # Certain tests will be built with a single arch only (like tests/auto/cmake) to avoid
+ # issues in the CI when trying to build them on VMs that do not have a universal macOS
+ # SDK.
+ list(APPEND init_platform
+ "# Only build multiple architectures when building Qt itself. Can be explicitly enabled or disabled.")
+ list(APPEND init_platform "if((QT_REPO_MODULE_VERSION AND NOT QT_FORCE_SINGLE_QT_OSX_ARCHITECTURE) OR QT_FORCE_ALL_QT_OSX_ARCHITECTURES)")
+ list(APPEND init_platform " set(__qt_toolchain_building_qt_repo TRUE)")
+ list(APPEND init_platform " set(CMAKE_OSX_ARCHITECTURES \"\${QT_OSX_ARCHITECTURES}\" CACHE STRING \"\")")
+ list(APPEND init_platform "endif()")
+ list(APPEND init_platform "")
+
+ # For macOS user projects, default to not specifying any architecture. This means CMake will
+ # not pass an -arch flag to the compiler and the compiler will choose the default
+ # architecture to build for.
+ # On Apple Silicon, CMake will introspect whether it's running under Rosetta and will
+ # pass the detected architecture (x86_64 under Rosetta or arm64 natively) to the compiler.
+ # This is line with default CMake behavior for user projects.
+ #
+ # For iOS, we provide a bit more convenience.
+ # When the user project is built using the Xcode generator, don't specify a default
+ # architecture and let Xcode and the developer handle it.
+ # When using the Ninja generator, specify the first architecture from QT_OSX_ARCHITECTURES
+ # (even with a simulator_and_device Qt build). This ensures that the default configuration
+ # at least tries to build something.
+ if(UIKIT)
+ qt_internal_get_first_osx_arch(osx_first_arch)
+ list(APPEND init_platform "if(NOT CMAKE_GENERATOR STREQUAL \"Xcode\" AND NOT __qt_toolchain_building_qt_repo)")
+ list(APPEND init_platform
+ " set(CMAKE_OSX_ARCHITECTURES \"${osx_first_arch}\" CACHE STRING \"\")")
+ list(APPEND init_platform "endif()")
+ list(APPEND init_platform "")
+ endif()
+
if(UIKIT)
list(APPEND init_platform
"set(CMAKE_SYSTEM_NAME \"${CMAKE_SYSTEM_NAME}\" CACHE STRING \"\")")
- set(_qt_osx_architectures_escaped "${CMAKE_OSX_ARCHITECTURES}")
- string(REPLACE ";" "LITERAL_SEMICOLON"
- _qt_osx_architectures_escaped "${_qt_osx_architectures_escaped}")
- list(APPEND init_platform
- "set(CMAKE_OSX_ARCHITECTURES \"${_qt_osx_architectures_escaped}\" CACHE STRING \"\")")
-
list(APPEND init_platform "if(CMAKE_GENERATOR STREQUAL \"Xcode\" AND NOT QT_NO_XCODE_EMIT_EPN)")
list(APPEND init_platform " set_property(GLOBAL PROPERTY XCODE_EMIT_EFFECTIVE_PLATFORM_NAME OFF)")
list(APPEND init_platform "endif()")
diff --git a/cmake/QtWasmHelpers.cmake b/cmake/QtWasmHelpers.cmake
new file mode 100644
index 0000000000..29fd27cd6b
--- /dev/null
+++ b/cmake/QtWasmHelpers.cmake
@@ -0,0 +1,93 @@
+
+function (qt_internal_setup_wasm_target_properties wasmTarget)
+
+ target_link_options("${wasmTarget}" INTERFACE "SHELL:-s EXIT_RUNTIME=1"
+ "SHELL:-s ERROR_ON_UNDEFINED_SYMBOLS=1"
+ "SHELL:-s EXTRA_EXPORTED_RUNTIME_METHODS=[UTF16ToString,stringToUTF16]"
+ "SHELL:-s USE_WEBGL2=1"
+ "--bind"
+ "SHELL:-s FETCH=1")
+ target_compile_options("${wasmTarget}" INTERFACE --bind)
+
+ # Hardcode wasm memory size. Emscripten does not currently support memory growth
+ # (ALLOW_MEMORY_GROWTH) in pthreads mode, and requires specifying the memory size
+ # at build time. Further, browsers limit the maximum initial memory size to 1GB.
+ # QT_WASM_INITIAL_MEMORY must be a multiple of 64KB (i.e. 65536)
+ if(NOT DEFINED QT_WASM_INITIAL_MEMORY AND QT_FEATURE_thread)
+ set(QT_WASM_INITIAL_MEMORY "1GB")
+ endif()
+
+ if(DEFINED QT_WASM_INITIAL_MEMORY)
+ target_link_options("${wasmTarget}" INTERFACE "SHELL:-s INITIAL_MEMORY=${QT_WASM_INITIAL_MEMORY}")
+ message("Setting INITIAL_MEMORY to ${QT_WASM_INITIAL_MEMORY}")
+ endif()
+
+ if (QT_FEATURE_opengles3)
+ target_link_options("${wasmTarget}" INTERFACE "SHELL:-s FULL_ES3=1")
+
+ target_link_options("${wasmTarget}" INTERFACE "SHELL:-s FULL_ES3=1"
+ "SHELL:-s MAX_WEBGL_VERSION=2"
+ "SHELL:-s WEBGL2_BACKWARDS_COMPATIBILITY_EMULATION=1")
+ else()
+ target_link_options("${wasmTarget}" INTERFACE "SHELL:-s FULL_ES2=1")
+ endif()
+
+ set(disable_exceptions_catching 1)
+ if (QT_FEATURE_exceptions)
+ set(disable_exceptions_catching 0)
+ endif()
+ target_link_options("${wasmTarget}" INTERFACE "SHELL:-s DISABLE_EXCEPTION_CATCHING=${disable_exceptions_catching}")
+
+ if (QT_FEATURE_thread)
+ target_compile_options("${wasmTarget}" INTERFACE "SHELL:-s USE_PTHREADS=1")
+ target_link_options("${wasmTarget}" INTERFACE "SHELL:-s USE_PTHREADS=1")
+
+ if(DEFINED QT_WASM_PTHREAD_POOL_SIZE)
+ target_link_options("${wasmTarget}" INTERFACE "SHELL:-s PTHREAD_POOL_SIZE=${QT_WASM_PTHREAD_POOL_SIZE}")
+ message("Setting PTHREAD_POOL_SIZE to ${QT_WASM_PTHREAD_POOL_SIZE}")
+ endif()
+
+ else()
+ target_link_options("${wasmTarget}" INTERFACE "SHELL:-s ALLOW_MEMORY_GROWTH=1")
+ endif()
+
+ # debug add_compile_options
+ if ("QT_WASM_SOURCE_MAP=1" IN_LIST QT_QMAKE_DEVICE_OPTIONS)
+ set(WASM_SOURCE_MAP_BASE "http://localhost:8000/")
+
+ if(DEFINED QT_WASM_SOURCE_MAP_BASE)
+ set(WASM_SOURCE_MAP_BASE "${QT_WASM_SOURCE_MAP_BASE}")
+ endif()
+
+ # Pass --source-map-base on the linker line. This informs the
+ # browser where to find the source files when debugging.
+ # -g4 to make source maps for debugging
+ target_link_options("${wasmTarget}" INTERFACE "-g4" "--source-map-base" "${WASM_SOURCE_MAP_BASE}")
+
+ endif()
+
+ # a few good defaults to make console more verbose while debugging
+ target_link_options("${wasmTarget}" INTERFACE $<$<CONFIG:Debug>:
+ SHELL:"-s DEMANGLE_SUPPORT=1"
+ SHELL:"-s GL_DEBUG=1"
+ SHELL:"-s ASSERTIONS=2"
+ --profiling-funcs>)
+
+ # target_link_options("${wasmTarget}" INTERFACE "SHELL:-s LIBRARY_DEBUG=1") # print out library calls, verbose
+ # target_link_options("${wasmTarget}" INTERFACE "SHELL:-s SYSCALL_DEBUG=1") # print out sys calls, verbose
+ # target_link_options("${wasmTarget}" INTERFACE "SHELL:-s FS_LOG=1") # print out filesystem ops, verbose
+ # target_link_options("${wasmTarget}" INTERFACE "SHELL:-s SOCKET_DEBUG") # print out socket,network data transfer
+
+ if ("QT_EMSCRIPTEN_ASYNCIFY=1" IN_LIST QT_QMAKE_DEVICE_OPTIONS)
+
+ # Emscripten recommends building with optimizations when using asyncify
+ # in order to reduce wasm file size, and may also generate broken wasm
+ # (with "wasm validation error: too many locals" type errors) if optimizations
+ # are omitted. Enable optimizations also for debug builds.
+ set(QT_CFLAGS_OPTIMIZE_DEBUG "-Os" CACHE STRING INTERNAL FORCE)
+ set(QT_FEATURE_optimize_debug ON CACHE BOOL INTERNAL FORCE)
+
+ target_link_options("${wasmTarget}" INTERFACE "SHELL:-s ASYNCIFY" "-Os")
+ target_compile_definitions("${wasmTarget}" INTERFACE QT_HAVE_EMSCRIPTEN_ASYNCIFY)
+ endif()
+endfunction()
diff --git a/cmake/QtWrapperScriptHelpers.cmake b/cmake/QtWrapperScriptHelpers.cmake
index 15b0ca9eca..cee9bfd1ed 100644
--- a/cmake/QtWrapperScriptHelpers.cmake
+++ b/cmake/QtWrapperScriptHelpers.cmake
@@ -138,24 +138,28 @@ function(qt_internal_create_qt_configure_tests_wrapper_script)
#
# The script takes a path to the repo for which the standalone tests will be configured.
set(script_name "qt-internal-configure-tests")
- set(qt_cmake_path
- "${QT_STAGING_PREFIX}/${INSTALL_BINDIR}/qt-cmake")
- set(common_args "-DQT_BUILD_STANDALONE_TESTS=ON")
+ set(script_passed_args "-DQT_BUILD_STANDALONE_TESTS=ON")
+
+ file(RELATIVE_PATH relative_path_from_libexec_dir_to_bin_dir
+ ${__qt_libexec_dir_absolute}
+ ${__qt_bin_dir_absolute})
+ file(TO_NATIVE_PATH "${relative_path_from_libexec_dir_to_bin_dir}"
+ relative_path_from_libexec_dir_to_bin_dir)
+
if(CMAKE_HOST_UNIX)
- set(script_os_prelude "#!/bin/sh")
- string(PREPEND qt_cmake_path "exec ")
- set(script_passed_args "${common_args} \"$@\"")
+ configure_file("${CMAKE_CURRENT_SOURCE_DIR}/libexec/${script_name}.in"
+ "${QT_BUILD_DIR}/${INSTALL_LIBEXECDIR}/${script_name}" @ONLY)
+
+ qt_install(PROGRAMS "${QT_BUILD_DIR}/${INSTALL_LIBEXECDIR}/${script_name}"
+ DESTINATION "${INSTALL_LIBEXECDIR}")
else()
- set(script_os_prelude "@echo off")
- string(APPEND script_name ".bat")
- string(APPEND qt_cmake_path ".bat")
- set(script_passed_args "${common_args} %*")
+ configure_file("${CMAKE_CURRENT_SOURCE_DIR}/libexec/${script_name}.bat.in"
+ "${QT_BUILD_DIR}/${INSTALL_LIBEXECDIR}/${script_name}.bat" @ONLY)
+
+ qt_install(PROGRAMS "${QT_BUILD_DIR}/${INSTALL_LIBEXECDIR}/${script_name}.bat"
+ DESTINATION "${INSTALL_LIBEXECDIR}")
endif()
- configure_file("${CMAKE_CURRENT_SOURCE_DIR}/bin/qt-internal-configure-tests.in"
- "${QT_BUILD_DIR}/${INSTALL_BINDIR}/${script_name}")
- qt_install(PROGRAMS "${QT_BUILD_DIR}/${INSTALL_BINDIR}/${script_name}"
- DESTINATION "${INSTALL_BINDIR}")
endfunction()
function(qt_internal_install_android_helper_scripts)
diff --git a/cmake/ios/MacOSXBundleInfo.plist.in b/cmake/ios/MacOSXBundleInfo.plist.in
new file mode 100644
index 0000000000..6f322398cd
--- /dev/null
+++ b/cmake/ios/MacOSXBundleInfo.plist.in
@@ -0,0 +1,46 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+ <key>CFBundleInfoDictionaryVersion</key>
+ <string>6.0</string>
+ &l