summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.cmake.conf1
-rw-r--r--.gitignore1
-rw-r--r--.prev_configure.cmake1083
-rw-r--r--.prev_qt_cmdline.cmake128
-rw-r--r--CMakeLists.txt25
-rw-r--r--INSTALL9
-rw-r--r--cmake/3rdparty/extra-cmake-modules/modules/ECMEnableSanitizers.cmake204
-rw-r--r--cmake/3rdparty/extra-cmake-modules/qt_attribution.json2
-rw-r--r--cmake/FindWrapAtomic.cmake6
-rw-r--r--cmake/FindWrapOpenSSL.cmake8
-rw-r--r--cmake/FindWrapOpenSSLHeaders.cmake7
-rw-r--r--cmake/FindWrapSystemMd4c.cmake24
-rw-r--r--cmake/FindWrapVulkan.cmake20
-rw-r--r--cmake/FindWrapVulkanHeaders.cmake23
-rw-r--r--cmake/Qt3rdPartyLibraryHelpers.cmake216
-rw-r--r--cmake/QtAppHelpers.cmake1
-rw-r--r--cmake/QtAutoDetect.cmake104
-rw-r--r--cmake/QtBaseConfigureTests.cmake4
-rw-r--r--cmake/QtBaseGlobalTargets.cmake102
-rw-r--r--cmake/QtBuild.cmake41
-rw-r--r--cmake/QtBuildInformation.cmake9
-rw-r--r--cmake/QtBuildInternals/QtBuildInternalsConfig.cmake377
-rw-r--r--cmake/QtBuildInternals/QtStandaloneTestTemplateProject/Main.cmake2
-rw-r--r--cmake/QtBuildInternalsExtra.cmake.in4
-rw-r--r--cmake/QtCompatibilityHelpers.cmake112
-rw-r--r--cmake/QtConfig.cmake.in33
-rw-r--r--cmake/QtConfigDependencies.cmake.in53
-rw-r--r--cmake/QtDocsHelpers.cmake15
-rw-r--r--cmake/QtExecutableHelpers.cmake14
-rw-r--r--cmake/QtFeature.cmake134
-rw-r--r--cmake/QtFindPackageHelpers.cmake55
-rw-r--r--cmake/QtFinishPrlFile.cmake4
-rw-r--r--cmake/QtFlagHandlingHelpers.cmake22
-rw-r--r--cmake/QtFrameworkHelpers.cmake66
-rw-r--r--cmake/QtGenerateLibHelpers.cmake11
-rw-r--r--cmake/QtGenerateLibPri.cmake2
-rw-r--r--cmake/QtInstallHelpers.cmake4
-rw-r--r--cmake/QtInternalTargets.cmake61
-rw-r--r--cmake/QtLoadFilePrintVars.cmake15
-rw-r--r--cmake/QtModuleConfig.cmake.in2
-rw-r--r--cmake/QtModuleDependencies.cmake.in78
-rw-r--r--cmake/QtModuleHelpers.cmake274
-rw-r--r--cmake/QtModuleToolsDependencies.cmake.in12
-rw-r--r--cmake/QtModuleToolsVersionlessTargets.cmake.in2
-rw-r--r--cmake/QtPlatformTargetHelpers.cmake63
-rw-r--r--cmake/QtPluginDependencies.cmake.in56
-rw-r--r--cmake/QtPluginHelpers.cmake26
-rw-r--r--cmake/QtPlugins.cmake.in134
-rw-r--r--cmake/QtPostProcessHelpers.cmake117
-rw-r--r--cmake/QtPriHelpers.cmake48
-rw-r--r--cmake/QtPrlHelpers.cmake249
-rw-r--r--cmake/QtProcessConfigureArgs.cmake27
-rw-r--r--cmake/QtPublicDependencyHelpers.cmake26
-rw-r--r--cmake/QtPublicFinalizerHelpers.cmake32
-rw-r--r--cmake/QtPublicFindPackageHelpers.cmake3
-rw-r--r--cmake/QtPublicPluginHelpers.cmake418
-rw-r--r--cmake/QtPublicTargetHelpers.cmake312
-rw-r--r--cmake/QtPublicTargetsHelpers.cmake33
-rw-r--r--cmake/QtPublicWalkLibsHelpers.cmake293
-rw-r--r--cmake/QtQmakeHelpers.cmake6
-rw-r--r--cmake/QtResourceHelpers.cmake9
-rw-r--r--cmake/QtRpathHelpers.cmake5
-rw-r--r--cmake/QtSanitizerHelpers.cmake34
-rw-r--r--cmake/QtScopeFinalizerHelpers.cmake3
-rw-r--r--cmake/QtSeparateDebugInfo.cmake3
-rw-r--r--cmake/QtSetup.cmake27
-rw-r--r--cmake/QtSingleRepoTargetSetBuildHelpers.cmake11
-rw-r--r--cmake/QtSyncQtHelpers.cmake2
-rw-r--r--cmake/QtTargetHelpers.cmake262
-rw-r--r--cmake/QtTestHelpers.cmake8
-rw-r--r--cmake/QtToolHelpers.cmake73
-rw-r--r--cmake/QtToolchainHelpers.cmake11
-rw-r--r--cmake/QtWasmHelpers.cmake25
-rw-r--r--cmake/README.md10
-rw-r--r--cmake/configure-cmake-mapping.md9
-rw-r--r--cmake/modulecppexports.h.in55
-rw-r--r--cmake/qt.toolchain.cmake.in5
-rw-r--r--coin/instructions/cmake_documentation_build.yaml2
-rw-r--r--coin/instructions/cmake_module_build_instructions.yaml18
-rw-r--r--coin/instructions/cmake_run_ctest_enforce_exit_code.yaml43
-rw-r--r--coin/instructions/cmake_run_ctest_ignore_exit_code.yaml2
-rw-r--r--coin/instructions/cmake_setup_running_tests_env_vars.yaml32
-rw-r--r--coin/instructions/coin_module_build_template_v2.yaml4
-rw-r--r--coin/instructions/coin_qtbase_build_template_v2.yaml4
-rw-r--r--coin/instructions/prepare_building_env.yaml9
-rw-r--r--conanfile.py434
-rw-r--r--config.tests/arch/arch.cpp3
-rw-r--r--config.tests/precompile_header/CMakeLists.txt5
-rw-r--r--config.tests/precompile_header/header.h44
-rw-r--r--config.tests/precompile_header/main.cpp43
-rw-r--r--config.tests/static_link_order/CMakeLists.txt22
-rw-r--r--config.tests/static_link_order/main.cpp33
-rw-r--r--config.tests/static_link_order/objlib.cpp33
-rw-r--r--config.tests/static_link_order/staticlib1.cpp33
-rw-r--r--config.tests/static_link_order/staticlib2.cpp30
-rw-r--r--config_help.txt4
-rwxr-xr-xconfigure1
-rw-r--r--configure.cmake159
-rw-r--r--configure.json1684
-rw-r--r--doc/global/externalsites/external-resources.qdoc5
-rw-r--r--doc/global/macros.qdocconf2
-rw-r--r--doc/global/template/style/offline.css4
-rw-r--r--doc/global/template/style/online.css2
-rw-r--r--examples/CMakeLists.txt4
-rw-r--r--examples/corelib/CMakeLists.txt1
-rw-r--r--examples/corelib/corelib.pro3
-rw-r--r--examples/corelib/ipc/CMakeLists.txt6
-rw-r--r--examples/corelib/mimetypes/CMakeLists.txt2
-rw-r--r--examples/corelib/platform/CMakeLists.txt3
-rw-r--r--examples/corelib/platform/androidnotifier/CMakeLists.txt55
-rw-r--r--examples/corelib/platform/androidnotifier/android/AndroidManifest.xml51
-rw-r--r--examples/corelib/platform/androidnotifier/android/res/drawable-hdpi/icon.pngbin0 -> 3654 bytes
-rw-r--r--examples/corelib/platform/androidnotifier/android/res/drawable-ldpi/icon.pngbin0 -> 1432 bytes
-rw-r--r--examples/corelib/platform/androidnotifier/android/res/drawable-mdpi/icon.pngbin0 -> 1998 bytes
-rw-r--r--examples/corelib/platform/androidnotifier/android/res/drawable-xhdpi/icon.pngbin0 -> 4549 bytes
-rw-r--r--examples/corelib/platform/androidnotifier/android/res/drawable-xxhdpi/icon.pngbin0 -> 9275 bytes
-rw-r--r--examples/corelib/platform/androidnotifier/android/res/drawable-xxxhdpi/icon.pngbin0 -> 12866 bytes
-rw-r--r--examples/corelib/platform/androidnotifier/android/src/org/qtproject/example/androidnotifier/NotificationClient.java93
-rw-r--r--examples/corelib/platform/androidnotifier/androidnotifier.pro20
-rw-r--r--examples/corelib/platform/androidnotifier/doc/images/androidnotifier.pngbin0 -> 48263 bytes
-rw-r--r--examples/corelib/platform/androidnotifier/doc/src/androidnotifier-example.qdoc84
-rw-r--r--examples/corelib/platform/androidnotifier/images/happy.pngbin0 -> 42346 bytes
-rw-r--r--examples/corelib/platform/androidnotifier/images/sad.pngbin0 -> 41223 bytes
-rw-r--r--examples/corelib/platform/androidnotifier/main.cpp103
-rw-r--r--examples/corelib/platform/androidnotifier/main.qrc6
-rw-r--r--examples/corelib/platform/androidnotifier/notificationclient.cpp90
-rw-r--r--examples/corelib/platform/androidnotifier/notificationclient.h76
-rw-r--r--examples/corelib/platform/platform.pro4
-rw-r--r--examples/corelib/serialization/CMakeLists.txt6
-rw-r--r--examples/corelib/threads/CMakeLists.txt8
-rw-r--r--examples/corelib/tools/CMakeLists.txt6
-rw-r--r--examples/dbus/CMakeLists.txt8
-rw-r--r--examples/dbus/remotecontrolledcar/CMakeLists.txt4
-rw-r--r--examples/embedded/CMakeLists.txt12
-rw-r--r--examples/gui/CMakeLists.txt4
-rw-r--r--examples/network/CMakeLists.txt42
-rw-r--r--examples/network/http/CMakeLists.txt10
-rw-r--r--examples/network/http/http.pro4
-rw-r--r--examples/network/http/main.cpp26
-rw-r--r--examples/opengl/CMakeLists.txt26
-rw-r--r--examples/qpa/CMakeLists.txt4
-rw-r--r--examples/qtconcurrent/CMakeLists.txt10
-rw-r--r--examples/qtestlib/CMakeLists.txt10
-rw-r--r--examples/sql/CMakeLists.txt18
-rw-r--r--examples/vulkan/CMakeLists.txt10
-rw-r--r--examples/vulkan/hellovulkancubes/main.cpp14
-rw-r--r--examples/vulkan/hellovulkantexture/main.cpp14
-rw-r--r--examples/vulkan/hellovulkantriangle/main.cpp14
-rw-r--r--examples/vulkan/hellovulkanwidget/main.cpp14
-rw-r--r--examples/vulkan/hellovulkanwindow/main.cpp15
-rw-r--r--examples/widgets/CMakeLists.txt4
-rw-r--r--examples/widgets/animation/CMakeLists.txt2
-rw-r--r--examples/widgets/desktop/CMakeLists.txt4
-rw-r--r--examples/widgets/dialogs/CMakeLists.txt14
-rw-r--r--examples/widgets/doc/images/regularexpression-example.pngbin78860 -> 75203 bytes
-rw-r--r--examples/widgets/draganddrop/CMakeLists.txt10
-rw-r--r--examples/widgets/effects/CMakeLists.txt4
-rw-r--r--examples/widgets/gestures/CMakeLists.txt2
-rw-r--r--examples/widgets/graphicsview/CMakeLists.txt22
-rw-r--r--examples/widgets/itemviews/CMakeLists.txt42
-rw-r--r--examples/widgets/itemviews/simpledommodel/mainwindow.cpp4
-rw-r--r--examples/widgets/layouts/CMakeLists.txt8
-rw-r--r--examples/widgets/mainwindows/CMakeLists.txt12
-rw-r--r--examples/widgets/painting/CMakeLists.txt24
-rw-r--r--examples/widgets/painting/affine/.prev_CMakeLists.txt175
-rw-r--r--examples/widgets/painting/affine/CMakeLists.txt177
-rw-r--r--examples/widgets/painting/composition/.prev_CMakeLists.txt175
-rw-r--r--examples/widgets/painting/composition/CMakeLists.txt177
-rw-r--r--examples/widgets/painting/deform/.prev_CMakeLists.txt175
-rw-r--r--examples/widgets/painting/deform/CMakeLists.txt177
-rw-r--r--examples/widgets/painting/fontsampler/CMakeLists.txt1
-rw-r--r--examples/widgets/painting/gradients/.prev_CMakeLists.txt175
-rw-r--r--examples/widgets/painting/gradients/CMakeLists.txt177
-rw-r--r--examples/widgets/painting/pathstroke/.prev_CMakeLists.txt175
-rw-r--r--examples/widgets/painting/pathstroke/CMakeLists.txt177
-rw-r--r--examples/widgets/painting/shared/CMakeLists.txt8
-rw-r--r--examples/widgets/painting/shared/arthurstyle.cpp2
-rw-r--r--examples/widgets/painting/shared/use_lib.cmake13
-rw-r--r--examples/widgets/richtext/CMakeLists.txt8
-rw-r--r--examples/widgets/richtext/syntaxhighlighter/mainwindow.cpp12
-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/textedit.cpp143
-rw-r--r--examples/widgets/richtext/textedit/textedit.h6
-rw-r--r--examples/widgets/scroller/CMakeLists.txt2
-rw-r--r--examples/widgets/tools/CMakeLists.txt20
-rw-r--r--examples/widgets/tools/echoplugin/CMakeLists.txt4
-rw-r--r--examples/widgets/tools/regularexpression/regularexpressiondialog.cpp114
-rw-r--r--examples/widgets/tools/regularexpression/regularexpressiondialog.h12
-rw-r--r--examples/widgets/touch/CMakeLists.txt8
-rw-r--r--examples/widgets/tutorials/CMakeLists.txt2
-rw-r--r--examples/widgets/tutorials/addressbook/CMakeLists.txt14
-rw-r--r--examples/widgets/tutorials/gettingStarted/CMakeLists.txt3
-rw-r--r--examples/widgets/tutorials/gettingStarted/gsQt/CMakeLists.txt10
-rw-r--r--examples/widgets/tutorials/gettingStarted/gsQt/part1/CMakeLists.txt10
-rw-r--r--examples/widgets/tutorials/gettingStarted/gsQt/part2/CMakeLists.txt10
-rw-r--r--examples/widgets/tutorials/gettingStarted/gsQt/part3/CMakeLists.txt10
-rw-r--r--examples/widgets/tutorials/gettingStarted/gsQt/part4/CMakeLists.txt10
-rw-r--r--examples/widgets/tutorials/gettingStarted/gsQt/part5/CMakeLists.txt10
-rw-r--r--examples/widgets/tutorials/gettingstartedqt.qdoc7
-rw-r--r--examples/widgets/tutorials/modelview/CMakeLists.txt14
-rw-r--r--examples/widgets/tutorials/notepad/notepad.cpp68
-rw-r--r--examples/widgets/tutorials/notepad/notepad.h12
-rw-r--r--examples/widgets/tutorials/notepad/notepad.ui9
-rw-r--r--examples/widgets/tutorials/widgets/CMakeLists.txt8
-rw-r--r--examples/widgets/widgets/CMakeLists.txt50
-rw-r--r--examples/widgets/widgets/tablet/mainwindow.cpp10
-rw-r--r--examples/xml/CMakeLists.txt10
-rw-r--r--libexec/qt-internal-configure-tests.bat.in7
-rwxr-xr-xlibexec/syncqt.pl3
-rw-r--r--mkspecs/common/macx.conf2
-rw-r--r--mkspecs/features/android/android_deployment_settings.prf2
-rw-r--r--mkspecs/features/mac/default_post.prf30
-rw-r--r--mkspecs/features/qt.prf45
-rw-r--r--mkspecs/features/qt_docs.prf2
-rw-r--r--mkspecs/features/qt_example_installs.prf10
-rw-r--r--mkspecs/features/wayland-scanner.prf2
-rw-r--r--mkspecs/macx-xcode/WorkspaceSettings.xcsettings2
-rw-r--r--mkspecs/wasm-emscripten/qmake.conf7
-rw-r--r--qmake/CMakeLists.txt9
-rw-r--r--qmake/library/proitems.cpp3
-rw-r--r--qmake/qmakelibraryinfo.cpp19
-rw-r--r--qt_cmdline.cmake6
-rw-r--r--src/3rdparty/blake2/qt_attribution.json4
-rw-r--r--src/3rdparty/blake2/src/blake2.h4
-rw-r--r--src/3rdparty/harfbuzz-ng/CMakeLists.txt6
-rw-r--r--src/3rdparty/libjpeg/COPYRIGHT.txt12
-rw-r--r--src/3rdparty/libjpeg/ijg-license.txt34
-rw-r--r--src/3rdparty/libjpeg/qt_attribution.json19
-rw-r--r--src/3rdparty/libjpeg/src/ChangeLog.md9
-rw-r--r--src/3rdparty/libjpeg/src/jchuff.c5
-rw-r--r--src/3rdparty/libjpeg/src/jcphuff.c5
-rw-r--r--src/3rdparty/libjpeg/zlib-license.txt15
-rw-r--r--src/3rdparty/md4/qt_attribution.json2
-rw-r--r--src/3rdparty/md4c/0001-md4c-Fix-MSVC-compiler-level-3-warnings.patch40
-rw-r--r--src/3rdparty/md4c/md4c.c99
-rw-r--r--src/3rdparty/md4c/qt_attribution.json4
-rw-r--r--src/3rdparty/md5/qt_attribution.json2
-rw-r--r--src/3rdparty/pcre2/AUTHORS6
-rw-r--r--src/3rdparty/pcre2/CMakeLists.txt7
-rw-r--r--src/3rdparty/pcre2/LICENCE6
-rw-r--r--src/3rdparty/pcre2/qt_attribution.json12
-rw-r--r--src/3rdparty/pcre2/src/pcre2.h4
-rw-r--r--src/3rdparty/pcre2/src/pcre2_auto_possess.c13
-rw-r--r--src/3rdparty/pcre2/src/pcre2_compile.c52
-rw-r--r--src/3rdparty/pcre2/src/pcre2_jit_compile.c40
-rw-r--r--src/3rdparty/pcre2/src/pcre2_jit_simd_inc.h828
-rw-r--r--src/3rdparty/pcre2/src/pcre2_match.c4
-rw-r--r--src/3rdparty/pcre2/src/sljit/sljitConfigInternal.h2
-rw-r--r--src/3rdparty/pcre2/src/sljit/sljitExecAllocator.c124
-rw-r--r--src/3rdparty/pcre2/src/sljit/sljitNativeS390X.c43
-rw-r--r--src/3rdparty/pcre2/src/sljit/sljitUtils.c10
-rw-r--r--src/3rdparty/pcre2/src/sljit/sljitWXExecAllocator.c8
-rw-r--r--src/3rdparty/sqlite/qt_attribution.json4
-rw-r--r--src/3rdparty/sqlite/sqlite3.c271
-rw-r--r--src/3rdparty/sqlite/sqlite3.h6
-rw-r--r--src/android/jar/src/org/qtproject/qt/android/CursorHandle.java5
-rw-r--r--src/android/jar/src/org/qtproject/qt/android/EditPopupMenu.java7
-rw-r--r--src/android/jar/src/org/qtproject/qt/android/ExtractStyle.java4
-rw-r--r--src/android/jar/src/org/qtproject/qt/android/QtActivityDelegate.java17
-rw-r--r--src/android/jar/src/org/qtproject/qt/android/QtNative.java34
-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.java55
-rw-r--r--src/android/java/res/values-de/strings.xml2
-rw-r--r--src/android/java/res/values-el/strings.xml2
-rw-r--r--src/android/java/res/values-es/strings.xml2
-rw-r--r--src/android/java/res/values-et/strings.xml2
-rw-r--r--src/android/java/res/values-fa/strings.xml2
-rw-r--r--src/android/java/res/values-fr/strings.xml2
-rw-r--r--src/android/java/res/values-in/strings.xml2
-rw-r--r--src/android/java/res/values-it/strings.xml2
-rw-r--r--src/android/java/res/values-ja/strings.xml2
-rw-r--r--src/android/java/res/values-ms/strings.xml2
-rw-r--r--src/android/java/res/values-nb/strings.xml2
-rw-r--r--src/android/java/res/values-nl/strings.xml2
-rw-r--r--src/android/java/res/values-pl/strings.xml2
-rw-r--r--src/android/java/res/values-pt-rBR/strings.xml2
-rw-r--r--src/android/java/res/values-ro/strings.xml2
-rw-r--r--src/android/java/res/values-ru/strings.xml2
-rw-r--r--src/android/java/res/values-se/strings.xml2
-rw-r--r--src/android/java/res/values-zh-rCN/strings.xml2
-rw-r--r--src/android/java/res/values-zh-rTW/strings.xml2
-rw-r--r--src/android/java/res/values/strings.xml2
-rw-r--r--src/android/java/src/org/kde/necessitas/ministro/IMinistro.aidl60
-rw-r--r--src/android/java/src/org/kde/necessitas/ministro/IMinistroCallback.aidl65
-rw-r--r--src/android/java/src/org/qtproject/qt/android/bindings/QtActivity.java7
-rw-r--r--src/android/java/src/org/qtproject/qt/android/bindings/QtActivityLoader.java26
-rw-r--r--src/android/java/src/org/qtproject/qt/android/bindings/QtApplication.java4
-rw-r--r--src/android/java/src/org/qtproject/qt/android/bindings/QtLoader.java224
-rw-r--r--src/android/templates/AndroidManifest.xml106
-rw-r--r--src/android/templates/build.gradle4
-rw-r--r--src/android/templates/res/values/libs.xml10
-rw-r--r--src/concurrent/CMakeLists.txt1
-rw-r--r--src/concurrent/qtconcurrent_global.h15
-rw-r--r--src/concurrent/qtconcurrentfilter.h58
-rw-r--r--src/concurrent/qtconcurrentfunctionwrappers.h45
-rw-r--r--src/concurrent/qtconcurrentmap.h69
-rw-r--r--src/concurrent/qtconcurrentthreadengine.cpp33
-rw-r--r--src/concurrent/qtconcurrentthreadengine.h23
-rw-r--r--src/corelib/.prev_configure.cmake965
-rw-r--r--src/corelib/CMakeLists.txt48
-rw-r--r--src/corelib/Qt6AndroidMacros.cmake123
-rw-r--r--src/corelib/Qt6CTestMacros.cmake43
-rw-r--r--src/corelib/Qt6CoreConfigExtras.cmake.in1
-rw-r--r--src/corelib/Qt6CoreMacros.cmake757
-rw-r--r--src/corelib/animation/qabstractanimation.cpp8
-rw-r--r--src/corelib/animation/qpropertyanimation.h4
-rw-r--r--src/corelib/animation/qsequentialanimationgroup.h6
-rw-r--r--src/corelib/animation/qvariantanimation.cpp4
-rw-r--r--src/corelib/configure.cmake30
-rw-r--r--src/corelib/configure.json1065
-rw-r--r--src/corelib/debug_script.py10
-rw-r--r--src/corelib/doc/include/QtCoreDoc2
-rw-r--r--src/corelib/doc/include/jni.h2
-rw-r--r--src/corelib/doc/qtcore.qdocconf1
-rw-r--r--src/corelib/doc/snippets/cmake-macros/examples.cmake9
-rw-r--r--src/corelib/doc/snippets/code/src_corelib_global_qrandom.cpp2
-rw-r--r--src/corelib/doc/snippets/code/src_corelib_kernel_qobject.cpp2
-rw-r--r--src/corelib/doc/snippets/code/src_corelib_kernel_qvariant.cpp14
-rw-r--r--src/corelib/doc/snippets/code/src_corelib_text_qstring.cpp2
-rw-r--r--src/corelib/doc/snippets/code/src_corelib_text_qstringconverter.cpp2
-rw-r--r--src/corelib/doc/snippets/jni/src_qjniobject.cpp5
-rw-r--r--src/corelib/doc/snippets/permissions/permissions.cpp32
-rw-r--r--src/corelib/doc/snippets/resource-system/CMakeLists.txt23
-rw-r--r--src/corelib/doc/snippets/settings/settings.cpp10
-rw-r--r--src/corelib/doc/src/cmake-macros.qdoc85
-rw-r--r--src/corelib/doc/src/cmake-properties.qdoc17
-rw-r--r--src/corelib/doc/src/external-resources.qdoc5
-rw-r--r--src/corelib/doc/src/includes/qfile-copy.qdocinc11
-rw-r--r--src/corelib/doc/src/objectmodel/bindableproperties.qdoc33
-rw-r--r--src/corelib/doc/src/qt6-changes.qdoc24
-rw-r--r--src/corelib/doc/src/resource-system.qdoc24
-rw-r--r--src/corelib/global/qcompare.h11
-rw-r--r--src/corelib/global/qcompare_impl.h69
-rw-r--r--src/corelib/global/qcompilerdetection.h1
-rw-r--r--src/corelib/global/qconfig-bootstrapped.h2
-rw-r--r--src/corelib/global/qflags.h101
-rw-r--r--src/corelib/global/qglobal.cpp160
-rw-r--r--src/corelib/global/qglobal.h44
-rw-r--r--src/corelib/global/qglobalstatic.h4
-rw-r--r--src/corelib/global/qlibraryinfo.cpp5
-rw-r--r--src/corelib/global/qlogging.cpp8
-rw-r--r--src/corelib/global/qnamespace.h7
-rw-r--r--src/corelib/global/qnamespace.qdoc32
-rw-r--r--src/corelib/global/qnativeinterface.h209
-rw-r--r--src/corelib/global/qrandom.cpp65
-rw-r--r--src/corelib/global/qrandom.h6
-rw-r--r--src/corelib/global/qrandom_p.h3
-rw-r--r--src/corelib/global/qsimd.cpp41
-rw-r--r--src/corelib/global/qsimd_p.h61
-rw-r--r--src/corelib/global/qt_pch.h35
-rw-r--r--src/corelib/io/qabstractfileengine.cpp2
-rw-r--r--src/corelib/io/qabstractfileengine_p.h3
-rw-r--r--src/corelib/io/qdebug.cpp57
-rw-r--r--src/corelib/io/qdebug.h9
-rw-r--r--src/corelib/io/qdebug_p.h3
-rw-r--r--src/corelib/io/qdir.cpp66
-rw-r--r--src/corelib/io/qdiriterator.cpp6
-rw-r--r--src/corelib/io/qfile.cpp26
-rw-r--r--src/corelib/io/qfile_p.h4
-rw-r--r--src/corelib/io/qfiledevice.cpp4
-rw-r--r--src/corelib/io/qfileinfo.cpp42
-rw-r--r--src/corelib/io/qfileinfo.h5
-rw-r--r--src/corelib/io/qfileselector.cpp5
-rw-r--r--src/corelib/io/qfilesystemengine.cpp13
-rw-r--r--src/corelib/io/qfilesystemengine_p.h3
-rw-r--r--src/corelib/io/qfilesystemengine_unix.cpp4
-rw-r--r--src/corelib/io/qfilesystemengine_win.cpp72
-rw-r--r--src/corelib/io/qfilesystementry.cpp38
-rw-r--r--src/corelib/io/qfilesystementry_p.h7
-rw-r--r--src/corelib/io/qfilesystemmetadata_p.h28
-rw-r--r--src/corelib/io/qfsfileengine.cpp9
-rw-r--r--src/corelib/io/qfsfileengine_unix.cpp6
-rw-r--r--src/corelib/io/qfsfileengine_win.cpp114
-rw-r--r--src/corelib/io/qiodevice.cpp13
-rw-r--r--src/corelib/io/qiodevice_p.h7
-rw-r--r--src/corelib/io/qloggingcategory.cpp9
-rw-r--r--src/corelib/io/qloggingregistry.cpp6
-rw-r--r--src/corelib/io/qloggingregistry_p.h2
-rw-r--r--src/corelib/io/qnoncontiguousbytedevice.cpp27
-rw-r--r--src/corelib/io/qnoncontiguousbytedevice_p.h25
-rw-r--r--src/corelib/io/qprocess.cpp176
-rw-r--r--src/corelib/io/qprocess.h2
-rw-r--r--src/corelib/io/qprocess_p.h47
-rw-r--r--src/corelib/io/qprocess_unix.cpp121
-rw-r--r--src/corelib/io/qprocess_win.cpp139
-rw-r--r--src/corelib/io/qresource.cpp3
-rw-r--r--src/corelib/io/qsavefile.cpp2
-rw-r--r--src/corelib/io/qsettings.cpp22
-rw-r--r--src/corelib/io/qsettings_mac.cpp25
-rw-r--r--src/corelib/io/qsettings_p.h4
-rw-r--r--src/corelib/io/qsettings_wasm.cpp8
-rw-r--r--src/corelib/io/qsettings_win.cpp61
-rw-r--r--src/corelib/io/qtemporaryfile.cpp2
-rw-r--r--src/corelib/io/qurl.cpp22
-rw-r--r--src/corelib/io/qurl.h22
-rw-r--r--src/corelib/io/qwindowspipereader.cpp96
-rw-r--r--src/corelib/io/qwindowspipereader_p.h3
-rw-r--r--src/corelib/io/qwindowspipewriter.cpp133
-rw-r--r--src/corelib/io/qwindowspipewriter_p.h11
-rw-r--r--src/corelib/itemmodels/qabstractitemmodel.cpp13
-rw-r--r--src/corelib/itemmodels/qabstractitemmodel_p.h3
-rw-r--r--src/corelib/itemmodels/qabstractproxymodel.cpp3
-rw-r--r--src/corelib/itemmodels/qabstractproxymodel.h4
-rw-r--r--src/corelib/itemmodels/qidentityproxymodel.cpp37
-rw-r--r--src/corelib/itemmodels/qidentityproxymodel_p.h98
-rw-r--r--src/corelib/itemmodels/qitemselectionmodel.cpp108
-rw-r--r--src/corelib/itemmodels/qitemselectionmodel.h15
-rw-r--r--src/corelib/itemmodels/qsortfilterproxymodel.cpp388
-rw-r--r--src/corelib/itemmodels/qsortfilterproxymodel.h43
-rw-r--r--src/corelib/itemmodels/qtransposeproxymodel.cpp30
-rw-r--r--src/corelib/kernel/qapplicationpermission.h (renamed from src/corelib/kernel/qpermission.h)33
-rw-r--r--src/corelib/kernel/qapplicationpermission.qdoc (renamed from src/corelib/kernel/qpermission.qdoc)38
-rw-r--r--src/corelib/kernel/qassociativeiterable.h2
-rw-r--r--src/corelib/kernel/qcfsocketnotifier.cpp14
-rw-r--r--src/corelib/kernel/qcore_mac.mm10
-rw-r--r--src/corelib/kernel/qcore_mac_p.h6
-rw-r--r--src/corelib/kernel/qcoreapplication.cpp81
-rw-r--r--src/corelib/kernel/qcoreapplication.h38
-rw-r--r--src/corelib/kernel/qcoreapplication_android.cpp173
-rw-r--r--src/corelib/kernel/qcoreapplication_p.h23
-rw-r--r--src/corelib/kernel/qcoreapplication_platform.h25
-rw-r--r--src/corelib/kernel/qcoreevent.cpp1
-rw-r--r--src/corelib/kernel/qdeadlinetimer.h2
-rw-r--r--src/corelib/kernel/qeventdispatcher_cf.mm2
-rw-r--r--src/corelib/kernel/qeventdispatcher_cf_p.h2
-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.cpp13
-rw-r--r--src/corelib/kernel/qeventloop.cpp24
-rw-r--r--src/corelib/kernel/qeventloop.h2
-rw-r--r--src/corelib/kernel/qiterable_p.h2
-rw-r--r--src/corelib/kernel/qjni.cpp2384
-rw-r--r--src/corelib/kernel/qjni_p.h292
-rw-r--r--src/corelib/kernel/qjnienvironment.cpp151
-rw-r--r--src/corelib/kernel/qjnienvironment.h11
-rw-r--r--src/corelib/kernel/qjnihelpers.cpp206
-rw-r--r--src/corelib/kernel/qjnihelpers_p.h61
-rw-r--r--src/corelib/kernel/qjniobject.cpp36
-rw-r--r--src/corelib/kernel/qjniobject.h3
-rw-r--r--src/corelib/kernel/qmath.qdoc8
-rw-r--r--src/corelib/kernel/qmetacontainer.cpp8
-rw-r--r--src/corelib/kernel/qmetaobject.cpp2
-rw-r--r--src/corelib/kernel/qmetaobjectbuilder.cpp6
-rw-r--r--src/corelib/kernel/qmetatype.cpp12
-rw-r--r--src/corelib/kernel/qmetatype.h88
-rw-r--r--src/corelib/kernel/qobject.cpp224
-rw-r--r--src/corelib/kernel/qobject.h26
-rw-r--r--src/corelib/kernel/qobject_p.h31
-rw-r--r--src/corelib/kernel/qproperty.cpp240
-rw-r--r--src/corelib/kernel/qproperty.h88
-rw-r--r--src/corelib/kernel/qproperty_p.h47
-rw-r--r--src/corelib/kernel/qsequentialiterable.h2
-rw-r--r--src/corelib/kernel/qsharedmemory.cpp63
-rw-r--r--src/corelib/kernel/qsharedmemory_posix.cpp2
-rw-r--r--src/corelib/kernel/qsocketnotifier.cpp2
-rw-r--r--src/corelib/kernel/qsystemerror.cpp9
-rw-r--r--src/corelib/kernel/qsystemsemaphore.cpp7
-rw-r--r--src/corelib/kernel/qsystemsemaphore_systemv.cpp14
-rw-r--r--src/corelib/kernel/qsystemsemaphore_unix.cpp6
-rw-r--r--src/corelib/kernel/qtranslator.cpp11
-rw-r--r--src/corelib/kernel/qvariant.cpp153
-rw-r--r--src/corelib/kernel/qvariant.h1
-rw-r--r--src/corelib/mimetypes/qmimedatabase.cpp15
-rw-r--r--src/corelib/mimetypes/qmimeprovider.cpp92
-rw-r--r--src/corelib/mimetypes/qmimeprovider_p.h9
-rw-r--r--src/corelib/platform/android/qandroidextras.cpp1034
-rw-r--r--src/corelib/platform/android/qandroidextras_p.h262
-rw-r--r--src/corelib/platform/android/qandroidnativeinterface.cpp149
-rw-r--r--src/corelib/plugin/qlibrary.cpp4
-rw-r--r--src/corelib/plugin/qlibrary_unix.cpp2
-rw-r--r--src/corelib/plugin/quuid.h37
-rw-r--r--src/corelib/serialization/qcborarray.h1
-rw-r--r--src/corelib/serialization/qcbormap.h1
-rw-r--r--src/corelib/serialization/qcborstreamreader.cpp8
-rw-r--r--src/corelib/serialization/qjsoncbor.cpp23
-rw-r--r--src/corelib/serialization/qjsonvalue.cpp18
-rw-r--r--src/corelib/serialization/qjsonvalue.h2
-rw-r--r--src/corelib/serialization/qtextstream.cpp52
-rw-r--r--src/corelib/text/qbytearray.h57
-rw-r--r--src/corelib/text/qbytearrayalgorithms.h53
-rw-r--r--src/corelib/text/qbytearrayview.h15
-rw-r--r--src/corelib/text/qbytearrayview.qdoc12
-rw-r--r--src/corelib/text/qchar.cpp83
-rw-r--r--src/corelib/text/qchar.h2
-rw-r--r--src/corelib/text/qcollator.cpp12
-rw-r--r--src/corelib/text/qlocale.cpp73
-rw-r--r--src/corelib/text/qlocale.qdoc4
-rw-r--r--src/corelib/text/qlocale_data_p.h40
-rw-r--r--src/corelib/text/qlocale_p.h1
-rw-r--r--src/corelib/text/qlocale_unix.cpp4
-rw-r--r--src/corelib/text/qlocale_win.cpp6
-rw-r--r--src/corelib/text/qregularexpression.cpp10
-rw-r--r--src/corelib/text/qstring.cpp188
-rw-r--r--src/corelib/text/qstring.h13
-rw-r--r--src/corelib/text/qstringbuilder.h2
-rw-r--r--src/corelib/text/qstringlist.cpp3
-rw-r--r--src/corelib/text/qstringview.cpp6
-rw-r--r--src/corelib/text/qt_attribution.json2
-rw-r--r--src/corelib/text/qtextboundaryfinder.cpp12
-rw-r--r--src/corelib/text/qunicodetools.cpp4
-rw-r--r--src/corelib/text/qutf8stringview.h6
-rw-r--r--src/corelib/text/qutf8stringview.qdoc6
-rw-r--r--src/corelib/thread/qexception.cpp6
-rw-r--r--src/corelib/thread/qexception.h2
-rw-r--r--src/corelib/thread/qfuture.h33
-rw-r--r--src/corelib/thread/qfuture.qdoc21
-rw-r--r--src/corelib/thread/qfuture_impl.h12
-rw-r--r--src/corelib/thread/qfutureinterface.cpp172
-rw-r--r--src/corelib/thread/qfutureinterface.h77
-rw-r--r--src/corelib/thread/qfutureinterface_p.h38
-rw-r--r--src/corelib/thread/qfuturewatcher.cpp30
-rw-r--r--src/corelib/thread/qfuturewatcher_p.h1
-rw-r--r--src/corelib/thread/qmutex.h3
-rw-r--r--src/corelib/thread/qorderedmutexlocker_p.h37
-rw-r--r--src/corelib/thread/qpromise.h26
-rw-r--r--src/corelib/thread/qpromise.qdoc10
-rw-r--r--src/corelib/thread/qresultstore.h1
-rw-r--r--src/corelib/thread/qsemaphore.cpp86
-rw-r--r--src/corelib/thread/qsemaphore.h16
-rw-r--r--src/corelib/thread/qthread.h3
-rw-r--r--src/corelib/thread/qthread_unix.cpp6
-rw-r--r--src/corelib/time/qcalendar.cpp125
-rw-r--r--src/corelib/time/qcalendar.h16
-rw-r--r--src/corelib/time/qcalendarbackend_p.h8
-rw-r--r--src/corelib/time/qdatetime.cpp846
-rw-r--r--src/corelib/time/qdatetime.h8
-rw-r--r--src/corelib/time/qdatetime_p.h21
-rw-r--r--src/corelib/time/qdatetimeparser.cpp161
-rw-r--r--src/corelib/time/qdatetimeparser_p.h11
-rw-r--r--src/corelib/time/qgregoriancalendar.cpp11
-rw-r--r--src/corelib/time/qgregoriancalendar_p.h4
-rw-r--r--src/corelib/time/qhijricalendar_data_p.h6
-rw-r--r--src/corelib/time/qislamiccivilcalendar.cpp4
-rw-r--r--src/corelib/time/qjalalicalendar.cpp4
-rw-r--r--src/corelib/time/qjalalicalendar_data_p.h6
-rw-r--r--src/corelib/time/qjuliancalendar.cpp4
-rw-r--r--src/corelib/time/qmilankoviccalendar.cpp4
-rw-r--r--src/corelib/time/qromancalendar_data_p.h36
-rw-r--r--src/corelib/time/qtimezone.cpp2
-rw-r--r--src/corelib/time/qtimezoneprivate.cpp70
-rw-r--r--src/corelib/time/qtimezoneprivate_tz.cpp4
-rw-r--r--src/corelib/time/qtimezoneprivate_win.cpp2
-rw-r--r--src/corelib/tools/qarraydata.cpp2
-rw-r--r--src/corelib/tools/qarraydata.h2
-rw-r--r--src/corelib/tools/qarraydataops.h8
-rw-r--r--src/corelib/tools/qarraydatapointer.h3
-rw-r--r--src/corelib/tools/qcryptographichash.cpp507
-rw-r--r--src/corelib/tools/qcryptographichash.h13
-rw-r--r--src/corelib/tools/qduplicatetracker_p.h63
-rw-r--r--src/corelib/tools/qhash.cpp195
-rw-r--r--src/corelib/tools/qhash.h13
-rw-r--r--src/corelib/tools/qhashfunctions.h38
-rw-r--r--src/corelib/tools/qline.cpp2
-rw-r--r--src/corelib/tools/qlist.qdoc11
-rw-r--r--src/corelib/tools/qmap.h28
-rw-r--r--src/corelib/tools/qmap.qdoc4
-rw-r--r--src/corelib/tools/qmessageauthenticationcode.cpp13
-rw-r--r--src/corelib/tools/qmultimap.qdoc14
-rw-r--r--src/corelib/tools/qoffsetstringarray_p.h1
-rw-r--r--src/corelib/tools/qpair.qdoc2
-rw-r--r--src/corelib/tools/qscopedpointer.cpp6
-rw-r--r--src/corelib/tools/qset.qdoc5
-rw-r--r--src/corelib/tools/qsharedpointer.cpp6
-rw-r--r--src/corelib/tools/qsharedpointer_impl.h12
-rw-r--r--src/corelib/tools/qtcore_tools_removed_functions_in_6_3.cpp63
-rw-r--r--src/corelib/tools/qtimeline.h4
-rw-r--r--src/corelib/tools/qvarlengtharray.h2
-rw-r--r--src/dbus/CMakeLists.txt1
-rw-r--r--src/dbus/qdbusargument_p.h1
-rw-r--r--src/dbus/qdbusmarshaller.cpp41
-rw-r--r--src/dbus/qtdbusglobal.h16
-rw-r--r--src/entrypoint/CMakeLists.txt32
-rw-r--r--src/gui/.prev_configure.cmake1225
-rw-r--r--src/gui/CMakeLists.txt19
-rw-r--r--src/gui/accessible/qaccessible.cpp39
-rw-r--r--src/gui/accessible/qaccessible.h27
-rw-r--r--src/gui/configure.cmake14
-rw-r--r--src/gui/configure.json1841
-rw-r--r--src/gui/doc/snippets/code/src_gui_kernel_qkeysequence.cpp4
-rw-r--r--src/gui/doc/snippets/code/src_gui_painting_qtransform.cpp8
-rw-r--r--src/gui/doc/snippets/code/src_gui_vulkan_qvulkaninstance.cpp6
-rw-r--r--src/gui/doc/snippets/code/src_gui_vulkan_qvulkanwindow.cpp2
-rw-r--r--src/gui/doc/snippets/textdocument-listitems/mainwindow.cpp8
-rw-r--r--src/gui/doc/snippets/textdocument-listitemstyles/mainwindow.cpp8
-rw-r--r--src/gui/doc/snippets/textdocument-printing/mainwindow.cpp8
-rw-r--r--src/gui/doc/snippets/textdocument-selections/mainwindow.cpp4
-rw-r--r--src/gui/doc/snippets/transform/main.cpp14
-rw-r--r--src/gui/image/qbitmap.cpp4
-rw-r--r--src/gui/image/qicon.cpp2
-rw-r--r--src/gui/image/qimage.cpp337
-rw-r--r--src/gui/image/qimage.h23
-rw-r--r--src/gui/image/qimage_conversions.cpp394
-rw-r--r--src/gui/image/qimage_p.h51
-rw-r--r--src/gui/image/qimagewriter.cpp10
-rw-r--r--src/gui/image/qpnghandler.cpp4
-rw-r--r--src/gui/itemmodels/qfilesystemmodel.cpp10
-rw-r--r--src/gui/itemmodels/qstandarditemmodel.cpp29
-rw-r--r--src/gui/kernel/qaction.cpp19
-rw-r--r--src/gui/kernel/qaction.h12
-rw-r--r--src/gui/kernel/qclipboard.cpp3
-rw-r--r--src/gui/kernel/qcursor.cpp4
-rw-r--r--src/gui/kernel/qevent.cpp120
-rw-r--r--src/gui/kernel/qevent.h19
-rw-r--r--src/gui/kernel/qeventpoint.cpp8
-rw-r--r--src/gui/kernel/qguiapplication.cpp49
-rw-r--r--src/gui/kernel/qguiapplication.h11
-rw-r--r--src/gui/kernel/qguiapplication_p.h13
-rw-r--r--src/gui/kernel/qinputdevice.h3
-rw-r--r--src/gui/kernel/qinputmethod.h3
-rw-r--r--src/gui/kernel/qkeymapper.cpp12
-rw-r--r--src/gui/kernel/qkeymapper_p.h5
-rw-r--r--src/gui/kernel/qoffscreensurface.cpp16
-rw-r--r--src/gui/kernel/qoffscreensurface.h3
-rw-r--r--src/gui/kernel/qoffscreensurface_platform.h3
-rw-r--r--src/gui/kernel/qopenglcontext.cpp28
-rw-r--r--src/gui/kernel/qopenglcontext.h3
-rw-r--r--src/gui/kernel/qopenglcontext_platform.h10
-rw-r--r--src/gui/kernel/qpalette.cpp5
-rw-r--r--src/gui/kernel/qplatformmenu_p.h2
-rw-r--r--src/gui/kernel/qplatformoffscreensurface.h8
-rw-r--r--src/gui/kernel/qplatformopenglcontext.h8
-rw-r--r--src/gui/kernel/qplatformscreen.cpp19
-rw-r--r--src/gui/kernel/qplatformscreen_p.h18
-rw-r--r--src/gui/kernel/qplatformwindow_p.h7
-rw-r--r--src/gui/kernel/qscreen.cpp23
-rw-r--r--src/gui/kernel/qscreen.h15
-rw-r--r--src/gui/kernel/qstylehints.h25
-rw-r--r--src/gui/kernel/qt_gui_pch.h1
-rw-r--r--src/gui/kernel/qtguiglobal.h15
-rw-r--r--src/gui/kernel/qwindow.cpp25
-rw-r--r--src/gui/kernel/qwindow.h18
-rw-r--r--src/gui/kernel/qwindowsysteminterface.cpp8
-rw-r--r--src/gui/kernel/qwindowsysteminterface.h4
-rw-r--r--src/gui/kernel/qwindowsysteminterface_p.h2
-rw-r--r--src/gui/math3d/qmatrix4x4.cpp8
-rw-r--r--src/gui/math3d/qmatrix4x4.h4
-rw-r--r--src/gui/math3d/qquaternion.cpp6
-rw-r--r--src/gui/painting/qbrush.cpp7
-rw-r--r--src/gui/painting/qcolor.cpp21
-rw-r--r--src/gui/painting/qcolor.h2
-rw-r--r--src/gui/painting/qcolorspace.cpp25
-rw-r--r--src/gui/painting/qcolorspace_p.h9
-rw-r--r--src/gui/painting/qcolortransform.cpp455
-rw-r--r--src/gui/painting/qcolortransform.h1
-rw-r--r--src/gui/painting/qcolortransform_p.h9
-rw-r--r--src/gui/painting/qcolortrclut.cpp17
-rw-r--r--src/gui/painting/qcolortrclut_p.h14
-rw-r--r--src/gui/painting/qcompositionfunctions.cpp1250
-rw-r--r--src/gui/painting/qdrawhelper.cpp1421
-rw-r--r--src/gui/painting/qdrawhelper_avx2.cpp385
-rw-r--r--src/gui/painting/qdrawhelper_p.h133
-rw-r--r--src/gui/painting/qdrawhelper_sse4.cpp75
-rw-r--r--src/gui/painting/qicc.cpp2
-rw-r--r--src/gui/painting/qimagescale.cpp223
-rw-r--r--src/gui/painting/qmemrotate.cpp66
-rw-r--r--src/gui/painting/qpagesize.h2
-rw-r--r--src/gui/painting/qpaintengine_raster.cpp30
-rw-r--r--src/gui/painting/qpaintengine_raster_p.h1
-rw-r--r--src/gui/painting/qpaintengineex.cpp2
-rw-r--r--src/gui/painting/qpainter.cpp106
-rw-r--r--src/gui/painting/qpainter.h28
-rw-r--r--src/gui/painting/qpainter_p.h50
-rw-r--r--src/gui/painting/qpixellayout.cpp850
-rw-r--r--src/gui/painting/qpixellayout_p.h32
-rw-r--r--src/gui/painting/qrasterizer.cpp4
-rw-r--r--src/gui/painting/qregion.cpp1
-rw-r--r--src/gui/painting/qrgbafloat.h140
-rw-r--r--src/gui/painting/qrgbafloat.qdoc265
-rw-r--r--src/gui/painting/qtransform.cpp21
-rw-r--r--src/gui/platform/android/qandroidnativeinterface.cpp2
-rw-r--r--src/gui/platform/macos/qcocoanativeinterface.mm2
-rw-r--r--src/gui/platform/unix/dbusmenu/qdbusmenuconnection.cpp7
-rw-r--r--src/gui/platform/unix/dbusmenu/qdbusmenuconnection_p.h2
-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.cpp20
-rw-r--r--src/gui/platform/windows/qwindowsnativeinterface.cpp2
-rw-r--r--src/gui/rhi/qrhi.cpp122
-rw-r--r--src/gui/rhi/qrhi_p.h27
-rw-r--r--src/gui/rhi/qrhi_p_p.h12
-rw-r--r--src/gui/rhi/qrhid3d11.cpp207
-rw-r--r--src/gui/rhi/qrhid3d11_p_p.h13
-rw-r--r--src/gui/rhi/qrhigles2.cpp259
-rw-r--r--src/gui/rhi/qrhigles2_p_p.h23
-rw-r--r--src/gui/rhi/qrhimetal.mm91
-rw-r--r--src/gui/rhi/qrhimetal_p_p.h3
-rw-r--r--src/gui/rhi/qrhinull.cpp18
-rw-r--r--src/gui/rhi/qrhinull_p_p.h5
-rw-r--r--src/gui/rhi/qrhiprofiler.cpp7
-rw-r--r--src/gui/rhi/qrhivulkan.cpp180
-rw-r--r--src/gui/rhi/qrhivulkan_p_p.h19
-rw-r--r--src/gui/rhi/qshader.cpp7
-rw-r--r--src/gui/rhi/qshader_p.h5
-rw-r--r--src/gui/text/freetype/qfontengine_ft.cpp4
-rw-r--r--src/gui/text/qcssparser.cpp24
-rw-r--r--src/gui/text/qfont.cpp20
-rw-r--r--src/gui/text/qfontdatabase.cpp20
-rw-r--r--src/gui/text/qtextdocumentfragment.cpp3
-rw-r--r--src/gui/text/qtextdocumentlayout.cpp12
-rw-r--r--src/gui/text/qtextengine.cpp13
-rw-r--r--src/gui/text/qtextformat.cpp34
-rw-r--r--src/gui/text/qtextformat.h10
-rw-r--r--src/gui/text/qtexthtmlparser.cpp94
-rw-r--r--src/gui/text/qtexthtmlparser_p.h3
-rw-r--r--src/gui/text/qtextlayout.cpp18
-rw-r--r--src/gui/text/qtextmarkdownimporter.cpp4
-rw-r--r--src/gui/text/unix/qfontconfigdatabase.cpp8
-rw-r--r--src/gui/text/unix/qfontconfigdatabase_p.h1
-rw-r--r--src/gui/text/windows/qwindowsfontenginedirectwrite.cpp3
-rw-r--r--src/gui/util/qvalidator.cpp4
-rw-r--r--src/gui/vulkan/qbasicvulkanplatforminstance.cpp1
-rw-r--r--src/gui/vulkan/qbasicvulkanplatforminstance_p.h2
-rw-r--r--src/gui/vulkan/qvulkanwindow.cpp3
-rw-r--r--src/network/.prev_configure.cmake433
-rw-r--r--src/network/CMakeLists.txt3
-rw-r--r--src/network/access/http2/http2protocol_p.h3
-rw-r--r--src/network/access/qdecompresshelper.cpp34
-rw-r--r--src/network/access/qdecompresshelper_p.h6
-rw-r--r--src/network/access/qhttp2protocolhandler.cpp36
-rw-r--r--src/network/access/qhttpnetworkconnection.cpp138
-rw-r--r--src/network/access/qhttpnetworkconnection_p.h7
-rw-r--r--src/network/access/qhttpnetworkconnectionchannel.cpp24
-rw-r--r--src/network/access/qhttpnetworkconnectionchannel_p.h2
-rw-r--r--src/network/access/qhttpnetworkreply.cpp64
-rw-r--r--src/network/access/qhttpnetworkreply_p.h9
-rw-r--r--src/network/access/qhttpnetworkrequest.cpp14
-rw-r--r--src/network/access/qhttpnetworkrequest_p.h3
-rw-r--r--src/network/access/qhttpprotocolhandler.cpp5
-rw-r--r--src/network/access/qhttpthreaddelegate.cpp7
-rw-r--r--src/network/access/qhttpthreaddelegate_p.h6
-rw-r--r--src/network/access/qnetworkaccessbackend.cpp6
-rw-r--r--src/network/access/qnetworkaccessmanager.cpp6
-rw-r--r--src/network/access/qnetworkdiskcache.cpp9
-rw-r--r--src/network/access/qnetworkreply.cpp21
-rw-r--r--src/network/access/qnetworkreply.h2
-rw-r--r--src/network/access/qnetworkreplyhttpimpl.cpp200
-rw-r--r--src/network/access/qnetworkreplyhttpimpl_p.h15
-rw-r--r--src/network/access/qnetworkreplyimpl.cpp4
-rw-r--r--src/network/access/qnetworkreplyimpl_p.h4
-rw-r--r--src/network/access/qnetworkreplywasmimpl.cpp86
-rw-r--r--src/network/access/qnetworkreplywasmimpl_p.h6
-rw-r--r--src/network/access/qnetworkrequest.cpp46
-rw-r--r--src/network/access/qnetworkrequest.h4
-rw-r--r--src/network/configure.json484
-rw-r--r--src/network/doc/snippets/code/src_network_ssl_qsslconfiguration.cpp2
-rw-r--r--src/network/doc/src/ssl.qdoc4
-rw-r--r--src/network/kernel/qauthenticator.cpp47
-rw-r--r--src/network/kernel/qauthenticator_p.h2
-rw-r--r--src/network/kernel/qnetworkinformation.cpp21
-rw-r--r--src/network/kernel/qnetworkinformation.h6
-rw-r--r--src/network/kernel/qnetworkinformation_p.h11
-rw-r--r--src/network/kernel/qnetworkinterface.cpp21
-rw-r--r--src/network/kernel/qnetworkinterface.h1
-rw-r--r--src/network/kernel/qt_attribution.json2
-rw-r--r--src/network/kernel/qtnetworkglobal.h15
-rw-r--r--src/network/kernel/qurltlds_p.h28726
-rw-r--r--src/network/socket/qabstractsocket.cpp51
-rw-r--r--src/network/socket/qabstractsocketengine_p.h2
-rw-r--r--src/network/socket/qhttpsocketengine.cpp5
-rw-r--r--src/network/socket/qhttpsocketengine_p.h2
-rw-r--r--src/network/socket/qlocalserver.h3
-rw-r--r--src/network/socket/qlocalserver_unix.cpp6
-rw-r--r--src/network/socket/qlocalsocket.cpp7
-rw-r--r--src/network/socket/qlocalsocket.h5
-rw-r--r--src/network/socket/qlocalsocket_p.h2
-rw-r--r--src/network/socket/qlocalsocket_tcp.cpp11
-rw-r--r--src/network/socket/qlocalsocket_unix.cpp11
-rw-r--r--src/network/socket/qlocalsocket_win.cpp131
-rw-r--r--src/network/socket/qnativesocketengine.cpp8
-rw-r--r--src/network/socket/qnativesocketengine_p.h2
-rw-r--r--src/network/socket/qnativesocketengine_unix.cpp49
-rw-r--r--src/network/socket/qnativesocketengine_win.cpp79
-rw-r--r--src/network/socket/qsctpsocket.cpp4
-rw-r--r--src/network/socket/qsocks5socketengine.cpp3
-rw-r--r--src/network/socket/qsocks5socketengine_p.h2
-rw-r--r--src/network/socket/qtcpserver.cpp31
-rw-r--r--src/network/socket/qtcpserver.h3
-rw-r--r--src/network/socket/qtcpserver_p.h1
-rw-r--r--src/network/ssl/qssl.cpp7
-rw-r--r--src/network/ssl/qssl.h15
-rw-r--r--src/network/ssl/qsslconfiguration.cpp2
-rw-r--r--src/network/ssl/qsslsocket.cpp31
-rw-r--r--src/network/ssl/qsslsocket_p.h4
-rw-r--r--src/network/ssl/qtlsbackend.cpp1783
-rw-r--r--src/network/ssl/qtlsbackend_p.h49
-rw-r--r--src/opengl/CMakeLists.txt3
-rw-r--r--src/opengl/qopenglframebufferobject.cpp44
-rw-r--r--src/opengl/qopenglpaintdevice.cpp2
-rw-r--r--src/opengl/qopenglpaintengine.cpp2
-rw-r--r--src/opengl/qopengltextureuploader.cpp39
-rw-r--r--src/opengl/qplatformbackingstoreopenglsupport.cpp3
-rw-r--r--src/opengl/qtopenglglobal.h15
-rw-r--r--src/openglwidgets/CMakeLists.txt1
-rw-r--r--src/openglwidgets/qtopenglwidgetsglobal.h15
-rw-r--r--src/platformsupport/devicediscovery/CMakeLists.txt10
-rw-r--r--src/platformsupport/fbconvenience/CMakeLists.txt4
-rw-r--r--src/platformsupport/input/CMakeLists.txt24
-rw-r--r--src/platformsupport/kmsconvenience/CMakeLists.txt4
-rw-r--r--src/plugins/CMakeLists.txt2
-rw-r--r--src/plugins/imageformats/jpeg/CMakeLists.txt2
-rw-r--r--src/plugins/networkinformation/CMakeLists.txt (renamed from src/plugins/networkinformationbackends/CMakeLists.txt)0
-rw-r--r--src/plugins/networkinformation/android/CMakeLists.txt (renamed from src/plugins/networkinformationbackends/android/CMakeLists.txt)15
-rw-r--r--src/plugins/networkinformation/android/jar/src/org/qtproject/qt/android/networkinformation/QtAndroidNetworkInformation.java (renamed from src/plugins/networkinformationbackends/android/jar/src/org/qtproject/qt/android/networkinformation/QtAndroidNetworkInformation.java)5
-rw-r--r--src/plugins/networkinformation/android/qandroidnetworkinformationbackend.cpp (renamed from src/plugins/networkinformationbackends/android/qandroidnetworkinformationbackend.cpp)6
-rw-r--r--src/plugins/networkinformation/android/wrapper/androidconnectivitymanager.cpp (renamed from src/plugins/networkinformationbackends/android/wrapper/androidconnectivitymanager.cpp)20
-rw-r--r--src/plugins/networkinformation/android/wrapper/androidconnectivitymanager.h (renamed from src/plugins/networkinformationbackends/android/wrapper/androidconnectivitymanager.h)1
-rw-r--r--src/plugins/networkinformation/networklistmanager/CMakeLists.txt13
-rw-r--r--src/plugins/networkinformation/networklistmanager/qnetworklistmanagernetworkinformationbackend.cpp (renamed from src/plugins/networkinformationbackends/networklistmanager/qnetworklistmanagernetworkinformationbackend.cpp)53
-rw-r--r--src/plugins/networkinformation/networkmanager/CMakeLists.txt (renamed from src/plugins/networkinformationbackends/networkmanager/CMakeLists.txt)8
-rw-r--r--src/plugins/networkinformation/networkmanager/qnetworkmanagernetworkinformationbackend.cpp (renamed from src/plugins/networkinformationbackends/networkmanager/qnetworkmanagernetworkinformationbackend.cpp)31
-rw-r--r--src/plugins/networkinformation/networkmanager/qnetworkmanagerservice.cpp (renamed from src/plugins/networkinformationbackends/networkmanager/qnetworkmanagerservice.cpp)19
-rw-r--r--src/plugins/networkinformation/networkmanager/qnetworkmanagerservice.h (renamed from src/plugins/networkinformationbackends/networkmanager/qnetworkmanagerservice.h)16
-rw-r--r--src/plugins/networkinformation/scnetworkreachability/CMakeLists.txt (renamed from src/plugins/networkinformationbackends/scnetworkreachability/CMakeLists.txt)8
-rw-r--r--src/plugins/networkinformation/scnetworkreachability/qscnetworkreachabilitynetworkinformationbackend.mm (renamed from src/plugins/networkinformationbackends/scnetworkreachability/qscnetworkreachabilitynetworkinformationbackend.mm)0
-rw-r--r--src/plugins/networkinformationbackends/networklistmanager/CMakeLists.txt9
-rw-r--r--src/plugins/platforminputcontexts/compose/qcomposeplatforminputcontext.cpp14
-rw-r--r--src/plugins/platforms/android/CMakeLists.txt2
-rw-r--r--src/plugins/platforms/android/androidjniinput.cpp5
-rw-r--r--src/plugins/platforms/android/androidjniinput.h1
-rw-r--r--src/plugins/platforms/android/qandroidinputcontext.cpp45
-rw-r--r--src/plugins/platforms/android/qandroidplatformfiledialoghelper.cpp17
-rw-r--r--src/plugins/platforms/android/qandroidplatformtheme.cpp10
-rw-r--r--src/plugins/platforms/android/qandroidplatformvulkanwindow.cpp2
-rw-r--r--src/plugins/platforms/cocoa/qcocoaaccessibilityelement.mm2
-rw-r--r--src/plugins/platforms/cocoa/qcocoaglcontext.mm8
-rw-r--r--src/plugins/platforms/cocoa/qcocoamenu.mm19
-rw-r--r--src/plugins/platforms/cocoa/qcocoamenuitem.h1
-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/qcocoascreen.h4
-rw-r--r--src/plugins/platforms/cocoa/qcocoascreen.mm19
-rw-r--r--src/plugins/platforms/cocoa/qcocoawindow.mm23
-rw-r--r--src/plugins/platforms/cocoa/qnsview_keys.mm5
-rw-r--r--src/plugins/platforms/cocoa/qnsview_mouse.mm23
-rw-r--r--src/plugins/platforms/direct2d/CMakeLists.txt111
-rw-r--r--src/plugins/platforms/direct2d/qwindowsdirect2dbitmap.cpp3
-rw-r--r--src/plugins/platforms/direct2d/qwindowsdirect2dpaintdevice.cpp3
-rw-r--r--src/plugins/platforms/eglfs/CMakeLists.txt16
-rw-r--r--src/plugins/platforms/eglfs/api/qeglfscontext_p.h1
-rw-r--r--src/plugins/platforms/eglfs/deviceintegration/CMakeLists.txt2
-rw-r--r--src/plugins/platforms/eglfs/deviceintegration/eglfs_emu/CMakeLists.txt2
-rw-r--r--src/plugins/platforms/eglfs/deviceintegration/eglfs_kms/CMakeLists.txt6
-rw-r--r--src/plugins/platforms/eglfs/deviceintegration/eglfs_kms_egldevice/CMakeLists.txt2
-rw-r--r--src/plugins/platforms/eglfs/deviceintegration/eglfs_kms_support/CMakeLists.txt6
-rw-r--r--src/plugins/platforms/eglfs/deviceintegration/eglfs_mali/CMakeLists.txt2
-rw-r--r--src/plugins/platforms/eglfs/deviceintegration/eglfs_openwfd/CMakeLists.txt24
-rw-r--r--src/plugins/platforms/eglfs/deviceintegration/eglfs_viv/CMakeLists.txt2
-rw-r--r--src/plugins/platforms/eglfs/deviceintegration/eglfs_viv_wl/CMakeLists.txt1
-rw-r--r--src/plugins/platforms/eglfs/deviceintegration/eglfs_x11/CMakeLists.txt2
-rw-r--r--src/plugins/platforms/ios/qiosviewcontroller.mm4
-rw-r--r--src/plugins/platforms/ios/quiaccessibilityelement.mm10
-rw-r--r--src/plugins/platforms/offscreen/qoffscreenintegration.cpp2
-rw-r--r--src/plugins/platforms/qnx/CMakeLists.txt8
-rw-r--r--src/plugins/platforms/vkkhrdisplay/CMakeLists.txt4
-rw-r--r--src/plugins/platforms/wasm/CMakeLists.txt16
-rw-r--r--src/plugins/platforms/wasm/qtloader.js63
-rw-r--r--src/plugins/platforms/wasm/qwasmclipboard.cpp25
-rw-r--r--src/plugins/platforms/wasm/qwasmcompositor.cpp10
-rw-r--r--src/plugins/platforms/wasm/qwasmeventtranslator.cpp177
-rw-r--r--src/plugins/platforms/wasm/qwasmeventtranslator.h2
-rw-r--r--src/plugins/platforms/wasm/qwasmintegration.cpp24
-rw-r--r--src/plugins/platforms/wasm/qwasmintegration.h1
-rw-r--r--src/plugins/platforms/wasm/qwasmscreen.cpp13
-rw-r--r--src/plugins/platforms/wasm/qwasmscreen.h4
-rw-r--r--src/plugins/platforms/wasm/qwasmstring.cpp4
-rw-r--r--src/plugins/platforms/wasm/qwasmwindow.cpp17
-rw-r--r--src/plugins/platforms/wasm/qwasmwindow.h1
-rw-r--r--src/plugins/platforms/windows/CMakeLists.txt2
-rw-r--r--src/plugins/platforms/windows/qwindowsglcontext.cpp7
-rw-r--r--src/plugins/platforms/windows/qwindowstheme.cpp11
-rw-r--r--src/plugins/platforms/xcb/CMakeLists.txt34
-rw-r--r--src/plugins/platforms/xcb/qxcbconnection.cpp14
-rw-r--r--src/plugins/platforms/xcb/qxcbconnection.h14
-rw-r--r--src/plugins/platforms/xcb/qxcbconnection_xi2.cpp62
-rw-r--r--src/plugins/platforms/xcb/qxcbcursor.cpp11
-rw-r--r--src/plugins/platforms/xcb/qxcbkeyboard.cpp6
-rw-r--r--src/plugins/platforms/xcb/qxcbsessionmanager.cpp2
-rw-r--r--src/plugins/platforms/xcb/qxcbwindow.cpp14
-rw-r--r--src/plugins/sqldrivers/.prev_configure.cmake77
-rw-r--r--src/plugins/sqldrivers/configure.json201
-rw-r--r--src/plugins/sqldrivers/mysql/qsql_mysql.cpp2
-rw-r--r--src/plugins/sqldrivers/oci/qsql_oci.cpp126
-rw-r--r--src/plugins/sqldrivers/odbc/qsql_odbc.cpp4
-rw-r--r--src/plugins/sqldrivers/sqlite/qsql_sqlite.cpp4
-rw-r--r--src/plugins/styles/mac/qmacstyle_mac.mm103
-rw-r--r--src/plugins/styles/windowsvista/qwindowsxpstyle.cpp4
-rw-r--r--src/plugins/tls/certonly/CMakeLists.txt5
-rw-r--r--src/plugins/tls/certonly/qtlsbackend_cert.cpp2
-rw-r--r--src/plugins/tls/openssl/CMakeLists.txt13
-rw-r--r--src/plugins/tls/openssl/qdtls_openssl.cpp9
-rw-r--r--src/plugins/tls/openssl/qdtls_openssl_p.h2
-rw-r--r--src/plugins/tls/openssl/qsslcontext_openssl.cpp39
-rw-r--r--src/plugins/tls/openssl/qsslcontext_openssl_p.h7
-rw-r--r--src/plugins/tls/openssl/qssldiffiehellmanparameters_openssl.cpp51
-rw-r--r--src/plugins/tls/openssl/qsslsocket_openssl_symbols.cpp17
-rw-r--r--src/plugins/tls/openssl/qsslsocket_openssl_symbols_p.h12
-rw-r--r--src/plugins/tls/openssl/qtls_openssl.cpp18
-rw-r--r--src/plugins/tls/openssl/qtls_openssl_p.h6
-rw-r--r--src/plugins/tls/openssl/qtlsbackend_openssl.cpp63
-rw-r--r--src/plugins/tls/openssl/qtlsbackend_openssl_p.h2
-rw-r--r--src/plugins/tls/openssl/qtlskey_openssl.cpp8
-rw-r--r--src/plugins/tls/openssl/qx509_openssl.cpp2
-rw-r--r--src/plugins/tls/schannel/CMakeLists.txt7
-rw-r--r--src/plugins/tls/schannel/qtls_schannel.cpp128
-rw-r--r--src/plugins/tls/schannel/qtlsbackend_schannel_p.h2
-rw-r--r--src/plugins/tls/schannel/qtlskey_schannel.cpp11
-rw-r--r--src/plugins/tls/securetransport/CMakeLists.txt5
-rw-r--r--src/plugins/tls/securetransport/qtls_st.cpp97
-rw-r--r--src/plugins/tls/securetransport/qtlsbackend_st.cpp5
-rw-r--r--src/plugins/tls/securetransport/qtlsbackend_st_p.h2
-rw-r--r--src/plugins/tls/shared/qdtls_base.cpp3
-rw-r--r--src/plugins/tls/shared/qsslsocket_mac_shared.cpp10
-rw-r--r--src/plugins/tls/shared/qsslsocket_qt.cpp8
-rw-r--r--src/plugins/tls/shared/qtlskey_generic.cpp4
-rw-r--r--src/plugins/tls/shared/qx509_generic.cpp2
-rw-r--r--src/printsupport/CMakeLists.txt68
-rw-r--r--src/printsupport/configure.json102
-rw-r--r--src/printsupport/dialogs/images/printer-24.png (renamed from src/printsupport/dialogs/images/print-24.png)bin914 -> 914 bytes
-rw-r--r--src/printsupport/dialogs/images/printer-32.png (renamed from src/printsupport/dialogs/images/print-32.png)bin1202 -> 1202 bytes
-rw-r--r--src/printsupport/dialogs/images/view-pages-facing-24.png (renamed from src/printsupport/dialogs/images/view-page-sided-24.png)bin700 -> 700 bytes
-rw-r--r--src/printsupport/dialogs/images/view-pages-facing-32.png (renamed from src/printsupport/dialogs/images/view-page-sided-32.png)bin908 -> 908 bytes
-rw-r--r--src/printsupport/dialogs/images/view-pages-overview-24.png (renamed from src/printsupport/dialogs/images/view-page-multi-24.png)bin390 -> 390 bytes
-rw-r--r--src/printsupport/dialogs/images/view-pages-overview-32.png (renamed from src/printsupport/dialogs/images/view-page-multi-32.png)bin556 -> 556 bytes
-rw-r--r--src/printsupport/dialogs/images/view-pages-single-24.png (renamed from src/printsupport/dialogs/images/view-page-one-24.png)bin662 -> 662 bytes
-rw-r--r--src/printsupport/dialogs/images/view-pages-single-32.png (renamed from src/printsupport/dialogs/images/view-page-one-32.png)bin810 -> 810 bytes
-rw-r--r--src/printsupport/dialogs/images/zoom-fit-page-24.png (renamed from src/printsupport/dialogs/images/fit-page-24.png)bin985 -> 985 bytes
-rw-r--r--src/printsupport/dialogs/images/zoom-fit-page-32.png (renamed from src/printsupport/dialogs/images/fit-page-32.png)bin1330 -> 1330 bytes
-rw-r--r--src/printsupport/dialogs/images/zoom-fit-width-24.png (renamed from src/printsupport/dialogs/images/fit-width-24.png)bin706 -> 706 bytes
-rw-r--r--src/printsupport/dialogs/images/zoom-fit-width-32.png (renamed from src/printsupport/dialogs/images/fit-width-32.png)bin1004 -> 1004 bytes
-rw-r--r--src/printsupport/dialogs/qpagesetupdialog_win.cpp31
-rw-r--r--src/printsupport/dialogs/qprintdialog.qrc24
-rw-r--r--src/printsupport/dialogs/qprintdialog_unix.cpp2
-rw-r--r--src/printsupport/dialogs/qprintpreviewdialog.cpp14
-rw-r--r--src/printsupport/doc/src/qtprintsupport-index.qdoc2
-rw-r--r--src/printsupport/doc/src/qtprintsupport-module.qdoc1
-rw-r--r--src/printsupport/kernel/qtprintsupportglobal.h15
-rw-r--r--src/sql/CMakeLists.txt1
-rw-r--r--src/sql/configure.json22
-rw-r--r--src/sql/kernel/qsqlfield.cpp36
-rw-r--r--src/sql/kernel/qsqlquery.cpp4
-rw-r--r--src/sql/kernel/qtsqlglobal.h11
-rw-r--r--src/sql/models/qsqlquerymodel.cpp3
-rw-r--r--src/testlib/CMakeLists.txt1
-rw-r--r--src/testlib/configure.json34
-rw-r--r--src/testlib/doc/snippets/code/src_qtestlib_qtestcase.cpp8
-rw-r--r--src/testlib/qabstracttestlogger_p.h2
-rw-r--r--src/testlib/qtest.h2
-rw-r--r--src/testlib/qtest_gui.h2
-rw-r--r--src/testlib/qtestaccessible.h11
-rw-r--r--src/testlib/qtestcase.cpp101
-rw-r--r--src/testlib/qtestcase.h35
-rw-r--r--src/testlib/qtestresult.cpp17
-rw-r--r--src/testlib/qtestresult_p.h3
-rw-r--r--src/testlib/qttestglobal.h11
-rw-r--r--src/tools/androiddeployqt/CMakeLists.txt2
-rw-r--r--src/tools/androiddeployqt/main.cpp272
-rw-r--r--src/tools/androidtestrunner/main.cpp56
-rw-r--r--src/tools/bootstrap/CMakeLists.txt6
-rw-r--r--src/tools/moc/CMakeLists.txt1
-rw-r--r--src/tools/moc/collectjson.cpp6
-rw-r--r--src/tools/moc/collectjson.h2
-rw-r--r--src/tools/moc/main.cpp54
-rw-r--r--src/tools/moc/moc.cpp11
-rw-r--r--src/tools/moc/moc.h3
-rw-r--r--src/tools/qtpaths/CMakeLists.txt1
-rw-r--r--src/tools/qtpaths/qtpaths.cpp59
-rw-r--r--src/tools/rcc/main.cpp6
-rw-r--r--src/tools/shared/depfile_shared.h80
-rw-r--r--src/tools/uic/CMakeLists.txt1
-rw-r--r--src/tools/uic/cpp/cppwriteincludes.cpp163
-rw-r--r--src/tools/uic/cpp/cppwriteincludes.h45
-rw-r--r--src/tools/uic/main.cpp6
-rw-r--r--src/tools/uic/option.h2
-rw-r--r--src/tools/uic/python/pythonwriteimports.cpp206
-rw-r--r--src/tools/uic/python/pythonwriteimports.h27
-rw-r--r--src/tools/uic/qclass_lib_map.h3
-rw-r--r--src/tools/uic/shared/writeincludesbase.cpp160
-rw-r--r--src/tools/uic/shared/writeincludesbase.h99
-rw-r--r--src/widgets/CMakeLists.txt401
-rw-r--r--src/widgets/configure.json647
-rw-r--r--src/widgets/dialogs/qfiledialog.cpp4
-rw-r--r--src/widgets/dialogs/qmessagebox.cpp26
-rw-r--r--src/widgets/dialogs/qmessagebox.h3
-rw-r--r--src/widgets/doc/src/guibooks.qdoc13
-rw-r--r--src/widgets/graphicsview/qgraphicsitem.cpp10
-rw-r--r--src/widgets/graphicsview/qgraphicsitem.h12
-rw-r--r--src/widgets/graphicsview/qgraphicsscene.cpp2
-rw-r--r--src/widgets/graphicsview/qgraphicsview.cpp2
-rw-r--r--src/widgets/graphicsview/qgraphicsview.h12
-rw-r--r--src/widgets/graphicsview/qgraphicswidget.h3
-rw-r--r--src/widgets/itemviews/qabstractitemview.cpp53
-rw-r--r--src/widgets/itemviews/qabstractitemview.h9
-rw-r--r--src/widgets/itemviews/qabstractitemview_p.h4
-rw-r--r--src/widgets/itemviews/qheaderview.h9
-rw-r--r--src/widgets/itemviews/qlistview.cpp66
-rw-r--r--src/widgets/itemviews/qlistwidget.cpp12
-rw-r--r--src/widgets/itemviews/qlistwidget.h3
-rw-r--r--src/widgets/itemviews/qtableview.cpp28
-rw-r--r--src/widgets/itemviews/qtableview_p.h3
-rw-r--r--src/widgets/itemviews/qtreeview.cpp15
-rw-r--r--src/widgets/itemviews/qtreewidget.cpp98
-rw-r--r--src/widgets/itemviews/qtreewidget.h9
-rw-r--r--src/widgets/itemviews/qtreewidget_p.h9
-rw-r--r--src/widgets/kernel/qapplication.cpp8
-rw-r--r--src/widgets/kernel/qapplication.h2
-rw-r--r--src/widgets/kernel/qboxlayout.cpp2
-rw-r--r--src/widgets/kernel/qformlayout.h12
-rw-r--r--src/widgets/kernel/qgesture.h3
-rw-r--r--src/widgets/kernel/qlayout.cpp27
-rw-r--r--src/widgets/kernel/qlayout.h4
-rw-r--r--src/widgets/kernel/qlayoutitem.cpp30
-rw-r--r--src/widgets/kernel/qlayoutitem.h1
-rw-r--r--src/widgets/kernel/qmacgesturerecognizer.cpp2
-rw-r--r--src/widgets/kernel/qt_widgets_pch.h1
-rw-r--r--src/widgets/kernel/qtwidgetsglobal.h15
-rw-r--r--src/widgets/kernel/qwidget.cpp164
-rw-r--r--src/widgets/kernel/qwidget.h85
-rw-r--r--src/widgets/styles/images/check_list_controller.svg21
-rw-r--r--src/widgets/styles/images/closedock-down-macstyle-10.pngbin0 -> 195 bytes
-rw-r--r--src/widgets/styles/images/closedock-down-macstyle-20.pngbin0 -> 344 bytes
-rw-r--r--src/widgets/styles/images/closedock-down-macstyle-32.pngbin0 -> 474 bytes
-rw-r--r--src/widgets/styles/images/closedock-down-macstyle-48.pngbin0 -> 721 bytes
-rw-r--r--src/widgets/styles/images/closedock-down-macstyle-64.pngbin0 -> 920 bytes
-rw-r--r--src/widgets/styles/images/closedock-down-macstyle.svg15
-rw-r--r--src/widgets/styles/images/closedock-macstyle-10.pngbin0 -> 309 bytes
-rw-r--r--src/widgets/styles/images/closedock-macstyle-20.pngbin0 -> 579 bytes
-rw-r--r--src/widgets/styles/images/closedock-macstyle-32.pngbin0 -> 938 bytes
-rw-r--r--src/widgets/styles/images/closedock-macstyle-48.pngbin0 -> 1236 bytes
-rw-r--r--src/widgets/styles/images/closedock-macstyle-64.pngbin0 -> 1495 bytes
-rw-r--r--src/widgets/styles/images/closedock-macstyle.svg15
-rw-r--r--src/widgets/styles/images/closedock.svg18
-rw-r--r--src/widgets/styles/images/critical.svg14
-rw-r--r--src/widgets/styles/images/dockdock-down-macstyle-10.pngbin0 -> 246 bytes
-rw-r--r--src/widgets/styles/images/dockdock-down-macstyle-20.pngbin0 -> 363 bytes
-rw-r--r--src/widgets/styles/images/dockdock-down-macstyle-32.pngbin0 -> 416 bytes
-rw-r--r--src/widgets/styles/images/dockdock-down-macstyle-48.pngbin0 -> 622 bytes
-rw-r--r--src/widgets/styles/images/dockdock-down-macstyle-64.pngbin0 -> 771 bytes
-rw-r--r--src/widgets/styles/images/dockdock-down-macstyle.svg16
-rw-r--r--src/widgets/styles/images/dockdock-macstyle-10.pngbin0 -> 339 bytes
-rw-r--r--src/widgets/styles/images/dockdock-macstyle-20.pngbin0 -> 555 bytes
-rw-r--r--src/widgets/styles/images/dockdock-macstyle-32.pngbin0 -> 654 bytes
-rw-r--r--src/widgets/styles/images/dockdock-macstyle-48.pngbin0 -> 915 bytes
-rw-r--r--src/widgets/styles/images/dockdock-macstyle-64.pngbin0 -> 1212 bytes
-rw-r--r--src/widgets/styles/images/dockdock-macstyle.svg17
-rw-r--r--src/widgets/styles/images/file_open.svg19
-rw-r--r--src/widgets/styles/images/filedialog_end.svg27
-rw-r--r--src/widgets/styles/images/filedialog_start.svg27
-rw-r--r--src/widgets/styles/images/information.svg14
-rw-r--r--src/widgets/styles/images/qt_close.svg18
-rw-r--r--src/widgets/styles/images/qt_help.svg25
-rw-r--r--src/widgets/styles/images/qt_maximize.svg12
-rw-r--r--src/widgets/styles/images/qt_menu.svg22
-rw-r--r--src/widgets/styles/images/qt_minimize.svg15
-rw-r--r--src/widgets/styles/images/qt_normalizeup.svg20
-rw-r--r--src/widgets/styles/images/qt_shade.svg15
-rw-r--r--src/widgets/styles/images/qt_unshade.svg15
-rw-r--r--src/widgets/styles/images/question.svg21
-rw-r--r--src/widgets/styles/images/toolbar-ext-h.svg16
-rw-r--r--src/widgets/styles/images/toolbar-ext-v.svg16
-rw-r--r--src/widgets/styles/images/warning.svg16
-rw-r--r--src/widgets/styles/qcommonstyle.cpp56
-rw-r--r--src/widgets/styles/qcommonstylepixmaps_p.h2
-rw-r--r--src/widgets/styles/qfusionstyle.cpp11
-rw-r--r--src/widgets/styles/qstyle.cpp9
-rw-r--r--src/widgets/styles/qstyle.h2
-rw-r--r--src/widgets/styles/qstylesheetstyle.cpp247
-rw-r--r--src/widgets/styles/qstylesheetstyle_p.h2
-rw-r--r--src/widgets/styles/qwindowsstyle.cpp2
-rw-r--r--src/widgets/util/qscroller.h3
-rw-r--r--src/widgets/widgets/qabstractscrollarea.cpp2
-rw-r--r--src/widgets/widgets/qabstractscrollarea.h6
-rw-r--r--src/widgets/widgets/qcalendarwidget.h6
-rw-r--r--src/widgets/widgets/qcombobox.cpp43
-rw-r--r--src/widgets/widgets/qcombobox.h3
-rw-r--r--src/widgets/widgets/qcombobox_p.h1
-rw-r--r--src/widgets/widgets/qdatetimeedit.cpp72
-rw-r--r--src/widgets/widgets/qdatetimeedit.h6
-rw-r--r--src/widgets/widgets/qdatetimeedit_p.h20
-rw-r--r--src/widgets/widgets/qdockarealayout.cpp4
-rw-r--r--src/widgets/widgets/qdockwidget.cpp33
-rw-r--r--src/widgets/widgets/qkeysequenceedit.h3
-rw-r--r--src/widgets/widgets/qlabel.cpp4
-rw-r--r--src/widgets/widgets/qlabel.h3
-rw-r--r--src/widgets/widgets/qlineedit.cpp14
-rw-r--r--src/widgets/widgets/qlineedit_p.cpp19
-rw-r--r--src/widgets/widgets/qlineedit_p.h7
-rw-r--r--src/widgets/widgets/qmainwindow.h3
-rw-r--r--src/widgets/widgets/qmainwindowlayout.cpp14
-rw-r--r--src/widgets/widgets/qmdisubwindow.cpp2
-rw-r--r--src/widgets/widgets/qmenu.cpp147
-rw-r--r--src/widgets/widgets/qmenu.h93
-rw-r--r--src/widgets/widgets/qplaintextedit.h3
-rw-r--r--src/widgets/widgets/qpushbutton_p.h2
-rw-r--r--src/widgets/widgets/qtabbar.cpp29
-rw-r--r--src/widgets/widgets/qtabbar.h3
-rw-r--r--src/widgets/widgets/qtextedit.h3
-rw-r--r--src/widgets/widgets/qtoolbar.cpp111
-rw-r--r--src/widgets/widgets/qtoolbar.h55
-rw-r--r--src/widgets/widgets/qtoolbutton.cpp6
-rw-r--r--src/widgets/widgets/qtwidgets_widgets_removed_functions_in_6_3.cpp102
-rw-r--r--src/widgets/widgets/qwidgetlinecontrol.cpp18
-rw-r--r--src/widgets/widgets/qwidgettextcontrol.cpp5
-rw-r--r--src/widgets/widgets/qwidgettextcontrol_p.h6
-rw-r--r--src/xml/CMakeLists.txt1
-rw-r--r--src/xml/configure.json16
-rw-r--r--src/xml/dom/qdom.cpp2
-rw-r--r--src/xml/qtxmlglobal.h14
-rw-r--r--sync.profile3
-rw-r--r--tests/auto/cmake/CMakeLists.txt66
-rw-r--r--tests/auto/cmake/mockplugins/.cmake.conf1
-rw-r--r--tests/auto/cmake/mockplugins/CMakeLists.txt29
-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_QTBUG-63422/CMakeLists.txt4
-rw-r--r--tests/auto/cmake/test_add_big_resource/CMakeLists.txt7
-rw-r--r--tests/auto/cmake/test_add_big_resource/subdir/subdir_resource_file.txt1
-rw-r--r--tests/auto/cmake/test_add_big_resource/subdir/test_add_big_resource.qrc5
-rw-r--r--tests/auto/cmake/test_generating_cpp_exports/.cmake.conf1
-rw-r--r--tests/auto/cmake/test_generating_cpp_exports/CMakeLists.txt19
-rw-r--r--tests/auto/cmake/test_generating_cpp_exports/test_autogenerating_cpp_exports/CMakeLists.txt17
-rw-r--r--tests/auto/cmake/test_generating_cpp_exports/test_autogenerating_cpp_exports/module_api.cpp45
-rw-r--r--tests/auto/cmake/test_generating_cpp_exports/test_autogenerating_cpp_exports/module_api.h51
-rw-r--r--tests/auto/cmake/test_generating_cpp_exports/test_autogenerating_cpp_exports/use_api.cpp47
-rw-r--r--tests/auto/cmake/test_generating_cpp_exports/test_autogenerating_cpp_exports_custom_name/CMakeLists.txt19
-rw-r--r--tests/auto/cmake/test_generating_cpp_exports/test_autogenerating_cpp_exports_custom_name/module_api.cpp45
-rw-r--r--tests/auto/cmake/test_generating_cpp_exports/test_autogenerating_cpp_exports_custom_name/module_api.h51
-rw-r--r--tests/auto/cmake/test_generating_cpp_exports/test_autogenerating_cpp_exports_custom_name/use_api.cpp47
-rw-r--r--tests/auto/cmake/test_global_promotion/CMakeLists.txt13
-rw-r--r--tests/auto/cmake/test_global_promotion/subdir_with_global_qt/CMakeLists.txt14
-rw-r--r--tests/auto/cmake/test_global_promotion/subdir_with_local_qt/CMakeLists.txt12
-rw-r--r--tests/auto/cmake/test_import_plugins/CMakeLists.txt230
-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_static_resources/.cmake.conf1
-rw-r--r--tests/auto/cmake/test_static_resources/CMakeLists.txt21
-rw-r--r--tests/auto/cmake/test_static_resources/mock_static_resources1/CMakeLists.txt17
-rw-r--r--tests/auto/cmake/test_static_resources/mock_static_resources1/configure.cmake2
-rw-r--r--tests/auto/cmake/test_static_resources/mock_static_resources1/dummy.cpp29
-rw-r--r--tests/auto/cmake/test_static_resources/mock_static_resources1/testfile1.txt (renamed from tests/auto/cmake/test_init_resources_static_plugin/testfile1.txt)0
-rw-r--r--tests/auto/cmake/test_static_resources/test_init_resources_static_plugin/CMakeLists.txt (renamed from tests/auto/cmake/test_init_resources_static_plugin/CMakeLists.txt)22
-rw-r--r--tests/auto/cmake/test_static_resources/test_init_resources_static_plugin/pluginmain.cpp (renamed from tests/auto/cmake/test_init_resources_static_plugin/pluginmain.cpp)0
-rw-r--r--tests/auto/cmake/test_static_resources/test_init_resources_static_plugin/test_init_resources_static_plugin.cpp (renamed from tests/auto/cmake/test_init_resources_static_plugin/test_init_resources_static_plugin.cpp)0
-rw-r--r--tests/auto/cmake/test_static_resources/test_init_resources_static_plugin/testfile1.txt (renamed from tests/auto/cmake/test_init_resources_static_plugin/testfile2.txt)0
-rw-r--r--tests/auto/cmake/test_static_resources/test_init_resources_static_plugin/testfile2.txt0
-rw-r--r--tests/auto/cmake/test_static_resources/test_static_resources_propagation/CMakeLists.txt160
-rw-r--r--tests/auto/cmake/test_static_resources/test_static_resources_propagation/main.cpp59
-rw-r--r--tests/auto/concurrent/qtconcurrentfilter/tst_qtconcurrentfilter.cpp328
-rw-r--r--tests/auto/concurrent/qtconcurrentiteratekernel/tst_qtconcurrentiteratekernel.cpp23
-rw-r--r--tests/auto/concurrent/qtconcurrentmap/tst_qtconcurrentmap.cpp300
-rw-r--r--tests/auto/concurrent/qtconcurrentthreadengine/tst_qtconcurrentthreadengine.cpp134
-rw-r--r--tests/auto/corelib/CMakeLists.txt1
-rw-r--r--tests/auto/corelib/animation/qsequentialanimationgroup/tst_qsequentialanimationgroup.cpp2
-rw-r--r--tests/auto/corelib/global/CMakeLists.txt1
-rw-r--r--tests/auto/corelib/global/qflags/tst_qflags.cpp68
-rw-r--r--tests/auto/corelib/global/qglobal/tst_qglobal.cpp42
-rw-r--r--tests/auto/corelib/global/qlogging/tst_qlogging.cpp4
-rw-r--r--tests/auto/corelib/global/qnativeinterface/CMakeLists.txt4
-rw-r--r--tests/auto/corelib/global/qnativeinterface/tst_qnativeinterface.cpp139
-rw-r--r--tests/auto/corelib/global/qtendian/tst_qtendian.cpp6
-rw-r--r--tests/auto/corelib/io/qdir/tst_qdir.cpp19
-rw-r--r--tests/auto/corelib/io/qfile/tst_qfile.cpp84
-rw-r--r--tests/auto/corelib/io/qfileinfo/tst_qfileinfo.cpp136
-rw-r--r--tests/auto/corelib/io/qfileselector/tst_qfileselector.cpp3
-rw-r--r--tests/auto/corelib/io/qfilesystementry/CMakeLists.txt3
-rw-r--r--tests/auto/corelib/io/qfilesystementry/tst_qfilesystementry.cpp13
-rw-r--r--tests/auto/corelib/io/qiodevice/tst_qiodevice.cpp7
-rw-r--r--tests/auto/corelib/io/qloggingregistry/tst_qloggingregistry.cpp30
-rw-r--r--tests/auto/corelib/io/qsettings/tst_qsettings.cpp7
-rw-r--r--tests/auto/corelib/io/qtemporarydir/CMakeLists.txt5
-rw-r--r--tests/auto/corelib/io/qtemporarydir/tst_qtemporarydir.cpp23
-rw-r--r--tests/auto/corelib/io/qtemporaryfile/CMakeLists.txt5
-rw-r--r--tests/auto/corelib/io/qtemporaryfile/tst_qtemporaryfile.cpp27
-rw-r--r--tests/auto/corelib/io/qurl/tst_qurl.cpp4
-rw-r--r--tests/auto/corelib/itemmodels/qconcatenatetablesproxymodel/tst_qconcatenatetablesproxymodel.cpp40
-rw-r--r--tests/auto/corelib/itemmodels/qidentityproxymodel/tst_qidentityproxymodel.cpp37
-rw-r--r--tests/auto/corelib/itemmodels/qitemselectionmodel/tst_qitemselectionmodel.cpp45
-rw-r--r--tests/auto/corelib/itemmodels/qsortfilterproxymodel_common/tst_qsortfilterproxymodel.cpp233
-rw-r--r--tests/auto/corelib/itemmodels/qsortfilterproxymodel_common/tst_qsortfilterproxymodel.h15
-rw-r--r--tests/auto/corelib/itemmodels/qsortfilterproxymodel_regularexpression/CMakeLists.txt3
-rw-r--r--tests/auto/corelib/itemmodels/qstringlistmodel/tst_qstringlistmodel.cpp30
-rw-r--r--tests/auto/corelib/itemmodels/qtransposeproxymodel/tst_qtransposeproxymodel.cpp80
-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.cpp52
-rw-r--r--tests/auto/corelib/kernel/qmetatype/tst_qmetatype2.cpp15
-rw-r--r--tests/auto/corelib/kernel/qobject/tst_qobject.cpp2
-rw-r--r--tests/auto/corelib/kernel/qproperty/tst_qproperty.cpp199
-rw-r--r--tests/auto/corelib/kernel/qsharedmemory/tst_qsharedmemory.cpp22
-rw-r--r--tests/auto/corelib/kernel/qsocketnotifier/CMakeLists.txt2
-rw-r--r--tests/auto/corelib/kernel/qtranslator/CMakeLists.txt2
-rw-r--r--tests/auto/corelib/kernel/qtranslator/android_testdata.qrc8
-rw-r--r--tests/auto/corelib/kernel/qtranslator/qtranslator.qrc6
-rw-r--r--tests/auto/corelib/kernel/qtranslator/tst_qtranslator.cpp46
-rw-r--r--tests/auto/corelib/kernel/qvariant/tst_qvariant.cpp10
-rw-r--r--tests/auto/corelib/mimetypes/qmimedatabase/qmimedatabase-cache/CMakeLists.txt50
-rw-r--r--tests/auto/corelib/mimetypes/qmimedatabase/qmimedatabase-xml/CMakeLists.txt50
-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.cpp194
-rw-r--r--tests/auto/corelib/plugin/qfactoryloader/test/CMakeLists.txt1
-rw-r--r--tests/auto/corelib/plugin/qlibrary/tst/CMakeLists.txt2
-rw-r--r--tests/auto/corelib/serialization/json/tst_qtjson.cpp6
-rw-r--r--tests/auto/corelib/serialization/qtextstream/test/CMakeLists.txt10
-rw-r--r--tests/auto/corelib/text/qbytearrayview/tst_qbytearrayview.cpp15
-rw-r--r--tests/auto/corelib/text/qchar/tst_qchar.cpp19
-rw-r--r--tests/auto/corelib/text/qlatin1string/tst_qlatin1string.cpp31
-rw-r--r--tests/auto/corelib/text/qlocale/tst_qlocale.cpp128
-rw-r--r--tests/auto/corelib/text/qstring/tst_qstring.cpp994
-rw-r--r--tests/auto/corelib/text/qstringapisymmetry/tst_qstringapisymmetry.cpp124
-rw-r--r--tests/auto/corelib/text/qstringlist/tst_qstringlist.cpp9
-rw-r--r--tests/auto/corelib/thread/qfuture/tst_qfuture.cpp29
-rw-r--r--tests/auto/corelib/thread/qfuturewatcher/tst_qfuturewatcher.cpp75
-rw-r--r--tests/auto/corelib/thread/qpromise/tst_qpromise.cpp1
-rw-r--r--tests/auto/corelib/thread/qsemaphore/tst_qsemaphore.cpp36
-rw-r--r--tests/auto/corelib/thread/qthread/tst_qthread.cpp5
-rw-r--r--tests/auto/corelib/thread/qthreadonce/CMakeLists.txt2
-rw-r--r--tests/auto/corelib/thread/qthreadonce/tst_qthreadonce.cpp9
-rw-r--r--tests/auto/corelib/time/qdatetime/tst_qdatetime.cpp1188
-rw-r--r--tests/auto/corelib/time/qtimezone/tst_qtimezone.cpp3
-rw-r--r--tests/auto/corelib/tools/CMakeLists.txt1
-rw-r--r--tests/auto/corelib/tools/collections/tst_collections.cpp2
-rw-r--r--tests/auto/corelib/tools/qarraydata/tst_qarraydata.cpp2
-rw-r--r--tests/auto/corelib/tools/qcryptographichash/tst_qcryptographichash.cpp119
-rw-r--r--tests/auto/corelib/tools/qduplicatetracker/tst_qduplicatetracker.cpp3
-rw-r--r--tests/auto/corelib/tools/qfreelist/CMakeLists.txt2
-rw-r--r--tests/auto/corelib/tools/qhash/tst_qhash.cpp637
-rw-r--r--tests/auto/corelib/tools/qhashfunctions/tst_qhashfunctions.cpp40
-rw-r--r--tests/auto/corelib/tools/qhashseed/CMakeLists.txt14
-rw-r--r--tests/auto/corelib/tools/qhashseed/tst_qhashseed.cpp188
-rw-r--r--tests/auto/corelib/tools/qhashseed/tst_qhashseed_helper.cpp39
-rw-r--r--tests/auto/corelib/tools/qlist/tst_qlist.cpp441
-rw-r--r--tests/auto/corelib/tools/qmap/tst_qmap.cpp937
-rw-r--r--tests/auto/corelib/tools/qset/tst_qset.cpp177
-rw-r--r--tests/auto/corelib/tools/qsharedpointer/tst_qsharedpointer.cpp21
-rw-r--r--tests/auto/gui/CMakeLists.txt1
-rw-r--r--tests/auto/gui/image/qimage/tst_qimage.cpp102
-rw-r--r--tests/auto/gui/image/qimagewriter/tst_qimagewriter.cpp63
-rw-r--r--tests/auto/gui/itemmodels/qfilesystemmodel/tst_qfilesystemmodel.cpp15
-rw-r--r--tests/auto/gui/itemmodels/qstandarditemmodel/tst_qstandarditemmodel.cpp85
-rw-r--r--tests/auto/gui/kernel/qwindow/tst_qwindow.cpp45
-rw-r--r--tests/auto/gui/math3d/qmatrixnxn/tst_qmatrixnxn.cpp46
-rw-r--r--tests/auto/gui/math3d/qquaternion/tst_qquaternion.cpp36
-rw-r--r--tests/auto/gui/painting/qcolor/tst_qcolor.cpp3
-rw-r--r--tests/auto/gui/painting/qcolorspace/tst_qcolorspace.cpp81
-rw-r--r--tests/auto/gui/painting/qpainter/tst_qpainter.cpp3
-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/BLACKLIST2
-rw-r--r--tests/auto/gui/qvulkan/tst_qvulkan.cpp2
-rw-r--r--tests/auto/gui/rhi/qrhi/BLACKLIST6
-rw-r--r--tests/auto/gui/rhi/qrhi/tst_qrhi.cpp326
-rw-r--r--tests/auto/gui/rhi/qshader/tst_qshader.cpp14
-rw-r--r--tests/auto/gui/text/qtextlayout/tst_qtextlayout.cpp14
-rw-r--r--tests/auto/network/access/http2/tst_http2.cpp107
-rw-r--r--tests/auto/network/access/qdecompresshelper/tst_qdecompresshelper.cpp12
-rw-r--r--tests/auto/network/access/qnetworkdiskcache/tst_qnetworkdiskcache.cpp48
-rw-r--r--tests/auto/network/access/qnetworkreply/4G.brbin0 -> 3361 bytes
-rw-r--r--tests/auto/network/access/qnetworkreply/BLACKLIST3
-rw-r--r--tests/auto/network/access/qnetworkreply/data/gzip.rcc.cpp1235
-rw-r--r--tests/auto/network/access/qnetworkreply/data/zstandard.rcc.cpp116
-rw-r--r--tests/auto/network/access/qnetworkreply/test/CMakeLists.txt7
-rw-r--r--tests/auto/network/access/qnetworkreply/tst_qnetworkreply.cpp399
-rw-r--r--tests/auto/network/kernel/qauthenticator/tst_qauthenticator.cpp18
-rw-r--r--tests/auto/network/kernel/qhostinfo/tst_qhostinfo.cpp2
-rw-r--r--tests/auto/network/kernel/qnetworkinformation/tst_qnetworkinformation.cpp37
-rw-r--r--tests/auto/network/socket/platformsocketengine/CMakeLists.txt2
-rw-r--r--tests/auto/network/socket/platformsocketengine/tst_platformsocketengine.cpp6
-rw-r--r--tests/auto/network/socket/qhttpsocketengine/CMakeLists.txt2
-rw-r--r--tests/auto/network/socket/qlocalsocket/tst_qlocalsocket.cpp205
-rw-r--r--tests/auto/network/socket/qsocks5socketengine/CMakeLists.txt2
-rw-r--r--tests/auto/network/socket/qsocks5socketengine/tst_qsocks5socketengine.cpp2
-rw-r--r--tests/auto/network/socket/qtcpserver/BLACKLIST3
-rw-r--r--tests/auto/network/socket/qtcpsocket/BLACKLIST2
-rw-r--r--tests/auto/network/socket/qudpsocket/BLACKLIST3
-rw-r--r--tests/auto/network/socket/qudpsocket/tst_qudpsocket.cpp5
-rw-r--r--tests/auto/network/ssl/qdtls/tst_qdtls.cpp10
-rw-r--r--tests/auto/network/ssl/qdtlscookie/tst_qdtlscookie.cpp10
-rw-r--r--tests/auto/network/ssl/qocsp/tst_qocsp.cpp29
-rw-r--r--tests/auto/network/ssl/qsslcertificate/tst_qsslcertificate.cpp34
-rw-r--r--tests/auto/network/ssl/qssldiffiehellmanparameters/tst_qssldiffiehellmanparameters.cpp30
-rw-r--r--tests/auto/network/ssl/qsslellipticcurve/tst_qsslellipticcurve.cpp24
-rw-r--r--tests/auto/network/ssl/qsslkey/tst_qsslkey.cpp45
-rw-r--r--tests/auto/network/ssl/qsslsocket/tst_qsslsocket.cpp383
-rw-r--r--tests/auto/network/ssl/shared/qopenssl_symbols.h810
-rw-r--r--tests/auto/network/ssl/shared/tlshelpers.h61
-rw-r--r--tests/auto/other/CMakeLists.txt3
-rw-r--r--tests/auto/other/android/tst_android.cpp24
-rw-r--r--tests/auto/other/lancelot/paintcommands.cpp8
-rw-r--r--tests/auto/other/lancelot/tst_lancelot.cpp25
-rw-r--r--tests/auto/other/qobjectrace/tst_qobjectrace.cpp49
-rw-r--r--tests/auto/testlib/selftests/CMakeLists.txt2
-rw-r--r--tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp12
-rw-r--r--tests/auto/testlib/selftests/expected_cmptest.junitxml7
-rw-r--r--tests/auto/testlib/selftests/expected_cmptest.lightxml8
-rw-r--r--tests/auto/testlib/selftests/expected_cmptest.tap114
-rw-r--r--tests/auto/testlib/selftests/expected_cmptest.teamcity5
-rw-r--r--tests/auto/testlib/selftests/expected_cmptest.txt6
-rw-r--r--tests/auto/testlib/selftests/expected_cmptest.xml8
-rw-r--r--tests/auto/testlib/selftests/expected_pairdiagnostics.junitxml8
-rw-r--r--tests/auto/testlib/selftests/expected_pairdiagnostics.lightxml8
-rw-r--r--tests/auto/testlib/selftests/expected_pairdiagnostics.tap16
-rw-r--r--tests/auto/testlib/selftests/expected_pairdiagnostics.teamcity4
-rw-r--r--tests/auto/testlib/selftests/expected_pairdiagnostics.txt8
-rw-r--r--tests/auto/testlib/selftests/expected_pairdiagnostics.xml8
-rw-r--r--tests/auto/testlib/selftests/expected_testlib.junitxml2
-rw-r--r--tests/auto/testlib/selftests/expected_testlib.lightxml2
-rw-r--r--tests/auto/testlib/selftests/expected_testlib.tap2
-rw-r--r--tests/auto/testlib/selftests/expected_testlib.teamcity2
-rw-r--r--tests/auto/testlib/selftests/expected_testlib.txt2
-rw-r--r--tests/auto/testlib/selftests/expected_testlib.xml2
-rw-r--r--tests/auto/testlib/selftests/xunit/tst_xunit.cpp4
-rw-r--r--tests/auto/tools/moc/allmocs_baseline_in.json16
-rw-r--r--tests/auto/tools/moc/tst_moc.cpp28
-rw-r--r--tests/auto/tools/rcc/CMakeLists.txt19
-rw-r--r--tests/auto/tools/uic/baseline/config.ui.py15
-rw-r--r--tests/auto/widgets/graphicsview/qgraphicsscene/tst_qgraphicsscene.cpp8
-rw-r--r--tests/auto/widgets/itemviews/qabstractitemview/tst_qabstractitemview.cpp458
-rw-r--r--tests/auto/widgets/itemviews/qitemdelegate/tst_qitemdelegate.cpp14
-rw-r--r--tests/auto/widgets/itemviews/qlistview/BLACKLIST3
-rw-r--r--tests/auto/widgets/itemviews/qlistview/tst_qlistview.cpp216
-rw-r--r--tests/auto/widgets/itemviews/qlistwidget/tst_qlistwidget.cpp68
-rw-r--r--tests/auto/widgets/itemviews/qtableview/tst_qtableview.cpp72
-rw-r--r--tests/auto/widgets/itemviews/qtablewidget/tst_qtablewidget.cpp71
-rw-r--r--tests/auto/widgets/itemviews/qtreeview/tst_qtreeview.cpp4
-rw-r--r--tests/auto/widgets/itemviews/qtreewidget/tst_qtreewidget.cpp73
-rw-r--r--tests/auto/widgets/kernel/qlayout/tst_qlayout.cpp24
-rw-r--r--tests/auto/widgets/kernel/qwidget/BLACKLIST1
-rw-r--r--tests/auto/widgets/kernel/qwidget/tst_qwidget.cpp78
-rw-r--r--tests/auto/widgets/kernel/qwidgetaction/tst_qwidgetaction.cpp12
-rw-r--r--tests/auto/widgets/styles/qstylesheetstyle/tst_qstylesheetstyle.cpp67
-rw-r--r--tests/auto/widgets/util/qcompleter/tst_qcompleter.cpp20
-rw-r--r--tests/auto/widgets/widgets/qcombobox/tst_qcombobox.cpp46
-rw-r--r--tests/auto/widgets/widgets/qdatetimeedit/tst_qdatetimeedit.cpp62
-rw-r--r--tests/auto/widgets/widgets/qlineedit/tst_qlineedit.cpp70
-rw-r--r--tests/auto/widgets/widgets/qmenu/tst_qmenu.cpp87
-rw-r--r--tests/auto/widgets/widgets/qscrollbar/tst_qscrollbar.cpp2
-rw-r--r--tests/auto/widgets/widgets/qtabbar/tst_qtabbar.cpp70
-rw-r--r--tests/auto/widgets/widgets/qtoolbutton/tst_qtoolbutton.cpp59
-rw-r--r--tests/benchmarks/corelib/io/qdiriterator/main.cpp28
-rw-r--r--tests/benchmarks/corelib/io/qfile/CMakeLists.txt2
-rw-r--r--tests/benchmarks/corelib/io/qfile/tst_bench_qfile.cpp (renamed from tests/benchmarks/corelib/io/qfile/main.cpp)439
-rw-r--r--tests/benchmarks/corelib/io/qfileinfo/main.cpp15
-rw-r--r--tests/benchmarks/corelib/io/qprocess/tst_bench_qprocess.cpp10
-rw-r--r--tests/benchmarks/corelib/text/CMakeLists.txt5
-rw-r--r--tests/benchmarks/corelib/text/qstring/CMakeLists.txt2
-rw-r--r--tests/benchmarks/corelib/text/qstring/tst_bench_qstring.cpp (renamed from tests/benchmarks/corelib/text/qstring/main.cpp)140
-rw-r--r--tests/benchmarks/corelib/text/qstringlist/main.cpp6
-rw-r--r--tests/benchmarks/corelib/text/qstringtokenizer/CMakeLists.txt17
-rw-r--r--tests/benchmarks/corelib/text/qstringtokenizer/data/lorem.txt40
-rw-r--r--tests/benchmarks/corelib/text/qstringtokenizer/main.cpp145
-rw-r--r--tests/benchmarks/corelib/thread/CMakeLists.txt1
-rw-r--r--tests/benchmarks/corelib/thread/qfuture/CMakeLists.txt11
-rw-r--r--tests/benchmarks/corelib/thread/qfuture/tst_qfuture.cpp320
-rw-r--r--tests/benchmarks/corelib/tools/qlist/main.cpp110
-rw-r--r--tests/benchmarks/corelib/tools/qmap/CMakeLists.txt2
-rw-r--r--tests/benchmarks/corelib/tools/qmap/tst_bench_qmap.cpp (renamed from tests/benchmarks/corelib/tools/qmap/main.cpp)122
-rw-r--r--tests/benchmarks/corelib/tools/qvector/CMakeLists.txt6
-rw-r--r--tests/benchmarks/corelib/tools/qvector/outofline.cpp28
-rw-r--r--tests/benchmarks/corelib/tools/qvector/qrawvector.h13
-rw-r--r--tests/benchmarks/corelib/tools/qvector/tst_bench_qvector.cpp (renamed from tests/benchmarks/corelib/tools/qvector/main.cpp)267
-rw-r--r--tests/benchmarks/dbus/qdbusperformance/server/CMakeLists.txt4
-rw-r--r--tests/benchmarks/dbus/qdbusperformance/tst_qdbusperformance.cpp4
-rw-r--r--tests/benchmarks/gui/painting/lancebench/CMakeLists.txt89
-rw-r--r--tests/benchmarks/network/socket/qlocalsocket/tst_qlocalsocket.cpp35
-rw-r--r--tests/benchmarks/sql/kernel/qsqlrecord/CMakeLists.txt2
-rw-r--r--tests/benchmarks/sql/kernel/qsqlrecord/tst_bench_qsqlrecord.cpp (renamed from tests/benchmarks/sql/kernel/qsqlrecord/tst_qsqlrecord.cpp)62
-rw-r--r--tests/benchmarks/widgets/graphicsview/qgraphicsview/CMakeLists.txt2
-rw-r--r--tests/libfuzzer/README24
-rw-r--r--tests/libfuzzer/corelib/serialization/qcborstreamreader/next/CMakeLists.txt27
-rw-r--r--tests/libfuzzer/corelib/serialization/qcborvalue/fromcbor/CMakeLists.txt27
-rw-r--r--tests/libfuzzer/corelib/serialization/qtextstream/extractionoperator-float/CMakeLists.txt27
-rw-r--r--tests/libfuzzer/corelib/serialization/qxmlstream/qxmlstreamreader/readnext/CMakeLists.txt27
-rw-r--r--tests/libfuzzer/corelib/text/qregularexpression/optimize/CMakeLists.txt40
-rw-r--r--tests/libfuzzer/corelib/time/qdatetime/fromstring/CMakeLists.txt27
-rw-r--r--tests/libfuzzer/corelib/tools/qcryptographichash/result/CMakeLists.txt27
-rw-r--r--tests/libfuzzer/gui/image/qimage/loadfromdata/CMakeLists.txt33
-rw-r--r--tests/libfuzzer/gui/painting/qcolorspace/fromiccprofile/CMakeLists.txt47
-rw-r--r--tests/libfuzzer/gui/text/qtextdocument/sethtml/CMakeLists.txt47
-rw-r--r--tests/libfuzzer/gui/text/qtextdocument/sethtml/main.cpp7
-rw-r--r--tests/libfuzzer/gui/text/qtextdocument/setmarkdown/CMakeLists.txt47
-rw-r--r--tests/libfuzzer/gui/text/qtextdocument/setmarkdown/main.cpp7
-rw-r--r--tests/libfuzzer/gui/text/qtextlayout/beginlayout/CMakeLists.txt47
-rw-r--r--tests/libfuzzer/network/ssl/qsslcertificate/qsslcertificate/pem/CMakeLists.txt29
-rw-r--r--tests/libfuzzer/network/ssl/qsslcertificate/qsslcertificate/pem/main.cpp4
-rw-r--r--tests/manual/lance/CMakeLists.txt146
-rw-r--r--tests/manual/qnetworkinformation/CMakeLists.txt6
-rw-r--r--tests/manual/qnetworkinformation/tst_qnetworkinformation.cpp78
-rw-r--r--tests/manual/qvulkaninstance/main.cpp6
-rw-r--r--tests/manual/rhi/CMakeLists.txt1
-rw-r--r--tests/manual/rhi/hellominimalcrossgfxtriangle/main.cpp13
-rw-r--r--tests/manual/rhi/multiwindow/multiwindow.cpp13
-rw-r--r--tests/manual/rhi/multiwindow_threaded/multiwindow_threaded.cpp13
-rw-r--r--tests/manual/rhi/offscreen/offscreen.cpp13
-rw-r--r--tests/manual/rhi/rhi.pro3
-rw-r--r--tests/manual/rhi/shared/examplefw.h19
-rw-r--r--tests/manual/rhi/tex3d/CMakeLists.txt20
-rw-r--r--tests/manual/rhi/tex3d/buildshaders.bat2
-rw-r--r--tests/manual/rhi/tex3d/tex3d.cpp274
-rw-r--r--tests/manual/rhi/tex3d/tex3d.pro8
-rw-r--r--tests/manual/rhi/tex3d/tex3d.qrc6
-rw-r--r--tests/manual/rhi/tex3d/texture3d.frag24
-rw-r--r--tests/manual/rhi/tex3d/texture3d.frag.qsbbin0 -> 1729 bytes
-rw-r--r--tests/manual/rhi/tex3d/texture3d.vert22
-rw-r--r--tests/manual/rhi/tex3d/texture3d.vert.qsbbin0 -> 1541 bytes
-rw-r--r--tests/manual/startsystemmove/main.cpp9
-rw-r--r--tests/manual/touch/main.cpp4
-rw-r--r--tests/shared/filesystem.h57
-rwxr-xr-xutil/android/android_emulator_launcher.sh12
-rw-r--r--util/cmake/helper.py65
-rwxr-xr-xutil/cmake/pro2cmake.py25
-rw-r--r--util/locale_database/cldr.py217
-rwxr-xr-xutil/locale_database/cldr2qlocalexml.py86
-rwxr-xr-xutil/locale_database/cldr2qtimezone.py445
-rw-r--r--[-rwxr-xr-x]util/locale_database/dateconverter.py3
-rw-r--r--util/locale_database/enumdata.py38
-rw-r--r--util/locale_database/ldml.py106
-rw-r--r--util/locale_database/localetools.py164
-rw-r--r--util/locale_database/qlocalexml.py132
-rw-r--r--util/locale_database/qlocalexml.rnc143
-rwxr-xr-xutil/locale_database/qlocalexml2cpp.py321
1433 files changed, 61125 insertions, 43816 deletions
diff --git a/.cmake.conf b/.cmake.conf
index 099f7e7563..a63f70d6b9 100644
--- a/.cmake.conf
+++ b/.cmake.conf
@@ -1,4 +1,5 @@
set(QT_REPO_MODULE_VERSION "6.2.0")
+set(QT_REPO_MODULE_PRERELEASE_VERSION_SEGMENT "alpha1")
# Minimum requirement for building Qt
set(QT_MIN_SUPPORTED_CMAKE_VERSION "3.16")
diff --git a/.gitignore b/.gitignore
index 6fbb1d40b4..b809298028 100644
--- a/.gitignore
+++ b/.gitignore
@@ -38,6 +38,7 @@ qt*-config_p.h
qt*-config.pri
*.pyc
.mypy_cache
+__pycache__
/include/
diff --git a/.prev_configure.cmake b/.prev_configure.cmake
deleted file mode 100644
index 84741e4406..0000000000
--- a/.prev_configure.cmake
+++ /dev/null
@@ -1,1083 +0,0 @@
-
-
-#### Inputs
-
-
-
-#### Libraries
-
-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)
-
-
-#### Tests
-
-# machineTuple
-qt_config_compile_test_machine_tuple("machine tuple")
-
-# cxx14
-qt_config_compile_test(cxx14
- LABEL "C++14 support"
- CODE
-"#if __cplusplus > 201103L
-// Compiler claims to support C++14, trust it
-#else
-# error __cplusplus must be > 201103L (the value of C++11)
-#endif
-
-int main(void)
-{
- /* BEGIN TEST: */
- /* END TEST: */
- return 0;
-}
-"
- CXX_STANDARD 14
-)
-
-# cxx17
-qt_config_compile_test(cxx17
- LABEL "C++17 support"
- CODE
-"#if __cplusplus > 201402L
-// Compiler claims to support C++17, trust it
-#else
-# error __cplusplus must be > 201402L (the value for C++14)
-#endif
-#include <map> // https://bugs.llvm.org//show_bug.cgi?id=33117
-#include <variant>
-
-int main(void)
-{
- /* BEGIN TEST: */
-std::variant<int> v(42);
-int i = std::get<int>(v);
-std::visit([](const auto &) { return 1; }, v);
- /* END TEST: */
- return 0;
-}
-"
- CXX_STANDARD 17
-)
-
-# cxx20
-qt_config_compile_test(cxx20
- LABEL "C++20 support"
- CODE
-"#if __cplusplus > 201703L
-// Compiler claims to support C++20, trust it
-#else
-# error __cplusplus must be > 201703L (the value for C++17)
-#endif
-
-int main(void)
-{
- /* BEGIN TEST: */
- /* END TEST: */
- return 0;
-}
-"
- CXX_STANDARD 20
-)
-
-# precompile_header
-qt_config_compile_test(precompile_header
- LABEL "precompiled header support"
- CODE
-"#ifndef HEADER_H
-#error no go
-#endif
-
-int main(void)
-{
- /* BEGIN TEST: */
- /* END TEST: */
- return 0;
-}
-"# FIXME: qmake: ['CONFIG += precompile_header', 'PRECOMPILED_DIR = .pch', 'PRECOMPILED_HEADER = header.h']
-)
-
-qt_config_compiler_supports_flag_test(use_bfd_linker
- LABEL "bfd linker"
- FLAG "-fuse-ld=bfd"
-)
-
-qt_config_compiler_supports_flag_test(use_gold_linker
- LABEL "gold linker"
- FLAG "-fuse-ld=gold"
-)
-
-qt_config_compiler_supports_flag_test(use_lld_linker
- LABEL "lld linker"
- FLAG "-fuse-ld=lld"
-)
-
-qt_config_compiler_supports_flag_test(optimize_debug
- LABEL "-Og support"
- FLAG "-Og"
-)
-
-qt_config_linker_supports_flag_test(enable_new_dtags
- LABEL "new dtags support"
- FLAG "--enable-new-dtags"
-)
-
-qt_config_linker_supports_flag_test(gdb_index
- LABEL "gdb index support"
- FLAG "--gdb-index"
-)
-
-# reduce_relocations
-qt_config_compile_test(reduce_relocations
- LABEL "-Bsymbolic-functions support"
- CODE
-"#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
-
-int main(void)
-{
- /* BEGIN TEST: */
- /* END TEST: */
- return 0;
-}
-"# FIXME: qmake: ['TEMPLATE = lib', 'CONFIG += dll bsymbolic_functions', 'isEmpty(QMAKE_LFLAGS_BSYMBOLIC_FUNC): error("Nope")']
-)
-
-
-qt_config_compile_test("separate_debug_info"
- LABEL "separate debug information support"
- PROJECT_PATH "${CMAKE_CURRENT_SOURCE_DIR}/config.tests/separate_debug_info"
-)
-# signaling_nan
-qt_config_compile_test(signaling_nan
- LABEL "Signaling NaN for doubles"
- CODE
-"#include <limits>
-
-int main(void)
-{
- /* BEGIN TEST: */
-using B = std::numeric_limits<double>;
-static_assert(B::has_signaling_NaN, \"System lacks signaling NaN\");
- /* END TEST: */
- return 0;
-}
-")
-
-# sse2
-qt_config_compile_test_x86simd(sse2 "SSE2 instructions")
-
-# sse3
-qt_config_compile_test_x86simd(sse3 "SSE3 instructions")
-
-# ssse3
-qt_config_compile_test_x86simd(ssse3 "SSSE3 instructions")
-
-# sse4_1
-qt_config_compile_test_x86simd(sse4_1 "SSE4.1 instructions")
-
-# sse4_2
-qt_config_compile_test_x86simd(sse4_2 "SSE4.2 instructions")
-
-# aesni
-qt_config_compile_test_x86simd(aesni "AES new instructions")
-
-# f16c
-qt_config_compile_test_x86simd(f16c "F16C instructions")
-
-# rdrnd
-qt_config_compile_test_x86simd(rdrnd "RDRAND instruction")
-
-# rdseed
-qt_config_compile_test_x86simd(rdseed "RDSEED instruction")
-
-# shani
-qt_config_compile_test_x86simd(shani "SHA new instructions")
-
-# avx
-qt_config_compile_test_x86simd(avx "AVX instructions")
-
-# avx2
-qt_config_compile_test_x86simd(avx2 "AVX2 instructions")
-
-# avx512f
-qt_config_compile_test_x86simd(avx512f "AVX512 F instructions")
-
-# avx512er
-qt_config_compile_test_x86simd(avx512er "AVX512 ER instructions")
-
-# avx512cd
-qt_config_compile_test_x86simd(avx512cd "AVX512 CD instructions")
-
-# avx512pf
-qt_config_compile_test_x86simd(avx512pf "AVX512 PF instructions")
-
-# avx512dq
-qt_config_compile_test_x86simd(avx512dq "AVX512 DQ instructions")
-
-# avx512bw
-qt_config_compile_test_x86simd(avx512bw "AVX512 BW instructions")
-
-# avx512vl
-qt_config_compile_test_x86simd(avx512vl "AVX512 VL instructions")
-
-# avx512ifma
-qt_config_compile_test_x86simd(avx512ifma "AVX512 IFMA instructions")
-
-# avx512vbmi
-qt_config_compile_test_x86simd(avx512vbmi "AVX512 VBMI instructions")
-
-# posix_fallocate
-qt_config_compile_test(posix_fallocate
- LABEL "POSIX fallocate()"
- CODE
-"#include <fcntl.h>
-#include <unistd.h>
-
-int main(void)
-{
- /* BEGIN TEST: */
-(void) posix_fallocate(0, 0, 0);
- /* END TEST: */
- return 0;
-}
-")
-
-# alloca_stdlib_h
-qt_config_compile_test(alloca_stdlib_h
- LABEL "alloca() in stdlib.h"
- CODE
-"#include <stdlib.h>
-
-int main(void)
-{
- /* BEGIN TEST: */
-alloca(1);
- /* END TEST: */
- return 0;
-}
-")
-
-# alloca_h
-qt_config_compile_test(alloca_h
- LABEL "alloca() in alloca.h"
- CODE
-"#include <alloca.h>
-#ifdef __QNXNTO__
-// extra include needed in QNX7 to define NULL for the alloca() macro
-# include <stddef.h>
-#endif
-
-int main(void)
-{
- /* BEGIN TEST: */
-alloca(1);
- /* END TEST: */
- return 0;
-}
-")
-
-# alloca_malloc_h
-qt_config_compile_test(alloca_malloc_h
- LABEL "alloca() in malloc.h"
- CODE
-"#include <malloc.h>
-
-int main(void)
-{
- /* BEGIN TEST: */
-alloca(1);
- /* END TEST: */
- return 0;
-}
-")
-
-# stack_protector
-qt_config_compile_test(stack_protector
- LABEL "stack protection"
- COMPILE_OPTIONS -fstack-protector-strong
- CODE
-"#ifdef __QNXNTO__
-# include <sys/neutrino.h>
-# if _NTO_VERSION < 700
-# error stack-protector not used (by default) before QNX 7.0.0.
-# endif
-#endif
-
-int main(void)
-{
- /* BEGIN TEST: */
- /* END TEST: */
- return 0;
-}
-")
-
-# intelcet
-qt_config_compile_test(intelcet
- LABEL "Support for Intel Control-flow Enforcement Technology"
- CODE
-"int main(void)
-{
- /* BEGIN TEST: */
-#if !defined(__CET__)
-# error Intel CET not available
-#endif
- /* END TEST: */
- return 0;
-}
-")
-
-
-
-#### Features
-
-# This belongs into gui, but the license check needs it here already.
-qt_feature("android-style-assets" PRIVATE
- LABEL "Android Style Assets"
- CONDITION ANDROID
-)
-qt_feature("shared" PUBLIC
- LABEL "Building shared libraries"
- AUTODETECT NOT UIKIT AND NOT WASM
- CONDITION BUILD_SHARED_LIBS
-)
-qt_feature_definition("shared" "QT_STATIC" NEGATE PREREQUISITE "!defined(QT_SHARED) && !defined(QT_STATIC)")
-qt_feature_config("shared" QMAKE_PUBLIC_QT_CONFIG)
-qt_feature_config("shared" QMAKE_PUBLIC_CONFIG)
-qt_feature("static" PUBLIC
- CONDITION NOT QT_FEATURE_shared
-)
-qt_feature_config("static" QMAKE_PUBLIC_QT_CONFIG)
-qt_feature_config("static" QMAKE_PUBLIC_CONFIG)
-qt_feature("cross_compile" PUBLIC
- LABEL "Cross compiling"
- CONDITION CMAKE_CROSSCOMPILING
-)
-qt_feature_config("cross_compile" QMAKE_PUBLIC_CONFIG)
-qt_feature_config("cross_compile" QMAKE_PRIVATE_CONFIG)
-qt_feature("gc_binaries" PRIVATE
- CONDITION NOT QT_FEATURE_shared
-)
-qt_feature("use_bfd_linker"
- LABEL "bfd"
- AUTODETECT false
- CONDITION NOT WIN32 AND NOT INTEGRITY AND NOT WASM AND TEST_use_bfd_linker
- ENABLE INPUT_linker STREQUAL 'bfd'
- DISABLE INPUT_linker STREQUAL 'gold' OR INPUT_linker STREQUAL 'lld'
-)
-qt_feature_config("use_bfd_linker" QMAKE_PRIVATE_CONFIG)
-qt_feature("use_gold_linker_alias"
- AUTODETECT false
- CONDITION NOT WIN32 AND NOT INTEGRITY AND NOT WASM AND TEST_use_gold_linker
-)
-qt_feature("use_gold_linker"
- LABEL "gold"
- AUTODETECT false
- CONDITION NOT WIN32 AND NOT INTEGRITY AND NOT WASM AND NOT rtems AND TEST_use_gold_linker
- ENABLE INPUT_linker STREQUAL 'gold' OR QT_FEATURE_use_gold_linker_alias
- DISABLE INPUT_linker STREQUAL 'bfd' OR INPUT_linker STREQUAL 'lld'
-)
-qt_feature_config("use_gold_linker" QMAKE_PRIVATE_CONFIG)
-qt_feature("use_lld_linker"
- LABEL "lld"
- AUTODETECT false
- CONDITION NOT WIN32 AND NOT INTEGRITY AND NOT WASM AND TEST_use_lld_linker
- ENABLE INPUT_linker STREQUAL 'lld'
- DISABLE INPUT_linker STREQUAL 'bfd' OR INPUT_linker STREQUAL 'gold'
-)
-qt_feature_config("use_lld_linker" QMAKE_PRIVATE_CONFIG)
-qt_feature("optimize_debug"
- LABEL "Optimize debug build"
- AUTODETECT NOT QT_FEATURE_developer_build
- CONDITION NOT MSVC AND NOT CLANG AND ( QT_FEATURE_debug OR QT_FEATURE_debug_and_release ) AND TEST_optimize_debug
-)
-qt_feature_config("optimize_debug" QMAKE_PRIVATE_CONFIG)
-qt_feature("optimize_size"
- LABEL "Optimize release build for size"
- AUTODETECT OFF
- CONDITION NOT QT_FEATURE_debug OR QT_FEATURE_debug_and_release
-)
-qt_feature_config("optimize_size" QMAKE_PRIVATE_CONFIG)
-qt_feature("pkg-config" PUBLIC
- LABEL "Using pkg-config"
- AUTODETECT NOT APPLE AND NOT WIN32 AND NOT ANDROID
- CONDITION PKG_CONFIG_FOUND
-)
-qt_feature_config("pkg-config" QMAKE_PUBLIC_QT_CONFIG
- NEGATE)
-qt_feature("developer-build"
- LABEL "Developer build"
- AUTODETECT OFF
-)
-qt_feature("private_tests" PRIVATE
- LABEL "Developer build: private_tests"
- CONDITION QT_FEATURE_developer_build
-)
-qt_feature_definition("developer-build" "QT_BUILD_INTERNAL")
-qt_feature_config("developer-build" QMAKE_PUBLIC_QT_CONFIG
- NAME "private_tests"
-)
-qt_feature("debug"
- LABEL "Build for debugging"
- AUTODETECT ON
- CONDITION CMAKE_BUILD_TYPE STREQUAL Debug OR Debug IN_LIST CMAKE_CONFIGURATION_TYPES
-)
-qt_feature("debug_and_release" PUBLIC
- LABEL "Compile libs in debug and release mode"
- AUTODETECT 1
- CONDITION QT_GENERATOR_IS_MULTI_CONFIG
-)
-qt_feature_config("debug_and_release" QMAKE_PUBLIC_QT_CONFIG)
-qt_feature("force_debug_info"
- LABEL "Add debug info in release mode"
- AUTODETECT CMAKE_BUILD_TYPE STREQUAL RelWithDebInfo OR RelWithDebInfo IN_LIST CMAKE_CONFIGURATION_TYPES
-)
-qt_feature_config("force_debug_info" QMAKE_PRIVATE_CONFIG)
-qt_feature("separate_debug_info" PUBLIC
- LABEL "Split off debug information"
- AUTODETECT OFF
- CONDITION ( QT_FEATURE_shared ) AND ( QT_FEATURE_debug OR QT_FEATURE_debug_and_release OR QT_FEATURE_force_debug_info ) AND ( APPLE OR TEST_separate_debug_info )
-)
-qt_feature_config("separate_debug_info" QMAKE_PUBLIC_QT_CONFIG)
-qt_feature("appstore-compliant" PUBLIC
- LABEL "App store compliance"
- PURPOSE "Disables code that is not allowed in platform app stores"
- AUTODETECT UIKIT OR ANDROID
-)
-qt_feature("simulator_and_device" PUBLIC
- LABEL "Build for both simulator and device"
- CONDITION UIKIT AND NOT QT_UIKIT_SDK
-)
-qt_feature_config("simulator_and_device" QMAKE_PUBLIC_QT_CONFIG)
-qt_feature("rpath" PUBLIC
- LABEL "Build with RPATH"
- AUTODETECT 1
- CONDITION BUILD_SHARED_LIBS AND UNIX AND NOT WIN32 AND NOT ANDROID
-)
-qt_feature_config("rpath" QMAKE_PUBLIC_QT_CONFIG)
-qt_feature("force_asserts" PUBLIC
- LABEL "Force assertions"
- AUTODETECT OFF
-)
-qt_feature("headersclean"
- LABEL "Check for clean headers"
- AUTODETECT OFF
- CONDITION NOT WASM
-)
-qt_feature_config("headersclean" QMAKE_PRIVATE_CONFIG)
-qt_feature("framework" PUBLIC
- LABEL "Build Apple Frameworks"
- CONDITION APPLE AND BUILD_SHARED_LIBS AND NOT CMAKE_BUILD_TYPE STREQUAL Debug
-)
-qt_feature_definition("framework" "QT_MAC_FRAMEWORK_BUILD")
-qt_feature_config("framework" QMAKE_PUBLIC_QT_CONFIG
- NAME "qt_framework"
-)
-qt_feature_config("framework" QMAKE_PUBLIC_CONFIG
- NAME "qt_framework"
-)
-qt_feature("largefile"
- LABEL "Large file support"
- CONDITION NOT ANDROID AND NOT INTEGRITY AND NOT rtems
-)
-qt_feature_definition("largefile" "QT_LARGEFILE_SUPPORT" VALUE "64")
-qt_feature_config("largefile" QMAKE_PRIVATE_CONFIG)
-qt_feature("testcocoon"
- LABEL "Testcocoon support"
- AUTODETECT OFF
-)
-qt_feature_config("testcocoon" QMAKE_PUBLIC_CONFIG)
-qt_feature("sanitize_address"
- LABEL "Addresses"
- AUTODETECT OFF
-)
-qt_feature_config("sanitize_address" QMAKE_PUBLIC_CONFIG)
-qt_feature("sanitize_thread"
- LABEL "Threads"
- AUTODETECT OFF
-)
-qt_feature_config("sanitize_thread" QMAKE_PUBLIC_CONFIG)
-qt_feature("sanitize_memory"
- LABEL "Memory"
- AUTODETECT OFF
-)
-qt_feature_config("sanitize_memory" QMAKE_PUBLIC_CONFIG)
-qt_feature("sanitize_fuzzer_no_link"
- LABEL "Fuzzer (instrumentation only)"
- PURPOSE "Adds instrumentation for fuzzing to the binaries but links to the usual main function instead of a fuzzer's."
- AUTODETECT OFF
-)
-qt_feature_config("sanitize_fuzzer_no_link" QMAKE_PUBLIC_CONFIG)
-qt_feature("sanitize_undefined"
- LABEL "Undefined"
- AUTODETECT OFF
-)
-qt_feature_config("sanitize_undefined" QMAKE_PUBLIC_CONFIG)
-qt_feature("sanitizer"
- LABEL "Sanitizers"
- CONDITION QT_FEATURE_sanitize_address OR QT_FEATURE_sanitize_thread OR QT_FEATURE_sanitize_memory OR QT_FEATURE_sanitize_fuzzer_no_link OR QT_FEATURE_sanitize_undefined
-)
-qt_feature_config("sanitizer" QMAKE_PUBLIC_CONFIG)
-qt_feature("coverage_trace_pc_guard"
- LABEL "trace-pc-guard"
- AUTODETECT OFF
-)
-qt_feature_config("coverage_trace_pc_guard" QMAKE_PUBLIC_CONFIG)
-qt_feature("coverage_source_based"
- LABEL "source-based"
- AUTODETECT OFF
-)
-qt_feature_config("coverage_source_based" QMAKE_PUBLIC_CONFIG)
-qt_feature("coverage"
- LABEL "Code Coverage Instrumentation"
- CONDITION QT_FEATURE_coverage_trace_pc_guard OR QT_FEATURE_coverage_source_based
-)
-qt_feature_config("coverage" QMAKE_PUBLIC_CONFIG)
-qt_feature("plugin-manifests"
- LABEL "Embed manifests in plugins"
- AUTODETECT OFF
- EMIT_IF WIN32
-)
-qt_feature_config("plugin-manifests" QMAKE_PUBLIC_CONFIG
- NEGATE
- NAME "no_plugin_manifest"
-)
-qt_feature("c++11" PUBLIC
- LABEL "C++11"
-)
-qt_feature_config("c++11" QMAKE_PUBLIC_QT_CONFIG)
-qt_feature("c++14" PUBLIC
- LABEL "C++14"
- CONDITION QT_FEATURE_cxx11 AND TEST_cxx14
-)
-qt_feature_config("c++14" QMAKE_PUBLIC_QT_CONFIG)
-qt_feature("c++17" PUBLIC
- LABEL "C++17"
- CONDITION QT_FEATURE_cxx14 AND TEST_cxx17
-)
-qt_feature_config("c++17" QMAKE_PUBLIC_QT_CONFIG)
-qt_feature("c++1z" PUBLIC
- LABEL "C++17"
- CONDITION QT_FEATURE_cxx17
-)
-qt_feature_config("c++1z" QMAKE_PUBLIC_QT_CONFIG)
-qt_feature("c++20" PUBLIC
- LABEL "C++20"
- AUTODETECT OFF
- CONDITION QT_FEATURE_cxx17 AND TEST_cxx20
-)
-qt_feature_config("c++20" QMAKE_PUBLIC_QT_CONFIG)
-qt_feature("c++2a" PUBLIC
- LABEL "C++20"
- CONDITION QT_FEATURE_cxx20
-)
-qt_feature_config("c++2a" QMAKE_PUBLIC_QT_CONFIG)
-qt_feature("c89"
- LABEL "C89"
-)
-qt_feature("c99" PUBLIC
- LABEL "C99"
- CONDITION c_std_99 IN_LIST CMAKE_C_COMPILE_FEATURES
-)
-qt_feature("c11" PUBLIC
- LABEL "C11"
- CONDITION QT_FEATURE_c99 AND c_std_11 IN_LIST CMAKE_C_COMPILE_FEATURES
-)
-qt_feature("precompile_header"
- LABEL "Using precompiled headers"
- CONDITION BUILD_WITH_PCH
-)
-qt_feature_config("precompile_header" QMAKE_PRIVATE_CONFIG)
-set(__qt_ltcg_detected FALSE)
-if(CMAKE_INTERPROCEDURAL_OPTIMIZATION)
- set(__qt_ltcg_detected TRUE)
-else()
- foreach(config ${CMAKE_BUILD_TYPE} ${CMAKE_CONFIGURATION_TYPES})
- string(TOUPPER "${config}" __qt_uc_config)
- if(CMAKE_INTERPROCEDURAL_OPTIMIZATION_${__qt_uc_config})
- set(__qt_ltcg_detected TRUE)
- break()
- endif()
- endforeach()
- unset(__qt_uc_config)
-endif()
-qt_feature("ltcg"
- LABEL "Using LTCG"
- AUTODETECT ON
- CONDITION __qt_ltcg_detected
-)
-qt_feature_config("ltcg" QMAKE_PRIVATE_CONFIG)
-qt_feature("enable_new_dtags"
- LABEL "Using new DTAGS"
- CONDITION LINUX AND TEST_enable_new_dtags
-)
-qt_feature_config("enable_new_dtags" QMAKE_PRIVATE_CONFIG)
-qt_feature("enable_gdb_index"
- LABEL "Generating GDB index"
- AUTODETECT QT_FEATURE_developer_build
- CONDITION GCC AND NOT CLANG AND ( QT_FEATURE_debug OR QT_FEATURE_force_debug_info OR QT_FEATURE_debug_and_release ) AND TEST_gdb_index
-)
-qt_feature_config("enable_gdb_index" QMAKE_PRIVATE_CONFIG)
-qt_feature("reduce_exports" PRIVATE
- LABEL "Reduce amount of exported symbols"
- CONDITION NOT MSVC
-)
-qt_feature_definition("reduce_exports" "QT_VISIBILITY_AVAILABLE")
-qt_feature_config("reduce_exports" QMAKE_PUBLIC_QT_CONFIG)
-qt_feature("reduce_relocations" PRIVATE
- LABEL "Reduce amount of relocations"
- CONDITION NOT WIN32 AND TEST_reduce_relocations
-)
-qt_feature_definition("reduce_relocations" "QT_REDUCE_RELOCATIONS")
-qt_feature_config("reduce_relocations" QMAKE_PUBLIC_QT_CONFIG)
-qt_feature("signaling_nan" PUBLIC
- LABEL "Signaling NaN"
- CONDITION TEST_signaling_nan
-)
-qt_feature("sse2" PRIVATE
- LABEL "SSE2"
- CONDITION ( ( TEST_architecture_arch STREQUAL i386 ) OR ( TEST_architecture_arch STREQUAL x86_64 ) ) AND TEST_subarch_sse2
-)
-qt_feature_definition("sse2" "QT_COMPILER_SUPPORTS_SSE2" VALUE "1")
-qt_feature_config("sse2" QMAKE_PRIVATE_CONFIG)
-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" 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" 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" 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" 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" PRIVATE
- LABEL "F16C"
- CONDITION QT_FEATURE_avx AND TEST_subarch_f16c
-)
-qt_feature_definition("f16c" "QT_COMPILER_SUPPORTS_F16C" VALUE "1")
-qt_feature_config("f16c" QMAKE_PRIVATE_CONFIG)
-qt_feature("avx2" PRIVATE
- LABEL "AVX2"
- CONDITION QT_FEATURE_avx AND TEST_subarch_avx2 AND ( NOT ANDROID OR NOT ( TEST_architecture_arch STREQUAL x86_64 ) )
-)
-qt_feature_definition("avx2" "QT_COMPILER_SUPPORTS_AVX2" VALUE "1")
-qt_feature_config("avx2" QMAKE_PRIVATE_CONFIG)
-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" 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" 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" 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" 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" 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" 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" 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" 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" 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" 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" 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" PRIVATE
- LABEL "SHA"
- CONDITION QT_FEATURE_sse2 AND TEST_subarch_shani
-)
-qt_feature_definition("shani" "QT_COMPILER_SUPPORTS_SHA" VALUE "1")
-qt_feature_config("shani" QMAKE_PRIVATE_CONFIG)
-qt_feature("x86SimdAlways"
- LABEL "Intrinsics without -mXXX option"
- CONDITION ( ( TEST_architecture_arch STREQUAL i386 ) OR ( TEST_architecture_arch STREQUAL x86_64 ) ) AND ON
-)
-qt_feature_definition("x86SimdAlways" "QT_COMPILER_SUPPORTS_SIMD_ALWAYS" VALUE "1")
-qt_feature_config("x86SimdAlways" QMAKE_PRIVATE_CONFIG)
-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" 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" PRIVATE
- LABEL "NEON"
- CONDITION ( ( TEST_architecture_arch STREQUAL arm ) OR ( TEST_architecture_arch STREQUAL arm64 ) ) AND TEST_arch_${TEST_architecture_arch}_subarch_neon
-)
-qt_feature_definition("neon" "QT_COMPILER_SUPPORTS_NEON" VALUE "1")
-qt_feature_config("neon" QMAKE_PRIVATE_CONFIG)
-qt_feature("posix_fallocate" PRIVATE
- LABEL "POSIX fallocate()"
- CONDITION TEST_posix_fallocate
-)
-qt_feature("alloca_h" PRIVATE
- LABEL "alloca.h"
- CONDITION TEST_alloca_h
-)
-qt_feature("alloca_malloc_h" PRIVATE
- LABEL "alloca() in malloc.h"
- CONDITION NOT QT_FEATURE_alloca_h AND TEST_alloca_malloc_h
-)
-qt_feature("alloca" PRIVATE
- LABEL "alloca()"
- CONDITION QT_FEATURE_alloca_h OR QT_FEATURE_alloca_malloc_h OR TEST_alloca_stdlib_h
-)
-qt_feature("stack-protector-strong" PRIVATE
- LABEL "stack protection"
- CONDITION QNX AND TEST_stack_protector
-)
-qt_feature("system-zlib" PRIVATE
- LABEL "Using system zlib"
- CONDITION WrapZLIB_FOUND
-)
-qt_feature("zstd" PRIVATE
- LABEL "Zstandard support"
- CONDITION ZSTD_FOUND
-)
-qt_feature("thread" PUBLIC
- SECTION "Kernel"
- LABEL "Thread support"
- PURPOSE "Provides QThread and related classes."
- AUTODETECT NOT WASM
-)
-qt_feature("future" PUBLIC
- SECTION "Kernel"
- LABEL "QFuture"
- PURPOSE "Provides QFuture and related classes."
- CONDITION QT_FEATURE_thread
-)
-qt_feature("concurrent" PUBLIC
- SECTION "Kernel"
- LABEL "Qt Concurrent"
- PURPOSE "Provides a high-level multi-threading API."
- CONDITION QT_FEATURE_future
-)
-qt_feature_definition("concurrent" "QT_NO_CONCURRENT" NEGATE VALUE "1")
-qt_feature("dbus" PUBLIC PRIVATE
- LABEL "Qt D-Bus"
- AUTODETECT NOT UIKIT AND NOT ANDROID
- CONDITION QT_FEATURE_thread AND NOT WASM
-)
-qt_feature_definition("dbus" "QT_NO_DBUS" NEGATE VALUE "1")
-qt_feature("dbus-linked" PRIVATE
- LABEL "Qt D-Bus directly linked to libdbus"
- CONDITION QT_FEATURE_dbus AND DBus1_FOUND
- ENABLE INPUT_dbus STREQUAL 'linked'
- DISABLE INPUT_dbus STREQUAL 'runtime'
-)
-qt_feature("qreal"
- LABEL "Type for qreal"
- CONDITION DEFINED QT_COORD_TYPE AND NOT QT_COORD_TYPE STREQUAL "double"
-)
-qt_feature_definition("qreal" "QT_COORD_TYPE" VALUE "${QT_COORD_TYPE}")
-qt_feature_definition("qreal" "QT_COORD_TYPE_STRING" VALUE "\"${QT_COORD_TYPE}\"")
-qt_feature("gui" PRIVATE
- LABEL "Qt Gui"
-)
-qt_feature_config("gui" QMAKE_PUBLIC_QT_CONFIG
- NEGATE)
-qt_feature("network" PRIVATE
- LABEL "Qt Network"
-)
-qt_feature("printsupport" PRIVATE
- LABEL "Qt PrintSupport"
- CONDITION QT_FEATURE_widgets
-)
-qt_feature("sql" PRIVATE
- LABEL "Qt Sql"
- CONDITION QT_FEATURE_thread AND NOT WASM
-)
-qt_feature("testlib" PRIVATE
- LABEL "Qt Testlib"
-)
-qt_feature("widgets" PRIVATE
- LABEL "Qt Widgets"
- AUTODETECT NOT TVOS AND NOT WATCHOS
- CONDITION QT_FEATURE_gui
-)
-qt_feature_definition("widgets" "QT_NO_WIDGETS" NEGATE)
-qt_feature_config("widgets" QMAKE_PUBLIC_QT_CONFIG
- NEGATE)
-qt_feature("xml" PRIVATE
- LABEL "Qt Xml"
-)
-qt_feature("libudev" PRIVATE
- LABEL "udev"
- CONDITION Libudev_FOUND
-)
-qt_feature("ccache"
- LABEL "Using ccache"
- AUTODETECT 1
- CONDITION QT_USE_CCACHE
-)
-qt_feature_config("ccache" QMAKE_PRIVATE_CONFIG)
-qt_feature("static_runtime"
- LABEL "Statically link the C/C++ runtime library"
- AUTODETECT OFF
- CONDITION NOT QT_FEATURE_shared
- EMIT_IF WIN32
-)
-qt_feature_config("static_runtime" QMAKE_PUBLIC_CONFIG)
-qt_feature_config("static_runtime" QMAKE_PUBLIC_QT_CONFIG)
-qt_feature("dlopen" PRIVATE
- LABEL "dlopen()"
- CONDITION UNIX
-)
-qt_feature("relocatable" PRIVATE
- LABEL "Relocatable"
- PURPOSE "Enable the Qt installation to be relocated."
- AUTODETECT QT_FEATURE_shared
- CONDITION QT_FEATURE_dlopen OR WIN32 OR NOT QT_FEATURE_shared
-)
-qt_feature("intelcet" PRIVATE
- LABEL "Using Intel CET"
- CONDITION TEST_intelcet
-)
-qt_configure_add_summary_build_type_and_config()
-qt_configure_add_summary_section(NAME "Build options")
-qt_configure_add_summary_build_mode(Mode)
-qt_configure_add_summary_entry(
- ARGS "optimize_debug"
- CONDITION NOT MSVC AND NOT CLANG AND ( QT_FEATURE_debug OR QT_FEATURE_debug_and_release )
-)
-qt_configure_add_summary_entry(
- ARGS "optimize_size"
- CONDITION NOT QT_FEATURE_debug OR QT_FEATURE_debug_and_release
-)
-qt_configure_add_summary_entry(ARGS "shared")
-qt_configure_add_summary_entry(
- TYPE "firstAvailableFeature"
- ARGS "c11 c99 c89"
- MESSAGE "Using C standard"
-)
-qt_configure_add_summary_entry(
- TYPE "firstAvailableFeature"
- ARGS "c++20 c++17 c++14 c++11"
- MESSAGE "Using C++ standard"
-)
-qt_configure_add_summary_entry(
- ARGS "ccache"
- CONDITION UNIX
-)
-qt_configure_add_summary_entry(
- TYPE "firstAvailableFeature"
- ARGS "use_bfd_linker use_gold_linker use_lld_linker"
- MESSAGE "Linker"
- CONDITION QT_FEATURE_use_bfd_linker OR QT_FEATURE_use_gold_linker OR QT_FEATURE_use_lld_linker
-)
-qt_configure_add_summary_entry(
- ARGS "enable_new_dtags"
- CONDITION LINUX
-)
-qt_configure_add_summary_entry(
- ARGS "enable_gdb_index"
- CONDITION GCC AND NOT CLANG AND ( QT_FEATURE_debug OR QT_FEATURE_force_debug_info OR QT_FEATURE_debug_and_release )
-)
-qt_configure_add_summary_entry(ARGS "relocatable")
-qt_configure_add_summary_entry(ARGS "precompile_header")
-qt_configure_add_summary_entry(ARGS "ltcg")
-qt_configure_add_summary_section(NAME "Target compiler supports")
-qt_configure_add_summary_entry(
- TYPE "featureList"
- ARGS "sse2 sse3 ssse3 sse4_1 sse4_2"
- MESSAGE "SSE"
- CONDITION ( ( TEST_architecture_arch STREQUAL i386 ) OR ( TEST_architecture_arch STREQUAL x86_64 ) )
-)
-qt_configure_add_summary_entry(
- TYPE "featureList"
- ARGS "avx avx2"
- MESSAGE "AVX"
- CONDITION ( ( TEST_architecture_arch STREQUAL i386 ) OR ( TEST_architecture_arch STREQUAL x86_64 ) )
-)
-qt_configure_add_summary_entry(
- TYPE "featureList"
- ARGS "avx512f avx512er avx512cd avx512pf avx512dq avx512bw avx512vl avx512ifma avx512vbmi"
- MESSAGE "AVX512"
- CONDITION ( ( TEST_architecture_arch STREQUAL i386 ) OR ( TEST_architecture_arch STREQUAL x86_64 ) )
-)
-qt_configure_add_summary_entry(
- TYPE "featureList"
- ARGS "aesni f16c rdrnd shani"
- MESSAGE "Other x86"
- CONDITION ( ( TEST_architecture_arch STREQUAL i386 ) OR ( TEST_architecture_arch STREQUAL x86_64 ) )
-)
-qt_configure_add_summary_entry(
- ARGS "x86SimdAlways"
- CONDITION ( ( TEST_architecture_arch STREQUAL i386 ) OR ( TEST_architecture_arch STREQUAL x86_64 ) ) AND NOT MSVC
-)
-qt_configure_add_summary_entry(
- ARGS "neon"
- CONDITION ( TEST_architecture_arch STREQUAL arm ) OR ( TEST_architecture_arch STREQUAL arm64 )
-)
-qt_configure_add_summary_entry(
- ARGS "mips_dsp"
- CONDITION ( TEST_architecture_arch STREQUAL mips )
-)
-qt_configure_add_summary_entry(
- ARGS "mips_dspr2"
- CONDITION ( TEST_architecture_arch STREQUAL mips )
-)
-qt_configure_end_summary_section() # end of "Target compiler supports" section
-qt_configure_add_summary_section(NAME "Sanitizers")
-qt_configure_add_summary_entry(ARGS "sanitize_address")
-qt_configure_add_summary_entry(ARGS "sanitize_thread")
-qt_configure_add_summary_entry(ARGS "sanitize_memory")
-qt_configure_add_summary_entry(ARGS "sanitize_fuzzer_no_link")
-qt_configure_add_summary_entry(ARGS "sanitize_undefined")
-qt_configure_end_summary_section() # end of "Sanitizers" section
-qt_configure_add_summary_entry(
- TYPE "firstAvailableFeature"
- ARGS "coverage_trace_pc_guard coverage_source_based"
- MESSAGE "Code Coverage Instrumentation"
- CONDITION QT_FEATURE_coverage
-)
-qt_configure_add_summary_build_parts("Build parts")
-qt_configure_add_summary_entry(
- ARGS "appstore-compliant"
- CONDITION APPLE OR ANDROID OR WIN32
-)
-qt_configure_end_summary_section() # end of "Build options" section
-qt_configure_add_summary_section(NAME "Qt modules and options")
-qt_configure_add_summary_entry(ARGS "concurrent")
-qt_configure_add_summary_entry(ARGS "dbus")
-qt_configure_add_summary_entry(ARGS "dbus-linked")
-qt_configure_add_summary_entry(ARGS "gui")
-qt_configure_add_summary_entry(ARGS "network")
-qt_configure_add_summary_entry(ARGS "sql")
-qt_configure_add_summary_entry(ARGS "testlib")
-qt_configure_add_summary_entry(ARGS "widgets")
-qt_configure_add_summary_entry(ARGS "xml")
-qt_configure_end_summary_section() # end of "Qt modules and options" section
-qt_configure_add_summary_section(NAME "Support enabled for")
-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
- MESSAGE "Using static linking will disable the use of dynamically loaded plugins. Make sure to import all needed static plugins, or compile needed modules into the library."
- 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
-)
-qt_configure_add_report_entry(
- TYPE WARNING
- MESSAGE "-debug-and-release is only supported on Darwin and Windows platforms. Qt can be built in release mode with separate debug information, so -debug-and-release is no longer necessary."
- CONDITION INPUT_debug_and_release STREQUAL 'yes' AND NOT APPLE AND NOT WIN32
-)
-qt_configure_add_report_entry(
- TYPE ERROR
- MESSAGE "debug-only framework builds are not supported. Configure with -no-framework if you want a pure debug build."
- CONDITION QT_FEATURE_framework AND QT_FEATURE_debug AND NOT QT_FEATURE_debug_and_release
-)
-qt_configure_add_report_entry(
- TYPE ERROR
- MESSAGE "Static builds don't support RPATH"
- CONDITION ( QT_FEATURE_rpath OR QT_EXTRA_RPATHS ) AND NOT QT_FEATURE_shared
-)
-qt_configure_add_report_entry(
- TYPE ERROR
- MESSAGE "Command line option -coverage is only supported with clang compilers."
- CONDITION QT_FEATURE_coverage AND NOT CLANG
-)
-qt_configure_add_report_entry(
- TYPE ERROR
- MESSAGE "Command line option -sanitize fuzzer-no-link is only supported with clang compilers."
- CONDITION QT_FEATURE_sanitize_fuzzer_no_link AND NOT CLANG
-)
-
-qt_extra_definition("QT_VERSION_STR" "\"${PROJECT_VERSION}\"" PUBLIC)
-qt_extra_definition("QT_VERSION_MAJOR" ${PROJECT_VERSION_MAJOR} PUBLIC)
-qt_extra_definition("QT_VERSION_MINOR" ${PROJECT_VERSION_MINOR} PUBLIC)
-qt_extra_definition("QT_VERSION_PATCH" ${PROJECT_VERSION_PATCH} PUBLIC)
diff --git a/.prev_qt_cmdline.cmake b/.prev_qt_cmdline.cmake
deleted file mode 100644
index 2ec0d18d13..0000000000
--- a/.prev_qt_cmdline.cmake
+++ /dev/null
@@ -1,128 +0,0 @@
-qt_commandline_subconfig(src/corelib)
-qt_commandline_subconfig(src/network)
-qt_commandline_subconfig(src/gui)
-qt_commandline_subconfig(src/sql)
-qt_commandline_subconfig(src/xml)
-qt_commandline_subconfig(src/widgets)
-qt_commandline_subconfig(src/printsupport)
-qt_commandline_subconfig(src/plugins/sqldrivers)
-qt_commandline_subconfig(src/testlib)
-qt_commandline_custom(qmakeArgs)
-qt_commandline_option(prefix TYPE string)
-qt_commandline_option(hostprefix TYPE optionalString)
-qt_commandline_option(extprefix TYPE string)
-qt_commandline_option(archdatadir TYPE string)
-qt_commandline_option(bindir TYPE string)
-qt_commandline_option(datadir TYPE string)
-qt_commandline_option(docdir TYPE string)
-qt_commandline_option(examplesdir TYPE string)
-qt_commandline_option(external-hostbindir TYPE string)
-qt_commandline_option(headerdir TYPE string)
-qt_commandline_option(hostbindir TYPE string)
-qt_commandline_option(hostdatadir TYPE string)
-qt_commandline_option(hostlibdir TYPE string)
-qt_commandline_option(libdir TYPE string)
-qt_commandline_option(libexecdir TYPE string)
-qt_commandline_option(plugindir TYPE string)
-qt_commandline_option(qmldir TYPE string)
-qt_commandline_option(settingsdir TYPE string NAME sysconfdir)
-qt_commandline_option(sysconfdir TYPE string)
-qt_commandline_option(testsdir TYPE string)
-qt_commandline_option(translationdir TYPE string)
-qt_commandline_option(android-arch TYPE string)
-qt_commandline_option(android-abis TYPE string)
-qt_commandline_option(android-ndk TYPE string)
-qt_commandline_option(android-ndk-host TYPE string)
-qt_commandline_option(android-ndk-platform TYPE string)
-qt_commandline_option(android-sdk TYPE string)
-qt_commandline_option(android-javac-target TYPE string)
-qt_commandline_option(android-javac-source TYPE string)
-qt_commandline_option(android-style-assets TYPE boolean)
-qt_commandline_option(appstore-compliant TYPE boolean)
-qt_commandline_option(avx TYPE boolean)
-qt_commandline_option(avx2 TYPE boolean)
-qt_commandline_option(avx512 TYPE boolean NAME avx512f)
-qt_commandline_option(c++std TYPE cxxstd)
-qt_commandline_option(ccache TYPE boolean NAME ccache)
-qt_commandline_option(commercial TYPE void)
-qt_commandline_option(confirm-license TYPE void)
-qt_commandline_option(coverage TYPE coverage)
-qt_commandline_option(dbus TYPE optionalString VALUES no yes linked runtime)
-qt_commandline_option(dbus-linked TYPE void NAME dbus VALUE linked)
-qt_commandline_option(dbus-runtime TYPE void NAME dbus VALUE runtime)
-qt_commandline_option(debug TYPE void)
-qt_commandline_option(debug-and-release TYPE boolean NAME debug_and_release)
-qt_commandline_option(developer-build TYPE void)
-qt_commandline_option(device TYPE string)
-qt_commandline_option(device-option TYPE addString)
-qt_commandline_option(f16c TYPE boolean)
-qt_commandline_option(force-asserts TYPE boolean NAME force_asserts)
-qt_commandline_option(force-debug-info TYPE boolean NAME force_debug_info)
-qt_commandline_option(force-pkg-config TYPE void NAME pkg-config)
-qt_commandline_option(framework TYPE boolean)
-qt_commandline_option(gc-binaries TYPE boolean NAME gc_binaries)
-qt_commandline_option(gdb-index TYPE boolean NAME enable_gdb_index)
-qt_commandline_option(gcc-sysroot TYPE boolean)
-qt_commandline_option(gcov TYPE boolean)
-qt_commandline_option(gnumake TYPE boolean NAME GNUmake)
-qt_commandline_option(gui TYPE boolean)
-qt_commandline_option(headersclean TYPE boolean)
-qt_commandline_option(incredibuild-xge TYPE boolean NAME incredibuild_xge)
-qt_commandline_option(libudev TYPE boolean)
-qt_commandline_option(linker TYPE optionalString VALUES bfd gold lld)
-qt_commandline_option(ltcg TYPE boolean)
-qt_commandline_option(make TYPE addString VALUES examples libs tests tools)
-qt_commandline_option(make-tool TYPE string)
-qt_commandline_option(mips_dsp TYPE boolean)
-qt_commandline_option(mips_dspr2 TYPE boolean)
-qt_commandline_option(mp TYPE boolean NAME msvc_mp)
-qt_commandline_option(nomake TYPE addString VALUES examples tests tools)
-qt_commandline_option(opensource TYPE void NAME commercial VALUE no)
-qt_commandline_option(optimize-debug TYPE boolean NAME optimize_debug)
-qt_commandline_option(optimize-size TYPE boolean NAME optimize_size)
-qt_commandline_option(optimized-qmake TYPE boolean NAME release_tools)
-qt_commandline_option(optimized-tools TYPE boolean NAME release_tools)
-qt_commandline_option(pch TYPE boolean NAME precompile_header)
-qt_commandline_option(pkg-config TYPE boolean)
-qt_commandline_option(platform TYPE string)
-qt_commandline_option(plugin-manifests TYPE boolean)
-qt_commandline_option(profile TYPE boolean)
-qt_commandline_option(qreal TYPE string)
-qt_commandline_option(qtlibinfix TYPE string NAME qt_libinfix)
-qt_commandline_option(qtnamespace TYPE string NAME qt_namespace)
-qt_commandline_option(reduce-exports TYPE boolean NAME reduce_exports)
-qt_commandline_option(reduce-relocations TYPE boolean NAME reduce_relocations)
-qt_commandline_option(release TYPE enum NAME debug MAPPING yes no no yes)
-qt_commandline_option(rpath TYPE boolean)
-qt_commandline_option(sanitize TYPE sanitize)
-qt_commandline_option(sdk TYPE string)
-qt_commandline_option(separate-debug-info TYPE boolean NAME separate_debug_info)
-qt_commandline_option(shared TYPE boolean)
-qt_commandline_option(silent TYPE void)
-qt_commandline_option(qdbus TYPE boolean NAME dbus)
-qt_commandline_option(sse2 TYPE boolean)
-qt_commandline_option(sse3 TYPE boolean)
-qt_commandline_option(sse4.1 TYPE boolean NAME sse4_1)
-qt_commandline_option(sse4.2 TYPE boolean NAME sse4_2)
-qt_commandline_option(ssse3 TYPE boolean)
-qt_commandline_option(static TYPE enum NAME shared MAPPING yes no no yes)
-qt_commandline_option(static-runtime TYPE boolean NAME static_runtime)
-qt_commandline_option(strip TYPE boolean)
-qt_commandline_option(syncqt TYPE boolean)
-qt_commandline_option(sysroot TYPE string)
-qt_commandline_option(testcocoon TYPE boolean)
-qt_commandline_option(use-gold-linker TYPE boolean NAME use_gold_linker_alias)
-qt_commandline_option(warnings-are-errors TYPE boolean NAME warnings_are_errors)
-qt_commandline_option(Werror TYPE boolean NAME warnings_are_errors)
-qt_commandline_option(widgets TYPE boolean)
-qt_commandline_option(xplatform TYPE string)
-qt_commandline_option(zlib TYPE enum NAME system-zlib MAPPING system yes qt no)
-qt_commandline_option(zstd TYPE boolean)
-qt_commandline_prefix(D defines)
-qt_commandline_prefix(F fpaths)
-qt_commandline_prefix(I includes)
-qt_commandline_prefix(L lpaths)
-qt_commandline_prefix(R rpaths)
-qt_commandline_prefix(W wflags)
-qt_commandline_assignment(DBUS_HOST_PATH host_dbus.prefix)
-qt_commandline_assignment(DBUS_PATH dbus.prefix)
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 76c08084d3..334c2496c7 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -8,12 +8,19 @@ cmake_minimum_required(VERSION 3.16)
# Get the repo version and CMake policy details
include(.cmake.conf)
-# Bail out if parts of the build directory's components are symlinks.
+# Bail out if any part of the build directory's path is symlinked.
+# The OS-level current working directory is always the real path and some
+# parts of the build system only deal with that path, which causes confusion
+# when compared to the logical working directory maintained by the shell and
+# passed on the command line.
get_filename_component(build_dir_absolute "${CMAKE_BINARY_DIR}" ABSOLUTE)
get_filename_component(build_dir_realpath "${CMAKE_BINARY_DIR}" REALPATH)
if(NOT build_dir_absolute STREQUAL build_dir_realpath)
message(FATAL_ERROR "The build path \"${CMAKE_BINARY_DIR}\" contains symlinks. \
-This is not supported. Please use some other - transparent - mechanism to map directories.")
+This is not supported. Possible solutions:
+- map directories using a transparent mechanism such as mount --bind
+- pass the real path of the build directory to CMake, e.g. using \
+cd $(realpath <build_dir>) before invoking cmake <source_dir>.")
endif()
unset(build_dir_absolute)
unset(build_dir_realpath)
@@ -36,9 +43,6 @@ project(QtBase
LANGUAGES CXX C ASM
)
-# Make sure we only use latest private CMake API, aka no compatibility wrappers.
-set(QT_NO_INTERNAL_COMPATIBILITY_FUNCTIONS TRUE)
-
if(NOT QT_BUILD_STANDALONE_TESTS)
## Add some paths to check for cmake modules:
list(PREPEND CMAKE_MODULE_PATH
@@ -81,6 +85,9 @@ if(NOT QT_BUILD_STANDALONE_TESTS)
## 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)
@@ -99,7 +106,10 @@ if(NOT QT_BUILD_STANDALONE_TESTS)
include(src/corelib/Qt6CoreMacros.cmake)
# Needed when building qtbase for android.
- include(src/corelib/Qt6AndroidMacros.cmake)
+ if(ANDROID)
+ include(src/corelib/Qt6AndroidMacros.cmake)
+ _qt_internal_create_global_apk_target()
+ endif()
if(WASM)
# Needed when building for WebAssembly.
@@ -156,7 +166,4 @@ qt_build_repo_end()
if(NOT QT_BUILD_STANDALONE_TESTS AND QT_BUILD_EXAMPLES)
add_subdirectory(examples)
- if(NOT QT_BUILD_EXAMPLES_BY_DEFAULT)
- set_property(DIRECTORY examples PROPERTY EXCLUDE_FROM_ALL TRUE)
- endif()
endif()
diff --git a/INSTALL b/INSTALL
deleted file mode 100644
index d0976a92ae..0000000000
--- a/INSTALL
+++ /dev/null
@@ -1,9 +0,0 @@
- INSTALLING Qt Source Package Version %VERSION%.
-
-For instructions on building and installing Qt for each supported platform,
-please see http://doc.qt.io/qt-%SHORTVERSION%/build-sources.html,
-or follow one of these links:
-
-Mac OS X: http://doc.qt.io/qt-%SHORTVERSION%/osx-building.html
-Windows: http://doc.qt.io/qt-%SHORTVERSION%/windows-building.html
-X11 Platforms: http://doc.qt.io/qt-%SHORTVERSION%/linux-building.html
diff --git a/cmake/3rdparty/extra-cmake-modules/modules/ECMEnableSanitizers.cmake b/cmake/3rdparty/extra-cmake-modules/modules/ECMEnableSanitizers.cmake
index 4c43e99b6b..dcdb8621d3 100644
--- a/cmake/3rdparty/extra-cmake-modules/modules/ECMEnableSanitizers.cmake
+++ b/cmake/3rdparty/extra-cmake-modules/modules/ECMEnableSanitizers.cmake
@@ -1,104 +1,83 @@
-#.rst:
-# ECMEnableSanitizers
-# -------------------
+# SPDX-FileCopyrightText: 2014 Mathieu Tarral <mathieu.tarral@gmail.com>
#
-# Enable compiler sanitizer flags.
-#
-# The following sanitizers are supported:
-#
-# - Address Sanitizer
-# - Memory Sanitizer
-# - Thread Sanitizer
-# - Leak Sanitizer
-# - Undefined Behaviour Sanitizer
-#
-# All of them are implemented in Clang, depending on your version, and
-# there is an work in progress in GCC, where some of them are currently
-# implemented.
-#
-# This module will check your current compiler version to see if it
-# supports the sanitizers that you want to enable
-#
-# Usage
-# =====
-#
-# Simply add::
-#
-# include(ECMEnableSanitizers)
-#
-# to your ``CMakeLists.txt``. Note that this module is included in
-# KDECompilerSettings, so projects using that module do not need to also
-# include this one.
-#
-# The sanitizers are not enabled by default. Instead, you must set
-# ``ECM_ENABLE_SANITIZERS`` (either in your ``CMakeLists.txt`` or on the
-# command line) to a semicolon-separated list of sanitizers you wish to enable.
-# The options are:
-#
-# - address
-# - memory
-# - thread
-# - leak
-# - undefined
-# - fuzzer-no-link
-# - fuzzer
-#
-# The sanitizers "address", "memory" and "thread" are mutually exclusive. You
-# cannot enable two of them in the same build.
-#
-# "leak" requires the "address" sanitizer.
-#
-# .. note::
-#
-# To reduce the overhead induced by the instrumentation of the sanitizers, it
-# is advised to enable compiler optimizations (``-O1`` or higher).
-#
-# Example
-# =======
-#
-# This is an example of usage::
-#
-# mkdir build
-# cd build
-# cmake -DECM_ENABLE_SANITIZERS='address;leak;undefined' ..
-#
-# .. note::
-#
-# Most of the sanitizers will require Clang. To enable it, use::
-#
-# -DCMAKE_CXX_COMPILER=clang++
-#
-# Since 1.3.0.
+# SPDX-License-Identifier: BSD-3-Clause
-#=============================================================================
-# Copyright 2014 Mathieu Tarral <mathieu.tarral@gmail.com>
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions
-# are met:
-#
-# 1. Redistributions of source code must retain the copyright
-# notice, this list of conditions and the following disclaimer.
-# 2. Redistributions in binary form must reproduce the copyright
-# notice, this list of conditions and the following disclaimer in the
-# documentation and/or other materials provided with the distribution.
-# 3. The name of the author may not be used to endorse or promote products
-# derived from this software without specific prior written permission.
-#
-# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
-# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
-# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
-# IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
-# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
-# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
-# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+#[=======================================================================[.rst:
+ECMEnableSanitizers
+-------------------
+
+Enable compiler sanitizer flags.
+
+The following sanitizers are supported:
+
+- Address Sanitizer
+- Memory Sanitizer
+- Thread Sanitizer
+- Leak Sanitizer
+- Undefined Behaviour Sanitizer
+
+All of them are implemented in Clang, depending on your version, and
+there is an work in progress in GCC, where some of them are currently
+implemented.
+
+This module will check your current compiler version to see if it
+supports the sanitizers that you want to enable
+
+Usage
+=====
+
+Simply add::
+
+ include(ECMEnableSanitizers)
+
+to your ``CMakeLists.txt``. Note that this module is included in
+KDECompilerSettings, so projects using that module do not need to also
+include this one.
+
+The sanitizers are not enabled by default. Instead, you must set
+``ECM_ENABLE_SANITIZERS`` (either in your ``CMakeLists.txt`` or on the
+command line) to a semicolon-separated list of sanitizers you wish to enable.
+The options are:
+
+- address
+- memory
+- thread
+- leak
+- undefined
+- fuzzer-no-link
+- fuzzer
+
+The sanitizers "address", "memory" and "thread" are mutually exclusive. You
+cannot enable two of them in the same build.
+
+"leak" requires the "address" sanitizer.
+
+.. note::
+
+ To reduce the overhead induced by the instrumentation of the sanitizers, it
+ is advised to enable compiler optimizations (``-O1`` or higher).
+
+Example
+=======
+
+This is an example of usage::
+
+ mkdir build
+ cd build
+ cmake -DECM_ENABLE_SANITIZERS='address;leak;undefined' ..
+
+.. note::
+
+ Most of the sanitizers will require Clang. To enable it, use::
+
+ -DCMAKE_CXX_COMPILER=clang++
+
+Since 1.3.0.
+#]=======================================================================]
# MACRO check_compiler_version
#-----------------------------
-macro (check_compiler_version gcc_required_version clang_required_version)
+macro (check_compiler_version gcc_required_version clang_required_version msvc_required_version)
if (
(
CMAKE_CXX_COMPILER_ID MATCHES "GNU"
@@ -111,12 +90,19 @@ macro (check_compiler_version gcc_required_version clang_required_version)
AND
CMAKE_CXX_COMPILER_VERSION VERSION_LESS ${clang_required_version}
)
+ OR
+ (
+ CMAKE_CXX_COMPILER_ID MATCHES "MSVC"
+ AND
+ CMAKE_CXX_COMPILER_VERSION VERSION_LESS ${msvc_required_version}
+ )
)
# error !
message(FATAL_ERROR "You ask to enable the sanitizer ${CUR_SANITIZER},
but your compiler ${CMAKE_CXX_COMPILER_ID} version ${CMAKE_CXX_COMPILER_VERSION}
does not support it !
- You should use at least GCC ${gcc_required_version} or Clang ${clang_required_version}
+ You should use at least GCC ${gcc_required_version}, Clang ${clang_required_version}
+ or MSVC ${msvc_required_version}
(99.99 means not implemented yet)")
endif ()
endmacro ()
@@ -125,29 +111,33 @@ endmacro ()
#------------------------------
macro (enable_sanitizer_flags sanitize_option)
if (${sanitize_option} MATCHES "address")
- check_compiler_version("4.8" "3.1")
- set(XSAN_COMPILE_FLAGS "-fsanitize=address -fno-omit-frame-pointer -fno-optimize-sibling-calls")
- set(XSAN_LINKER_FLAGS "asan")
+ check_compiler_version("4.8" "3.1" "19.28")
+ if (CMAKE_CXX_COMPILER_ID MATCHES "MSVC")
+ set(XSAN_COMPILE_FLAGS "-fsanitize=address")
+ else()
+ set(XSAN_COMPILE_FLAGS "-fsanitize=address -fno-omit-frame-pointer -fno-optimize-sibling-calls")
+ set(XSAN_LINKER_FLAGS "asan")
+ endif()
elseif (${sanitize_option} MATCHES "thread")
- check_compiler_version("4.8" "3.1")
+ check_compiler_version("4.8" "3.1" "99.99")
set(XSAN_COMPILE_FLAGS "-fsanitize=thread")
set(XSAN_LINKER_FLAGS "tsan")
elseif (${sanitize_option} MATCHES "memory")
- check_compiler_version("99.99" "3.1")
+ check_compiler_version("99.99" "3.1" "99.99")
set(XSAN_COMPILE_FLAGS "-fsanitize=memory")
elseif (${sanitize_option} MATCHES "leak")
- check_compiler_version("4.9" "3.4")
+ check_compiler_version("4.9" "3.4" "99.99")
set(XSAN_COMPILE_FLAGS "-fsanitize=leak")
set(XSAN_LINKER_FLAGS "lsan")
elseif (${sanitize_option} MATCHES "undefined")
- check_compiler_version("4.9" "3.1")
+ check_compiler_version("4.9" "3.1" "99.99")
set(XSAN_COMPILE_FLAGS "-fsanitize=undefined -fsanitize=float-divide-by-zero -fno-omit-frame-pointer -fno-optimize-sibling-calls")
elseif (${sanitize_option} MATCHES "fuzzer-no-link")
- check_compiler_version("99.99" "6.0")
+ check_compiler_version("99.99" "6.0" "99.99")
set(XSAN_COMPILE_FLAGS "-fsanitize=fuzzer-no-link")
set(XSAN_LINKER_FLAGS "-fsanitize=fuzzer-no-link")
elseif (${sanitize_option} MATCHES "fuzzer")
- check_compiler_version("99.99" "6.0")
+ check_compiler_version("99.99" "6.0" "99.99")
set(XSAN_COMPILE_FLAGS "-fsanitize=fuzzer")
else ()
message(FATAL_ERROR "Compiler sanitizer option \"${sanitize_option}\" not supported.")
@@ -155,7 +145,7 @@ macro (enable_sanitizer_flags sanitize_option)
endmacro ()
if (ECM_ENABLE_SANITIZERS)
- if (CMAKE_CXX_COMPILER_ID MATCHES "GNU" OR CMAKE_CXX_COMPILER_ID MATCHES "Clang")
+ if (CMAKE_CXX_COMPILER_ID MATCHES "GNU" OR CMAKE_CXX_COMPILER_ID MATCHES "Clang" OR CMAKE_CXX_COMPILER_ID MATCHES "MSVC")
# for each element of the ECM_ENABLE_SANITIZERS list
foreach ( CUR_SANITIZER ${ECM_ENABLE_SANITIZERS} )
# lowercase filter
diff --git a/cmake/3rdparty/extra-cmake-modules/qt_attribution.json b/cmake/3rdparty/extra-cmake-modules/qt_attribution.json
index cebebf82eb..941fb9ea11 100644
--- a/cmake/3rdparty/extra-cmake-modules/qt_attribution.json
+++ b/cmake/3rdparty/extra-cmake-modules/qt_attribution.json
@@ -6,7 +6,7 @@
"Description": "Additional CMake modules.",
"Homepage": "https://api.kde.org/ecm/",
- "Version": "5.50.0",
+ "Version": "5.84.0",
"License": "BSD-3-Clause",
"LicenseId": "BSD 3-Clause License",
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/FindWrapOpenSSL.cmake b/cmake/FindWrapOpenSSL.cmake
index b4481f3c09..486686d338 100644
--- a/cmake/FindWrapOpenSSL.cmake
+++ b/cmake/FindWrapOpenSSL.cmake
@@ -30,4 +30,10 @@ if(OpenSSL_FOUND)
endif()
include(FindPackageHandleStandardArgs)
-find_package_handle_standard_args(WrapOpenSSL DEFAULT_MSG WrapOpenSSL_FOUND)
+find_package_handle_standard_args(WrapOpenSSL
+ REQUIRED_VARS
+ OPENSSL_CRYPTO_LIBRARY
+ OPENSSL_INCLUDE_DIR
+ VERSION_VAR
+ OPENSSL_VERSION
+)
diff --git a/cmake/FindWrapOpenSSLHeaders.cmake b/cmake/FindWrapOpenSSLHeaders.cmake
index 52e6df3b0a..ea422a68ba 100644
--- a/cmake/FindWrapOpenSSLHeaders.cmake
+++ b/cmake/FindWrapOpenSSLHeaders.cmake
@@ -31,4 +31,9 @@ if(OPENSSL_INCLUDE_DIR)
endif()
include(FindPackageHandleStandardArgs)
-find_package_handle_standard_args(WrapOpenSSLHeaders DEFAULT_MSG WrapOpenSSLHeaders_FOUND)
+find_package_handle_standard_args(WrapOpenSSLHeaders
+ REQUIRED_VARS
+ OPENSSL_INCLUDE_DIR
+ VERSION_VAR
+ OPENSSL_VERSION
+)
diff --git a/cmake/FindWrapSystemMd4c.cmake b/cmake/FindWrapSystemMd4c.cmake
new file mode 100644
index 0000000000..ea691a4590
--- /dev/null
+++ b/cmake/FindWrapSystemMd4c.cmake
@@ -0,0 +1,24 @@
+if(TARGET WrapSystemMd4c::WrapSystemMd4c)
+ set(WrapSystemMd4c_FOUND TRUE)
+ return()
+endif()
+
+find_package(md4c CONFIG)
+
+# md4c provides a md4c::md4c target but
+# older versions create a md4c target without
+# namespace. If we find the old variant create
+# a namespaced target out of the md4c target.
+if(TARGET md4c AND NOT TARGET md4c::md4c)
+ add_library(md4c::md4c INTERFACE IMPORTED)
+ target_link_libraries(md4c::md4c INTERFACE md4c)
+endif()
+
+if(TARGET md4c::md4c)
+ add_library(WrapSystemMd4c::WrapSystemMd4c INTERFACE IMPORTED)
+ target_link_libraries(WrapSystemMd4c::WrapSystemMd4c INTERFACE md4c::md4c)
+endif()
+
+if(TARGET WrapSystemMd4c::WrapSystemMd4c)
+ set(WrapSystemMd4c_FOUND TRUE)
+endif()
diff --git a/cmake/FindWrapVulkan.cmake b/cmake/FindWrapVulkan.cmake
new file mode 100644
index 0000000000..38cf3ea417
--- /dev/null
+++ b/cmake/FindWrapVulkan.cmake
@@ -0,0 +1,20 @@
+# 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 WrapVulkan::WrapVulkan)
+ set(WrapVulkan_FOUND ON)
+ return()
+endif()
+
+set(WrapVulkan_FOUND OFF)
+
+find_package(Vulkan ${WrapVulkan_FIND_VERSION} QUIET)
+
+if(Vulkan_FOUND)
+ set(WrapVulkan_FOUND ON)
+
+ add_library(WrapVulkan::WrapVulkan INTERFACE IMPORTED)
+ target_link_libraries(WrapVulkan::WrapVulkan INTERFACE Vulkan::Vulkan)
+endif()
+
+include(FindPackageHandleStandardArgs)
+find_package_handle_standard_args(WrapVulkan DEFAULT_MSG Vulkan_LIBRARY Vulkan_INCLUDE_DIR)
diff --git a/cmake/FindWrapVulkanHeaders.cmake b/cmake/FindWrapVulkanHeaders.cmake
new file mode 100644
index 0000000000..a079e07300
--- /dev/null
+++ b/cmake/FindWrapVulkanHeaders.cmake
@@ -0,0 +1,23 @@
+# 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 WrapVulkanHeaders::WrapVulkanHeaders)
+ set(WrapVulkanHeaders_FOUND ON)
+ return()
+endif()
+
+set(WrapVulkanHeaders_FOUND OFF)
+
+find_package(Vulkan ${WrapVulkanHeaders_FIND_VERSION} QUIET)
+
+# We are interested only in include headers. The libraries might be missing, so we can't check the
+# _FOUND variable.
+if(Vulkan_INCLUDE_DIR)
+ set(WrapVulkanHeaders_FOUND ON)
+
+ add_library(WrapVulkanHeaders::WrapVulkanHeaders INTERFACE IMPORTED)
+ target_include_directories(WrapVulkanHeaders::WrapVulkanHeaders INTERFACE
+ ${Vulkan_INCLUDE_DIR})
+endif()
+
+include(FindPackageHandleStandardArgs)
+find_package_handle_standard_args(WrapVulkanHeaders DEFAULT_MSG Vulkan_INCLUDE_DIR)
diff --git a/cmake/Qt3rdPartyLibraryHelpers.cmake b/cmake/Qt3rdPartyLibraryHelpers.cmake
index 27d615b2b4..f2b3882fc7 100644
--- a/cmake/Qt3rdPartyLibraryHelpers.cmake
+++ b/cmake/Qt3rdPartyLibraryHelpers.cmake
@@ -1,66 +1,95 @@
-# Wrapper function to create a regular cmake target and forward all the
-# arguments collected by the conversion script.
-function(qt_internal_add_cmake_library target)
- # Process arguments:
- qt_parse_all_arguments(arg "qt_add_cmake_library"
- "SHARED;MODULE;STATIC;INTERFACE"
- "OUTPUT_DIRECTORY;ARCHIVE_INSTALL_DIRECTORY;INSTALL_DIRECTORY"
- "${__default_private_args};${__default_public_args}"
+macro(qt_internal_get_add_library_option_args option_args)
+ set(${option_args}
+ SHARED
+ STATIC
+ MODULE
+ INTERFACE
+ )
+endmacro()
+
+# Helper to create a library using the public _qt_internal_add_library function.
+#
+# The difference to _qt_internal_add_library is that MODULE is replaced with STATIC in a static
+# Qt build.
+# Everything else is just prepation for option validating.
+function(qt_internal_add_common_qt_library_helper target)
+ qt_internal_get_add_library_option_args(option_args)
+ qt_parse_all_arguments(arg "qt_internal_add_common_qt_library_helper"
+ "${option_args}"
+ ""
+ ""
${ARGN}
)
- set(is_static_lib 0)
-
- ### Define Targets:
- if(${arg_INTERFACE})
- add_library("${target}" INTERFACE)
- elseif(${arg_STATIC} OR (${arg_MODULE} AND NOT BUILD_SHARED_LIBS))
- add_library("${target}" STATIC)
- set(is_static_lib 1)
- elseif(${arg_SHARED})
- add_library("${target}" SHARED)
- _qt_internal_apply_win_prefix_and_suffix("${target}")
- elseif(${arg_MODULE})
- add_library("${target}" MODULE)
- set_property(TARGET ${name} PROPERTY C_VISIBILITY_PRESET default)
- set_property(TARGET ${name} PROPERTY CXX_VISIBILITY_PRESET default)
- set_property(TARGET ${name} PROPERTY OBJC_VISIBILITY_PRESET default)
- set_property(TARGET ${name} PROPERTY OBJCXX_VISIBILITY_PRESET default)
-
- 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}")
+ if(arg_SHARED)
+ set(arg_SHARED SHARED)
else()
- add_library("${target}")
- if(NOT BUILD_SHARED_LIBS)
- set(is_static_lib 1)
- endif()
+ set(arg_SHARED "")
endif()
- if (NOT arg_ARCHIVE_INSTALL_DIRECTORY AND arg_INSTALL_DIRECTORY)
- set(arg_ARCHIVE_INSTALL_DIRECTORY "${arg_INSTALL_DIRECTORY}")
+ if(arg_MODULE)
+ set(arg_MODULE MODULE)
+ else()
+ set(arg_MODULE "")
endif()
- if (ANDROID)
- qt_android_apply_arch_suffix("${target}")
+ if(arg_STATIC)
+ set(arg_STATIC STATIC)
+ else()
+ set(arg_STATIC "")
endif()
- qt_skip_warnings_are_errors_when_repo_unclean("${target}")
- # No need to compile Q_IMPORT_PLUGIN-containing files for non-executables.
- if(is_static_lib)
- _qt_internal_disable_static_default_plugins("${target}")
+ if(arg_INTERFACE)
+ set(arg_INTERFACE INTERFACE)
+ else()
+ set(arg_INTERFACE "")
endif()
- if (arg_INSTALL_DIRECTORY)
- set(install_arguments
- ARCHIVE_INSTALL_DIRECTORY ${arg_ARCHIVE_INSTALL_DIRECTORY}
- INSTALL_DIRECTORY ${arg_INSTALL_DIRECTORY}
- )
+ if(arg_MODULE AND NOT BUILD_SHARED_LIBS)
+ set(arg_MODULE STATIC)
endif()
+ _qt_internal_add_library(${target} ${arg_STATIC} ${arg_SHARED} ${arg_MODULE} ${arg_INTERFACE})
+ qt_internal_mark_as_internal_library(${target})
+endfunction()
+
+# Wrapper function to create a regular cmake target and forward all the
+# arguments collected by the conversion script.
+function(qt_internal_add_cmake_library target)
+ qt_internal_get_add_library_option_args(option_args)
+ set(single_args
+ OUTPUT_DIRECTORY
+ ARCHIVE_INSTALL_DIRECTORY
+ INSTALL_DIRECTORY
+ )
+ set(multi_args
+ ${__default_private_args}
+ ${__default_public_args}
+ )
+
+ qt_parse_all_arguments(arg "qt_add_cmake_library"
+ "${option_args}"
+ "${single_args}"
+ "${multi_args}"
+ ${ARGN}
+ )
+
+ qt_remove_args(library_helper_args
+ ARGS_TO_REMOVE
+ ${single_args}
+ ${multi_args}
+ ALL_ARGS
+ ${option_args}
+ ${single_args}
+ ${multi_args}
+ ARGS
+ ${ARGN}
+ )
+
+ qt_internal_add_common_qt_library_helper(${target} ${library_helper_args})
+
+ qt_skip_warnings_are_errors_when_repo_unclean("${target}")
+
if (arg_OUTPUT_DIRECTORY)
set_target_properties(${target} PROPERTIES
ARCHIVE_OUTPUT_DIRECTORY ${arg_OUTPUT_DIRECTORY}
@@ -88,7 +117,6 @@ function(qt_internal_add_cmake_library target)
MOC_OPTIONS ${arg_MOC_OPTIONS}
ENABLE_AUTOGEN_TOOLS ${arg_ENABLE_AUTOGEN_TOOLS}
DISABLE_AUTOGEN_TOOLS ${arg_DISABLE_AUTOGEN_TOOLS}
- ${install_arguments}
)
endfunction()
@@ -96,64 +124,55 @@ endfunction()
# compile 3rdparty libraries as part of the build.
#
function(qt_internal_add_3rdparty_library target)
- # Process arguments:
- qt_parse_all_arguments(arg "qt_add_3rdparty_library"
- "SHARED;MODULE;STATIC;INTERFACE;EXCEPTIONS;INSTALL;SKIP_AUTOMOC"
- "OUTPUT_DIRECTORY;QMAKE_LIB_NAME"
- "${__default_private_args};${__default_public_args}"
+ qt_internal_get_add_library_option_args(library_option_args)
+ set(option_args
+ EXCEPTIONS
+ INSTALL
+ SKIP_AUTOMOC
+ )
+ set(single_args
+ OUTPUT_DIRECTORY
+ QMAKE_LIB_NAME
+ )
+ set(multi_args
+ ${__default_private_args}
+ ${__default_public_args}
+ )
+
+ qt_parse_all_arguments(arg "qt_internal_add_3rdparty_library"
+ "${library_option_args};${option_args}"
+ "${single_args}"
+ "${multi_args}"
${ARGN}
)
- set(is_static_lib 0)
-
- ### Define Targets:
- if(${arg_INTERFACE})
- add_library("${target}" INTERFACE)
- elseif(${arg_STATIC} OR (${arg_MODULE} AND NOT BUILD_SHARED_LIBS))
- add_library("${target}" STATIC)
- set(is_static_lib 1)
- elseif(${arg_SHARED})
- add_library("${target}" SHARED)
- elseif(${arg_MODULE})
- add_library("${target}" MODULE)
- set_property(TARGET ${name} PROPERTY C_VISIBILITY_PRESET default)
- set_property(TARGET ${name} PROPERTY CXX_VISIBILITY_PRESET default)
- set_property(TARGET ${name} PROPERTY OBJC_VISIBILITY_PRESET default)
- set_property(TARGET ${name} PROPERTY OBJCXX_VISIBILITY_PRESET default)
-
- 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()
- else()
- add_library("${target}")
- if(NOT BUILD_SHARED_LIBS)
- set(is_static_lib 1)
- endif()
- endif()
+ qt_remove_args(library_helper_args
+ ARGS_TO_REMOVE
+ ${option_args}
+ ${single_args}
+ ${multi_args}
+ ALL_ARGS
+ ${library_option_args}
+ ${option_args}
+ ${single_args}
+ ${multi_args}
+ ARGS
+ ${ARGN}
+ )
+
+ qt_internal_add_common_qt_library_helper(${target} ${library_helper_args})
if(NOT arg_INTERFACE)
qt_set_common_target_properties(${target})
endif()
- if (NOT arg_ARCHIVE_INSTALL_DIRECTORY AND arg_INSTALL_DIRECTORY)
- set(arg_ARCHIVE_INSTALL_DIRECTORY "${arg_INSTALL_DIRECTORY}")
- endif()
-
+ set_target_properties(${target} PROPERTIES
+ _qt_module_interface_name "${target}"
+ )
qt_internal_add_qt_repo_known_module(${target})
qt_internal_add_target_aliases(${target})
_qt_internal_apply_strict_cpp(${target})
- # No need to compile Q_IMPORT_PLUGIN-containing files for non-executables.
- if(is_static_lib)
- _qt_internal_disable_static_default_plugins("${target}")
- endif()
-
- if (ANDROID)
- qt_android_apply_arch_suffix("${target}")
- endif()
-
qt_skip_warnings_are_errors_when_repo_unclean("${target}")
set_target_properties(${target} PROPERTIES
@@ -200,7 +219,6 @@ function(qt_internal_add_3rdparty_library target)
MOC_OPTIONS ${arg_MOC_OPTIONS}
ENABLE_AUTOGEN_TOOLS ${arg_ENABLE_AUTOGEN_TOOLS}
DISABLE_AUTOGEN_TOOLS ${arg_DISABLE_AUTOGEN_TOOLS}
- ${install_arguments}
)
if(NOT BUILD_SHARED_LIBS OR arg_INSTALL)
@@ -275,8 +293,8 @@ function(qt_install_3rdparty_library_wrap_config_extra_file target)
set(use_bundled "OFF")
endif()
- set(QT_USE_BUNDLED_${target} "${use_bundled}" CACHE BOOL "" FORCE)
- set(extra_cmake_code "set(QT_USE_BUNDLED_${target} ${use_bundled} CACHE BOOL \"\" FORCE)")
+ set(QT_USE_BUNDLED_${target} "${use_bundled}" CACHE INTERNAL "")
+ set(extra_cmake_code "set(QT_USE_BUNDLED_${target} ${use_bundled} CACHE INTERNAL \"\")")
configure_file(
"${QT_CMAKE_DIR}/QtFindWrapConfigExtra.cmake.in"
"${QT_CONFIG_BUILD_DIR}/${INSTALL_CMAKE_NAMESPACE}/FindWrap${target}ConfigExtra.cmake"
diff --git a/cmake/QtAppHelpers.cmake b/cmake/QtAppHelpers.cmake
index c40488cc66..4301b7e480 100644
--- a/cmake/QtAppHelpers.cmake
+++ b/cmake/QtAppHelpers.cmake
@@ -40,6 +40,7 @@ function(qt_internal_add_app target)
)
qt_internal_add_target_aliases("${target}")
_qt_internal_apply_strict_cpp("${target}")
+ qt_internal_adjust_main_config_runtime_output_dir("${target}" "${output_directory}")
# To mimic the default behaviors of qt_app.prf, we by default enable GUI Windows applications,
# but don't enable macOS bundles.
diff --git a/cmake/QtAutoDetect.cmake b/cmake/QtAutoDetect.cmake
index 6a94515e60..ffa6028320 100644
--- a/cmake/QtAutoDetect.cmake
+++ b/cmake/QtAutoDetect.cmake
@@ -5,6 +5,16 @@
# Make sure to not run detection when building standalone tests, because the detection was already
# done when initially configuring qtbase.
+function(qt_internal_ensure_static_qt_config)
+ 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()
+endfunction()
function(qt_auto_detect_wasm)
if("${QT_QMAKE_TARGET_MKSPEC}" STREQUAL "wasm-emscripten" AND DEFINED ENV{EMSDK})
@@ -49,14 +59,7 @@ function(qt_auto_detect_wasm)
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()
+ qt_internal_ensure_static_qt_config()
# this version of Qt needs this version of emscripten
set(QT_EMCC_RECOMMENDED_VERSION 2.0.14 CACHE STRING INTERNAL FORCE)
endif()
@@ -72,38 +75,18 @@ 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}.")
+function(qt_auto_detect_android)
+ # We assume an Android build if any of the ANDROID_* cache variables are set.
+ if(DEFINED ANDROID_SDK_ROOT
+ OR DEFINED ANDROID_NDK_ROOT
+ OR DEFINED ANDROID_ABI
+ OR DEFINED ANDROID_NATIVE_ABI_LEVEL
+ OR DEFINED ANDROID_STL)
+ set(android_detected TRUE)
+ else()
+ set(android_detected FALSE)
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 ANDROID_NDK_ROOT AND DEFINED ANDROID_SDK_ROOT)
file(GLOB ndk_versions LIST_DIRECTORIES true RELATIVE "${ANDROID_SDK_ROOT}/ndk"
@@ -144,22 +127,24 @@ function(qt_auto_detect_android)
endif()
endif()
- if("${CMAKE_TOOLCHAIN_FILE}" STREQUAL ""
- AND (DEFINED ANDROID_ABI OR DEFINED ANDROID_NATIVE_API_LEVEL))
+ if(NOT DEFINED CMAKE_TOOLCHAIN_FILE AND android_detected)
message(FATAL_ERROR "An Android build was requested, but no Android toolchain file was "
"specified nor detected.")
endif()
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)
+ # Peek into the toolchain file and check if it looks like an Android one.
+ if(NOT android_detected)
+ 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)
+ set(android_detected TRUE)
+ endif()
endif()
if(android_detected)
- message(STATUS "Android toolchain file detected, checking configuration defaults...")
+ message(STATUS "Android build detected, checking configuration defaults...")
if(NOT DEFINED ANDROID_NATIVE_API_LEVEL)
message(STATUS "ANDROID_NATIVE_API_LEVEL was not specified, using API level 23 as default")
set(ANDROID_NATIVE_API_LEVEL 23 CACHE STRING "")
@@ -170,11 +155,11 @@ function(qt_auto_detect_android)
endif()
set(QT_AUTODETECT_ANDROID ${android_detected} CACHE STRING "")
elseif (QT_AUTODETECT_ANDROID)
- message(STATUS "Android toolchain file detected")
+ message(STATUS "Android build detected")
endif()
endfunction()
-function(qt_auto_detect_vpckg)
+function(qt_auto_detect_vcpkg)
if(DEFINED ENV{VCPKG_ROOT})
set(vcpkg_toolchain_file "$ENV{VCPKG_ROOT}/scripts/buildsystems/vcpkg.cmake")
get_filename_component(vcpkg_toolchain_file "${vcpkg_toolchain_file}" ABSOLUTE)
@@ -279,14 +264,7 @@ function(qt_auto_detect_ios)
endif()
set(CMAKE_OSX_ARCHITECTURES "${osx_architectures}" CACHE STRING "")
- 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()
+ qt_internal_ensure_static_qt_config()
# Disable qt rpaths for iOS, just like mkspecs/common/uikit.conf does, due to those
# bundles not being able to use paths outside the app bundle. Not sure this is strictly
@@ -449,6 +427,17 @@ function(qt_auto_detect_win32_arm)
endif()
endfunction()
+function(qt_auto_detect_integrity)
+ if(
+ # Qt's custom CMake toolchain file sets this value.
+ CMAKE_SYSTEM_NAME STREQUAL "Integrity" OR
+
+ # Upstream CMake expects this name, but we don't currently use it in Qt.
+ CMAKE_SYSTEM_NAME STREQUAL "GHS-MULTI"
+ )
+ qt_internal_ensure_static_qt_config()
+ endif()
+endfunction()
qt_auto_detect_cmake_generator()
qt_auto_detect_cyclic_toolchain()
@@ -457,7 +446,8 @@ qt_auto_detect_darwin()
qt_auto_detect_macos_universal()
qt_auto_detect_ios()
qt_auto_detect_android()
-qt_auto_detect_vpckg()
+qt_auto_detect_vcpkg()
qt_auto_detect_pch()
qt_auto_detect_wasm()
qt_auto_detect_win32_arm()
+qt_auto_detect_integrity()
diff --git a/cmake/QtBaseConfigureTests.cmake b/cmake/QtBaseConfigureTests.cmake
index 15d506db16..717ea1248e 100644
--- a/cmake/QtBaseConfigureTests.cmake
+++ b/cmake/QtBaseConfigureTests.cmake
@@ -130,6 +130,10 @@ VERS_1;
if(APPLE)
set(HAVE_LD_VERSION_SCRIPT OFF)
endif()
+ # Also makes no sense with MSVC-style command-line
+ if(MSVC)
+ set(HAVE_LD_VERSION_SCRIPT OFF)
+ endif()
set(TEST_ld_version_script "${HAVE_LD_VERSION_SCRIPT}" CACHE INTERNAL "linker version script support")
endfunction()
diff --git a/cmake/QtBaseGlobalTargets.cmake b/cmake/QtBaseGlobalTargets.cmake
index a1f81ecb90..aab7646b25 100644
--- a/cmake/QtBaseGlobalTargets.cmake
+++ b/cmake/QtBaseGlobalTargets.cmake
@@ -21,28 +21,6 @@ file(RELATIVE_PATH
__GlobalConfig_relative_path_from_bin_dir_to_cmake_config_dir
${__qt_bin_dir_absolute} ${__GlobalConfig_install_dir_absolute})
-# Generate and install Qt6 config file.
-qt_internal_get_min_new_policy_cmake_version(min_new_policy_version)
-qt_internal_get_max_new_policy_cmake_version(max_new_policy_version)
-configure_package_config_file(
- "${PROJECT_SOURCE_DIR}/cmake/QtConfig.cmake.in"
- "${__GlobalConfig_build_dir}/${INSTALL_CMAKE_NAMESPACE}Config.cmake"
- INSTALL_DESTINATION "${__GlobalConfig_install_dir}"
-)
-
-write_basic_package_version_file(
- ${__GlobalConfig_build_dir}/${INSTALL_CMAKE_NAMESPACE}ConfigVersion.cmake
- VERSION ${PROJECT_VERSION}
- COMPATIBILITY AnyNewerVersion
-)
-
-qt_install(FILES
- "${__GlobalConfig_build_dir}/${INSTALL_CMAKE_NAMESPACE}Config.cmake"
- "${__GlobalConfig_build_dir}/${INSTALL_CMAKE_NAMESPACE}ConfigVersion.cmake"
- DESTINATION "${__GlobalConfig_install_dir}"
- COMPONENT Devel
-)
-
# Configure and install the QtBuildInternals package.
set(__build_internals_path_suffix "${INSTALL_CMAKE_NAMESPACE}BuildInternals")
qt_path_join(__build_internals_build_dir ${QT_CONFIG_BUILD_DIR} ${__build_internals_path_suffix})
@@ -134,11 +112,16 @@ 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
include(QtInternalTargets)
+qt_internal_run_common_config_tests()
+
+# Setup sanitizer options for qtbase directory scope based on features computed above.
+qt_internal_set_up_sanitizer_options()
+include("${CMAKE_CURRENT_LIST_DIR}/3rdparty/extra-cmake-modules/modules/ECMEnableSanitizers.cmake")
set(__export_targets Platform
GlobalConfig
@@ -159,7 +142,32 @@ qt_internal_export_modern_cmake_config_targets_file(TARGETS ${__export_targets}
CONFIG_INSTALL_DIR
${__GlobalConfig_install_dir})
-## Install some QtBase specific CMake files:
+# Generate and install Qt6 config file. Make sure it happens after the global feature evaluation so
+# they can be accessed in the Config file if needed.
+qt_internal_get_min_new_policy_cmake_version(min_new_policy_version)
+qt_internal_get_max_new_policy_cmake_version(max_new_policy_version)
+configure_package_config_file(
+ "${PROJECT_SOURCE_DIR}/cmake/QtConfig.cmake.in"
+ "${__GlobalConfig_build_dir}/${INSTALL_CMAKE_NAMESPACE}Config.cmake"
+ INSTALL_DESTINATION "${__GlobalConfig_install_dir}"
+)
+
+write_basic_package_version_file(
+ "${__GlobalConfig_build_dir}/${INSTALL_CMAKE_NAMESPACE}ConfigVersion.cmake"
+ VERSION ${PROJECT_VERSION}
+ COMPATIBILITY AnyNewerVersion
+)
+
+qt_install(FILES
+ "${__GlobalConfig_build_dir}/${INSTALL_CMAKE_NAMESPACE}Config.cmake"
+ "${__GlobalConfig_build_dir}/${INSTALL_CMAKE_NAMESPACE}ConfigVersion.cmake"
+ DESTINATION "${__GlobalConfig_install_dir}"
+ COMPONENT Devel
+)
+
+# 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
@@ -171,7 +179,6 @@ qt_copy_or_install(FILES
cmake/QtBuildInformation.cmake
cmake/QtCMakeHelpers.cmake
cmake/QtCMakeVersionHelpers.cmake
- cmake/QtCompatibilityHelpers.cmake
cmake/QtCompilerFlags.cmake
cmake/QtCompilerOptimization.cmake
cmake/QtConfigDependencies.cmake.in
@@ -179,8 +186,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
@@ -214,7 +219,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
@@ -225,6 +230,7 @@ qt_copy_or_install(FILES
cmake/QtSeparateDebugInfo.cmake
cmake/QtSetup.cmake
cmake/QtSimdHelpers.cmake
+ cmake/QtSingleRepoTargetSetBuildHelpers.cmake
cmake/QtStandaloneTestsConfig.cmake.in
cmake/QtSyncQtHelpers.cmake
cmake/QtTargetHelpers.cmake
@@ -234,13 +240,49 @@ qt_copy_or_install(FILES
cmake/QtWasmHelpers.cmake
cmake/QtWrapperScriptHelpers.cmake
cmake/QtWriteArgsFile.cmake
+ cmake/modulecppexports.h.in
DESTINATION "${__GlobalConfig_install_dir}"
)
-file(COPY cmake/QtFeature.cmake DESTINATION "${__GlobalConfig_build_dir}")
+# Install public config.tests files.
+qt_copy_or_install(DIRECTORY
+ "config.tests/static_link_order"
+ DESTINATION "${__GlobalConfig_install_dir}/config.tests"
+)
+
+# 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/QtPublicFinalizerHelpers.cmake
+ cmake/QtPublicPluginHelpers.cmake
+ cmake/QtPublicTargetHelpers.cmake
+ cmake/QtPublicWalkLibsHelpers.cmake
+ cmake/QtPublicFindPackageHelpers.cmake
+ cmake/QtPublicDependencyHelpers.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}")
+qt_copy_or_install(DIRECTORY "cmake/3rdparty" 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 other repos in a top-level build.
+if(QT_WILL_INSTALL)
+ file(COPY "cmake/3rdparty" DESTINATION "${__GlobalConfig_build_dir}")
+endif()
# Install our custom Find modules, which will be used by the find_dependency() calls
# inside the generated ModuleDependencies cmake files.
diff --git a/cmake/QtBuild.cmake b/cmake/QtBuild.cmake
index 18027848c2..f89512ae58 100644
--- a/cmake/QtBuild.cmake
+++ b/cmake/QtBuild.cmake
@@ -285,7 +285,9 @@ if(WIN32)
list(APPEND QT_DEFAULT_PLATFORM_DEFINITIONS WIN64 _WIN64)
endif()
if(MSVC)
- if(CMAKE_SYSTEM_PROCESSOR STREQUAL "arm64")
+ if (CLANG)
+ set(QT_DEFAULT_MKSPEC win32-clang-msvc)
+ elseif(CMAKE_SYSTEM_PROCESSOR STREQUAL "arm64")
set(QT_DEFAULT_MKSPEC win32-arm64-msvc)
else()
set(QT_DEFAULT_MKSPEC win32-msvc)
@@ -370,19 +372,15 @@ else()
set(QT_QMAKE_HOST_MKSPEC "${QT_QMAKE_TARGET_MKSPEC}")
endif()
-# Platform definition dir provided by user on command line.
-# Derive the absolute one relative to the current source dir.
-if(QT_PLATFORM_DEFINITION_DIR)
- set(QT_DEFAULT_PLATFORM_DEFINITION_DIR "${QT_PLATFORM_DEFINITION_DIR}")
- get_filename_component(
- QT_DEFAULT_PLATFORM_DEFINITION_DIR_ABSOLUTE
- "${QT_PLATFORM_DEFINITION_DIR}"
- ABSOLUTE)
-elseif(QT_QMAKE_TARGET_MKSPEC)
- # Used by consumers of prefix builds via INSTALL_INTERFACE (relative path).
- set(QT_DEFAULT_PLATFORM_DEFINITION_DIR "${INSTALL_MKSPECSDIR}/${QT_QMAKE_TARGET_MKSPEC}")
- # Used by qtbase itself and consumers of non-prefix builds via BUILD_INTERFACE (absolute path).
- set(QT_DEFAULT_PLATFORM_DEFINITION_DIR_ABSOLUTE "${QT_MKSPECS_DIR}/${QT_QMAKE_TARGET_MKSPEC}")
+if(NOT EXISTS "${QT_MKSPECS_DIR}/${QT_QMAKE_TARGET_MKSPEC}")
+ file(GLOB known_platforms
+ LIST_DIRECTORIES true
+ RELATIVE "${QT_MKSPECS_DIR}"
+ "${QT_MKSPECS_DIR}/*"
+ )
+ list(JOIN known_platforms "\n " known_platforms)
+ message(FATAL_ERROR "Unknown platform ${QT_QMAKE_TARGET_MKSPEC}\n\
+Known platforms:\n ${known_platforms}")
endif()
if(NOT DEFINED QT_DEFAULT_PLATFORM_DEFINITIONS)
@@ -391,10 +389,7 @@ endif()
set(QT_PLATFORM_DEFINITIONS ${QT_DEFAULT_PLATFORM_DEFINITIONS}
CACHE STRING "Qt platform specific pre-processor defines")
-set(QT_PLATFORM_DEFINITION_DIR "${QT_DEFAULT_PLATFORM_DEFINITION_DIR}"
- CACHE PATH "Path to directory that contains qplatformdefs.h")
-set(QT_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")
include(QtGlobalStateHelpers)
@@ -507,11 +502,11 @@ 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)
include(QtCMakeHelpers)
-include(QtCompatibilityHelpers)
include(QtDeferredDependenciesHelpers)
include(QtDbusHelpers)
include(QtDocsHelpers)
@@ -533,6 +528,7 @@ include(QtRpathHelpers)
include(QtSanitizerHelpers)
include(QtScopeFinalizerHelpers)
include(QtSimdHelpers)
+include(QtSingleRepoTargetSetBuildHelpers)
include(QtSyncQtHelpers)
include(QtTargetHelpers)
include(QtTestHelpers)
@@ -544,6 +540,13 @@ if(ANDROID)
include(QtAndroidHelpers)
endif()
+# Helpers that are available in public projects and while building Qt itself.
+include(QtPublicPluginHelpers)
+include(QtPublicTargetHelpers)
+include(QtPublicWalkLibsHelpers)
+include(QtPublicFindPackageHelpers)
+include(QtPublicDependencyHelpers)
+
# 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.
diff --git a/cmake/QtBuildInformation.cmake b/cmake/QtBuildInformation.cmake
index c010ff631d..6828cbba8e 100644
--- a/cmake/QtBuildInformation.cmake
+++ b/cmake/QtBuildInformation.cmake
@@ -272,8 +272,13 @@ endfunction()
function(qt_configure_process_add_summary_build_type_and_config)
get_property(subarch_summary GLOBAL PROPERTY qt_configure_subarch_summary)
- set(message
- "Building for: ${QT_QMAKE_TARGET_MKSPEC} (${TEST_architecture_arch}, CPU features: ${subarch_summary})")
+ if(APPLE AND (CMAKE_OSX_ARCHITECTURES MATCHES ";"))
+ set(message
+ "Building for: ${QT_QMAKE_TARGET_MKSPEC} (${CMAKE_OSX_ARCHITECTURES}), ${TEST_architecture_arch} features: ${subarch_summary})")
+ else()
+ set(message
+ "Building for: ${QT_QMAKE_TARGET_MKSPEC} (${TEST_architecture_arch}, CPU features: ${subarch_summary})")
+ endif()
qt_configure_add_report("${message}")
set(message "Compiler: ")
diff --git a/cmake/QtBuildInternals/QtBuildInternalsConfig.cmake b/cmake/QtBuildInternals/QtBuildInternalsConfig.cmake
index 2d4c11ede2..f100e4ab44 100644
--- a/cmake/QtBuildInternals/QtBuildInternalsConfig.cmake
+++ b/cmake/QtBuildInternals/QtBuildInternalsConfig.cmake
@@ -324,6 +324,50 @@ macro(qt_prepare_standalone_project)
qt_enable_cmake_languages()
endmacro()
+# Define a repo target set, and store accompanying information.
+#
+# A repo target set is a subset of targets in a Qt module repository. To build a repo target set,
+# set QT_BUILD_SINGLE_REPO_TARGET_SET to the name of the repo target set.
+#
+# This function is to be called in the top-level project file of a repository,
+# before qt_internal_prepare_single_repo_target_set_build()
+#
+# This function stores information in variables of the parent scope.
+#
+# Positional Arguments:
+# name - The name of this repo target set.
+#
+# Named Arguments:
+# DEPENDS - List of Qt6 COMPONENTS that are build dependencies of this repo target set.
+function(qt_internal_define_repo_target_set name)
+ set(oneValueArgs DEPENDS)
+ set(prefix QT_REPO_TARGET_SET_)
+ cmake_parse_arguments(${prefix}${name} "" ${oneValueArgs} "" ${ARGN})
+ foreach(arg IN LISTS oneValueArgs)
+ set(${prefix}${name}_${arg} ${${prefix}${name}_${arg}} PARENT_SCOPE)
+ endforeach()
+ set(QT_REPO_KNOWN_TARGET_SETS "${QT_REPO_KNOWN_TARGET_SETS};${name}" PARENT_SCOPE)
+endfunction()
+
+# Setup a single repo target set build if QT_BUILD_SINGLE_REPO_TARGET_SET is defined.
+#
+# This macro must be called in the top-level project file of the repository after all repo target
+# sets have been defined.
+macro(qt_internal_prepare_single_repo_target_set_build)
+ if(DEFINED QT_BUILD_SINGLE_REPO_TARGET_SET)
+ if(NOT QT_BUILD_SINGLE_REPO_TARGET_SET IN_LIST QT_REPO_KNOWN_TARGET_SETS)
+ message(FATAL_ERROR
+ "Repo target set '${QT_BUILD_SINGLE_REPO_TARGET_SET}' is undefined.")
+ endif()
+ message(STATUS
+ "Preparing single repo target set build of ${QT_BUILD_SINGLE_REPO_TARGET_SET}")
+ if (NOT "${QT_REPO_TARGET_SET_${QT_BUILD_SINGLE_REPO_TARGET_SET}_DEPENDS}" STREQUAL "")
+ find_package(${INSTALL_CMAKE_NAMESPACE} ${PROJECT_VERSION} CONFIG REQUIRED
+ COMPONENTS ${QT_REPO_TARGET_SET_${QT_BUILD_SINGLE_REPO_TARGET_SET}_DEPENDS})
+ endif()
+ endif()
+endmacro()
+
macro(qt_build_repo_begin)
qt_build_internals_set_up_private_api()
qt_enable_cmake_languages()
@@ -422,49 +466,65 @@ macro(qt_build_repo_end)
endif()
endif()
+ qt_build_internals_add_toplevel_targets()
+
if(NOT QT_SUPERBUILD)
qt_print_build_instructions()
- else()
- qt_build_internals_add_toplevel_targets()
endif()
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()
-
- if(QT_BUILD_EXAMPLES AND BUILD_SHARED_LIBS
+macro(qt_build_repo_impl_examples)
+ if(QT_BUILD_EXAMPLES
AND EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/examples/CMakeLists.txt"
AND NOT QT_BUILD_STANDALONE_TESTS)
add_subdirectory(examples)
- if(NOT QT_BUILD_EXAMPLES_BY_DEFAULT)
- set_property(DIRECTORY examples PROPERTY EXCLUDE_FROM_ALL TRUE)
- endif()
endif()
endmacro()
@@ -473,7 +533,7 @@ macro(qt_set_up_standalone_tests_build)
# Standalone tests are not handled via the main repo project and qt_build_tests.
endmacro()
-function(qt_get_standalone_tests_confg_files_path out_var)
+function(qt_get_standalone_tests_config_files_path out_var)
set(path "${QT_CONFIG_INSTALL_DIR}/${INSTALL_CMAKE_NAMESPACE}BuildInternals/StandaloneTests")
# QT_CONFIG_INSTALL_DIR is relative in prefix builds.
@@ -492,7 +552,7 @@ macro(qt_build_tests)
if(QT_BUILD_STANDALONE_TESTS)
# Find location of TestsConfig.cmake. These contain the modules that need to be
# find_package'd when testing.
- qt_get_standalone_tests_confg_files_path(_qt_build_tests_install_prefix)
+ qt_get_standalone_tests_config_files_path(_qt_build_tests_install_prefix)
include("${_qt_build_tests_install_prefix}/${PROJECT_NAME}TestsConfig.cmake" OPTIONAL)
# Of course we always need the test module as well.
@@ -596,6 +656,69 @@ macro(qt_internal_set_up_build_dir_package_paths)
endmacro()
macro(qt_examples_build_begin)
+ set(options EXTERNAL_BUILD)
+ set(singleOpts "")
+ set(multiOpts DEPENDS)
+
+ cmake_parse_arguments(arg "${options}" "${singleOpts}" "${multiOpts}" ${ARGN})
+
+ # FIXME: Support prefix builds as well
+ if(arg_EXTERNAL_BUILD AND NOT QT_WILL_INSTALL)
+ # Examples will be built using ExternalProject.
+ # We always depend on all plugins so as to prevent opportunities for
+ # weird errors associated with loading out-of-date plugins from
+ # unrelated Qt modules.
+ # We also depend on all targets from this repo's src and tools subdirectories
+ # to ensure that we've built anything that a find_package() call within
+ # an example might use. Projects can add further dependencies if needed,
+ # but that should rarely be necessary.
+ set(QT_EXAMPLE_DEPENDENCIES qt_plugins ${arg_DEPENDS})
+
+ if(TARGET ${qt_repo_targets_name}_src)
+ list(APPEND QT_EXAMPLE_DEPENDENCIES ${qt_repo_targets_name}_src)
+ endif()
+
+ if(TARGET ${qt_repo_targets_name}_tools)
+ list(APPEND QT_EXAMPLE_DEPENDENCIES ${qt_repo_targets_name}_tools)
+ endif()
+
+ set(QT_EXAMPLE_BASE_DIR ${CMAKE_CURRENT_SOURCE_DIR})
+ set(QT_IS_EXTERNAL_EXAMPLES_BUILD TRUE)
+
+ string(TOLOWER ${PROJECT_NAME} project_name_lower)
+ if(NOT TARGET examples)
+ if(QT_BUILD_EXAMPLES_BY_DEFAULT)
+ add_custom_target(examples ALL)
+ else()
+ add_custom_target(examples)
+ endif()
+ endif()
+ if(NOT TARGET examples_${project_name_lower})
+ add_custom_target(examples_${project_name_lower})
+ add_dependencies(examples examples_${project_name_lower})
+ endif()
+
+ include(ExternalProject)
+ else()
+ # This repo has not yet been updated to build examples in a separate
+ # build from this main build, or we can't use that arrangement yet.
+ # Build them directly as part of the main build instead for backward
+ # compatibility.
+ if(NOT BUILD_SHARED_LIBS)
+ # Ordinarily, it would be an error to call return() from within a
+ # macro(), but in this case we specifically want to return from the
+ # caller's scope if we are doing a static build and the project
+ # isn't building examples in a separate build from the main build.
+ # Configuring static builds requires tools that are not available
+ # until build time.
+ return()
+ endif()
+
+ if(NOT QT_BUILD_EXAMPLES_BY_DEFAULT)
+ set_directory_properties(PROPERTIES EXCLUDE_FROM_ALL TRUE)
+ endif()
+ endif()
+
# Examples that are built as part of the Qt build need to use the CMake config files from the
# build dir, because they are not installed yet in a prefix build.
# Appending to CMAKE_PREFIX_PATH helps find the initial Qt6Config.cmake.
@@ -614,16 +737,28 @@ macro(qt_examples_build_begin)
endmacro()
macro(qt_examples_build_end)
- # We use AUTOMOC/UIC/RCC in the examples. Make sure to not fail on a fresh Qt build, that e.g. the moc binary does not exist yet.
+ # We use AUTOMOC/UIC/RCC in the examples. When the examples are part of the
+ # main build rather than being built in their own separate project, make
+ # sure we do not fail on a fresh Qt build (e.g. the moc binary won't exist
+ # yet because it is created at build time).
- # This function gets all targets below this directory
+ # This function gets all targets below this directory (excluding custom targets and aliases)
function(get_all_targets _result _dir)
get_property(_subdirs DIRECTORY "${_dir}" PROPERTY SUBDIRECTORIES)
foreach(_subdir IN LISTS _subdirs)
get_all_targets(${_result} "${_subdir}")
endforeach()
get_property(_sub_targets DIRECTORY "${_dir}" PROPERTY BUILDSYSTEM_TARGETS)
- set(${_result} ${${_result}} ${_sub_targets} PARENT_SCOPE)
+ set(_real_targets "")
+ if(_sub_targets)
+ foreach(__target IN LISTS _sub_targets)
+ get_target_property(target_type ${__target} TYPE)
+ if(NOT target_type STREQUAL "UTILITY" AND NOT target_type STREQUAL "ALIAS")
+ list(APPEND _real_targets ${__target})
+ endif()
+ endforeach()
+ endif()
+ set(${_result} ${${_result}} ${_real_targets} PARENT_SCOPE)
endfunction()
get_all_targets(targets "${CMAKE_CURRENT_SOURCE_DIR}")
@@ -638,6 +773,174 @@ macro(qt_examples_build_end)
set(CMAKE_FIND_ROOT_PATH_MODE_PACKAGE ${BACKUP_CMAKE_FIND_ROOT_PATH_MODE_PACKAGE})
endmacro()
+function(qt_internal_add_example subdir)
+ # FIXME: Support building examples externally for prefix builds as well.
+
+ if(NOT QT_IS_EXTERNAL_EXAMPLES_BUILD)
+ # Use old non-external approach
+ add_subdirectory(${subdir} ${ARGN})
+ return()
+ endif()
+
+ set(options "")
+ set(singleOpts NAME)
+ set(multiOpts "")
+
+ cmake_parse_arguments(PARSE_ARGV 1 arg "${options}" "${singleOpts}" "${multiOpts}")
+
+ if(NOT arg_NAME)
+ file(RELATIVE_PATH rel_path ${QT_EXAMPLE_BASE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/${subdir})
+ string(REPLACE "/" "_" arg_NAME "${rel_path}")
+ endif()
+
+ if(QtBase_BINARY_DIR)
+ # Always use the copy in the build directory, even for prefix builds.
+ # We may build examples without installing, so we can't use the
+ # install or staging area.
+ set(qt_cmake_dir ${QtBase_BINARY_DIR}/lib/cmake/${QT_CMAKE_EXPORT_NAMESPACE})
+ else()
+ # This is a per-repo build that isn't the qtbase repo, so we know that
+ # qtbase was found via find_package() and Qt6_DIR must be set
+ set(qt_cmake_dir ${${QT_CMAKE_EXPORT_NAMESPACE}_DIR})
+ endif()
+
+ set(vars_to_pass_if_defined)
+ set(var_defs)
+ if(QT_HOST_PATH OR CMAKE_CROSSCOMPILING)
+ # Android NDK forces CMAKE_FIND_ROOT_PATH_MODE_PACKAGE to ONLY, so we
+ # can't rely on this setting here making it through to the example
+ # project.
+ # TODO: We should probably leave CMAKE_FIND_ROOT_PATH_MODE_PACKAGE
+ # alone. It may be a leftover from earlier methods that are no
+ # longer used or that no longer need this.
+ list(APPEND var_defs
+ -DCMAKE_TOOLCHAIN_FILE:FILEPATH=${qt_cmake_dir}/qt.toolchain.cmake
+ -DCMAKE_FIND_ROOT_PATH_MODE_PACKAGE:STRING=BOTH
+ )
+ else()
+ get_filename_component(prefix_dir ${qt_cmake_dir}/../../.. ABSOLUTE)
+ list(PREPEND CMAKE_PREFIX_PATH ${prefix_dir})
+
+ # Setting CMAKE_SYSTEM_NAME affects CMAKE_CROSSCOMPILING, even if it is
+ # set to the same as the host, so it should only be set if it is different.
+ # See https://gitlab.kitware.com/cmake/cmake/-/issues/21744
+ if(NOT DEFINED CMAKE_TOOLCHAIN_FILE AND
+ NOT CMAKE_SYSTEM_NAME STREQUAL CMAKE_HOST_SYSTEM_NAME)
+ list(APPEND vars_to_pass_if_defined CMAKE_SYSTEM_NAME:STRING)
+ endif()
+ endif()
+
+ list(APPEND vars_to_pass_if_defined
+ CMAKE_BUILD_TYPE:STRING
+ CMAKE_PREFIX_PATH:STRING
+ CMAKE_FIND_ROOT_PATH:STRING
+ CMAKE_FIND_ROOT_PATH_MODE_PACKAGE:STRING
+ BUILD_SHARED_LIBS:BOOL
+ CMAKE_OSX_ARCHITECTURES:STRING
+ CMAKE_OSX_DEPLOYMENT_TARGET:STRING
+ CMAKE_XCODE_ATTRIBUTE_CODE_SIGNING_ALLOWED:BOOL
+ CMAKE_XCODE_ATTRIBUTE_ONLY_ACTIVE_ARCH:BOOL
+ CMAKE_C_COMPILER_LAUNCHER:STRING
+ CMAKE_CXX_COMPILER_LAUNCHER:STRING
+ CMAKE_OBJC_COMPILER_LAUNCHER:STRING
+ CMAKE_OBJCXX_COMPILER_LAUNCHER:STRING
+ )
+
+ foreach(var_with_type IN LISTS vars_to_pass_if_defined)
+ string(REPLACE ":" ";" key_as_list "${var_with_type}")
+ list(GET key_as_list 0 var)
+ if(NOT DEFINED ${var})
+ continue()
+ endif()
+
+ # Preserve lists
+ string(REPLACE ";" "$<SEMICOLON>" varForGenex "${${var}}")
+
+ list(APPEND var_defs -D${var_with_type}=${varForGenex})
+ endforeach()
+
+
+ set(deps "")
+ list(REMOVE_DUPLICATES QT_EXAMPLE_DEPENDENCIES)
+ foreach(dep IN LISTS QT_EXAMPLE_DEPENDENCIES)
+ if(TARGET ${dep})
+ list(APPEND deps ${dep})
+ endif()
+ endforeach()
+
+ set(independent_args)
+ cmake_policy(PUSH)
+ if(POLICY CMP0114)
+ set(independent_args INDEPENDENT TRUE)
+ cmake_policy(SET CMP0114 NEW)
+ endif()
+
+ # The USES_TERMINAL_BUILD setting forces the build step to the console pool
+ # when using Ninja. This has two benefits:
+ #
+ # - You see build output as it is generated instead of at the end of the
+ # build step.
+ # - Only one task can use the console pool at a time, so it effectively
+ # serializes all example build steps, thereby preventing CPU
+ # over-commitment.
+ #
+ # If the loss of interactivity is not so important, one can allow CPU
+ # over-commitment for Ninja builds. This may result in better throughput,
+ # but is not allowed by default because it can make a machine almost
+ # unusable while a compilation is running.
+ set(terminal_args USES_TERMINAL_BUILD TRUE)
+ if(CMAKE_GENERATOR MATCHES "Ninja")
+ option(QT_BUILD_EXAMPLES_WITH_CPU_OVERCOMMIT
+ "Allow CPU over-commitment when building examples (Ninja only)"
+ )
+ if(QT_BUILD_EXAMPLES_WITH_CPU_OVERCOMMIT)
+ set(terminal_args)
+ endif()
+ endif()
+
+ ExternalProject_Add(${arg_NAME}
+ EXCLUDE_FROM_ALL TRUE
+ SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/${subdir}
+ INSTALL_COMMAND ""
+ TEST_COMMAND ""
+ DEPENDS ${deps}
+ CMAKE_CACHE_ARGS ${var_defs}
+ ${terminal_args}
+ )
+
+ # Force configure step to re-run after we configure the main project
+ set(reconfigure_check_file ${CMAKE_CURRENT_BINARY_DIR}/reconfigure_${arg_NAME}.txt)
+ file(TOUCH ${reconfigure_check_file})
+ ExternalProject_Add_Step(${arg_NAME} reconfigure-check
+ DEPENDERS configure
+ DEPENDS ${reconfigure_check_file}
+ ${independent_args}
+ )
+
+ # Create an apk external project step and custom target that invokes the apk target
+ # within the external project.
+ # Make the global apk target depend on that custom target.
+ if(ANDROID)
+ ExternalProject_Add_Step(${arg_NAME} apk
+ COMMAND ${CMAKE_COMMAND} --build <BINARY_DIR> --target apk
+ DEPENDEES configure
+ EXCLUDE_FROM_MAIN YES
+ ${terminal_args}
+ )
+ ExternalProject_Add_StepTargets(${arg_NAME} apk)
+
+ if(TARGET apk)
+ add_dependencies(apk ${arg_NAME}-apk)
+ endif()
+ endif()
+
+ cmake_policy(POP)
+
+ string(TOLOWER ${PROJECT_NAME} project_name_lower)
+ add_dependencies(examples_${project_name_lower} ${arg_NAME})
+
+endfunction()
+
if ("STANDALONE_TEST" IN_LIST Qt6BuildInternals_FIND_COMPONENTS)
include(${CMAKE_CURRENT_LIST_DIR}/QtStandaloneTestTemplateProject/Main.cmake)
if (NOT PROJECT_VERSION_MAJOR)
@@ -650,3 +953,51 @@ if ("STANDALONE_TEST" IN_LIST Qt6BuildInternals_FIND_COMPONENTS)
list(GET _qt_core_version_list 2 PROJECT_VERSION_PATCH)
endif()
endif()
+
+function(qt_internal_static_link_order_test)
+ # The CMake versions greater than 3.21 take care about the resource object files order in a
+ # linker line, it's expected that all object files are located at the beginning of the linker
+ # line.
+ # No need to run the test.
+ # TODO: This check is added before the actual release of CMake 3.21. So need to check if the
+ # target version meets the expectations.
+ if(CMAKE_VERSION VERSION_LESS 3.21)
+ __qt_internal_check_link_order_matters(link_order_matters)
+ if(link_order_matters)
+ set(summary_message "no")
+ else()
+ set(summary_message "yes")
+ endif()
+ else()
+ set(summary_message "yes")
+ endif()
+ qt_configure_add_summary_entry(TYPE "message"
+ ARGS "Linker can resolve circular dependencies"
+ MESSAGE "${summary_message}"
+ )
+endfunction()
+
+function(qt_internal_check_cmp0099_available)
+ # Don't care about CMP0099 in CMake versions greater than or equal to 3.21
+ if(CMAKE_VERSION VERSION_GREATER_EQUAL 3.21)
+ return()
+ endif()
+
+ __qt_internal_check_cmp0099_available(result)
+ if(result)
+ set(summary_message "yes")
+ else()
+ set(summary_message "no")
+ endif()
+ qt_configure_add_summary_entry(TYPE "message"
+ ARGS "CMake policy CMP0099 is supported"
+ MESSAGE "${summary_message}"
+ )
+endfunction()
+
+function(qt_internal_run_common_config_tests)
+ qt_configure_add_summary_section(NAME "Common build options")
+ qt_internal_static_link_order_test()
+ qt_internal_check_cmp0099_available()
+ qt_configure_end_summary_section()
+endfunction()
diff --git a/cmake/QtBuildInternals/QtStandaloneTestTemplateProject/Main.cmake b/cmake/QtBuildInternals/QtStandaloneTestTemplateProject/Main.cmake
index 38e1d75d87..3f8f8c3980 100644
--- a/cmake/QtBuildInternals/QtStandaloneTestTemplateProject/Main.cmake
+++ b/cmake/QtBuildInternals/QtStandaloneTestTemplateProject/Main.cmake
@@ -5,7 +5,7 @@ qt_build_internals_set_up_private_api()
# 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)
+qt_get_standalone_tests_config_files_path(standalone_tests_config_path)
file(GLOB config_files "${standalone_tests_config_path}/*")
foreach(file ${config_files})
diff --git a/cmake/QtBuildInternalsExtra.cmake.in b/cmake/QtBuildInternalsExtra.cmake.in
index d623835144..b089f00fd6 100644
--- a/cmake/QtBuildInternalsExtra.cmake.in
+++ b/cmake/QtBuildInternalsExtra.cmake.in
@@ -65,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/QtCompatibilityHelpers.cmake b/cmake/QtCompatibilityHelpers.cmake
deleted file mode 100644
index 89e23f498f..0000000000
--- a/cmake/QtCompatibilityHelpers.cmake
+++ /dev/null
@@ -1,112 +0,0 @@
-if(NOT QT_NO_INTERNAL_COMPATIBILITY_FUNCTIONS)
- # Compatibility functions that should be removed once all their usages are removed.
- function(extend_target)
- qt_extend_target(${ARGV})
- endfunction()
-
- function(add_qt_module)
- qt_add_module(${ARGV})
- endfunction()
-
- function(add_qt_plugin)
- qt_add_plugin(${ARGV})
- endfunction()
-
- function(add_qt_tool)
- qt_add_tool(${ARGV})
- endfunction()
-
- function(add_qt_test)
- qt_add_test(${ARGV})
- endfunction()
-
- function(add_qt_test_helper)
- qt_add_test_helper(${ARGV})
- endfunction()
-
- function(add_qt_manual_test)
- qt_add_manual_test(${ARGV})
- endfunction()
-
- function(add_qt_benchmark)
- qt_add_benchmark(${ARGV})
- endfunction()
-
- function(add_qt_executable)
- qt_add_executable(${ARGV})
- endfunction()
-
- function(add_qt_simd_part)
- qt_add_simd_part(${ARGV})
- endfunction()
-
- function(add_qt_docs)
- qt_add_docs(${ARGV})
- endfunction()
-
- function(add_qt_resource)
- qt_add_resource(${ARGV})
- endfunction()
-
- function(add_cmake_library)
- qt_add_cmake_library(${ARGV})
- endfunction()
-
-
- # New compatibility functions that should be removed before release.
- function(qt_extend_target)
- qt_internal_extend_target(${ARGV})
- endfunction()
-
- function(qt_add_module)
- qt_internal_add_module(${ARGV})
- endfunction()
-
- function(qt_add_tool)
- qt_internal_add_tool(${ARGV})
- endfunction()
-
- function(qt_add_test)
- qt_internal_add_test(${ARGV})
- endfunction()
-
- function(qt_add_test_helper)
- qt_internal_add_test_helper(${ARGV})
- endfunction()
-
- function(qt_add_manual_test)
- qt_internal_add_manual_test(${ARGV})
- endfunction()
-
- function(qt_add_benchmark)
- qt_internal_add_benchmark(${ARGV})
- endfunction()
-
- function(qt_add_executable)
- qt_internal_add_executable(${ARGV})
- endfunction()
-
- function(qt_add_simd_part)
- qt_internal_add_simd_part(${ARGV})
- endfunction()
-
- function(qt_add_docs)
- qt_internal_add_docs(${ARGV})
- endfunction()
-
- function(qt_add_resource)
- qt_internal_add_resource(${ARGV})
- endfunction()
-
- function(qt_add_cmake_library)
- qt_internal_add_cmake_library(${ARGV})
- endfunction()
-
- function(qt_add_3rdparty_library)
- qt_internal_add_3rdparty_library(${ARGV})
- endfunction()
-
- function(qt_create_tracepoints)
- qt_internal_create_tracepoints(${ARGV})
- endfunction()
-endif()
diff --git a/cmake/QtConfig.cmake.in b/cmake/QtConfig.cmake.in
index 451d4191a7..92e47a04a0 100644
--- a/cmake/QtConfig.cmake.in
+++ b/cmake/QtConfig.cmake.in
@@ -53,6 +53,33 @@ set(QT_ADDITIONAL_PACKAGES_PREFIX_PATH "" CACHE STRING "Additional directories w
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}/QtPublicFinalizerHelpers.cmake")
+include("${CMAKE_CURRENT_LIST_DIR}/QtPublicPluginHelpers.cmake")
+include("${CMAKE_CURRENT_LIST_DIR}/QtPublicTargetHelpers.cmake")
+include("${CMAKE_CURRENT_LIST_DIR}/QtPublicWalkLibsHelpers.cmake")
+include("${CMAKE_CURRENT_LIST_DIR}/QtPublicFindPackageHelpers.cmake")
+include("${CMAKE_CURRENT_LIST_DIR}/QtPublicDependencyHelpers.cmake")
+
+if(NOT DEFINED QT_CMAKE_EXPORT_NAMESPACE)
+ set(QT_CMAKE_EXPORT_NAMESPACE @QT_CMAKE_EXPORT_NAMESPACE@)
+endif()
+
+# Propagate sanitizer flags to both internal Qt builds and user projects.
+# Allow opt-out in case if downstream projects handle it in a different way.
+set(QT_CONFIGURED_SANITIZER_OPTIONS "@ECM_ENABLE_SANITIZERS@")
+
+if(QT_CONFIGURED_SANITIZER_OPTIONS
+ AND NOT __qt_sanitizer_options_set
+ AND NOT QT_NO_ADD_SANITIZER_OPTIONS)
+ set(ECM_ENABLE_SANITIZERS "${QT_CONFIGURED_SANITIZER_OPTIONS}")
+ include(
+ "${CMAKE_CURRENT_LIST_DIR}/3rdparty/extra-cmake-modules/modules/ECMEnableSanitizers.cmake")
+endif()
+# Mark that the current directory scope has its sanitizer flags set.
+set(__qt_sanitizer_options_set TRUE)
+
# Find required dependencies, if any.
include(CMakeFindDependencyMacro)
if(EXISTS "${CMAKE_CURRENT_LIST_DIR}/@INSTALL_CMAKE_NAMESPACE@Dependencies.cmake")
@@ -97,3 +124,9 @@ if (_Qt_NOTFOUND_MESSAGE)
set(@INSTALL_CMAKE_NAMESPACE@_NOT_FOUND_MESSAGE "${_Qt_NOTFOUND_MESSAGE}")
set(@INSTALL_CMAKE_NAMESPACE@_FOUND False)
endif()
+
+__qt_internal_defer_promote_targets_in_dir_scope_to_global()
+if(CMAKE_VERSION VERSION_LESS 3.21)
+ __qt_internal_check_link_order_matters()
+ __qt_internal_check_cmp0099_available()
+endif()
diff --git a/cmake/QtConfigDependencies.cmake.in b/cmake/QtConfigDependencies.cmake.in
index 52d6421b5e..b23b6681eb 100644
--- a/cmake/QtConfigDependencies.cmake.in
+++ b/cmake/QtConfigDependencies.cmake.in
@@ -1,42 +1,49 @@
set(@INSTALL_CMAKE_NAMESPACE@_DEPENDENCIES_FOUND FALSE)
# note: _third_party_deps example: "ICU\\;FALSE\\;1.0\\;i18n uc data;ZLIB\\;FALSE\\;\\;"
-set(_third_party_deps "@third_party_deps@")
+set(__qt_third_party_deps "@third_party_deps@")
@third_party_extra@
-foreach(_target_dep ${_third_party_deps})
- list(GET _target_dep 0 pkg)
- list(GET _target_dep 1 is_optional)
- list(GET _target_dep 2 version)
- list(GET _target_dep 3 components)
- set(find_package_args "${pkg}")
- if(version)
- list(APPEND find_package_args "${version}")
+foreach(__qt_target_dep ${__qt_third_party_deps})
+ list(GET __qt_target_dep 0 __qt_pkg)
+ list(GET __qt_target_dep 1 __qt_is_optional)
+ list(GET __qt_target_dep 2 __qt_version)
+ list(GET __qt_target_dep 3 __qt_components)
+ list(GET __qt_target_dep 4 __qt_optional_components)
+ set(__qt_find_package_args "${__qt_pkg}")
+ if(__qt_version)
+ list(APPEND __qt_find_package_args "${__qt_version}")
endif()
- if(components)
- string(REPLACE " " ";" components "${components}")
- list(APPEND find_package_args COMPONENTS ${components})
+ if(__qt_components)
+ string(REPLACE " " ";" __qt_components "${__qt_components}")
+ list(APPEND __qt_find_package_args COMPONENTS ${__qt_components})
+ endif()
+ if(__qt_optional_components)
+ string(REPLACE " " ";" __qt_optional_components "${__qt_optional_components}")
+ list(APPEND __qt_find_package_args OPTIONAL_COMPONENTS ${__qt_optional_components})
endif()
# Already build an error message, because find_dependency calls return() on failure.
- set(__@INSTALL_CMAKE_NAMESPACE@_message "\nPackage: ${pkg}")
- if(version)
- string(APPEND __@INSTALL_CMAKE_NAMESPACE@_message "\nVersion: ${version}")
+ set(__qt_message "\nPackage: ${__qt_pkg}")
+ if(__qt_version)
+ string(APPEND __qt_message "\nVersion: ${__qt_version}")
+ endif()
+ if(__qt_components)
+ string(APPEND __qt_message "\nComponents: ${__qt_components}")
endif()
- if(components)
- string(APPEND __@INSTALL_CMAKE_NAMESPACE@_message "\nComponents: ${components}")
+ if(__qt_optional_components)
+ string(APPEND __qt_message "\nComponents: ${__qt_optional_components}")
endif()
- set(@INSTALL_CMAKE_NAMESPACE@_DEPENDENCY_NOT_FOUND_MESSAGE
- "${__@INSTALL_CMAKE_NAMESPACE@_message}")
+ set(@INSTALL_CMAKE_NAMESPACE@_DEPENDENCY_NOT_FOUND_MESSAGE "${__qt_message}")
- if(is_optional)
+ if(__qt_is_optional)
if(${CMAKE_FIND_PACKAGE_NAME}_FIND_QUIETLY)
- list(APPEND find_package_args QUIET)
+ list(APPEND __qt_find_package_args QUIET)
endif()
- find_package(${find_package_args})
+ find_package(${__qt_find_package_args})
else()
- find_dependency(${find_package_args})
+ find_dependency(${__qt_find_package_args})
endif()
endforeach()
diff --git a/cmake/QtDocsHelpers.cmake b/cmake/QtDocsHelpers.cmake
index e2f75db213..d534ee3e8b 100644
--- a/cmake/QtDocsHelpers.cmake
+++ b/cmake/QtDocsHelpers.cmake
@@ -34,16 +34,19 @@ function(qt_internal_add_docs)
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}")
+ set(doc_tools_bin "${QT_HOST_PATH}/${QT${PROJECT_VERSION_MAJOR}_HOST_INFO_BINDIR}")
+ set(doc_tools_libexec "${QT_HOST_PATH}/${QT${PROJECT_VERSION_MAJOR}_HOST_INFO_LIBEXECDIR}")
elseif(QT_SUPERBUILD)
- set(doc_tools_dir "${QtBase_BINARY_DIR}/${INSTALL_BINDIR}")
+ set(doc_tools_bin "${QtBase_BINARY_DIR}/${INSTALL_BINDIR}")
+ set(doc_tools_libexec "${QtBase_BINARY_DIR}/${INSTALL_LIBEXECDIR}")
else()
- set(doc_tools_dir "${QT_BUILD_INTERNALS_RELOCATABLE_INSTALL_PREFIX}/${INSTALL_BINDIR}")
+ set(doc_tools_bin "${QT_BUILD_INTERNALS_RELOCATABLE_INSTALL_PREFIX}/${INSTALL_BINDIR}")
+ set(doc_tools_libexec "${QT_BUILD_INTERNALS_RELOCATABLE_INSTALL_PREFIX}/${INSTALL_LIBEXECDIR}")
endif()
- set(qdoc_bin "${doc_tools_dir}/qdoc${CMAKE_EXECUTABLE_SUFFIX}")
- set(qtattributionsscanner_bin "${doc_tools_dir}/qtattributionsscanner${CMAKE_EXECUTABLE_SUFFIX}")
- set(qhelpgenerator_bin "${doc_tools_dir}/qhelpgenerator${CMAKE_EXECUTABLE_SUFFIX}")
+ set(qdoc_bin "${doc_tools_bin}/qdoc${CMAKE_EXECUTABLE_SUFFIX}")
+ set(qtattributionsscanner_bin "${doc_tools_libexec}/qtattributionsscanner${CMAKE_EXECUTABLE_SUFFIX}")
+ set(qhelpgenerator_bin "${doc_tools_bin}/qhelpgenerator${CMAKE_EXECUTABLE_SUFFIX}")
get_target_property(target_type ${target} TYPE)
if (NOT target_type STREQUAL "INTERFACE_LIBRARY")
diff --git a/cmake/QtExecutableHelpers.cmake b/cmake/QtExecutableHelpers.cmake
index e86a5d07ae..ea3810f107 100644
--- a/cmake/QtExecutableHelpers.cmake
+++ b/cmake/QtExecutableHelpers.cmake
@@ -29,7 +29,7 @@ function(qt_internal_add_executable name)
endif()
if(arg_QT_APP AND QT_FEATURE_debug_and_release AND CMAKE_VERSION VERSION_GREATER_EQUAL "3.19.0")
- set_property(TARGET "${target}"
+ set_property(TARGET "${name}"
PROPERTY EXCLUDE_FROM_ALL "$<NOT:$<CONFIG:${QT_MULTI_CONFIG_FIRST_CONFIG}>>")
endif()
@@ -243,7 +243,9 @@ function(qt_internal_add_executable name)
set(class_names
"${class_names_regular}${class_names_separator}${class_names_current_project}")
- file(GENERATE OUTPUT ${out_file} CONTENT
+ set(out_file_path "${CMAKE_CURRENT_BINARY_DIR}/${out_file}")
+
+ file(GENERATE OUTPUT "${out_file_path}" CONTENT
"// This file is auto-generated. Do not edit.
#include <QtPlugin>
@@ -251,8 +253,14 @@ Q_IMPORT_PLUGIN($<JOIN:${class_names},)\nQ_IMPORT_PLUGIN(>)
"
CONDITION "$<NOT:$<STREQUAL:${class_names},>>"
)
+
+ # CMake versions earlier than 3.18.0 can't find the generated file for some reason,
+ # failing at generation phase.
+ # Explicitly marking the file as GENERATED fixes the issue.
+ set_source_files_properties("${out_file_path}" PROPERTIES GENERATED TRUE)
+
target_sources(${name} PRIVATE
- "$<$<NOT:$<STREQUAL:${class_names},>>:${out_file}>"
+ "$<$<NOT:$<STREQUAL:${class_names},>>:${out_file_path}>"
)
target_link_libraries(${name} PRIVATE
"$<TARGET_PROPERTY:${lib},_qt_initial_repo_plugins>"
diff --git a/cmake/QtFeature.cmake b/cmake/QtFeature.cmake
index 7f4a9d8b52..21f84f8e20 100644
--- a/cmake/QtFeature.cmake
+++ b/cmake/QtFeature.cmake
@@ -227,45 +227,54 @@ 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 condition calculated label)
+# Stores the user provided value to FEATURE_${feature} if provided.
+# If not provided, stores ${computed} instead.
+# ${computed} is also stored when reconfiguring and the condition does not align with the user
+# provided value.
+#
+function(qt_feature_check_and_save_user_provided_value resultVar feature condition computed label)
if (DEFINED "FEATURE_${feature}")
- # Revisit value:
- set(cache "${FEATURE_${feature}}")
+ # Revisit new user provided value
+ set(user_value "${FEATURE_${feature}}")
+ set(result "${user_value}")
- # If the build is marked as dirty and the cache value doesn't meet the new condition,
- # reset it to the calculated one.
+ # If the build is marked as dirty and the user_value doesn't meet the new condition,
+ # reset it to the computed one.
get_property(dirty_build GLOBAL PROPERTY _qt_dirty_build)
- if(NOT condition AND cache AND dirty_build)
- set(cache "${calculated}")
- message(WARNING "Reset FEATURE_${feature} value to ${calculated}, because it doesn't \
+ if(NOT condition AND result AND dirty_build)
+ set(result "${computed}")
+ message(WARNING "Reset FEATURE_${feature} value to ${result}, because it doesn't \
meet its condition after reconfiguration.")
endif()
set(bool_values OFF NO FALSE N ON YES TRUE Y)
- if ((cache IN_LIST bool_values) OR (cache GREATER_EQUAL 0))
- set(result "${cache}")
+ if ((result IN_LIST bool_values) OR (result GREATER_EQUAL 0))
+ # All good!
else()
- message(FATAL_ERROR "Sanity check failed: FEATURE_${feature} has invalid value \"${cache}\"!")
+ message(FATAL_ERROR
+ "Sanity check failed: FEATURE_${feature} has invalid value \"${result}\"!")
endif()
# Fix-up user-provided values
- set("FEATURE_${feature}" "${cache}" CACHE BOOL "${label}" FORCE)
+ set("FEATURE_${feature}" "${result}" CACHE BOOL "${label}" FORCE)
else()
# Initial setup:
- set("FEATURE_${feature}" "${calculated}" CACHE BOOL "${label}")
- set(result "${calculated}")
+ set(result "${computed}")
+ set("FEATURE_${feature}" "${result}" CACHE BOOL "${label}")
endif()
set("${resultVar}" "${result}" PARENT_SCOPE)
endfunction()
-macro(qt_feature_set_value feature cache condition label conditionExpression)
- set(result "${cache}")
+# Saves the final user value to QT_FEATURE_${feature}, after checking that the condition is met.
+macro(qt_feature_check_and_save_internal_value
+ feature saved_user_value condition label conditionExpression)
+ set(result "${saved_user_value}")
- if (NOT (condition) AND (cache))
+ if ((NOT condition) AND result)
_qt_internal_dump_expression_values(conditionDump "${conditionExpression}")
string(JOIN " " conditionString ${conditionExpression})
- qt_configure_add_report_error("Feature \"${feature}\": Forcing to \"${cache}\" breaks its \
+ qt_configure_add_report_error("Feature \"${feature}\": Forcing to \"${result}\" breaks its \
condition:\n ${conditionString}\nCondition values dump:\n ${conditionDump}\n" RECORD_ON_FEATURE_EVALUATION)
endif()
@@ -279,6 +288,30 @@ condition:\n ${conditionString}\nCondition values dump:\n ${conditionDump}
set(QT_KNOWN_FEATURES "${QT_KNOWN_FEATURES}" CACHE INTERNAL "" FORCE)
endmacro()
+
+# The build system stores 2 CMake cache variables for each feature, to allow detecting value changes
+# during subsequent reconfigurations.
+#
+#
+# `FEATURE_foo` stores the user provided feature value for the current configuration run.
+# It can be set directly by the user, or derived from INPUT_foo (also set by the user).
+#
+# If a value is not provided on initial configuration, the value will be auto-computed based on the
+# various conditions of the feature.
+# TODO: Document the various conditions and how they relate to each other.
+#
+#
+# `QT_FEATURE_foo` stores the value of the feature from the previous configuration run.
+# Its value is updated once with the newest user provided value after some checks are performed.
+#
+# This variable also serves as the main source of truth throughout the build system code to check
+# if the feature is enabled, e.g. if(QT_FEATURE_foo)
+#
+# It is not meant to be set by the user. It is only modified by the build system.
+#
+# Comparing the values of QT_FEATURE_foo and FEATURE_foo, the build system can detect whether
+# the user changed the value for a feature and thus recompute any dependent features.
+#
function(qt_evaluate_feature feature)
# If the feature was already evaluated as dependency nothing to do here.
if(DEFINED "QT_FEATURE_${feature}")
@@ -316,12 +349,12 @@ function(qt_evaluate_feature feature)
qt_evaluate_config_expression(enable_result ${arg_ENABLE})
qt_evaluate_config_expression(auto_detect ${arg_AUTODETECT})
if(${disable_result})
- set(result OFF)
+ set(computed OFF)
elseif((${enable_result}) OR (${auto_detect}))
- set(result ${condition})
+ set(computed ${condition})
else()
# feature not auto-detected and not explicitly enabled
- set(result OFF)
+ set(computed OFF)
endif()
if("${arg_EMIT_IF}" STREQUAL "")
@@ -341,19 +374,30 @@ function(qt_evaluate_feature feature)
endif()
endif()
+ # Warn about a feature which is not emitted, but the user explicitly provided a value for it.
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)
+
+ # Remove the cache entry so that the warning is not persisted and shown on every
+ # reconfiguration.
+ unset(FEATURE_${feature} CACHE)
+ endif()
+
+ # Only save the user provided value if the feature was emitted.
+ if(emit_if)
+ qt_feature_check_and_save_user_provided_value(
+ saved_user_value "${feature}" "${condition}" "${computed}" "${arg_LABEL}")
+ else()
+ # Make sure the feature internal value is OFF if not emitted.
+ set(saved_user_value OFF)
endif()
- qt_feature_set_cache_value(cache "${feature}" "${condition}" "${result}" "${arg_LABEL}")
- qt_feature_set_value("${feature}" "${cache}" "${condition}" "${arg_LABEL}"
- "${arg_CONDITION}")
+ qt_feature_check_and_save_internal_value(
+ "${feature}" "${saved_user_value}" "${condition}" "${arg_LABEL}" "${arg_CONDITION}")
# Store each feature's label for summary info.
set(QT_FEATURE_LABEL_${feature} "${arg_LABEL}" CACHE INTERNAL "")
@@ -522,6 +566,17 @@ function(qt_feature_evaluate_features list_of_paths)
qt_feature_module_end(ONLY_EVALUATE_FEATURES)
endfunction()
+function(qt_feature_record_summary_entries list_of_paths)
+ # Clean up any stale state just in case.
+ qt_feature_unset_state_vars()
+
+ set(__QtFeature_only_record_summary_entries TRUE)
+ foreach(path ${list_of_paths})
+ include("${path}")
+ endforeach()
+ qt_feature_unset_state_vars()
+endfunction()
+
function(qt_feature_module_end)
set(flags ONLY_EVALUATE_FEATURES)
set(options OUT_VAR_PREFIX)
@@ -660,6 +715,10 @@ function(qt_feature_module_end)
qt_feature_copy_global_config_features_to_core(${target})
endif()
+ qt_feature_unset_state_vars()
+endfunction()
+
+macro(qt_feature_unset_state_vars)
unset(__QtFeature_library PARENT_SCOPE)
unset(__QtFeature_public_features PARENT_SCOPE)
unset(__QtFeature_private_features PARENT_SCOPE)
@@ -675,7 +734,8 @@ function(qt_feature_module_end)
unset(__QtFeature_custom_enabled_features PARENT_SCOPE)
unset(__QtFeature_custom_disabled_features PARENT_SCOPE)
unset(__QtFeature_only_evaluate_features PARENT_SCOPE)
-endfunction()
+ unset(__QtFeature_only_record_summary_entries PARENT_SCOPE)
+endmacro()
function(qt_feature_copy_global_config_features_to_core target)
# CMake doesn't support setting custom properties on exported INTERFACE libraries
@@ -720,7 +780,7 @@ function(qt_config_compile_test name)
endif()
cmake_parse_arguments(arg "" "LABEL;PROJECT_PATH;C_STANDARD;CXX_STANDARD"
- "COMPILE_OPTIONS;LIBRARIES;CODE;PACKAGES" ${ARGN})
+ "COMPILE_OPTIONS;LIBRARIES;CODE;PACKAGES;CMAKE_FLAGS" ${ARGN})
if(arg_PROJECT_PATH)
message(STATUS "Performing Test ${arg_LABEL}")
@@ -799,8 +859,12 @@ function(qt_config_compile_test name)
endif()
endif()
+ if(NOT arg_CMAKE_FLAGS)
+ set(arg_CMAKE_FLAGS "")
+ endif()
+
try_compile(HAVE_${name} "${CMAKE_BINARY_DIR}/config.tests/${name}" "${arg_PROJECT_PATH}"
- "${name}" CMAKE_FLAGS ${flags})
+ "${name}" CMAKE_FLAGS ${flags} ${arg_CMAKE_FLAGS})
if(${HAVE_${name}})
set(status_label "Success")
@@ -982,15 +1046,11 @@ function(qt_config_linker_supports_flag_test name)
# Select the right linker.
if(GCC OR CLANG)
- # TODO: This works for now but is... suboptimal. Once
- # QTBUG-86186 is resolved, we should check the *features*
- # QT_FEATURE_use_gold_linker etc. instead of trying to
- # replicate the feature conditions.
- if(QT_FEATURE_use_gold_linker_alias OR INPUT_linker STREQUAL "gold")
+ if(QT_FEATURE_use_gold_linker)
list(PREPEND flags "-fuse-ld=gold")
- elseif(INPUT_linker STREQUAL "bfd")
+ elseif(QT_FEATURE_use_bfd_linker)
list(PREPEND flags "-fuse-ld=bfd")
- elseif(INPUT_linker STREQUAL "lld")
+ elseif(QT_FEATURE_use_lld_linker)
list(PREPEND flags "-fuse-ld=lld")
endif()
endif()
@@ -1031,5 +1091,3 @@ function(qt_make_features_available target)
endforeach()
endforeach()
endfunction()
-
-
diff --git a/cmake/QtFindPackageHelpers.cmake b/cmake/QtFindPackageHelpers.cmake
index 1162f2c39e..9f8ae1a9a9 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)
@@ -18,7 +18,7 @@ macro(qt_find_package)
set(find_package_options CONFIG NO_MODULE MODULE REQUIRED)
set(options ${find_package_options} MARK_OPTIONAL)
set(oneValueArgs MODULE_NAME QMAKE_LIB)
- set(multiValueArgs PROVIDED_TARGETS COMPONENTS)
+ set(multiValueArgs PROVIDED_TARGETS COMPONENTS OPTIONAL_COMPONENTS)
cmake_parse_arguments(arg "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN})
# If some Qt internal project calls qt_find_package(WrapFreeType), but WrapFreeType was already
@@ -45,6 +45,12 @@ macro(qt_find_package)
endif()
endif()
+ # When configure.cmake is included only to record summary entries, there's no point in looking
+ # for the packages.
+ if(__QtFeature_only_record_summary_entries)
+ set(_qt_find_package_skip_find_package TRUE)
+ endif()
+
# Get the version if specified.
set(package_version "")
if(${ARGC} GREATER_EQUAL 2)
@@ -57,7 +63,10 @@ macro(qt_find_package)
# Re-append components to forward them.
list(APPEND arg_UNPARSED_ARGUMENTS "COMPONENTS;${arg_COMPONENTS}")
endif()
- # TODO: Handle REQUIRED_COMPONENTS.
+ if(arg_OPTIONAL_COMPONENTS)
+ # Re-append optional components to forward them.
+ list(APPEND arg_UNPARSED_ARGUMENTS "OPTIONAL_COMPONENTS;${arg_OPTIONAL_COMPONENTS}")
+ endif()
# Don't look for packages in PATH if requested to.
if(QT_NO_USE_FIND_PACKAGE_SYSTEM_ENVIRONMENT_PATH)
@@ -148,13 +157,19 @@ macro(qt_find_package)
PROPERTY INTERFACE_QT_PACKAGE_COMPONENTS ${components_as_string})
endif()
+ if(arg_OPTIONAL_COMPONENTS)
+ string(REPLACE ";" " " components_as_string "${arg_OPTIONAL_COMPONENTS}")
+ set_property(TARGET ${qt_find_package_target_name}
+ PROPERTY INTERFACE_QT_PACKAGE_OPTIONAL_COMPONENTS
+ ${components_as_string})
+ endif()
+
get_property(is_global TARGET ${qt_find_package_target_name} PROPERTY
IMPORTED_GLOBAL)
qt_internal_should_not_promote_package_target_to_global(
"${qt_find_package_target_name}" should_not_promote)
if(NOT is_global AND NOT should_not_promote)
- set_property(TARGET ${qt_find_package_target_name} PROPERTY
- IMPORTED_GLOBAL TRUE)
+ __qt_internal_promote_target_to_global(${qt_find_package_target_name})
qt_find_package_promote_targets_to_global_scope(
"${qt_find_package_target_name}")
endif()
@@ -203,14 +218,14 @@ endfunction()
# This function records a dependency between ${main_target_name} and ${dep_target_name}
# at the CMake package level.
-# E.g. Qt6CoreConfig.cmake needs to find_package(Qt6EntryPoint).
+# E.g. Qt6CoreConfig.cmake needs to find_package(Qt6EntryPointPrivate).
# main_target_name = Core
-# dep_target_name = EntryPoint
+# dep_target_name = EntryPointPrivate
# This is just a convenience function that deals with Qt targets and their associated packages
# instead of raw package names.
function(qt_record_extra_qt_package_dependency main_target_name dep_target_name
dep_package_version)
- # EntryPoint -> Qt6EntryPoint.
+ # EntryPointPrivate -> Qt6EntryPointPrivate.
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}")
@@ -254,7 +269,7 @@ function(qt_record_extra_qt_main_tools_package_dependency main_target_name
"${main_target_name}" "${qtfied_package_name_versioned}" "${dep_package_version}")
endfunction()
-# This function stores the list of Qt modules a library depend on,
+# This function stores the list of Qt targets a library depend on,
# along with their version info, for usage in ${target}Depends.cmake file
function(qt_register_target_dependencies target public_libs private_libs)
get_target_property(target_deps "${target}" _qt_target_deps)
@@ -272,15 +287,13 @@ function(qt_register_target_dependencies target public_libs private_libs)
foreach(lib IN LISTS lib_list)
if ("${lib}" MATCHES "^Qt::(.*)")
set(lib "${CMAKE_MATCH_1}")
- if (lib STREQUAL Platform
- OR lib STREQUAL GlobalConfig
- OR lib STREQUAL GlobalConfigPrivate
- OR lib STREQUAL PlatformModuleInternal
- OR lib STREQUAL PlatformPluginInternal
- OR lib STREQUAL PlatformToolInternal)
+ if (lib STREQUAL "Platform"
+ OR lib STREQUAL "GlobalConfig"
+ OR lib STREQUAL "GlobalConfigPrivate"
+ OR lib STREQUAL "PlatformModuleInternal"
+ OR lib STREQUAL "PlatformPluginInternal"
+ OR lib STREQUAL "PlatformToolInternal")
list(APPEND target_deps "Qt6\;${PROJECT_VERSION}")
- elseif ("${lib}" MATCHES "(.*)Private")
- list(APPEND target_deps "${INSTALL_CMAKE_NAMESPACE}${CMAKE_MATCH_1}\;${PROJECT_VERSION}")
else()
list(APPEND target_deps "${INSTALL_CMAKE_NAMESPACE}${lib}\;${PROJECT_VERSION}")
endif()
@@ -295,7 +308,3 @@ function(qt_internal_should_not_promote_package_target_to_global target out_var)
get_property(should_not_promote TARGET "${target}" PROPERTY _qt_no_promote_global)
set("${out_var}" "${should_not_promote}" PARENT_SCOPE)
endfunction()
-
-function(qt_internal_disable_find_package_global_promotion target)
- set_target_properties("${target}" PROPERTIES _qt_no_promote_global TRUE)
-endfunction()
diff --git a/cmake/QtFinishPrlFile.cmake b/cmake/QtFinishPrlFile.cmake
index 869770f535..04ae2c9a43 100644
--- a/cmake/QtFinishPrlFile.cmake
+++ b/cmake/QtFinishPrlFile.cmake
@@ -21,7 +21,9 @@
# LIBRARY_SUFFIXES: list of known library extensions, e.g. .so;.a on Linux
# LIBRARY_PREFIXES: list of known library prefies, e.g. the "lib" in "libz" on on Linux
# LINK_LIBRARY_FLAG: flag used to link a shared library to an executable, e.g. -l on UNIX
+# IMPLICIT_LINK_DIRECTORIES: list of implicit linker search paths
+cmake_policy(SET CMP0007 NEW)
include("${CMAKE_CURRENT_LIST_DIR}/QtGenerateLibHelpers.cmake")
file(STRINGS "${IN_FILE}" lines)
@@ -72,7 +74,7 @@ foreach(line ${lines})
endif()
endforeach()
if(rcc_objects)
- list(APPEND adjusted_libs ${rcc_objects})
+ list(PREPEND adjusted_libs ${rcc_objects})
endif()
list(JOIN adjusted_libs " " adjusted_libs_for_qmake)
string(APPEND content "QMAKE_PRL_LIBS = ${adjusted_libs_for_qmake}\n")
diff --git a/cmake/QtFlagHandlingHelpers.cmake b/cmake/QtFlagHandlingHelpers.cmake
index cbc39cbf1a..dc81a79333 100644
--- a/cmake/QtFlagHandlingHelpers.cmake
+++ b/cmake/QtFlagHandlingHelpers.cmake
@@ -46,7 +46,7 @@ function(qt_internal_add_link_flags_no_undefined target)
if (NOT QT_BUILD_SHARED_LIBS)
return()
endif()
- if (GCC OR CLANG)
+ if ((GCC OR CLANG) AND NOT MSVC)
if(CLANG AND QT_FEATURE_sanitizer)
return()
endif()
@@ -235,7 +235,7 @@ endfunction()
function(qt_set_msvc_cplusplus_options target visibility)
# For MSVC we need to explicitly pass -Zc:__cplusplus to get correct __cplusplus.
# Check qt_config_compile_test for more info.
- if(CMAKE_CXX_COMPILER_ID STREQUAL "MSVC" AND MSVC_VERSION GREATER_EQUAL 1913)
+ if(MSVC AND MSVC_VERSION GREATER_EQUAL 1913)
target_compile_options("${target}" ${visibility} "-Zc:__cplusplus" "-permissive-")
endif()
endfunction()
@@ -256,6 +256,15 @@ function(qt_enable_utf8_sources target)
endif()
endfunction()
+function(qt_internal_enable_unicode_defines)
+ if(WIN32)
+ set(no_unicode_condition
+ "$<NOT:$<BOOL:$<TARGET_PROPERTY:QT_NO_UNICODE_DEFINES>>>")
+ target_compile_definitions(Platform
+ INTERFACE "$<${no_unicode_condition}:UNICODE;_UNICODE>")
+ endif()
+endfunction()
+
# Saves the list of known optimization flags for the current compiler in out_var.
#
# Mostly used for removing them before adding new ones.
@@ -412,7 +421,7 @@ function(qt_internal_remove_flags_impl flag_var_name flag_values IN_CACHE)
# cache variable with FORCE will overwrite the non-cache variable in this
# function scope, but we need to use the original value before that change.
foreach(flag_value IN LISTS flag_values)
- string(${replace_type} "${flag_value}" "" ${flag_var_name} "${${flag_var_name}}")
+ string(${replace_type} "${flag_value}" " " ${flag_var_name} "${${flag_var_name}}")
endforeach()
string(STRIP "${${flag_var_name}}" ${flag_var_name})
set(${flag_var_name} "${${flag_var_name}}" PARENT_SCOPE)
@@ -424,7 +433,7 @@ function(qt_internal_remove_flags_impl flag_var_name flag_values IN_CACHE)
# Work exclusively on cache variable value only.
set(mod_flags $CACHE{${flag_var_name}})
foreach(flag_value IN LISTS flag_values)
- string(${replace_type} "${flag_value}" "" mod_flags "${mod_flags}")
+ string(${replace_type} "${flag_value}" " " mod_flags "${mod_flags}")
endforeach()
string(STRIP "${mod_flags}" mod_flags)
get_property(help_text CACHE ${flag_var_name} PROPERTY HELPSTRING)
@@ -662,6 +671,11 @@ function(qt_internal_add_optimize_full_flags)
""
${ARGN})
+ # QT_USE_DEFAULT_CMAKE_OPTIMIZATION_FLAGS disables forced full optimization.
+ if(QT_USE_DEFAULT_CMAKE_OPTIMIZATION_FLAGS)
+ return()
+ endif()
+
# Assume that FEATURE_optimize_full has higher priority. But if FEATURE_optimize_full is OFF,
# flags are set by FEATURE_optimize_size should remain unchanged.
if(QT_FEATURE_optimize_size AND NOT QT_FEATURE_optimize_full)
diff --git a/cmake/QtFrameworkHelpers.cmake b/cmake/QtFrameworkHelpers.cmake
index 6289ce98b1..596b480218 100644
--- a/cmake/QtFrameworkHelpers.cmake
+++ b/cmake/QtFrameworkHelpers.cmake
@@ -64,27 +64,27 @@ function(qt_copy_framework_headers target)
set(multiValueArgs)
cmake_parse_arguments(ARG "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN})
- get_target_property(fw_version ${target} FRAMEWORK_VERSION)
- get_target_property(fw_bundle_version ${target} MACOSX_FRAMEWORK_BUNDLE_VERSION)
- get_target_property(fw_dir ${target} LIBRARY_OUTPUT_DIRECTORY)
- get_target_property(fw_name ${target} OUTPUT_NAME)
- set(fw_headers_dir ${fw_dir}/${fw_name}.framework/Versions/${fw_version}/Headers/)
+ qt_internal_get_framework_info(fw ${target})
+ set(fw_output_header_dir "${fw_versioned_header_dir}")
if(ARG_PRIVATE)
- string(APPEND fw_headers_dir "${fw_bundle_version}/Qt${target}/private/")
+ set(fw_output_header_dir "${fw_private_module_header_dir}/private")
elseif(ARG_QPA)
- string(APPEND fw_headers_dir "${fw_bundle_version}/Qt${target}/qpa/")
+ set(fw_output_header_dir "${fw_private_module_header_dir}/qpa")
endif()
+ get_target_property(output_dir ${target} LIBRARY_OUTPUT_DIRECTORY)
+ set(fw_output_header_dir "${output_dir}/${fw_output_header_dir}")
+
set(out_files)
foreach(hdr IN LISTS ARG_UNPARSED_ARGUMENTS)
get_filename_component(in_file_path ${hdr} ABSOLUTE)
get_filename_component(in_file_name ${hdr} NAME)
- set(out_file_path ${fw_headers_dir}${in_file_name})
+ set(out_file_path "${fw_output_header_dir}/${in_file_name}")
add_custom_command(
OUTPUT ${out_file_path}
DEPENDS ${in_file_path}
- COMMAND ${CMAKE_COMMAND} -E make_directory "${fw_headers_dir}"
- COMMAND ${CMAKE_COMMAND} -E copy "${in_file_path}" "${fw_headers_dir}")
+ COMMAND ${CMAKE_COMMAND} -E make_directory "${fw_output_header_dir}"
+ COMMAND ${CMAKE_COMMAND} -E copy "${in_file_path}" "${fw_output_header_dir}")
list(APPEND out_files ${out_file_path})
endforeach()
@@ -111,7 +111,7 @@ function(qt_finalize_framework_headers_copy target)
# Create a fake header file and copy it into the framework by marking it as PUBLIC_HEADER.
# CMake now takes care of creating the symlink.
set(fake_header ${target}_fake_header.h)
- qt_get_main_cmake_configuration(main_config)
+ qt_internal_get_main_cmake_configuration(main_config)
file(GENERATE OUTPUT ${fake_header} CONTENT "// ignore this file\n"
CONDITION "$<CONFIG:${main_config}>")
string(PREPEND fake_header "${CMAKE_CURRENT_BINARY_DIR}/")
@@ -124,3 +124,47 @@ function(qt_finalize_framework_headers_copy target)
add_dependencies(${target} ${target}_framework_headers)
endif()
endfunction()
+
+# Collects the framework related information and paths from the target properties.
+# Output variables:
+# <out_var>_name framework base name, e.g. 'QtCore'.
+# <out_var>_dir framework base directory, e.g. 'QtCore.framework'.
+# <out_var>_version framework version, e.g. 'A', 'B' etc.
+# <out_var>_bundle_version framework bundle version, same as the PROJECT_VERSION, e.g. '6.0.0'.
+# <out_var>_header_dir top-level header directory, e.g. 'QtCore.framework/Headers'.
+# <out_var>_versioned_header_dir header directory for specific framework version,
+# e.g. 'QtCore.framework/Versions/A/Headers'
+# <out_var>_private_header_dir header directory for the specific framework version and
+# framework bundle version e.g. 'QtCore.framework/Versions/A/Headers/6.0.0'
+# <out_var>_private_module_header_dir private header directory for the specific framework
+# version, framework bundle version and tailing module name, e.g.
+# 'QtCore.framework/Versions/A/Headers/6.0.0/Core'
+function(qt_internal_get_framework_info out_var target)
+ get_target_property(${out_var}_version ${target} FRAMEWORK_VERSION)
+ get_target_property(${out_var}_bundle_version ${target} MACOSX_FRAMEWORK_BUNDLE_VERSION)
+
+ # The module name might be different of the actual target name
+ # and we want to use the Qt'fied module name as a framework identifier.
+ get_target_property(module_interface_name ${target} _qt_module_interface_name)
+ if(module_interface_name)
+ qt_internal_qtfy_target(module ${module_interface_name})
+ else()
+ qt_internal_qtfy_target(module ${target})
+ endif()
+
+ set(${out_var}_name "${module}")
+ set(${out_var}_dir "${${out_var}_name}.framework")
+ set(${out_var}_header_dir "${${out_var}_dir}/Headers")
+ set(${out_var}_versioned_header_dir "${${out_var}_dir}/Versions/${${out_var}_version}/Headers")
+ set(${out_var}_private_header_dir "${${out_var}_header_dir}/${${out_var}_bundle_version}")
+ set(${out_var}_private_module_header_dir "${${out_var}_private_header_dir}/${module}")
+
+ set(${out_var}_name "${${out_var}_name}" PARENT_SCOPE)
+ set(${out_var}_dir "${${out_var}_dir}" PARENT_SCOPE)
+ set(${out_var}_header_dir "${${out_var}_header_dir}" PARENT_SCOPE)
+ set(${out_var}_version "${${out_var}_version}" PARENT_SCOPE)
+ set(${out_var}_bundle_version "${${out_var}_bundle_version}" PARENT_SCOPE)
+ set(${out_var}_versioned_header_dir "${${out_var}_versioned_header_dir}" PARENT_SCOPE)
+ set(${out_var}_private_header_dir "${${out_var}_private_header_dir}" PARENT_SCOPE)
+ set(${out_var}_private_module_header_dir "${${out_var}_private_module_header_dir}" PARENT_SCOPE)
+endfunction()
diff --git a/cmake/QtGenerateLibHelpers.cmake b/cmake/QtGenerateLibHelpers.cmake
index dedcdc7950..e3f4bbf881 100644
--- a/cmake/QtGenerateLibHelpers.cmake
+++ b/cmake/QtGenerateLibHelpers.cmake
@@ -6,11 +6,12 @@ function(qt_get_library_name_without_prefix_and_suffix out_var file_path)
if(IS_ABSOLUTE "${file_path}")
get_filename_component(basename "${file_path}" NAME_WE)
get_filename_component(ext "${file_path}" EXT)
+ string(TOLOWER "${ext}" ext_lower)
foreach(libsuffix ${LIBRARY_SUFFIXES})
# Handle weird prefix extensions like in the case of
# "/usr/lib/x86_64-linux-gnu/libglib-2.0.so"
# it's ".0.so".
- if(ext MATCHES "^(\\.[0-9]+)*${libsuffix}(\\.[0-9]+)*")
+ if(ext_lower MATCHES "^(\\.[0-9]+)*${libsuffix}(\\.[0-9]+)*")
set(is_linkable_library TRUE)
set(weird_numbered_extension "${CMAKE_MATCH_1}")
break()
@@ -64,6 +65,14 @@ function(qt_transform_absolute_library_paths_to_link_flags out_var library_path_
foreach(library_path ${library_path_list})
qt_get_library_with_link_flag(lib_name_with_link_flag "${library_path}")
if(lib_name_with_link_flag)
+ string(TOLOWER "${IMPLICIT_LINK_DIRECTORIES}" IMPLICIT_LINK_DIRECTORIES_LOWER)
+ get_filename_component(dir "${library_path}" DIRECTORY)
+ string(TOLOWER "${dir}" dir_lower)
+ # If library_path isn't in default link directories, we should add it to link flags.
+ list(FIND IMPLICIT_LINK_DIRECTORIES_LOWER "${dir_lower}" index)
+ if(${index} EQUAL -1)
+ list(APPEND out_list "-L\"${dir}\"")
+ endif()
list(APPEND out_list "${lib_name_with_link_flag}")
else()
list(APPEND out_list "${library_path}")
diff --git a/cmake/QtGenerateLibPri.cmake b/cmake/QtGenerateLibPri.cmake
index f5763899e6..127d859189 100644
--- a/cmake/QtGenerateLibPri.cmake
+++ b/cmake/QtGenerateLibPri.cmake
@@ -7,6 +7,7 @@
# LIBRARY_SUFFIXES: list of known library extensions, e.g. .so;.a on Linux
# LIBRARY_PREFIXES: list of known library prefies, e.g. the "lib" in "libz" on on Linux
# LINK_LIBRARY_FLAG: flag used to link a shared library to an executable, e.g. -l on UNIX
+# IMPLICIT_LINK_DIRECTORIES: list of implicit linker search paths
#
# QMAKE_LIBS_XXX values are split into QMAKE_LIBS_XXX_DEBUG and QMAKE_LIBS_XXX_RELEASE if
# debug_and_release was detected. The CMake configuration "Debug" is considered for the _DEBUG
@@ -15,6 +16,7 @@
# The library values are transformed from an absolute path into link flags
# aka from "/usr/lib/x86_64-linux-gnu/libcups.so" to "-lcups".
+cmake_policy(SET CMP0007 NEW)
cmake_policy(SET CMP0057 NEW)
# Create a qmake-style list from the passed arguments and store it in ${out_var}.
diff --git a/cmake/QtInstallHelpers.cmake b/cmake/QtInstallHelpers.cmake
index 30962b84e2..9dbb22251d 100644
--- a/cmake/QtInstallHelpers.cmake
+++ b/cmake/QtInstallHelpers.cmake
@@ -136,6 +136,10 @@ function(qt_internal_install_versioned_link install_dir target)
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}>")
diff --git a/cmake/QtInternalTargets.cmake b/cmake/QtInternalTargets.cmake
index 006c0c0213..22080b4d53 100644
--- a/cmake/QtInternalTargets.cmake
+++ b/cmake/QtInternalTargets.cmake
@@ -1,7 +1,7 @@
function(qt_internal_set_warnings_are_errors_flags target)
set(flags "")
- if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
+ if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang" AND NOT MSVC)
# Regular clang 3.0+
if (CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL "3.0.0")
list(APPEND flags -Werror -Wno-error=\#warnings -Wno-error=deprecated-declarations)
@@ -32,6 +32,26 @@ function(qt_internal_set_warnings_are_errors_flags target)
list(APPEND flags -Wno-error=format-overflow)
endif()
+ if (CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL "10.0.0")
+ # GCC 10 has a number of bugs in -Wstringop-overflow. Do not make them an error.
+ # https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92955
+ # https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94335
+ # https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101134
+ list(APPEND flags -Wno-error=stringop-overflow)
+ endif()
+
+ if (CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL "11.0.0")
+ # We do mixed enum arithmetic all over the place:
+ list(APPEND flags -Wno-error=deprecated-enum-enum-conversion -Wno-error=deprecated-enum-float-conversion)
+ endif()
+
+ if (CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL "11.0.0" AND CMAKE_CXX_COMPILER_VERSION VERSION_LESS "11.2.0")
+ # GCC 11.1 has a regression in the integrated preprocessor, so disable it as a workaround (QTBUG-93360)
+ # https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100796
+ # This in turn triggers a fallthrough warning in cborparser.c, so we disable this warning.
+ list(APPEND flags -no-integrated-cpp -Wno-implicit-fallthrough)
+ endif()
+
# Work-around for bug https://code.google.com/p/android/issues/detail?id=58135
if (ANDROID)
list(APPEND flags -Wno-error=literal-suffix)
@@ -51,10 +71,9 @@ function(qt_internal_set_warnings_are_errors_flags target)
endif()
endif()
elseif ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "MSVC")
- # In qmake land, currently warnings as errors are only enabled for
- # MSVC 2012, 2013, 2015.
- # Respectively MSVC_VERRSIONs are: 1700-1799, 1800-1899, 1900-1909.
- if(MSVC_VERSION GREATER_EQUAL 1700 AND MSVC_VERSION LESS_EQUAL 1909)
+ # Only enable for versions of MSVC that are known to work
+ # 1929 is Visual Studio 2019 version 16.0
+ if(MSVC_VERSION LESS_EQUAL 1929)
list(APPEND flags /WX)
endif()
endif()
@@ -134,7 +153,6 @@ function(qt_internal_apply_bitcode_flags target)
set(bitcode_flags "$<${is_enabled_genex}:${flags_genex}>")
- target_link_options("${target}" INTERFACE ${bitcode_flags})
target_compile_options("${target}" INTERFACE ${bitcode_flags})
endfunction()
@@ -148,14 +166,11 @@ elseif(UIKIT)
target_compile_definitions(PlatformCommonInternal INTERFACE GLES_SILENCE_DEPRECATION)
endif()
-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()
+if(MSVC)
+ target_compile_definitions(PlatformCommonInternal INTERFACE
+ "_CRT_SECURE_NO_WARNINGS"
+ "$<$<STREQUAL:$<TARGET_PROPERTY:TYPE>,SHARED_LIBRARY>:_WINDLL>"
+ )
endif()
if(UIKIT)
@@ -310,8 +325,22 @@ function(qt_handle_apple_app_extension_api_only)
# Build Qt libraries with -fapplication-extension. Needed to avoid linker warnings
# transformed into errors on darwin platforms.
set(flags "-fapplication-extension")
- set(genex_condition "$<NOT:$<BOOL:$<TARGET_PROPERTY:QT_NO_APP_EXTENSION_ONLY_API>>>")
- set(flags "$<${genex_condition}:${flags}>")
+
+ # The flags should only be applied to internal Qt libraries like modules and plugins.
+ # The reason why we use a custom property to apply the flags is because there's no other
+ # way to prevent the link options spilling out into user projects if the target that links
+ # against PlatformXInternal is a static library.
+ # The exported static library's INTERFACE_LINK_LIBRARIES property would contain
+ # $<LINK_ONLY:PlatformXInternal> and PlatformXInternal's INTERFACE_LINK_OPTIONS would be
+ # applied to a user project target.
+ # So to contain the spilling out of the flags, we ensure the link options are only added
+ # to internal Qt libraries that are marked with the property.
+ set(not_disabled "$<NOT:$<BOOL:$<TARGET_PROPERTY:QT_NO_APP_EXTENSION_ONLY_API>>>")
+ set(is_qt_internal_library "$<BOOL:$<TARGET_PROPERTY:_qt_is_internal_library>>")
+
+ set(condition "$<AND:${not_disabled},${is_qt_internal_library}>")
+
+ set(flags "$<${condition}:${flags}>")
target_compile_options(PlatformModuleInternal INTERFACE ${flags})
target_link_options(PlatformModuleInternal INTERFACE ${flags})
target_compile_options(PlatformPluginInternal INTERFACE ${flags})
diff --git a/cmake/QtLoadFilePrintVars.cmake b/cmake/QtLoadFilePrintVars.cmake
deleted file mode 100644
index fe0f3ee8d2..0000000000
--- a/cmake/QtLoadFilePrintVars.cmake
+++ /dev/null
@@ -1,15 +0,0 @@
-# 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 f9a5897676..7f0f00fdf5 100644
--- a/cmake/QtModuleDependencies.cmake.in
+++ b/cmake/QtModuleDependencies.cmake.in
@@ -15,34 +15,39 @@ find_dependency(@INSTALL_CMAKE_NAMESPACE@ @PROJECT_VERSION@
)
# note: _third_party_deps example: "ICU\\;FALSE\\;1.0\\;i18n uc data;ZLIB\\;FALSE\\;\\;"
-set(_third_party_deps "@third_party_deps@")
+set(__qt_@target@_third_party_deps "@third_party_deps@")
-foreach(_target_dep ${_third_party_deps})
- list(GET _target_dep 0 pkg)
- list(GET _target_dep 1 is_optional)
- list(GET _target_dep 2 version)
- list(GET _target_dep 3 components)
- set(find_package_args "${pkg}")
- if(version)
- list(APPEND find_package_args "${version}")
+foreach(__qt_@target@_target_dep ${__qt_@target@_third_party_deps})
+ list(GET __qt_@target@_target_dep 0 __qt_@target@_pkg)
+ list(GET __qt_@target@_target_dep 1 __qt_@target@_is_optional)
+ list(GET __qt_@target@_target_dep 2 __qt_@target@_version)
+ list(GET __qt_@target@_target_dep 3 __qt_@target@_components)
+ list(GET __qt_@target@_target_dep 4 __qt_@target@_optional_components)
+ set(__qt_@target@_find_package_args "${__qt_@target@_pkg}")
+ if(__qt_@target@_version)
+ list(APPEND __qt_@target@_find_package_args "${__qt_@target@_version}")
endif()
- if(components)
- string(REPLACE " " ";" components "${components}")
- list(APPEND find_package_args COMPONENTS ${components})
+ if(__qt_@target@_components)
+ string(REPLACE " " ";" __qt_@target@_components "${__qt_@target@_components}")
+ list(APPEND __qt_@target@_find_package_args COMPONENTS ${__qt_@target@_components})
+ endif()
+ if(__qt_@target@_optional_components)
+ string(REPLACE " " ";" __qt_@target@_optional_components "${__qt_@target@_optional_components}")
+ list(APPEND __qt_@target@_find_package_args OPTIONAL_COMPONENTS ${__qt_@target@_optional_components})
endif()
- if(is_optional)
+ if(__qt_@target@_is_optional)
if(${CMAKE_FIND_PACKAGE_NAME}_FIND_QUIETLY)
- list(APPEND find_package_args QUIET)
+ list(APPEND __qt_@target@_find_package_args QUIET)
endif()
- find_package(${find_package_args})
+ find_package(${__qt_@target@_find_package_args})
else()
- find_dependency(${find_package_args})
+ find_dependency(${__qt_@target@_find_package_args})
endif()
endforeach()
# Find Qt tool package.
-set(_tool_deps "@main_module_tool_deps@")
+set(__qt_@target@_tool_deps "@main_module_tool_deps@")
if(NOT "${QT_HOST_PATH}" STREQUAL "")
# Make sure that the tools find the host tools first
@@ -52,19 +57,23 @@ if(NOT "${QT_HOST_PATH}" STREQUAL "")
list(PREPEND CMAKE_FIND_ROOT_PATH "${QT_HOST_PATH}")
endif()
-foreach(_target_dep ${_tool_deps})
- list(GET _target_dep 0 pkg)
- list(GET _target_dep 1 version)
+foreach(__qt_@target@_target_dep ${__qt_@target@_tool_deps})
+ list(GET __qt_@target@_target_dep 0 __qt_@target@_pkg)
+ list(GET __qt_@target@_target_dep 1 __qt_@target@_version)
- unset(find_package_args)
+ unset(__qt_@target@_find_package_args)
if(${CMAKE_FIND_PACKAGE_NAME}_FIND_QUIETLY)
- list(APPEND find_package_args QUIET)
+ list(APPEND __qt_@target@_find_package_args QUIET)
endif()
if(${CMAKE_FIND_PACKAGE_NAME}_FIND_REQUIRED)
- list(APPEND find_package_args REQUIRED)
+ list(APPEND __qt_@target@_find_package_args REQUIRED)
endif()
- find_package(${pkg} ${version} ${find_package_args})
- if (NOT ${pkg}_FOUND)
+ find_package(${__qt_@target@_pkg} ${__qt_@target@_version} ${__qt_@target@_find_package_args}
+ PATHS
+ ${_qt_additional_packages_prefix_path}
+ ${_qt_additional_packages_prefix_path_env}
+ )
+ if (NOT ${__qt_@target@_pkg}_FOUND)
if(NOT "${QT_HOST_PATH}" STREQUAL "")
set(CMAKE_PREFIX_PATH ${BACKUP_@target@_CMAKE_PREFIX_PATH})
set(CMAKE_FIND_ROOT_PATH ${BACKUP_@target@_CMAKE_FIND_ROOT_PATH})
@@ -78,22 +87,9 @@ if(NOT "${QT_HOST_PATH}" STREQUAL "")
endif()
# note: target_deps example: "Qt6Core\;5.12.0;Qt6Gui\;5.12.0"
-set(_target_deps "@target_deps@")
-foreach(_target_dep ${_target_deps})
- list(GET _target_dep 0 pkg)
- list(GET _target_dep 1 version)
-
- if (NOT ${pkg}_FOUND)
- find_dependency(${pkg} ${version}
- PATHS
- "${CMAKE_CURRENT_LIST_DIR}/.."
- ${_qt_additional_packages_prefix_path}
- ${_qt_additional_packages_prefix_path_env}
- ${QT_EXAMPLES_CMAKE_PREFIX_PATH}
- ${__qt_use_no_default_path_for_qt_packages}
- )
- endif()
-endforeach()
+set(__qt_@target@_target_deps "@target_deps@")
+set(__qt_@target@_find_dependency_paths "${CMAKE_CURRENT_LIST_DIR}/..")
+_qt_internal_find_dependencies(__qt_@target@_target_deps __qt_@target@_find_dependency_paths)
set(_@QT_CMAKE_EXPORT_NAMESPACE@@target@_MODULE_DEPENDENCIES "@qt_module_dependencies@")
set(@INSTALL_CMAKE_NAMESPACE@@target@_FOUND TRUE)
diff --git a/cmake/QtModuleHelpers.cmake b/cmake/QtModuleHelpers.cmake
index 86408eca8d..512772b287 100644
--- a/cmake/QtModuleHelpers.cmake
+++ b/cmake/QtModuleHelpers.cmake
@@ -1,3 +1,40 @@
+macro(qt_internal_get_internal_add_module_keywords option_args single_args multi_args)
+ set(${option_args}
+ STATIC
+ EXCEPTIONS
+ INTERNAL_MODULE
+ HEADER_MODULE
+ DISABLE_TOOLS_EXPORT
+ SKIP_DEPENDS_INCLUDE
+ NO_MODULE_HEADERS
+ NO_SYNC_QT
+ NO_PRIVATE_MODULE
+ NO_CONFIG_HEADER_FILE
+ NO_ADDITIONAL_TARGET_INFO
+ NO_GENERATE_METATYPES
+ GENERATE_CPP_EXPORTS # TODO: Rename to NO_GENERATE_CPP_EXPORTS once migration is done
+ GENERATE_METATYPES # TODO: Remove once it is not used anymore
+ )
+ set(${single_args}
+ MODULE_INCLUDE_NAME
+ MODULE_INTERFACE_NAME
+ CONFIG_MODULE_NAME
+ PRECOMPILED_HEADER
+ CONFIGURE_FILE_PATH
+ CPP_EXPORT_HEADER_NAME
+ ${__default_target_info_args}
+ )
+ set(${multi_args}
+ QMAKE_MODULE_CONFIG
+ EXTRA_CMAKE_FILES
+ EXTRA_CMAKE_INCLUDES
+ NO_PCH_SOURCES
+ ${__default_private_args}
+ ${__default_public_args}
+ ${__default_private_module_args}
+ )
+endmacro()
+
# This is the main entry function for creating a Qt module, that typically
# consists of a library, public header files, private header files and configurable
# features.
@@ -14,43 +51,111 @@
# Don't generate a Qt6*AdditionalTargetInfo.cmake file.
# The caller is responsible for creating one.
#
+# MODULE_INTERFACE_NAME
+# The custom name of the module interface. This name is used as a part of the include paths
+# associated with the module and other interface names. The default value is the target name.
+# If the INTERNAL_MODULE option is specified, MODULE_INTERFACE_NAME is not specified and the
+# target name ends with the suffix 'Private', the MODULE_INTERFACE_NAME value defaults to the
+# non-suffixed target name, e.g.:
+# For the SomeInternalModulePrivate target, the MODULE_INTERFACE_NAME will be
+# SomeInternalModule
+#
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_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})
+ qt_internal_get_internal_add_module_keywords(
+ option_args
+ single_args
+ multi_args
+ )
- qt_internal_add_qt_repo_known_module("${target}")
+ qt_parse_all_arguments(arg "qt_internal_add_module"
+ "${option_args}"
+ "${single_args}"
+ "${multi_args}"
+ ${ARGN}
+ )
- if(NOT DEFINED arg_CONFIG_MODULE_NAME)
- set(arg_CONFIG_MODULE_NAME "${module_lower}")
+ if(arg_INTERNAL_MODULE)
+ set(arg_INTERNAL_MODULE "INTERNAL_MODULE")
+ set(arg_NO_PRIVATE_MODULE TRUE)
+ # Assume the interface name of the internal module should be the module name without the
+ # 'Private' suffix.
+ if(NOT arg_MODULE_INTERFACE_NAME)
+ if(target MATCHES "(.*)Private$")
+ set(arg_MODULE_INTERFACE_NAME "${CMAKE_MATCH_1}")
+ else()
+ message(WARNING "The internal module target should end with the 'Private' suffix.")
+ endif()
+ endif()
+ else()
+ unset(arg_INTERNAL_MODULE)
endif()
- # Module define needs to take into account the config module name.
- string(TOUPPER "${arg_CONFIG_MODULE_NAME}" module_define_infix)
- string(REPLACE "-" "_" module_define_infix "${module_define_infix}")
- string(REPLACE "." "_" module_define_infix "${module_define_infix}")
+ if(NOT arg_MODULE_INTERFACE_NAME)
+ set(arg_MODULE_INTERFACE_NAME "${target}")
+ endif()
### Define Targets:
+ if(arg_HEADER_MODULE)
+ set(type_to_create INTERFACE)
+ elseif(arg_STATIC)
+ set(type_to_create STATIC)
+ else()
+ # Use default depending on Qt configuration.
+ set(type_to_create "")
+ endif()
+
+ _qt_internal_add_library("${target}" ${type_to_create})
+ qt_internal_mark_as_internal_library("${target}")
+
+ get_target_property(target_type ${target} TYPE)
+
set(is_interface_lib 0)
set(is_shared_lib 0)
set(is_static_lib 0)
- if(${arg_HEADER_MODULE})
- add_library("${target}" INTERFACE)
+ if(target_type STREQUAL "INTERFACE_LIBRARY")
set(is_interface_lib 1)
- elseif(${arg_STATIC})
- add_library("${target}" STATIC)
+ elseif(target_type STREQUAL "STATIC_LIBRARY")
set(is_static_lib 1)
- elseif(${QT_BUILD_SHARED_LIBS})
- add_library("${target}" SHARED)
+ elseif(target_type STREQUAL "SHARED_LIBRARY")
set(is_shared_lib 1)
else()
- add_library("${target}" STATIC)
- set(is_static_lib 1)
+ message(FATAL_ERROR "Invalid target type '${target_type}' for Qt module '${target}'")
+ endif()
+
+ set_target_properties(${target} PROPERTIES
+ _qt_module_interface_name "${arg_MODULE_INTERFACE_NAME}"
+ )
+ set_property(TARGET ${target} APPEND PROPERTY EXPORT_PROPERTIES _qt_module_interface_name)
+
+ qt_internal_module_info(module "${target}")
+ qt_internal_add_qt_repo_known_module("${target}")
+
+ if(NOT arg_CONFIG_MODULE_NAME)
+ set(arg_CONFIG_MODULE_NAME "${module_lower}")
+ endif()
+
+ set(module_config_header "qt${arg_CONFIG_MODULE_NAME}-config.h")
+ set(module_config_private_header "qt${arg_CONFIG_MODULE_NAME}-config_p.h")
+
+ # Module define needs to take into account the config module name.
+ string(TOUPPER "${arg_CONFIG_MODULE_NAME}" module_define_infix)
+ string(REPLACE "-" "_" module_define_infix "${module_define_infix}")
+ string(REPLACE "." "_" module_define_infix "${module_define_infix}")
+
+ if(arg_MODULE_INCLUDE_NAME)
+ set(module_include_name ${arg_MODULE_INCLUDE_NAME})
+ else()
+ set(module_include_name ${module})
+ endif()
+
+ if(arg_GENERATE_CPP_EXPORTS)
+ if(arg_CPP_EXPORT_HEADER_NAME)
+ set(cpp_export_header_name "CPP_EXPORT_HEADER_NAME;${arg_CPP_EXPORT_HEADER_NAME}")
+ endif()
+ qt_internal_generate_cpp_global_exports(${target} ${module_define_infix}
+ ${module_include_name}
+ "${cpp_export_header_name}"
+ )
endif()
set(property_prefix "INTERFACE_")
@@ -59,6 +164,9 @@ function(qt_internal_add_module target)
set(property_prefix "")
endif()
+ if(arg_INTERNAL_MODULE)
+ string(APPEND arg_CONFIG_MODULE_NAME "_private")
+ endif()
set_target_properties(${target} PROPERTIES
_qt_config_module_name "${arg_CONFIG_MODULE_NAME}"
${property_prefix}QT_QMAKE_MODULE_CONFIG "${arg_QMAKE_MODULE_CONFIG}")
@@ -70,10 +178,11 @@ function(qt_internal_add_module target)
set_target_properties(${target} PROPERTIES
FRAMEWORK TRUE
FRAMEWORK_VERSION "A" # Not based on Qt major version
- MACOSX_FRAMEWORK_IDENTIFIER org.qt-project.Qt${target}
+ MACOSX_FRAMEWORK_IDENTIFIER org.qt-project.${module}
MACOSX_FRAMEWORK_BUNDLE_VERSION ${PROJECT_VERSION}
MACOSX_FRAMEWORK_SHORT_VERSION_STRING ${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}
)
+ qt_internal_get_framework_info(fw ${target})
endif()
if(QT_FEATURE_reduce_relocations AND UNIX AND NOT is_interface_lib)
@@ -97,9 +206,6 @@ function(qt_internal_add_module target)
target_compile_options(${target} PRIVATE -ffat-lto-objects)
endif()
- if (ANDROID)
- qt_android_apply_arch_suffix("${target}")
- endif()
qt_internal_add_target_aliases("${target}")
qt_skip_warnings_are_errors_when_repo_unclean("${target}")
_qt_internal_apply_strict_cpp("${target}")
@@ -110,8 +216,8 @@ function(qt_internal_add_module target)
endif()
# Add _private target to link against the private headers:
+ set(target_private "${target}Private")
if(NOT ${arg_NO_PRIVATE_MODULE})
- set(target_private "${target}Private")
add_library("${target_private}" INTERFACE)
qt_internal_add_target_aliases("${target_private}")
set_target_properties(${target_private} PROPERTIES
@@ -159,27 +265,19 @@ function(qt_internal_add_module target)
endif()
if(is_framework)
set_target_properties(${target} PROPERTIES
- OUTPUT_NAME Qt${target}
+ OUTPUT_NAME ${fw_name}
)
else()
set_target_properties(${target} PROPERTIES
- OUTPUT_NAME "${INSTALL_CMAKE_NAMESPACE}${target}${QT_LIBINFIX}"
+ OUTPUT_NAME "${INSTALL_CMAKE_NAMESPACE}${module_interface_name}${QT_LIBINFIX}"
)
endif()
- _qt_internal_apply_win_prefix_and_suffix("${target}")
-
if (WIN32 AND BUILD_SHARED_LIBS)
_qt_internal_generate_win32_rc_file(${target})
endif()
endif()
- if(arg_MODULE_INCLUDE_NAME)
- set(module_include_name ${arg_MODULE_INCLUDE_NAME})
- else()
- set(module_include_name ${module})
- endif()
-
# Module headers:
set_property(TARGET "${target}" APPEND PROPERTY EXPORT_PROPERTIES _qt_module_has_headers)
if(${arg_NO_MODULE_HEADERS} OR ${arg_NO_SYNC_QT})
@@ -285,7 +383,7 @@ function(qt_internal_add_module target)
# Make sure to create such paths for both the the BUILD_INTERFACE and the INSTALL_INTERFACE.
#
# Only add syncqt headers if they exist.
- # This handles cases like QmlDevTools which do not have their own headers, but borrow them
+ # This handles cases like QmlDevToolsPrivate which do not have their own headers, but borrow them
# from another module.
if(NOT arg_NO_SYNC_QT AND NOT arg_NO_MODULE_HEADERS)
# Don't include private headers unless they exist, aka syncqt created them.
@@ -302,19 +400,21 @@ function(qt_internal_add_module target)
endif()
if(is_framework)
- set(fw_bundle_subdir "${INSTALL_LIBDIR}/Qt${target}.framework")
+ set(fw_install_dir "${INSTALL_LIBDIR}/${fw_dir}")
+ set(fw_install_header_dir "${INSTALL_LIBDIR}/${fw_header_dir}")
+ set(fw_output_header_dir "${QT_BUILD_DIR}/${fw_install_header_dir}")
list(APPEND public_includes
# Add the lib/Foo.framework dir as include path to let CMake generate
# the -F compiler flag for framework-style includes to work.
- "$<INSTALL_INTERFACE:${fw_bundle_subdir}>"
+ "$<INSTALL_INTERFACE:${fw_install_dir}>"
# Add the framework Headers subdir, so that non-framework-style includes work. The
# BUILD_INTERFACE Headers symlink was previously claimed not to exist at the relevant
# time, and a fully specified Header path was used instead. This doesn't seem to be a
# problem anymore.
- "$<BUILD_INTERFACE:${QT_BUILD_DIR}/${fw_bundle_subdir}/Headers>"
- "$<INSTALL_INTERFACE:${fw_bundle_subdir}/Headers>"
- )
+ "$<BUILD_INTERFACE:${fw_output_header_dir}>"
+ "$<INSTALL_INTERFACE:${fw_install_header_dir}>"
+ )
endif()
if(NOT arg_NO_MODULE_HEADERS AND NOT arg_NO_SYNC_QT)
@@ -356,6 +456,7 @@ function(qt_internal_add_module target)
QT_BUILD_${module_define_infix}_LIB ### FIXME: use QT_BUILD_ADDON for Add-ons or remove if we don't have add-ons anymore
${deprecation_define}
)
+ list(APPEND arg_LIBRARIES Qt::PlatformModuleInternal)
endif()
qt_internal_extend_target("${target}"
@@ -371,7 +472,7 @@ function(qt_internal_add_module target)
${arg_DEFINES}
${defines_for_extend_target}
PUBLIC_LIBRARIES ${arg_PUBLIC_LIBRARIES}
- LIBRARIES ${arg_LIBRARIES} Qt::PlatformModuleInternal
+ LIBRARIES ${arg_LIBRARIES}
PRIVATE_MODULE_INTERFACE ${arg_PRIVATE_MODULE_INTERFACE}
FEATURE_DEPENDENCIES ${arg_FEATURE_DEPENDENCIES}
DBUS_ADAPTOR_SOURCES ${arg_DBUS_ADAPTOR_SOURCES}
@@ -407,16 +508,20 @@ function(qt_internal_add_module target)
if(EXISTS "${configureFile}" AND NOT arg_NO_CONFIG_HEADER_FILE)
qt_feature_module_begin(
LIBRARY "${target}"
- PUBLIC_FILE "qt${arg_CONFIG_MODULE_NAME}-config.h"
- PRIVATE_FILE "qt${arg_CONFIG_MODULE_NAME}-config_p.h"
+ PUBLIC_FILE "${module_config_header}"
+ PRIVATE_FILE "${module_config_private_header}"
PUBLIC_DEPENDENCIES ${arg_FEATURE_DEPENDENCIES}
PRIVATE_DEPENDENCIES ${arg_FEATURE_DEPENDENCIES}
)
include(${configureFile})
qt_feature_module_end("${target}")
- set_property(TARGET "${target}" APPEND PROPERTY PUBLIC_HEADER "${CMAKE_CURRENT_BINARY_DIR}/qt${arg_CONFIG_MODULE_NAME}-config.h")
- set_property(TARGET "${target}" APPEND PROPERTY PRIVATE_HEADER "${CMAKE_CURRENT_BINARY_DIR}/qt${arg_CONFIG_MODULE_NAME}-config_p.h")
+ set_property(TARGET "${target}" APPEND PROPERTY
+ PUBLIC_HEADER "${CMAKE_CURRENT_BINARY_DIR}/${module_config_header}"
+ )
+ set_property(TARGET "${target}" APPEND PROPERTY
+ PRIVATE_HEADER "${CMAKE_CURRENT_BINARY_DIR}/${module_config_private_header}"
+ )
endif()
if(NOT arg_HEADER_MODULE)
@@ -486,26 +591,17 @@ set(QT_LIBINFIX \"${QT_LIBINFIX}\")")
set(extra_cmake_code "")
- if(target STREQUAL Core)
- # Propagate non-build related variables that are needed for consuming Qt packages.
- # Do this in CoreConfig instead of Qt6Config, so that consumers can also use
- # find_package(Qt6Core) instead of find_package(Qt6 COMPONENTS Core)
- string(APPEND extra_cmake_code "
-set(QT_CMAKE_EXPORT_NAMESPACE ${QT_CMAKE_EXPORT_NAMESPACE})")
- endif()
-
# Generate metatypes
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}")
+ set(args __QT_INTERNAL_NO_INSTALL)
else()
set(args INSTALL_DIR "${metatypes_install_dir}")
endif()
@@ -585,12 +681,6 @@ set(QT_CMAKE_EXPORT_NAMESPACE ${QT_CMAKE_EXPORT_NAMESPACE})")
EXPORT_NAME_PREFIX ${INSTALL_CMAKE_NAMESPACE}${target}
CONFIG_INSTALL_DIR "${config_install_dir}")
- if (${arg_INTERNAL_MODULE})
- set(arg_INTERNAL_MODULE "INTERNAL_MODULE")
- else()
- unset(arg_INTERNAL_MODULE)
- endif()
-
### fixme: cmake is missing a built-in variable for this. We want to apply it only to modules and plugins
# that belong to Qt.
if(NOT arg_HEADER_MODULE)
@@ -599,7 +689,7 @@ set(QT_CMAKE_EXPORT_NAMESPACE ${QT_CMAKE_EXPORT_NAMESPACE})")
set(interface_includes "")
- # Handle cases like QmlDevTools which do not have their own headers, but rather borrow them
+ # Handle cases like QmlDevToolsPrivate which do not have their own headers, but rather borrow them
# from another module.
if(NOT arg_NO_SYNC_QT)
list(APPEND interface_includes "$<BUILD_INTERFACE:${CMAKE_CURRENT_BINARY_DIR}>")
@@ -616,11 +706,11 @@ set(QT_CMAKE_EXPORT_NAMESPACE ${QT_CMAKE_EXPORT_NAMESPACE})")
"$<BUILD_INTERFACE:${module_include_dir}/${PROJECT_VERSION}/${module}>")
if(is_framework)
- set(fw_headers_dir
- "${INSTALL_LIBDIR}/${module}.framework/Headers/")
+ set(fw_install_private_header_dir "${INSTALL_LIBDIR}/${fw_private_header_dir}")
+ set(fw_install_private_module_header_dir "${INSTALL_LIBDIR}/${fw_private_module_header_dir}")
list(APPEND interface_includes
- "$<INSTALL_INTERFACE:${fw_headers_dir}${PROJECT_VERSION}>"
- "$<INSTALL_INTERFACE:${fw_headers_dir}${PROJECT_VERSION}/${module}>")
+ "$<INSTALL_INTERFACE:${fw_install_private_header_dir}>"
+ "$<INSTALL_INTERFACE:${fw_install_private_module_header_dir}>")
else()
list(APPEND interface_includes
"$<INSTALL_INTERFACE:${INSTALL_INCLUDEDIR}/${module}/${PROJECT_VERSION}>"
@@ -636,7 +726,9 @@ set(QT_CMAKE_EXPORT_NAMESPACE ${QT_CMAKE_EXPORT_NAMESPACE})")
"${module_headers_clean}")
endif()
- if(NOT ${arg_NO_PRIVATE_MODULE})
+ if(arg_INTERNAL_MODULE)
+ target_include_directories("${target}" INTERFACE ${interface_includes})
+ elseif(NOT ${arg_NO_PRIVATE_MODULE})
target_include_directories("${target_private}" INTERFACE ${interface_includes})
target_link_libraries("${target_private}" INTERFACE "${target}")
endif()
@@ -671,7 +763,7 @@ function(qt_finalize_module target)
qt_generate_module_pri_file("${target}" ${ARGN})
endfunction()
-# Get a set of Qt module related values based on the target name.
+# Get a set of Qt module related values based on the target.
# When doing qt_internal_module_info(foo Core) this method will set
# the following variables in the caller's scope:
# * foo with the value "QtCore"
@@ -684,16 +776,24 @@ endfunction()
# * foo_include_dir with the module's include directory
# e.g for QtQuick it would be qtdeclarative_build_dir/include/QtQuick for a prefix build or
# qtbase_build_dir/include/QtQuick for a non-prefix build
+# * foo_interface_name the interface name of the module stored in _qt_module_interface_name
+# property.
function(qt_internal_module_info result target)
- set(module "Qt${target}")
+ get_target_property(module_interface_name ${target} _qt_module_interface_name)
+ if(NOT module_interface_name)
+ message(FATAL_ERROR "${target} is not a module.")
+ endif()
+
+ qt_internal_qtfy_target(module ${module_interface_name})
set("${result}" "${module}" PARENT_SCOPE)
- set("${result}_versioned" "Qt${PROJECT_VERSION_MAJOR}${target}" PARENT_SCOPE)
- string(TOUPPER "${target}" upper)
- string(TOLOWER "${target}" lower)# * foo_upper with the value "CORE"
+ set("${result}_versioned" "${module_versioned}" PARENT_SCOPE)
+ string(TOUPPER "${module_interface_name}" upper)
+ string(TOLOWER "${module_interface_name}" lower)# * foo_upper with the value "CORE"
set("${result}_upper" "${upper}" PARENT_SCOPE)
set("${result}_lower" "${lower}" PARENT_SCOPE)
set("${result}_repo_include_dir" "${QT_BUILD_DIR}/include" PARENT_SCOPE)
set("${result}_include_dir" "${QT_BUILD_DIR}/include/${module}" PARENT_SCOPE)
+ set("${result}_interface_name" "${module_interface_name}" PARENT_SCOPE)
endfunction()
# Generate a module description file based on the template in ModuleDescription.json.in
@@ -712,3 +812,25 @@ function(qt_describe_module target)
qt_install(FILES "${descfile_out}" DESTINATION "${install_dir}")
endfunction()
+
+function(qt_internal_generate_cpp_global_exports target module_define_infix module_include_name)
+ cmake_parse_arguments(arg
+ ""
+ "CPP_EXPORT_HEADER_NAME"
+ "" ${ARGN})
+ qt_internal_module_info(module "${target}")
+ if(NOT arg_CPP_EXPORT_HEADER_NAME)
+ set(arg_CPP_EXPORT_HEADER_NAME "qt${module_lower}exports.h")
+ endif()
+
+ set(generated_header_path
+ "${QT_BUILD_DIR}/include/${module_include_name}/${arg_CPP_EXPORT_HEADER_NAME}"
+ )
+
+ configure_file("${QT_CMAKE_DIR}/modulecppexports.h.in"
+ "${generated_header_path}" @ONLY
+ )
+
+ target_sources(${target} PRIVATE "${generated_header_path}")
+ set_property(TARGET ${target} APPEND PROPERTY PUBLIC_HEADER "${generated_header_path}")
+endfunction()
diff --git a/cmake/QtModuleToolsDependencies.cmake.in b/cmake/QtModuleToolsDependencies.cmake.in
index d9ff04b6f9..2eaaf74976 100644
--- a/cmake/QtModuleToolsDependencies.cmake.in
+++ b/cmake/QtModuleToolsDependencies.cmake.in
@@ -1,12 +1,12 @@
# Find "ModuleTools" dependencies, which are other ModuleTools packages.
set(@INSTALL_CMAKE_NAMESPACE@@target@_FOUND FALSE)
-set(_tool_deps "@package_deps@")
-foreach(_target_dep ${_tool_deps})
- list(GET _target_dep 0 pkg)
- list(GET _target_dep 1 version)
+set(__qt_@target@_tool_deps "@package_deps@")
+foreach(__qt_@target@_target_dep ${__qt_@target@_tool_deps})
+ list(GET __qt_@target@_target_dep 0 __qt_@target@_pkg)
+ list(GET __qt_@target@_target_dep 1 __qt_@target@_version)
- if (NOT ${pkg}_FOUND)
- find_dependency(${pkg} ${version})
+ if (NOT ${__qt_@target@_pkg}_FOUND)
+ find_dependency(${__qt_@target@_pkg} ${__qt_@target@_version})
endif()
endforeach()
diff --git a/cmake/QtModuleToolsVersionlessTargets.cmake.in b/cmake/QtModuleToolsVersionlessTargets.cmake.in
index 6d0f57e039..0cf554c34a 100644
--- a/cmake/QtModuleToolsVersionlessTargets.cmake.in
+++ b/cmake/QtModuleToolsVersionlessTargets.cmake.in
@@ -1,6 +1,6 @@
foreach(__qt_tool @tool_targets_non_prefixed@)
if(NOT TARGET Qt::${__qt_tool} AND TARGET Qt6::${__qt_tool})
- add_executable(Qt::${__qt_tool} IMPORTED)
+ add_executable(Qt::${__qt_tool} IMPORTED GLOBAL)
# Check all the usual imported location properties to find one that contains a path.
foreach(__qt_imported_location_config
diff --git a/cmake/QtPlatformTargetHelpers.cmake b/cmake/QtPlatformTargetHelpers.cmake
new file mode 100644
index 0000000000..9c95c0883f
--- /dev/null
+++ b/cmake/QtPlatformTargetHelpers.cmake
@@ -0,0 +1,63 @@
+# 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)
+ qt_internal_get_platform_definition_include_dir(
+ install_interface_definition_dir
+ build_interface_definition_dir
+ )
+
+ ## 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:${build_interface_definition_dir}>
+ $<BUILD_INTERFACE:${PROJECT_BINARY_DIR}/include>
+ $<INSTALL_INTERFACE:${install_interface_definition_dir}>
+ $<INSTALL_INTERFACE:${INSTALL_INCLUDEDIR}>
+ )
+ target_compile_definitions(Platform INTERFACE ${QT_PLATFORM_DEFINITIONS})
+
+ # When building on android we need to link against the logging library
+ # in order to satisfy linker dependencies. Both of these libraries are part of
+ # the NDK.
+ if (ANDROID)
+ target_link_libraries(Platform INTERFACE log)
+ endif()
+
+ qt_set_msvc_cplusplus_options(Platform INTERFACE)
+
+ # Propagate minimum C++ 17 via Platform to Qt consumers (apps), after the global features
+ # are computed.
+ qt_set_language_standards_interface_compile_features(Platform)
+
+ # By default enable utf8 sources for both Qt and Qt consumers. Can be opted out.
+ qt_enable_utf8_sources(Platform)
+
+ # By default enable unicode on WIN32 platforms for both Qt and Qt consumers. Can be opted out.
+ qt_internal_enable_unicode_defines(Platform)
+endfunction()
+
+function(qt_internal_get_platform_definition_include_dir install_interface build_interface)
+ # Used by consumers of prefix builds via INSTALL_INTERFACE (relative path).
+ set(${install_interface} "${INSTALL_MKSPECSDIR}/${QT_QMAKE_TARGET_MKSPEC}" PARENT_SCOPE)
+
+ # Used by qtbase in prefix builds via BUILD_INTERFACE
+ set(build_interface_base_dir
+ "${CMAKE_CURRENT_LIST_DIR}/../mkspecs"
+ )
+
+ # Used by qtbase and consumers in non-prefix builds via BUILD_INTERFACE
+ if(NOT QT_WILL_INSTALL)
+ set(build_interface_base_dir
+ "${QT_BUILD_DIR}/${INSTALL_MKSPECSDIR}"
+ )
+ endif()
+
+ get_filename_component(build_interface_dir
+ "${build_interface_base_dir}/${QT_QMAKE_TARGET_MKSPEC}"
+ ABSOLUTE
+ )
+ set(${build_interface} "${build_interface_dir}" PARENT_SCOPE)
+endfunction()
diff --git a/cmake/QtPluginDependencies.cmake.in b/cmake/QtPluginDependencies.cmake.in
index 7bd1eef9aa..81b66837f0 100644
--- a/cmake/QtPluginDependencies.cmake.in
+++ b/cmake/QtPluginDependencies.cmake.in
@@ -1,29 +1,34 @@
set(@target@_FOUND FALSE)
# note: _third_party_deps example: "ICU\\;FALSE\\;1.0\\;i18n uc data;ZLIB\\;FALSE\\;\\;"
-set(_third_party_deps "@third_party_deps@")
+set(__qt_@target@_third_party_deps "@third_party_deps@")
-foreach(_target_dep ${_third_party_deps})
- list(GET _target_dep 0 pkg)
- list(GET _target_dep 1 is_optional)
- list(GET _target_dep 2 version)
- list(GET _target_dep 3 components)
- set(find_package_args "${pkg}")
- if(version)
- list(APPEND find_package_args "${version}")
+foreach(__qt_@target@_target_dep ${__qt_@target@_third_party_deps})
+ list(GET __qt_@target@_target_dep 0 __qt_@target@_pkg)
+ list(GET __qt_@target@_target_dep 1 __qt_@target@_is_optional)
+ list(GET __qt_@target@_target_dep 2 __qt_@target@_version)
+ list(GET __qt_@target@_target_dep 3 __qt_@target@_components)
+ list(GET __qt_@target@_target_dep 4 __qt_@target@_optional_components)
+ set(__qt_@target@_find_package_args "${__qt_@target@_pkg}")
+ if(__qt_@target@_version)
+ list(APPEND __qt_@target@_find_package_args "${__qt_@target@_version}")
endif()
- if(components)
- string(REPLACE " " ";" components "${components}")
- list(APPEND find_package_args COMPONENTS ${components})
+ if(__qt_@target@_components)
+ string(REPLACE " " ";" __qt_@target@_components "${__qt_@target@_components}")
+ list(APPEND __qt_@target@_find_package_args COMPONENTS ${__qt_@target@_components})
+ endif()
+ if(__qt_@target@_optional_components)
+ string(REPLACE " " ";" __qt_@target@_optional_components "${__qt_@target@_optional_components}")
+ list(APPEND __qt_@target@_find_package_args OPTIONAL_COMPONENTS ${__qt_@target@_optional_components})
endif()
- if(is_optional)
+ if(__qt_@target@_is_optional)
if(${CMAKE_FIND_PACKAGE_NAME}_FIND_QUIETLY)
- list(APPEND find_package_args QUIET)
+ list(APPEND __qt_@target@_find_package_args QUIET)
endif()
- find_package(${find_package_args})
+ find_package(${__qt_@target@_find_package_args})
else()
- find_dependency(${find_package_args})
+ find_dependency(${__qt_@target@_find_package_args})
endif()
endforeach()
@@ -33,21 +38,8 @@ if(QT_DISABLE_NO_DEFAULT_PATH_IN_QT_PACKAGES)
endif()
# note: target_deps example: "Qt6Core\;5.12.0;Qt6Gui\;5.12.0"
-set(_target_deps "@target_deps@")
-foreach(_target_dep ${_target_deps})
- list(GET _target_dep 0 pkg)
- list(GET _target_dep 1 version)
-
- if (NOT ${pkg}_FOUND)
- find_dependency(${pkg} ${version}
- PATHS
- @find_dependency_paths@
- ${_qt_additional_packages_prefix_path}
- ${_qt_additional_packages_prefix_path_env}
- ${QT_EXAMPLES_CMAKE_PREFIX_PATH}
- ${__qt_use_no_default_path_for_qt_packages}
- )
- endif()
-endforeach()
+set(__qt_@target@_target_deps "@target_deps@")
+set(__qt_@target@_find_dependency_paths "@find_dependency_paths@")
+_qt_internal_find_dependencies(__qt_@target@_target_deps __qt_@target@_find_dependency_paths)
set(@target@_FOUND TRUE)
diff --git a/cmake/QtPluginHelpers.cmake b/cmake/QtPluginHelpers.cmake
index 2368531d99..4ec7ef6009 100644
--- a/cmake/QtPluginHelpers.cmake
+++ b/cmake/QtPluginHelpers.cmake
@@ -48,7 +48,7 @@ function(qt_internal_add_plugin target)
# Put this behind a cache option for now. It's too noisy for general use
# until most repos are updated.
- option(QT_WARN_PLUGIN_PUBLIC_KEYWORDS "Warn if a plugin specifies a PUBLIC keyword")
+ option(QT_WARN_PLUGIN_PUBLIC_KEYWORDS "Warn if a plugin specifies a PUBLIC keyword" ON)
if(QT_WARN_PLUGIN_PUBLIC_KEYWORDS)
foreach(publicKeyword IN LISTS __default_public_args)
if(NOT "${arg_${publicKeyword}}" STREQUAL "")
@@ -76,6 +76,7 @@ function(qt_internal_add_plugin target)
${ARGN}
)
qt6_add_plugin(${target} ${plugin_args})
+ qt_internal_mark_as_internal_library(${target})
qt_get_sanitized_plugin_type("${arg_TYPE}" plugin_type_escaped)
@@ -119,10 +120,6 @@ function(qt_internal_add_plugin target)
qt_skip_warnings_are_errors_when_repo_unclean("${target}")
_qt_internal_apply_strict_cpp("${target}")
- # Disable linking of plugins against other plugins during static regular and
- # super builds. The latter causes cyclic dependencies otherwise.
- _qt_internal_disable_static_default_plugins("${target}")
-
set_target_properties("${target}" PROPERTIES
LIBRARY_OUTPUT_DIRECTORY "${output_directory}"
RUNTIME_OUTPUT_DIRECTORY "${output_directory}"
@@ -322,8 +319,18 @@ function(qt_internal_add_plugin target)
endforeach()
qt_register_target_dependencies("${target}" "${arg_PUBLIC_LIBRARIES}" "${qt_libs_private}")
+ set(plugin_init_target "")
if (NOT BUILD_SHARED_LIBS)
- qt_generate_plugin_pri_file("${target}" pri_file)
+
+ # There's no point in generating pri files for qml plugins. We didn't do it in Qt5 times.
+ if(NOT plugin_type_escaped STREQUAL "qml_plugin")
+ qt_generate_plugin_pri_file("${target}" pri_file)
+ endif()
+
+ if(qt_module_target)
+ __qt_internal_add_static_plugin_init_object_library("${target}" plugin_init_target)
+ qt_internal_link_internal_platform_for_object_library("${plugin_init_target}")
+ endif()
endif()
if (NOT arg_SKIP_INSTALL)
@@ -342,7 +349,7 @@ function(qt_internal_add_plugin target)
qt_path_join(config_install_dir ${QT_CONFIG_INSTALL_DIR} ${path_suffix})
qt_internal_export_additional_targets_file(
- TARGETS ${target}
+ TARGETS ${target} ${plugin_init_target}
EXPORT_NAME_PREFIX ${INSTALL_CMAKE_NAMESPACE}${target}
CONFIG_INSTALL_DIR "${config_install_dir}")
@@ -372,10 +379,13 @@ function(qt_internal_add_plugin target)
# Make the export name of plugins be consistent with modules, so that
# qt_add_resource adds its additional targets to the same export set in a static Qt build.
set(export_name "${INSTALL_CMAKE_NAMESPACE}${target}Targets")
- qt_install(TARGETS "${target}"
+ qt_install(TARGETS
+ "${target}"
+ ${plugin_init_target}
EXPORT ${export_name}
RUNTIME DESTINATION "${install_directory}"
LIBRARY DESTINATION "${install_directory}"
+ OBJECTS DESTINATION "${install_directory}"
ARCHIVE DESTINATION "${archive_install_directory}"
)
qt_install(EXPORT ${export_name}
diff --git a/cmake/QtPlugins.cmake.in b/cmake/QtPlugins.cmake.in
index 3e554a43ad..a96588cc5e 100644
--- a/cmake/QtPlugins.cmake.in
+++ b/cmake/QtPlugins.cmake.in
@@ -14,7 +14,10 @@ function(__qt_internal_add_static_plugins_once)
set(_module_target ${_aliased_target})
endif()
- # Include all PluginConfig.cmake files and update the QT_PLUGINS property of the module.
+ # Include all PluginConfig.cmake files and update the _qt_plugins and QT_PLUGINS property of
+ # the module. The underscored version is the one we will use going forward to have compatibility
+ # with INTERFACE libraries. QT_PLUGINS is now deprecated and only kept so that we don't break
+ # existing projects using it (like CMake itself).
file(GLOB _qt_plugin_config_files "${CMAKE_CURRENT_LIST_DIR}/@INSTALL_CMAKE_NAMESPACE@*PluginConfig.cmake")
foreach(_config_file ${_qt_plugin_config_files})
string(REGEX REPLACE "^.*/@INSTALL_CMAKE_NAMESPACE@(.*Plugin)Config.cmake$" "\\1" _qt_plugin "${_config_file}")
@@ -23,6 +26,9 @@ function(__qt_internal_add_static_plugins_once)
list(APPEND _qt_plugins ${_qt_plugin})
endif()
endforeach()
+ set_property(TARGET ${_module_target} PROPERTY _qt_plugins ${_qt_plugins})
+
+ # TODO: Deprecated. Remove in Qt 7.
set_property(TARGET ${_module_target} PROPERTY QT_PLUGINS ${_qt_plugins})
get_target_property(_have_added_plugins_already ${_module_target} __qt_internal_plugins_added)
@@ -30,123 +36,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>>")
- 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)
- 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}>")
-
- # 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}>"
- ">"
- ">"
- )
+ list(APPEND "QT_ALL_PLUGINS_FOUND_BY_FIND_PACKAGE_${__plugin_type}" "${plugin_target}")
- # 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}"
- ">"
- ">"
- ">>"
- )
-
- # 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_content "#include <QtPlugin>\nQ_IMPORT_PLUGIN(${_classname})")
-
- # 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()
-
- 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/QtPostProcessHelpers.cmake b/cmake/QtPostProcessHelpers.cmake
index 6e09fcdf94..5d3e949206 100644
--- a/cmake/QtPostProcessHelpers.cmake
+++ b/cmake/QtPostProcessHelpers.cmake
@@ -3,7 +3,7 @@ function(qt_internal_write_depends_file module)
set(contents "/* This file was generated by cmake with the info from ${module} target. */\n")
string(APPEND contents "#ifdef __cplusplus /* create empty PCH in C mode */\n")
foreach (m ${ARGN})
- string(APPEND contents "# include <Qt${m}/Qt${m}>\n")
+ string(APPEND contents "# include <${m}/${m}>\n")
endforeach()
string(APPEND contents "#endif\n")
@@ -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)
@@ -57,13 +57,54 @@ macro(qt_collect_third_party_deps target)
set(package_components "")
endif()
+ get_target_property(package_optional_components ${dep}
+ INTERFACE_QT_PACKAGE_OPTIONAL_COMPONENTS)
+ if(NOT package_optional_components)
+ set(package_optional_components "")
+ endif()
+
list(APPEND third_party_deps
- "${package_name}\;${package_is_optional}\;${package_version}\;${package_components}")
+ "${package_name}\;${package_is_optional}\;${package_version}\;${package_components}\;${package_optional_components}")
endif()
endif()
endforeach()
endmacro()
+# Filter the dependency targets to collect unique set of the dependencies.
+# non-Private and Private targets are treated as the single object in this context
+# since they are defined by the same CMake package. For internal modules
+# the CMake package will be always Private.
+function(qt_internal_remove_qt_dependency_duplicates out_deps deps)
+ set(${out_deps} "")
+ foreach(dep ${deps})
+ if(dep)
+ list(FIND ${out_deps} "${dep}" dep_seen)
+
+ # If the library depends on the Private and non-Private targets,
+ # we only need to 'find_dependency' for one of them.
+ if(dep_seen EQUAL -1 AND "${dep}" MATCHES "(.+)Private\;(.+)")
+ list(FIND ${out_deps} "${CMAKE_MATCH_1};${CMAKE_MATCH_2}" dep_seen)
+ endif()
+ if(dep_seen EQUAL -1)
+ list(LENGTH dep len)
+ if(NOT (len EQUAL 2))
+ message(FATAL_ERROR "List '${dep}' should look like QtFoo;version")
+ endif()
+ list(GET dep 0 dep_name)
+ list(GET dep 1 dep_ver)
+
+ # Skip over Qt6 dependency, because we will manually handle it in the Dependencies
+ # file before everything else, to ensure that find_package(Qt6Core)-style works.
+ if(dep_name STREQUAL "${INSTALL_CMAKE_NAMESPACE}")
+ continue()
+ endif()
+ list(APPEND ${out_deps} "${dep_name}\;${dep_ver}")
+ endif()
+ endif()
+ endforeach()
+ set(${out_deps} "${${out_deps}}" PARENT_SCOPE)
+endfunction()
+
function(qt_internal_create_module_depends_file target)
get_target_property(target_type "${target}" TYPE)
if(target_type STREQUAL "INTERFACE_LIBRARY")
@@ -93,7 +134,7 @@ function(qt_internal_create_module_depends_file target)
if(NOT arg_HEADER_MODULE)
get_target_property(extra_depends "${target}" QT_EXTRA_PACKAGE_DEPENDENCIES)
endif()
- if(NOT extra_depends STREQUAL "${extra_depends}-NOTFOUND")
+ if(NOT extra_depends MATCHES "-NOTFOUND$")
list(APPEND target_deps "${extra_depends}")
endif()
@@ -152,13 +193,11 @@ function(qt_internal_create_module_depends_file target)
endif()
endif()
endif()
- if (dep MATCHES "(.*)Private")
- set(dep "${CMAKE_MATCH_1}")
- endif()
list(FIND known_modules "${dep}" _pos)
if (_pos GREATER -1)
- list(APPEND qtdeps "${dep}")
+ qt_internal_module_info(module ${QT_CMAKE_EXPORT_NAMESPACE}::${dep})
+ list(APPEND qtdeps ${module})
# Make the ModuleTool package depend on dep's ModuleTool package.
list(FIND tool_deps_seen ${dep} dep_seen)
@@ -178,33 +217,16 @@ function(qt_internal_create_module_depends_file target)
"${INSTALL_CMAKE_NAMESPACE}${target}Tools\;${PROJECT_VERSION}")
endif()
- # Dirty deduplication hack because of https://gitlab.kitware.com/cmake/cmake/issues/19200
foreach(dep ${target_deps})
- if(dep)
- list(FIND target_deps_seen "${dep}" dep_seen)
- if(dep_seen EQUAL -1)
- list(LENGTH dep len)
- if(NOT (len EQUAL 2))
- message(FATAL_ERROR "List '${dep}' should look like QtFoo;version")
- endif()
- list(GET dep 0 dep_name)
- list(GET dep 1 dep_ver)
-
- # Skip over Qt6 dependency, because we will manually handle it in the Dependencies
- # file before everything else, to ensure that find_package(Qt6Core)-style works.
- if(dep_name STREQUAL INSTALL_CMAKE_NAMESPACE)
- continue()
- endif()
-
- list(APPEND target_deps_seen "${dep_name}\;${dep_ver}")
-
- if (dep_name MATCHES "${INSTALL_CMAKE_NAMESPACE}(.*)")
- list(APPEND qt_module_dependencies "${CMAKE_MATCH_1}")
- endif()
- endif()
+ if(NOT dep MATCHES ".+Private$" AND
+ dep MATCHES "${INSTALL_CMAKE_NAMESPACE}(.+)")
+ list(APPEND qt_module_dependencies "${CMAKE_MATCH_1}")
endif()
endforeach()
- set(target_deps "${target_deps_seen}")
+ list(REMOVE_DUPLICATES qt_module_dependencies)
+
+ qt_internal_remove_qt_dependency_duplicates(target_deps "${target_deps}")
+
if (DEFINED qtdeps)
list(REMOVE_DUPLICATES qtdeps)
@@ -251,23 +273,7 @@ function(qt_internal_create_plugin_depends_file target)
qt_collect_third_party_deps(${target})
- # Dirty hack because https://gitlab.kitware.com/cmake/cmake/issues/19200
- foreach(dep ${target_deps})
- if(dep)
- list(FIND target_deps_seen "${dep}" dep_seen)
- if(dep_seen EQUAL -1)
- list(LENGTH dep len)
- if(NOT (len EQUAL 2))
- message(FATAL_ERROR "List '${dep}' should look like QtFoo;version")
- endif()
- list(GET dep 0 dep_name)
- list(GET dep 1 dep_ver)
-
- list(APPEND target_deps_seen "${dep_name}\;${dep_ver}")
- endif()
- endif()
- endforeach()
- set(target_deps "${target_deps_seen}")
+ qt_internal_remove_qt_dependency_duplicates(target_deps "${target_deps}")
if(third_party_deps OR target_deps)
# Setup build and install paths
@@ -535,11 +541,6 @@ endif()\n")
"set(QT_BUILD_TOOLS_WHEN_CROSSCOMPILING \"TRUE\" CACHE BOOL \"\" FORCE)\n")
endif()
- if(ECM_ENABLE_SANITIZERS)
- string(APPEND QT_EXTRA_BUILD_INTERNALS_VARS
- "set(ECM_ENABLE_SANITIZERS \"${ECM_ENABLE_SANITIZERS}\" CACHE BOOL \"\" FORCE)\n")
- endif()
-
# Save the default qpa platform.
# Used by qtwayland/src/plugins/platforms/qwayland-generic/CMakeLists.txt. Otherwise
# the DEFAULT_IF condition is evaluated incorrectly.
@@ -637,6 +638,14 @@ endif()
")
endif()
+ if(DEFINED OpenGL_GL_PREFERENCE)
+ string(APPEND QT_EXTRA_BUILD_INTERNALS_VARS
+ "
+# Use the OpenGL_GL_PREFERENCE value qtbase was built with. But do not FORCE it.
+set(OpenGL_GL_PREFERENCE \"${OpenGL_GL_PREFERENCE}\" CACHE STRING \"\")
+")
+ endif()
+
qt_compute_relative_path_from_cmake_config_dir_to_prefix()
configure_file(
"${CMAKE_CURRENT_LIST_DIR}/QtBuildInternalsExtra.cmake.in"
diff --git a/cmake/QtPriHelpers.cmake b/cmake/QtPriHelpers.cmake
index 36f455bfa1..233f7ea4a4 100644
--- a/cmake/QtPriHelpers.cmake
+++ b/cmake/QtPriHelpers.cmake
@@ -55,8 +55,10 @@ function(qt_generate_qmake_libraries_pri_content module_name output_root_dir out
endforeach()
# Filter out implicit include directories
- string(PREPEND lib_incdir "$<FILTER:")
- string(APPEND lib_incdir ",EXCLUDE,${implicit_include_dirs_regex}>")
+ if(implicit_include_dirs_regex)
+ string(PREPEND lib_incdir "$<FILTER:")
+ string(APPEND lib_incdir ",EXCLUDE,${implicit_include_dirs_regex}>")
+ endif()
set(uccfg $<UPPER_CASE:$<CONFIG>>)
string(APPEND content "list(APPEND known_libs ${uclib})
@@ -213,22 +215,22 @@ function(qt_generate_module_pri_file target)
endif()
if(is_fw)
- set(framework_base_path "$$QT_MODULE_LIB_BASE/${module}.framework/Headers")
- set(public_module_includes "${framework_base_path}")
- set(public_module_frameworks "$$QT_MODULE_LIB_BASE")
- set(private_module_includes "${framework_base_path}/${PROJECT_VERSION} ${framework_base_path}/${PROJECT_VERSION}/${module}")
- set(module_name_in_pri "${module}")
+ qt_internal_get_framework_info(fw ${target})
+ set(framework_base_path "$$QT_MODULE_LIB_BASE")
+ set(public_module_includes "${framework_base_path}/${fw_header_dir}")
+ set(public_module_frameworks "${framework_base_path}")
+ set(private_module_includes "${framework_base_path}/${fw_private_header_dir} \
+${framework_base_path}/${fw_private_module_header_dir}")
else()
set(public_module_includes "$$QT_MODULE_INCLUDE_BASE $$QT_MODULE_INCLUDE_BASE/${module}")
set(public_module_frameworks "")
set(private_module_includes "$$QT_MODULE_INCLUDE_BASE/${module}/${PROJECT_VERSION} $$QT_MODULE_INCLUDE_BASE/${module}/${PROJECT_VERSION}/${module}")
- set(module_name_in_pri "${module_versioned}")
endif()
if(arg_HEADER_MODULE)
set(module_name_in_pri "")
else()
- set(module_name_in_pri "${module_name_in_pri}${QT_LIBINFIX}")
+ get_target_property(module_name_in_pri ${target} OUTPUT_NAME)
endif()
get_target_property(hasModuleHeaders ${target} INTERFACE_MODULE_HAS_HEADERS)
@@ -242,7 +244,6 @@ function(qt_generate_module_pri_file target)
set(config_module_name_base "${config_module_name}")
if (arg_INTERNAL_MODULE)
- string(APPEND config_module_name "_private")
# Internal module pri needs to provide private headers
set(public_module_includes "${private_module_includes}")
endif()
@@ -375,6 +376,13 @@ QT.${config_module_name}_private.disabled_features = ${disabled_private_features
${CMAKE_SHARED_LIBRARY_SUFFIX}
${CMAKE_EXTRA_SHARED_LIBRARY_SUFFIXES}
${CMAKE_STATIC_LIBRARY_SUFFIX})
+ if(MSVC)
+ set(link_library_flag "-l")
+ file(TO_CMAKE_PATH "$ENV{LIB};${CMAKE_CXX_IMPLICIT_LINK_DIRECTORIES}" implicit_link_directories)
+ else()
+ set(link_library_flag ${CMAKE_LINK_LIBRARY_FLAG})
+ set(implicit_link_directories ${CMAKE_CXX_IMPLICIT_LINK_DIRECTORIES})
+ endif()
add_custom_command(
OUTPUT "${private_pri_file_path}"
DEPENDS ${inputs}
@@ -383,8 +391,9 @@ QT.${config_module_name}_private.disabled_features = ${disabled_private_features
COMMAND ${CMAKE_COMMAND} "-DIN_FILES=${inputs}" "-DOUT_FILE=${private_pri_file_path}"
"-DLIBRARY_PREFIXES=${library_prefixes}"
"-DLIBRARY_SUFFIXES=${library_suffixes}"
- "-DLINK_LIBRARY_FLAG=${CMAKE_LINK_LIBRARY_FLAG}"
+ "-DLINK_LIBRARY_FLAG=${link_library_flag}"
"-DCONFIGS=${configs}"
+ "-DIMPLICIT_LINK_DIRECTORIES=${implicit_link_directories}"
-P "${QT_CMAKE_DIR}/QtGenerateLibPri.cmake"
VERBATIM)
add_custom_target(${target}_lib_pri DEPENDS "${private_pri_file_path}")
@@ -598,6 +607,13 @@ QT_PATCH_VERSION = ${PROJECT_VERSION_PATCH}
list(APPEND extra_statements "QT_MAC_SDK_VERSION = ${QT_MAC_SDK_VERSION}")
list(APPEND extra_statements
"QMAKE_MACOSX_DEPLOYMENT_TARGET = ${CMAKE_OSX_DEPLOYMENT_TARGET}")
+ if (CMAKE_OSX_ARCHITECTURES)
+ list(APPEND architectures "${CMAKE_OSX_ARCHITECTURES}")
+ string (REPLACE ";" " " architectures "${architectures}")
+ else()
+ set(architectures "$$QT_ARCH")
+ endif()
+ list(APPEND extra_statements "QT_ARCHS = ${architectures}")
endif()
list(APPEND extra_statements "QT_EDITION = Open Source")
@@ -785,6 +801,13 @@ CONFIG += ${private_config_joined}
${CMAKE_SHARED_LIBRARY_SUFFIX}
${CMAKE_EXTRA_SHARED_LIBRARY_SUFFIXES}
${CMAKE_STATIC_LIBRARY_SUFFIX})
+ if(MSVC)
+ set(link_library_flag "-l")
+ file(TO_CMAKE_PATH "$ENV{LIB};${CMAKE_CXX_IMPLICIT_LINK_DIRECTORIES}" implicit_link_directories)
+ else()
+ set(link_library_flag ${CMAKE_LINK_LIBRARY_FLAG})
+ set(implicit_link_directories ${CMAKE_CXX_IMPLICIT_LINK_DIRECTORIES})
+ endif()
add_custom_command(
OUTPUT "${qmodule_pri_target_path}"
DEPENDS ${inputs}
@@ -793,8 +816,9 @@ CONFIG += ${private_config_joined}
COMMAND ${CMAKE_COMMAND} "-DIN_FILES=${inputs}" "-DOUT_FILE=${qmodule_pri_target_path}"
"-DLIBRARY_PREFIXES=${library_prefixes}"
"-DLIBRARY_SUFFIXES=${library_suffixes}"
- "-DLINK_LIBRARY_FLAG=${CMAKE_LINK_LIBRARY_FLAG}"
+ "-DLINK_LIBRARY_FLAG=${link_library_flag}"
"-DCONFIGS=${configs}"
+ "-DIMPLICIT_LINK_DIRECTORIES=${implicit_link_directories}"
-P "${QT_CMAKE_DIR}/QtGenerateLibPri.cmake"
VERBATIM)
add_custom_target(qmodule_pri DEPENDS "${qmodule_pri_target_path}")
diff --git a/cmake/QtPrlHelpers.cmake b/cmake/QtPrlHelpers.cmake
index f843fb4bbe..18b230deb1 100644
--- a/cmake/QtPrlHelpers.cmake
+++ b/cmake/QtPrlHelpers.cmake
@@ -1,250 +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()
- elseif(NOT lib_target_type STREQUAL "OBJECT_LIBRARY")
- 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()
- elseif("${lib_target}" MATCHES "^Qt::(.*)")
- message(FATAL_ERROR "The ${CMAKE_MATCH_1} target is mentioned as a dependency for \
-${target}, but not declared.")
- 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)
@@ -386,6 +151,13 @@ ${prl_step1_content_libs}
qt_path_join(prl_meta_info_path
"${CMAKE_CURRENT_BINARY_DIR}"
"${prl_meta_info_name_prefix}${config}${prl_meta_info_name_suffix}")
+ if(MSVC)
+ set(link_library_flag "-l")
+ file(TO_CMAKE_PATH "$ENV{LIB};${CMAKE_CXX_IMPLICIT_LINK_DIRECTORIES}" implicit_link_directories)
+ else()
+ set(link_library_flag ${CMAKE_LINK_LIBRARY_FLAG})
+ set(implicit_link_directories ${CMAKE_CXX_IMPLICIT_LINK_DIRECTORIES})
+ endif()
add_custom_command(
OUTPUT "${prl_step2_path}"
DEPENDS "${prl_step1_path}"
@@ -398,8 +170,9 @@ ${prl_step1_content_libs}
"-DOUT_FILE=${prl_step2_path}"
"-DLIBRARY_PREFIXES=${library_prefixes}"
"-DLIBRARY_SUFFIXES=${library_suffixes}"
- "-DLINK_LIBRARY_FLAG=${CMAKE_LINK_LIBRARY_FLAG}"
+ "-DLINK_LIBRARY_FLAG=${link_library_flag}"
"-DQT_LIB_DIRS=${qt_lib_dirs}"
+ "-DIMPLICIT_LINK_DIRECTORIES=${implicit_link_directories}"
-P "${QT_CMAKE_DIR}/QtFinishPrlFile.cmake"
VERBATIM
COMMENT "Generating prl file for target ${target}"
diff --git a/cmake/QtProcessConfigureArgs.cmake b/cmake/QtProcessConfigureArgs.cmake
index f793096e50..c13c2dde35 100644
--- a/cmake/QtProcessConfigureArgs.cmake
+++ b/cmake/QtProcessConfigureArgs.cmake
@@ -76,12 +76,6 @@ while(NOT "${configure_args}" STREQUAL "")
elseif(arg STREQUAL "-skip")
list(POP_FRONT configure_args qtrepo)
push("-DBUILD_${qtrepo}=OFF")
- elseif(arg STREQUAL "-hostprefix")
- message(FATAL_ERROR "${arg} is not supported in the CMake build.")
- elseif(arg STREQUAL "-external-hostbindir")
- # This points to the bin directory of the Qt installation.
- # This can be multiple levels deep and we cannot deduce the QT_HOST_PATH safely.
- message(FATAL_ERROR "${arg} is not supported anymore. Use -qt-host-path <dir> instead.")
elseif(arg STREQUAL "-qt-host-path")
pop_path_argument()
push("-DQT_HOST_PATH=${path}")
@@ -93,12 +87,12 @@ while(NOT "${configure_args}" STREQUAL "")
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.
list(APPEND cmake_args "${configure_args}")
@@ -389,7 +383,7 @@ function(qt_commandline_addString arg val nextok)
qtConfValidateValue("${arg}" "${val}" success)
if(success)
if(DEFINED command_line_option_${arg}_variable)
- set(opt ${command_line_option_${arg}_variable)
+ set(arg ${command_line_option_${arg}_variable})
endif()
set_property(GLOBAL APPEND PROPERTY "INPUT_${arg}" "${val}")
set_property(GLOBAL APPEND PROPERTY CONFIG_INPUTS ${arg})
@@ -722,12 +716,18 @@ function(guess_compiler_from_mkspec)
set(mkspec ${CMAKE_MATCH_2})
set(c_compiler "")
set(cxx_compiler "")
- if(mkspec MATCHES "-clang(-|$)" AND NOT mkspec MATCHES "android")
+ if(mkspec MATCHES "-clang-msvc$")
+ set(c_compiler "clang-cl")
+ set(cxx_compiler "clang-cl")
+ elseif(mkspec MATCHES "-clang(-|$)" AND NOT mkspec MATCHES "android")
set(c_compiler "clang")
set(cxx_compiler "clang++")
elseif(mkspec MATCHES "-icc(-|$)")
set(c_compiler "icc")
set(cxx_compiler "icpc")
+ elseif(mkspec MATCHES "-msvc(-|$)")
+ set(c_compiler "cl")
+ set(cxx_compiler "cl")
endif()
if(guess_c_compiler AND NOT c_compiler STREQUAL "")
push("-DCMAKE_C_COMPILER=${c_compiler}")
@@ -789,16 +789,9 @@ translate_string_input(platform QT_QMAKE_TARGET_MKSPEC)
translate_string_input(xplatform QT_QMAKE_TARGET_MKSPEC)
guess_compiler_from_mkspec()
translate_string_input(qpa_default_platform QT_QPA_DEFAULT_PLATFORM)
-translate_list_input(sanitize ECM_ENABLE_SANITIZERS)
translate_path_input(android-sdk ANDROID_SDK_ROOT)
translate_path_input(android-ndk ANDROID_NDK_ROOT)
-if(DEFINED INPUT_android-ndk-host)
- drop_input(android-ndk-host)
- qtConfAddWarning("The -android-ndk-host option is not supported with the CMake build. "
- "Determining the right host platform is handled by the CMake toolchain file that is "
- "located in your NDK.")
-endif()
if(DEFINED INPUT_android-ndk-platform)
drop_input(android-ndk-platform)
string(REGEX REPLACE "^android-" "" INPUT_android-ndk-platform "${INPUT_android-ndk-platform}")
diff --git a/cmake/QtPublicDependencyHelpers.cmake b/cmake/QtPublicDependencyHelpers.cmake
new file mode 100644
index 0000000000..84c9e8be92
--- /dev/null
+++ b/cmake/QtPublicDependencyHelpers.cmake
@@ -0,0 +1,26 @@
+# Please note the target_dep_list accepts not the actual list values but the list names that
+# contain preformed dependencies. See foreach block for reference.
+# The same applies for find_dependency_path_list.
+macro(_qt_internal_find_dependencies target_dep_list find_dependency_path_list)
+ foreach(__qt_target_dep IN LISTS ${target_dep_list})
+ list(GET __qt_target_dep 0 __qt_pkg)
+ list(GET __qt_target_dep 1 __qt_version)
+
+ if (NOT ${__qt_pkg}_FOUND)
+ set(__qt_pkg_names ${__qt_pkg})
+ if(__qt_pkg MATCHES "(.*)Private$")
+ set(__qt_pkg_names "${CMAKE_MATCH_1};${__qt_pkg}")
+ endif()
+ find_dependency(${__qt_pkg} ${__qt_version}
+ NAMES
+ ${__qt_pkg_names}
+ PATHS
+ ${${find_dependency_path_list}}
+ ${_qt_additional_packages_prefix_path}
+ ${_qt_additional_packages_prefix_path_env}
+ ${QT_EXAMPLES_CMAKE_PREFIX_PATH}
+ ${__qt_use_no_default_path_for_qt_packages}
+ )
+ endif()
+ endforeach()
+endmacro()
diff --git a/cmake/QtPublicFinalizerHelpers.cmake b/cmake/QtPublicFinalizerHelpers.cmake
new file mode 100644
index 0000000000..1a4dcda902
--- /dev/null
+++ b/cmake/QtPublicFinalizerHelpers.cmake
@@ -0,0 +1,32 @@
+# Helper to check if the finalizer mode should be used.
+# If true, use finalizer mode.
+# If false, use regular mode (usage requirement propagation via associated Qt module)
+# Arguments:
+# DEFAULT_VALUE specifies the default value of the finalizer mode flag if it is not set.
+function(__qt_internal_check_finalizer_mode target out_var finalizer)
+ set(option_args "")
+ set(single_args DEFAULT_VALUE)
+ set(multi_args "")
+ cmake_parse_arguments(arg "${option_args}" "${single_args}" "${multi_args}" ${ARGN})
+
+ if(NOT DEFINED arg_DEFAULT_VALUE OR arg_DEFAULT_VALUE)
+ set(arg_DEFAULT_VALUE TRUE)
+ else()
+ set(arg_DEFAULT_VALUE FALSE)
+ endif()
+ get_target_property(value ${target} _qt_${finalizer}_finalizer_mode)
+ if("${value}" STREQUAL "value-NOTFOUND")
+ __qt_internal_enable_finalizer_mode(${target} ${finalizer} "${arg_DEFAULT_VALUE}")
+ set(value "${arg_DEFAULT_VALUE}")
+ endif()
+ set(${out_var} "${value}" PARENT_SCOPE)
+endfunction()
+
+function(__qt_internal_enable_finalizer_mode target finalizer enabled)
+ if(enabled)
+ set(enabled "TRUE")
+ else()
+ set(enabled "FALSE")
+ endif()
+ set_property(TARGET "${target}" PROPERTY _qt_${finalizer}_finalizer_mode "${enabled}")
+endfunction()
diff --git a/cmake/QtPublicFindPackageHelpers.cmake b/cmake/QtPublicFindPackageHelpers.cmake
new file mode 100644
index 0000000000..df42241c56
--- /dev/null
+++ b/cmake/QtPublicFindPackageHelpers.cmake
@@ -0,0 +1,3 @@
+function(qt_internal_disable_find_package_global_promotion target)
+ set_target_properties("${target}" PROPERTIES _qt_no_promote_global TRUE)
+endfunction()
diff --git a/cmake/QtPublicPluginHelpers.cmake b/cmake/QtPublicPluginHelpers.cmake
new file mode 100644
index 0000000000..a765157f5f
--- /dev/null
+++ b/cmake/QtPublicPluginHelpers.cmake
@@ -0,0 +1,418 @@
+# Gets the qt plugin type of the given plugin into out_var_plugin_type.
+# Also sets out_var_has_plugin_type to TRUE or FALSE depending on whether the plugin type was found.
+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()
+
+# Gets the qt plugin class name of the given target into out_var.
+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()
+
+# Constructs a generator expression which decides whether a plugin will be used.
+#
+# The conditions are based on the various properties set in qt_import_plugins.
+
+# All the TARGET_PROPERTY genexes are evaluated in the context of the currently linked target.
+#
+# The genex is saved into out_var.
+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>")
+
+ set(_plugin_is_default "$<TARGET_PROPERTY:${plugin_target},QT_DEFAULT_PLUGIN>")
+
+ # The code in here uses the properties defined in qt_import_plugins (Qt6CoreMacros.cmake)
+
+ # 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}>"
+ ">"
+ ">"
+ )
+
+ # No point in linking the plugin initialization source file into static libraries. The
+ # initialization symbol will be discarded by the linker when the static lib is linked into an
+ # executable or shared library, because nothing is referencing the global static symbol.
+ set(type_genex "$<TARGET_PROPERTY:TYPE>")
+ set(no_static_genex "$<NOT:$<STREQUAL:${type_genex},STATIC_LIBRARY>>")
+
+ # Complete condition that defines whether a static plugin is linked
+ string(CONCAT _plugin_condition
+ "$<BOOL:$<AND:"
+ "${_is_plugin_marker_genex},"
+ "${no_static_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()
+
+# Wraps the genex condition to evaluate to true only when using the regular plugin importing mode
+# (not finalizer mode).
+function(__qt_internal_get_plugin_condition_regular_mode plugin_condition out_var)
+ set(not_finalizer_mode "$<NOT:$<BOOL:$<TARGET_PROPERTY:_qt_static_plugins_use_finalizer_mode>>>")
+ set(full_plugin_condition "$<AND:${plugin_condition},${not_finalizer_mode}>")
+ set(${out_var} "${full_plugin_condition}" PARENT_SCOPE)
+endfunction()
+
+# Link plugin via usage requirements of associated Qt module.
+function(__qt_internal_add_static_plugin_linkage plugin_target qt_module_target)
+ __qt_internal_get_static_plugin_condition_genex("${plugin_target}" plugin_condition)
+ __qt_internal_get_plugin_condition_regular_mode("${plugin_condition}" full_plugin_condition)
+
+ set(plugin_target "${QT_CMAKE_EXPORT_NAMESPACE}::${plugin_target}")
+
+ # If this condition i