summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.prev_configure.cmake1083
-rw-r--r--.prev_qt_cmdline.cmake128
-rw-r--r--CMakeLists.txt28
-rw-r--r--INSTALL9
-rwxr-xr-xbin/qt-cmake-standalone-test.in2
-rw-r--r--cmake/FindGSSAPI.cmake1
-rw-r--r--cmake/FindWrapAtomic.cmake6
-rw-r--r--cmake/FindWrapBrotli.cmake54
-rw-r--r--cmake/FindWrapOpenSSL.cmake2
-rw-r--r--cmake/FindWrapSystemMd4c.cmake24
-rw-r--r--cmake/FindWrapZLIB.cmake29
-rw-r--r--cmake/Qt3rdPartyLibraryHelpers.cmake211
-rw-r--r--cmake/QtAutoDetect.cmake43
-rw-r--r--cmake/QtBaseConfigureTests.cmake4
-rw-r--r--cmake/QtBaseGlobalTargets.cmake52
-rw-r--r--cmake/QtBuild.cmake43
-rw-r--r--cmake/QtBuildInternals/QtBuildInternalsConfig.cmake386
-rw-r--r--cmake/QtBuildInternals/QtStandaloneTestTemplateProject/CMakeLists.txt19
-rw-r--r--cmake/QtBuildInternals/QtStandaloneTestTemplateProject/Main.cmake18
-rw-r--r--cmake/QtBuildInternalsExtra.cmake.in24
-rw-r--r--cmake/QtCMakeVersionHelpers.cmake6
-rw-r--r--cmake/QtCompatibilityHelpers.cmake112
-rw-r--r--cmake/QtConfig.cmake.in19
-rw-r--r--cmake/QtConfigDependencies.cmake.in8
-rw-r--r--cmake/QtDocsHelpers.cmake41
-rw-r--r--cmake/QtExecutableHelpers.cmake54
-rw-r--r--cmake/QtFeature.cmake26
-rw-r--r--cmake/QtFindPackageHelpers.cmake63
-rw-r--r--cmake/QtFinishPrlFile.cmake9
-rw-r--r--cmake/QtFlagHandlingHelpers.cmake17
-rw-r--r--cmake/QtFrameworkHelpers.cmake64
-rw-r--r--cmake/QtGenerateLibHelpers.cmake6
-rw-r--r--cmake/QtGenerateLibPri.cmake1
-rw-r--r--cmake/QtInstallHelpers.cmake4
-rw-r--r--cmake/QtInternalTargets.cmake28
-rw-r--r--cmake/QtModuleConfig.cmake.in2
-rw-r--r--cmake/QtModuleDependencies.cmake.in30
-rw-r--r--cmake/QtModuleHelpers.cmake234
-rw-r--r--cmake/QtModuleToolsVersionlessTargets.cmake.in2
-rw-r--r--cmake/QtPlatformSupport.cmake1
-rw-r--r--cmake/QtPlatformTargetHelpers.cmake (renamed from cmake/QtPublicTargetsHelpers.cmake)3
-rw-r--r--cmake/QtPluginConfig.cmake.in2
-rw-r--r--cmake/QtPluginDependencies.cmake.in24
-rw-r--r--cmake/QtPluginHelpers.cmake87
-rw-r--r--cmake/QtPlugins.cmake.in134
-rw-r--r--cmake/QtPostProcessHelpers.cmake129
-rw-r--r--cmake/QtPriHelpers.cmake44
-rw-r--r--cmake/QtPrlHelpers.cmake253
-rw-r--r--cmake/QtProcessConfigureArgs.cmake103
-rw-r--r--cmake/QtPublicDependencyHelpers.cmake26
-rw-r--r--cmake/QtPublicFinalizerHelpers.cmake32
-rw-r--r--cmake/QtPublicFindPackageHelpers.cmake3
-rw-r--r--cmake/QtPublicPluginHelpers.cmake417
-rw-r--r--cmake/QtPublicTargetHelpers.cmake256
-rw-r--r--cmake/QtPublicWalkLibsHelpers.cmake293
-rw-r--r--cmake/QtResourceHelpers.cmake4
-rw-r--r--cmake/QtRpathHelpers.cmake7
-rw-r--r--cmake/QtScopeFinalizerHelpers.cmake3
-rw-r--r--cmake/QtSeparateDebugInfo.cmake3
-rw-r--r--cmake/QtSingleRepoTargetSetBuildHelpers.cmake11
-rw-r--r--cmake/QtSyncQtHelpers.cmake2
-rw-r--r--cmake/QtTargetHelpers.cmake160
-rw-r--r--cmake/QtTestHelpers.cmake34
-rw-r--r--cmake/QtToolHelpers.cmake46
-rw-r--r--cmake/QtToolchainHelpers.cmake17
-rw-r--r--cmake/QtWasmHelpers.cmake15
-rw-r--r--cmake/QtWrapperScriptHelpers.cmake32
-rw-r--r--cmake/ios/MacOSXBundleInfo.plist.in46
-rw-r--r--cmake/qt.toolchain.cmake.in5
-rw-r--r--coin/instructions/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.yaml2
-rw-r--r--coin/instructions/cmake_run_ctest_ignore_exit_code.yaml2
-rw-r--r--coin/instructions/coin_module_build_template_v2.yaml19
-rw-r--r--coin/instructions/coin_qtbase_build_template_v2.yaml15
-rw-r--r--coin/instructions/prepare_building_env.yaml33
-rw-r--r--conanfile.py460
-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.txt2
-rw-r--r--configure.cmake72
-rw-r--r--configure.json1684
-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--doc/src/images/fetchmore-example.pngbin19169 -> 19872 bytes
-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.xml76
-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.cpp25
-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/doc/src/fetchmore.qdoc17
-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/fetchmore/filelistmodel.cpp53
-rw-r--r--examples/widgets/itemviews/fetchmore/filelistmodel.h13
-rw-r--r--examples/widgets/itemviews/fetchmore/window.cpp48
-rw-r--r--examples/widgets/itemviews/fetchmore/window.h13
-rw-r--r--examples/widgets/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/gradients/gradients.cpp2
-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/use_lib.cmake13
-rw-r--r--examples/widgets/richtext/CMakeLists.txt8
-rw-r--r--examples/widgets/richtext/textedit/.prev_CMakeLists.txt2
-rw-r--r--examples/widgets/richtext/textedit/CMakeLists.txt2
-rw-r--r--examples/widgets/richtext/textedit/images/mac/textundercolor.pngbin0 -> 6916 bytes
-rw-r--r--examples/widgets/richtext/textedit/images/win/textundercolor.pngbin0 -> 6916 bytes
-rw-r--r--examples/widgets/richtext/textedit/textedit.cpp160
-rw-r--r--examples/widgets/richtext/textedit/textedit.h8
-rw-r--r--examples/widgets/richtext/textedit/textedit.qrc2
-rw-r--r--examples/widgets/scroller/CMakeLists.txt2
-rw-r--r--examples/widgets/tools/CMakeLists.txt24
-rw-r--r--examples/widgets/tools/echoplugin/CMakeLists.txt4
-rw-r--r--examples/widgets/tools/plugandpaint/CMakeLists.txt16
-rw-r--r--examples/widgets/tools/plugandpaint/app/CMakeLists.txt56
-rw-r--r--examples/widgets/tools/plugandpaint/app/app.pro6
-rw-r--r--examples/widgets/tools/plugandpaint/plugins/basictools/CMakeLists.txt26
-rw-r--r--examples/widgets/tools/plugandpaint/plugins/extrafilters/CMakeLists.txt27
-rw-r--r--examples/widgets/tools/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/stylesheet/mainwindow.cpp6
-rw-r--r--examples/xml/CMakeLists.txt10
-rw-r--r--libexec/qt-internal-configure-tests.bat.in9
-rwxr-xr-xlibexec/qt-internal-configure-tests.in6
-rw-r--r--mkspecs/features/mac/default_post.prf18
-rw-r--r--mkspecs/features/qt.prf2
-rw-r--r--mkspecs/features/qt_example_installs.prf10
-rw-r--r--mkspecs/features/wasm/wasm.prf24
-rw-r--r--mkspecs/features/wayland-scanner.prf2
-rw-r--r--mkspecs/macx-xcode/WorkspaceSettings.xcsettings2
-rw-r--r--mkspecs/wasm-emscripten/qmake.conf2
-rw-r--r--qmake/CMakeLists.txt1
-rw-r--r--qmake/cachekeys.h1
-rw-r--r--qmake/doc/src/qmake-manual.qdoc16
-rw-r--r--qmake/library/qmakeglobals.cpp7
-rw-r--r--qmake/option.cpp21
-rw-r--r--qmake/project.cpp5
-rw-r--r--qmake/qmakelibraryinfo.cpp12
-rw-r--r--src/3rdparty/blake2/qt_attribution.json4
-rw-r--r--src/3rdparty/blake2/src/blake2.h4
-rw-r--r--src/3rdparty/freetype/CMakeLists.txt2
-rw-r--r--src/3rdparty/libjpeg/COPYRIGHT.txt12
-rw-r--r--src/3rdparty/libjpeg/LICENSE2
-rw-r--r--src/3rdparty/libjpeg/ijg-license.txt34
-rwxr-xr-xsrc/3rdparty/libjpeg/import_from_libjpeg_tarball.sh2
-rw-r--r--src/3rdparty/libjpeg/qt_attribution.json21
-rw-r--r--src/3rdparty/libjpeg/src/ChangeLog.md205
-rw-r--r--src/3rdparty/libjpeg/src/README.ijg15
-rw-r--r--src/3rdparty/libjpeg/src/README.md2
-rw-r--r--src/3rdparty/libjpeg/src/change.log31
-rw-r--r--src/3rdparty/libjpeg/src/jccolext.c18
-rw-r--r--src/3rdparty/libjpeg/src/jccolor.c12
-rw-r--r--src/3rdparty/libjpeg/src/jcdctmgr.c37
-rw-r--r--src/3rdparty/libjpeg/src/jchuff.c385
-rw-r--r--src/3rdparty/libjpeg/src/jconfig.h (renamed from src/3rdparty/libjpeg/jconfig.h)4
-rw-r--r--src/3rdparty/libjpeg/src/jconfig.h.in5
-rw-r--r--src/3rdparty/libjpeg/src/jconfigint.h (renamed from src/3rdparty/libjpeg/jconfigint.h)2
-rw-r--r--src/3rdparty/libjpeg/src/jcphuff.c24
-rw-r--r--src/3rdparty/libjpeg/src/jcsample.c63
-rw-r--r--src/3rdparty/libjpeg/src/jdapistd.c10
-rw-r--r--src/3rdparty/libjpeg/src/jdarith.c15
-rw-r--r--src/3rdparty/libjpeg/src/jdcoefct.c290
-rw-r--r--src/3rdparty/libjpeg/src/jdcoefct.h3
-rw-r--r--src/3rdparty/libjpeg/src/jdcol565.c96
-rw-r--r--src/3rdparty/libjpeg/src/jdcolext.c8
-rw-r--r--src/3rdparty/libjpeg/src/jdcolor.c14
-rw-r--r--src/3rdparty/libjpeg/src/jdhuff.c60
-rw-r--r--src/3rdparty/libjpeg/src/jdhuff.h13
-rw-r--r--src/3rdparty/libjpeg/src/jdmarker.c67
-rw-r--r--src/3rdparty/libjpeg/src/jdmaster.c15
-rw-r--r--src/3rdparty/libjpeg/src/jdmrg565.c68
-rw-r--r--src/3rdparty/libjpeg/src/jdmrgext.c34
-rw-r--r--src/3rdparty/libjpeg/src/jdphuff.c48
-rw-r--r--src/3rdparty/libjpeg/src/jdsample.c38
-rw-r--r--src/3rdparty/libjpeg/src/jerror.h13
-rw-r--r--src/3rdparty/libjpeg/src/jidctint.c8
-rw-r--r--src/3rdparty/libjpeg/src/jmorecfg.h35
-rw-r--r--src/3rdparty/libjpeg/src/jpegint.h5
-rw-r--r--src/3rdparty/libjpeg/src/jquant1.c27
-rw-r--r--src/3rdparty/libjpeg/src/jquant2.c46
-rw-r--r--src/3rdparty/libjpeg/src/jsimd.h6
-rw-r--r--src/3rdparty/libjpeg/src/jsimd_none.c13
-rw-r--r--src/3rdparty/libjpeg/src/jversion.h12
-rw-r--r--src/3rdparty/libjpeg/zlib-license.txt15
-rw-r--r--src/3rdparty/libpng/CMakeLists.txt2
-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/3rdparty/zlib/qtpatches.diff4
-rw-r--r--src/3rdparty/zlib/src/gzguts.h2
-rw-r--r--src/android/jar/src/org/qtproject/qt/android/CursorHandle.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/QtActivityDelegate.java27
-rw-r--r--src/android/jar/src/org/qtproject/qt/android/QtInputConnection.java26
-rw-r--r--src/android/jar/src/org/qtproject/qt/android/QtNative.java23
-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/src/org/qtproject/qt/android/bindings/QtActivity.java10
-rw-r--r--src/android/java/src/org/qtproject/qt/android/bindings/QtApplication.java4
-rw-r--r--src/android/templates/build.gradle4
-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.txt35
-rw-r--r--src/corelib/Qt6AndroidMacros.cmake130
-rw-r--r--src/corelib/Qt6CTestMacros.cmake19
-rw-r--r--src/corelib/Qt6CoreConfigExtras.cmake.in1
-rw-r--r--src/corelib/Qt6CoreMacros.cmake677
-rw-r--r--src/corelib/animation/qabstractanimation.cpp72
-rw-r--r--src/corelib/animation/qabstractanimation.h19
-rw-r--r--src/corelib/animation/qabstractanimation_p.h27
-rw-r--r--src/corelib/animation/qpropertyanimation.cpp93
-rw-r--r--src/corelib/animation/qpropertyanimation.h8
-rw-r--r--src/corelib/animation/qpropertyanimation_p.h26
-rw-r--r--src/corelib/animation/qsequentialanimationgroup.cpp11
-rw-r--r--src/corelib/animation/qsequentialanimationgroup.h6
-rw-r--r--src/corelib/animation/qsequentialanimationgroup_p.h11
-rw-r--r--src/corelib/animation/qvariantanimation.cpp27
-rw-r--r--src/corelib/animation/qvariantanimation.h7
-rw-r--r--src/corelib/animation/qvariantanimation_p.h11
-rw-r--r--src/corelib/configure.cmake30
-rw-r--r--src/corelib/configure.json1065
-rw-r--r--src/corelib/doc/include/QtCoreDoc2
-rw-r--r--src/corelib/doc/include/jni.h64
-rw-r--r--src/corelib/doc/qtcore.qdocconf3
-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_qvariant.cpp14
-rw-r--r--src/corelib/doc/snippets/jni/src_qjniobject.cpp5
-rw-r--r--src/corelib/doc/snippets/permissions/permissions.cpp141
-rw-r--r--src/corelib/doc/snippets/resource-system/CMakeLists.txt23
-rw-r--r--src/corelib/doc/snippets/settings/settings.cpp10
-rw-r--r--src/corelib/doc/src/cmake-macros.qdoc89
-rw-r--r--src/corelib/doc/src/cmake-properties.qdoc95
-rw-r--r--src/corelib/doc/src/external-resources.qdoc10
-rw-r--r--src/corelib/doc/src/json.qdoc4
-rw-r--r--src/corelib/doc/src/objectmodel/bindableproperties.qdoc33
-rw-r--r--src/corelib/doc/src/objectmodel/properties.qdoc3
-rw-r--r--src/corelib/doc/src/qt6-changes.qdoc22
-rw-r--r--src/corelib/doc/src/resource-system.qdoc24
-rw-r--r--src/corelib/global/qcompilerdetection.h1
-rw-r--r--src/corelib/global/qconfig-bootstrapped.h6
-rw-r--r--src/corelib/global/qflags.h84
-rw-r--r--src/corelib/global/qfloat16.h16
-rw-r--r--src/corelib/global/qglobal.cpp258
-rw-r--r--src/corelib/global/qglobal.h111
-rw-r--r--src/corelib/global/qhooks.cpp2
-rw-r--r--src/corelib/global/qlibraryinfo.cpp4
-rw-r--r--src/corelib/global/qnamespace.h9
-rw-r--r--src/corelib/global/qnamespace.qdoc20
-rw-r--r--src/corelib/global/qnativeinterface.h141
-rw-r--r--src/corelib/global/qrandom.cpp75
-rw-r--r--src/corelib/global/qrandom.h4
-rw-r--r--src/corelib/global/qrandom_p.h3
-rw-r--r--src/corelib/global/qsimd.cpp144
-rw-r--r--src/corelib/global/qsimd_p.h57
-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.cpp75
-rw-r--r--src/corelib/io/qdiriterator.cpp6
-rw-r--r--src/corelib/io/qfile.cpp12
-rw-r--r--src/corelib/io/qfile_p.h4
-rw-r--r--src/corelib/io/qfiledevice.cpp4
-rw-r--r--src/corelib/io/qfileinfo.cpp42
-rw-r--r--src/corelib/io/qfileinfo.h5
-rw-r--r--src/corelib/io/qfilesystemengine.cpp13
-rw-r--r--src/corelib/io/qfilesystemengine_p.h3
-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.h36
-rw-r--r--src/corelib/io/qfilesystemwatcher_inotify.cpp2
-rw-r--r--src/corelib/io/qfilesystemwatcher_kqueue_p.h6
-rw-r--r--src/corelib/io/qfsfileengine.cpp9
-rw-r--r--src/corelib/io/qfsfileengine_unix.cpp2
-rw-r--r--src/corelib/io/qfsfileengine_win.cpp114
-rw-r--r--src/corelib/io/qiodevice.cpp18
-rw-r--r--src/corelib/io/qiodevice.h6
-rw-r--r--src/corelib/io/qiodevice_p.h7
-rw-r--r--src/corelib/io/qlockfile.cpp2
-rw-r--r--src/corelib/io/qlockfile_unix.cpp6
-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/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/qsavefile.cpp2
-rw-r--r--src/corelib/io/qsettings.cpp11
-rw-r--r--src/corelib/io/qsettings_win.cpp12
-rw-r--r--src/corelib/io/qstandardpaths_android.cpp4
-rw-r--r--src/corelib/io/qtemporaryfile.cpp2
-rw-r--r--src/corelib/io/qurl.cpp22
-rw-r--r--src/corelib/io/qurl.h24
-rw-r--r--src/corelib/io/qwindowspipereader.cpp94
-rw-r--r--src/corelib/io/qwindowspipereader_p.h7
-rw-r--r--src/corelib/io/qwindowspipewriter.cpp133
-rw-r--r--src/corelib/io/qwindowspipewriter_p.h11
-rw-r--r--src/corelib/itemmodels/qabstractitemmodel.cpp6
-rw-r--r--src/corelib/itemmodels/qabstractitemmodel.h3
-rw-r--r--src/corelib/itemmodels/qabstractproxymodel.cpp38
-rw-r--r--src/corelib/itemmodels/qabstractproxymodel.h5
-rw-r--r--src/corelib/itemmodels/qabstractproxymodel_p.h80
-rw-r--r--src/corelib/itemmodels/qidentityproxymodel.cpp39
-rw-r--r--src/corelib/itemmodels/qidentityproxymodel_p.h98
-rw-r--r--src/corelib/itemmodels/qitemselectionmodel.cpp136
-rw-r--r--src/corelib/itemmodels/qitemselectionmodel.h4
-rw-r--r--src/corelib/itemmodels/qitemselectionmodel_p.h12
-rw-r--r--src/corelib/itemmodels/qsortfilterproxymodel.cpp427
-rw-r--r--src/corelib/itemmodels/qsortfilterproxymodel.h43
-rw-r--r--src/corelib/itemmodels/qtransposeproxymodel.cpp5
-rw-r--r--src/corelib/kernel/qassociativeiterable.h2
-rw-r--r--src/corelib/kernel/qcore_mac.mm10
-rw-r--r--src/corelib/kernel/qcore_mac_p.h14
-rw-r--r--src/corelib/kernel/qcoreapplication.cpp264
-rw-r--r--src/corelib/kernel/qcoreapplication.h18
-rw-r--r--src/corelib/kernel/qcoreapplication_android.cpp319
-rw-r--r--src/corelib/kernel/qcoreapplication_p.h15
-rw-r--r--src/corelib/kernel/qcoreapplication_platform.h27
-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.h2
-rw-r--r--src/corelib/kernel/qiterable_p.h2
-rw-r--r--src/corelib/kernel/qjnienvironment.cpp203
-rw-r--r--src/corelib/kernel/qjnienvironment.h22
-rw-r--r--src/corelib/kernel/qjnihelpers.cpp112
-rw-r--r--src/corelib/kernel/qjnihelpers_p.h48
-rw-r--r--src/corelib/kernel/qjniobject.cpp837
-rw-r--r--src/corelib/kernel/qjniobject.h707
-rw-r--r--src/corelib/kernel/qjnionload.cpp79
-rw-r--r--src/corelib/kernel/qmath.qdoc8
-rw-r--r--src/corelib/kernel/qmetacontainer.cpp8
-rw-r--r--src/corelib/kernel/qmetaobject.cpp17
-rw-r--r--src/corelib/kernel/qmetaobject.h1
-rw-r--r--src/corelib/kernel/qmetaobject_p.h5
-rw-r--r--src/corelib/kernel/qmetaobjectbuilder.cpp32
-rw-r--r--src/corelib/kernel/qmetaobjectbuilder_p.h3
-rw-r--r--src/corelib/kernel/qmetatype.cpp12
-rw-r--r--src/corelib/kernel/qmetatype.h46
-rw-r--r--src/corelib/kernel/qobject.cpp172
-rw-r--r--src/corelib/kernel/qobject.h4
-rw-r--r--src/corelib/kernel/qobject_p.h62
-rw-r--r--src/corelib/kernel/qpermission.h78
-rw-r--r--src/corelib/kernel/qpermission.qdoc102
-rw-r--r--src/corelib/kernel/qproperty.cpp290
-rw-r--r--src/corelib/kernel/qproperty.h200
-rw-r--r--src/corelib/kernel/qproperty_p.h72
-rw-r--r--src/corelib/kernel/qpropertyprivate.h6
-rw-r--r--src/corelib/kernel/qsequentialiterable.h2
-rw-r--r--src/corelib/kernel/qsharedmemory.cpp63
-rw-r--r--src/corelib/kernel/qsharedmemory_p.h10
-rw-r--r--src/corelib/kernel/qsharedmemory_posix.cpp2
-rw-r--r--src/corelib/kernel/qsharedmemory_systemv.cpp2
-rw-r--r--src/corelib/kernel/qsocketnotifier.cpp2
-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/qvariant.cpp139
-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.cpp1037
-rw-r--r--src/corelib/platform/android/qandroidextras_p.h262
-rw-r--r--src/corelib/platform/android/qandroidnativeinterface.cpp177
-rw-r--r--src/corelib/plugin/qlibrary.cpp4
-rw-r--r--src/corelib/plugin/qlibrary_unix.cpp2
-rw-r--r--src/corelib/serialization/qcborstreamreader.cpp8
-rw-r--r--src/corelib/serialization/qtextstream.cpp52
-rw-r--r--src/corelib/serialization/qxmlstream.g2
-rw-r--r--src/corelib/serialization/qxmlstreamparser_p.h2
-rw-r--r--src/corelib/text/qbytearray.cpp33
-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.cpp63
-rw-r--r--src/corelib/text/qchar.h2
-rw-r--r--src/corelib/text/qlocale.cpp55
-rw-r--r--src/corelib/text/qlocale.qdoc6
-rw-r--r--src/corelib/text/qlocale_data_p.h888
-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.cpp6
-rw-r--r--src/corelib/text/qstring.cpp229
-rw-r--r--src/corelib/text/qstring.h13
-rw-r--r--src/corelib/text/qstringalgorithms.h2
-rw-r--r--src/corelib/text/qstringview.cpp6
-rw-r--r--src/corelib/text/qt_attribution.json2
-rw-r--r--src/corelib/text/qtliterals.qdoc33
-rw-r--r--src/corelib/text/qunicodetools.cpp6
-rw-r--r--src/corelib/text/qutf8stringview.h1
-rw-r--r--src/corelib/text/qutf8stringview.qdoc40
-rw-r--r--src/corelib/thread/qexception.cpp6
-rw-r--r--src/corelib/thread/qexception.h2
-rw-r--r--src/corelib/thread/qfuture.h11
-rw-r--r--src/corelib/thread/qfuture.qdoc11
-rw-r--r--src/corelib/thread/qfuture_impl.h12
-rw-r--r--src/corelib/thread/qfutureinterface.cpp172
-rw-r--r--src/corelib/thread/qfutureinterface.h73
-rw-r--r--src/corelib/thread/qfutureinterface_p.h38
-rw-r--r--src/corelib/thread/qfuturewatcher.cpp10
-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.cpp46
-rw-r--r--src/corelib/thread/qthread.h3
-rw-r--r--src/corelib/thread/qthread_unix.cpp6
-rw-r--r--src/corelib/thread/qthreadpool.cpp17
-rw-r--r--src/corelib/thread/qthreadpool_p.h5
-rw-r--r--src/corelib/time/qdatetime.cpp898
-rw-r--r--src/corelib/time/qdatetime.h8
-rw-r--r--src/corelib/time/qdatetime_p.h21
-rw-r--r--src/corelib/time/qdatetimeparser.cpp49
-rw-r--r--src/corelib/time/qdatetimeparser_p.h11
-rw-r--r--src/corelib/time/qgregoriancalendar.cpp9
-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/qjalalicalendar_data_p.h6
-rw-r--r--src/corelib/time/qtimezone.cpp11
-rw-r--r--src/corelib/time/qtimezoneprivate.cpp73
-rw-r--r--src/corelib/time/qtimezoneprivate_android.cpp18
-rw-r--r--src/corelib/time/qtimezoneprivate_data_p.h1251
-rw-r--r--src/corelib/time/qtimezoneprivate_p.h1
-rw-r--r--src/corelib/time/qtimezoneprivate_tz.cpp206
-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.h291
-rw-r--r--src/corelib/tools/qarraydatapointer.h137
-rw-r--r--src/corelib/tools/qcontainertools_impl.h124
-rw-r--r--src/corelib/tools/qduplicatetracker_p.h5
-rw-r--r--src/corelib/tools/qhash.cpp199
-rw-r--r--src/corelib/tools/qhash.h7
-rw-r--r--src/corelib/tools/qhashfunctions.h38
-rw-r--r--src/corelib/tools/qline.cpp2
-rw-r--r--src/corelib/tools/qlist.h21
-rw-r--r--src/corelib/tools/qlist.qdoc11
-rw-r--r--src/corelib/tools/qmultimap.qdoc10
-rw-r--r--src/corelib/tools/qoffsetstringarray_p.h1
-rw-r--r--src/corelib/tools/qpair.qdoc2
-rw-r--r--src/corelib/tools/qscopedpointer.cpp9
-rw-r--r--src/corelib/tools/qsharedpointer.cpp6
-rw-r--r--src/corelib/tools/qsharedpointer_impl.h18
-rw-r--r--src/corelib/tools/qtimeline.cpp140
-rw-r--r--src/corelib/tools/qtimeline.h20
-rw-r--r--src/dbus/qdbusmetaobject.cpp3
-rw-r--r--src/dbus/qdbusservicewatcher.cpp81
-rw-r--r--src/dbus/qdbusservicewatcher.h7
-rw-r--r--src/entrypoint/CMakeLists.txt32
-rw-r--r--src/gui/.prev_configure.cmake1225
-rw-r--r--src/gui/CMakeLists.txt27
-rw-r--r--src/gui/accessible/qaccessible.cpp39
-rw-r--r--src/gui/accessible/qaccessible.h27
-rw-r--r--src/gui/configure.cmake13
-rw-r--r--src/gui/configure.json1841
-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/image/qbitmap.cpp4
-rw-r--r--src/gui/image/qicon.cpp8
-rw-r--r--src/gui/image/qimage.cpp342
-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/qimageiohandler.h3
-rw-r--r--src/gui/image/qimagereader.cpp4
-rw-r--r--src/gui/image/qpixmap.cpp5
-rw-r--r--src/gui/image/qpnghandler.cpp4
-rw-r--r--src/gui/itemmodels/qfilesystemmodel.cpp7
-rw-r--r--src/gui/itemmodels/qstandarditemmodel.cpp29
-rw-r--r--src/gui/kernel/qaction.cpp19
-rw-r--r--src/gui/kernel/qcursor.cpp4
-rw-r--r--src/gui/kernel/qevent.cpp83
-rw-r--r--src/gui/kernel/qevent.h13
-rw-r--r--src/gui/kernel/qeventpoint.cpp8
-rw-r--r--src/gui/kernel/qguiapplication.cpp58
-rw-r--r--src/gui/kernel/qguiapplication.h2
-rw-r--r--src/gui/kernel/qguiapplication_p.h11
-rw-r--r--src/gui/kernel/qhighdpiscaling.cpp92
-rw-r--r--src/gui/kernel/qhighdpiscaling_p.h10
-rw-r--r--src/gui/kernel/qkeymapper.cpp13
-rw-r--r--src/gui/kernel/qkeymapper_p.h3
-rw-r--r--src/gui/kernel/qoffscreensurface.cpp17
-rw-r--r--src/gui/kernel/qoffscreensurface.h1
-rw-r--r--src/gui/kernel/qoffscreensurface_platform.h3
-rw-r--r--src/gui/kernel/qopenglcontext.cpp29
-rw-r--r--src/gui/kernel/qopenglcontext.h2
-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/qpointingdevice.cpp23
-rw-r--r--src/gui/kernel/qpointingdevice_p.h3
-rw-r--r--src/gui/kernel/qscreen.cpp25
-rw-r--r--src/gui/kernel/qscreen.h3
-rw-r--r--src/gui/kernel/qwindow.cpp60
-rw-r--r--src/gui/kernel/qwindow.h7
-rw-r--r--src/gui/kernel/qwindowsysteminterface.cpp24
-rw-r--r--src/gui/kernel/qwindowsysteminterface.h10
-rw-r--r--src/gui/kernel/qwindowsysteminterface_p.h7
-rw-r--r--src/gui/math3d/qmatrix4x4.cpp8
-rw-r--r--src/gui/math3d/qquaternion.cpp6
-rw-r--r--src/gui/painting/qbezier.cpp12
-rw-r--r--src/gui/painting/qcolorspace.cpp11
-rw-r--r--src/gui/painting/qcolorspace_p.h1
-rw-r--r--src/gui/painting/qcolortransform.cpp445
-rw-r--r--src/gui/painting/qcolortransform.h1
-rw-r--r--src/gui/painting/qcolortransform_p.h9
-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.cpp225
-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.cpp6
-rw-r--r--src/gui/painting/qpainter.h28
-rw-r--r--src/gui/painting/qpen.cpp4
-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/qrgbaf.h135
-rw-r--r--src/gui/painting/qrgbaf.qdoc248
-rw-r--r--src/gui/platform/android/qandroidnativeinterface.cpp2
-rw-r--r--src/gui/platform/macos/qcocoanativeinterface.mm9
-rw-r--r--src/gui/platform/unix/dbusmenu/qdbusmenuconnection.cpp17
-rw-r--r--src/gui/platform/unix/dbusmenu/qdbusmenuconnection_p.h2
-rw-r--r--src/gui/platform/unix/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.cpp284
-rw-r--r--src/gui/rhi/qrhigles2_p_p.h24
-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/coretext/qfontengine_coretext.mm4
-rw-r--r--src/gui/text/freetype/qfontengine_ft.cpp3
-rw-r--r--src/gui/text/qcssparser.cpp1
-rw-r--r--src/gui/text/qcssparser_p.h1
-rw-r--r--src/gui/text/qfont.cpp30
-rw-r--r--src/gui/text/qfont.h3
-rw-r--r--src/gui/text/qfontdatabase.cpp20
-rw-r--r--src/gui/text/qrawfont.cpp14
-rw-r--r--src/gui/text/qtextdocument.cpp63
-rw-r--r--src/gui/text/qtextdocument_p.h1
-rw-r--r--src/gui/text/qtextdocumentfragment.cpp3
-rw-r--r--src/gui/text/qtextdocumentlayout.cpp12
-rw-r--r--src/gui/text/qtextengine.cpp33
-rw-r--r--src/gui/text/qtextformat.cpp13
-rw-r--r--src/gui/text/qtexthtmlparser.cpp100
-rw-r--r--src/gui/text/qtexthtmlparser_p.h3
-rw-r--r--src/gui/text/qtextlayout.cpp24
-rw-r--r--src/gui/text/qtextlayout.h12
-rw-r--r--src/gui/text/qtextmarkdownimporter.cpp4
-rw-r--r--src/gui/text/windows/qwindowsfontdatabase.cpp10
-rw-r--r--src/gui/text/windows/qwindowsfontdatabase_ft.cpp6
-rw-r--r--src/gui/text/windows/qwindowsfontenginedirectwrite.cpp3
-rw-r--r--src/gui/util/qedidparser.cpp83
-rw-r--r--src/gui/util/qedidparser_p.h9
-rw-r--r--src/gui/util/qedidvendortable_p.h312
-rw-r--r--src/gui/util/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.cmake414
-rw-r--r--src/network/CMakeLists.txt75
-rw-r--r--src/network/access/http2/http2protocol_p.h3
-rw-r--r--src/network/access/qdecompresshelper.cpp28
-rw-r--r--src/network/access/qdecompresshelper_p.h2
-rw-r--r--src/network/access/qhttp2protocolhandler.cpp135
-rw-r--r--src/network/access/qhttpnetworkconnection.cpp129
-rw-r--r--src/network/access/qhttpnetworkconnectionchannel.cpp22
-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.h3
-rw-r--r--src/network/access/qhttpnetworkrequest.cpp16
-rw-r--r--src/network/access/qhttpnetworkrequest_p.h4
-rw-r--r--src/network/access/qhttpprotocolhandler.cpp5
-rw-r--r--src/network/access/qhttpthreaddelegate.cpp5
-rw-r--r--src/network/access/qhttpthreaddelegate_p.h4
-rw-r--r--src/network/access/qnetworkaccessmanager.cpp7
-rw-r--r--src/network/access/qnetworkreplyhttpimpl.cpp181
-rw-r--r--src/network/access/qnetworkreplyhttpimpl_p.h9
-rw-r--r--src/network/access/qnetworkreplywasmimpl.cpp84
-rw-r--r--src/network/access/qnetworkreplywasmimpl_p.h2
-rw-r--r--src/network/access/qnetworkrequest.cpp46
-rw-r--r--src/network/access/qnetworkrequest.h4
-rw-r--r--src/network/configure.cmake29
-rw-r--r--src/network/configure.json469
-rw-r--r--src/network/doc/src/qt6-changes.qdoc2
-rw-r--r--src/network/kernel/qauthenticator.cpp20
-rw-r--r--src/network/kernel/qauthenticator_p.h2
-rw-r--r--src/network/kernel/qnetworkinformation.cpp21
-rw-r--r--src/network/kernel/qnetworkinformation.h5
-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/qnetworkinterface_unix.cpp10
-rw-r--r--src/network/kernel/qnetworkproxy_android.cpp2
-rw-r--r--src/network/kernel/qt_attribution.json2
-rw-r--r--src/network/kernel/qurltlds_p.h28726
-rw-r--r--src/network/socket/qabstractsocket.cpp51
-rw-r--r--src/network/socket/qhttpsocketengine.cpp2
-rw-r--r--src/network/socket/qlocalsocket.h8
-rw-r--r--src/network/socket/qlocalsocket_p.h2
-rw-r--r--src/network/socket/qlocalsocket_win.cpp167
-rw-r--r--src/network/socket/qnativesocketengine_unix.cpp53
-rw-r--r--src/network/socket/qnativesocketengine_win.cpp79
-rw-r--r--src/network/ssl/qopenssl.cpp71
-rw-r--r--src/network/ssl/qssl.cpp7
-rw-r--r--src/network/ssl/qssl.h3
-rw-r--r--src/network/ssl/qsslcertificate.cpp3
-rw-r--r--src/network/ssl/qsslkey_p.cpp4
-rw-r--r--src/network/ssl/qsslkey_p.h4
-rw-r--r--src/network/ssl/qsslsocket.cpp2
-rw-r--r--src/network/ssl/qsslsocket_p.h5
-rw-r--r--src/network/ssl/qtlsbackend.cpp1787
-rw-r--r--src/network/ssl/qtlsbackend_p.h49
-rw-r--r--src/opengl/qopenglframebufferobject.cpp44
-rw-r--r--src/opengl/qopenglpaintengine.cpp12
-rw-r--r--src/opengl/qopengltextureuploader.cpp39
-rw-r--r--src/opengl/qplatformbackingstoreopenglsupport.cpp3
-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.txt3
-rw-r--r--src/plugins/imageformats/jpeg/CMakeLists.txt8
-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)6
-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)6
-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/platforms/android/androidcontentfileengine.cpp4
-rw-r--r--src/plugins/platforms/android/androidjniclipboard.cpp2
-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/androidjnimain.cpp5
-rw-r--r--src/plugins/platforms/android/androidjnimain.h1
-rw-r--r--src/plugins/platforms/android/qandroidassetsfileenginehandler.cpp2
-rw-r--r--src/plugins/platforms/android/qandroidinputcontext.cpp88
-rw-r--r--src/plugins/platforms/android/qandroidinputcontext.h2
-rw-r--r--src/plugins/platforms/android/qandroidplatformfiledialoghelper.cpp17
-rw-r--r--src/plugins/platforms/android/qandroidplatformintegration.cpp5
-rw-r--r--src/plugins/platforms/android/qandroidplatformvulkanwindow.cpp2
-rw-r--r--src/plugins/platforms/cocoa/qcocoaglcontext.mm8
-rw-r--r--src/plugins/platforms/cocoa/qcocoahelpers.h1
-rw-r--r--src/plugins/platforms/cocoa/qcocoahelpers.mm1
-rw-r--r--src/plugins/platforms/cocoa/qcocoamenu.mm10
-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.mm4
-rw-r--r--src/plugins/platforms/cocoa/qcocoatheme.mm5
-rw-r--r--src/plugins/platforms/cocoa/qcocoawindow.mm14
-rw-r--r--src/plugins/platforms/cocoa/qmacclipboard.mm81
-rw-r--r--src/plugins/platforms/cocoa/qnsview.mm2
-rw-r--r--src/plugins/platforms/cocoa/qnsview_dragging.mm4
-rw-r--r--src/plugins/platforms/cocoa/qnsview_gestures.mm2
-rw-r--r--src/plugins/platforms/cocoa/qnsview_keys.mm11
-rw-r--r--src/plugins/platforms/cocoa/qnsview_mouse.mm23
-rw-r--r--src/plugins/platforms/direct2d/CMakeLists.txt109
-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_kms/CMakeLists.txt4
-rw-r--r--src/plugins/platforms/eglfs/deviceintegration/eglfs_kms_support/CMakeLists.txt6
-rw-r--r--src/plugins/platforms/eglfs/deviceintegration/eglfs_openwfd/CMakeLists.txt24
-rw-r--r--src/plugins/platforms/ios/qiosscreen.h2
-rw-r--r--src/plugins/platforms/ios/qiosscreen.mm2
-rw-r--r--src/plugins/platforms/ios/qiostextresponder.mm15
-rw-r--r--src/plugins/platforms/ios/qiosviewcontroller.mm4
-rw-r--r--src/plugins/platforms/ios/quiaccessibilityelement.mm13
-rw-r--r--src/plugins/platforms/offscreen/qoffscreenintegration_x11.cpp7
-rw-r--r--src/plugins/platforms/offscreen/qoffscreenintegration_x11.h6
-rw-r--r--src/plugins/platforms/qnx/qqnxscreeneventhandler.cpp4
-rw-r--r--src/plugins/platforms/vnc/qvnc.cpp7
-rw-r--r--src/plugins/platforms/vnc/qvncclient.cpp2
-rw-r--r--src/plugins/platforms/wasm/qwasmcompositor.cpp10
-rw-r--r--src/plugins/platforms/wasm/qwasmeventtranslator.cpp164
-rw-r--r--src/plugins/platforms/wasm/qwasmeventtranslator.h4
-rw-r--r--src/plugins/platforms/wasm/qwasmscreen.cpp5
-rw-r--r--src/plugins/platforms/wasm/qwasmwindow.cpp16
-rw-r--r--src/plugins/platforms/wasm/qwasmwindow.h1
-rw-r--r--src/plugins/platforms/windows/qwindowscontext.cpp8
-rw-r--r--src/plugins/platforms/windows/qwindowsglcontext.cpp7
-rw-r--r--src/plugins/platforms/windows/qwindowsscreen.cpp1
-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/gl_integrations/xcb_glx/qxcbglxintegration.cpp4
-rw-r--r--src/plugins/platforms/xcb/qxcbconnection.cpp69
-rw-r--r--src/plugins/platforms/xcb/qxcbconnection.h14
-rw-r--r--src/plugins/platforms/xcb/qxcbconnection_screens.cpp1
-rw-r--r--src/plugins/platforms/xcb/qxcbconnection_xi2.cpp62
-rw-r--r--src/plugins/platforms/xcb/qxcbcursor.cpp3
-rw-r--r--src/plugins/platforms/xcb/qxcbintegration.cpp2
-rw-r--r--src/plugins/platforms/xcb/qxcbintegration.h4
-rw-r--r--src/plugins/platforms/xcb/qxcbkeyboard.cpp6
-rw-r--r--src/plugins/platforms/xcb/qxcbscreen.cpp23
-rw-r--r--src/plugins/platforms/xcb/qxcbscreen.h2
-rw-r--r--src/plugins/platforms/xcb/qxcbsessionmanager.cpp2
-rw-r--r--src/plugins/platforms/xcb/qxcbwindow.cpp18
-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/odbc/qsql_odbc.cpp4
-rw-r--r--src/plugins/sqldrivers/sqlite/qsql_sqlite.cpp37
-rw-r--r--src/plugins/styles/mac/qmacstyle_mac.mm40
-rw-r--r--src/plugins/tls/CMakeLists.txt13
-rw-r--r--src/plugins/tls/certonly/CMakeLists.txt17
-rw-r--r--src/plugins/tls/certonly/qtlsbackend_cert.cpp (renamed from src/network/ssl/qtlsbackend_cert.cpp)8
-rw-r--r--src/plugins/tls/certonly/qtlsbackend_cert_p.h (renamed from src/network/ssl/qtlsbackend_cert_p.h)12
-rw-r--r--src/plugins/tls/openssl/CMakeLists.txt51
-rw-r--r--src/plugins/tls/openssl/qdtls_openssl.cpp (renamed from src/network/ssl/qdtls_openssl.cpp)43
-rw-r--r--src/plugins/tls/openssl/qdtls_openssl_p.h (renamed from src/network/ssl/qdtls_openssl_p.h)19
-rw-r--r--src/plugins/tls/openssl/qopenssl_p.h (renamed from src/network/ssl/qopenssl_p.h)5
-rw-r--r--src/plugins/tls/openssl/qsslcontext_openssl.cpp (renamed from src/network/ssl/qsslcontext_openssl.cpp)41
-rw-r--r--src/plugins/tls/openssl/qsslcontext_openssl_p.h (renamed from src/network/ssl/qsslcontext_openssl_p.h)2
-rw-r--r--src/plugins/tls/openssl/qssldiffiehellmanparameters_openssl.cpp (renamed from src/network/ssl/qssldiffiehellmanparameters_openssl.cpp)3
-rw-r--r--src/plugins/tls/openssl/qsslsocket_openssl_android.cpp (renamed from src/network/ssl/qsslsocket_openssl_android.cpp)3
-rw-r--r--src/plugins/tls/openssl/qsslsocket_openssl_symbols.cpp (renamed from src/network/ssl/qsslsocket_openssl_symbols.cpp)31
-rw-r--r--src/plugins/tls/openssl/qsslsocket_openssl_symbols_p.h (renamed from src/network/ssl/qsslsocket_openssl_symbols_p.h)76
-rw-r--r--src/plugins/tls/openssl/qtls_openssl.cpp (renamed from src/network/ssl/qtls_openssl.cpp)98
-rw-r--r--src/plugins/tls/openssl/qtls_openssl_p.h (renamed from src/network/ssl/qtls_openssl_p.h)7
-rw-r--r--src/plugins/tls/openssl/qtlsbackend_openssl.cpp (renamed from src/network/ssl/qtlsbackend_openssl.cpp)30
-rw-r--r--src/plugins/tls/openssl/qtlsbackend_openssl_p.h (renamed from src/network/ssl/qtlsbackend_openssl_p.h)15
-rw-r--r--src/plugins/tls/openssl/qtlskey_openssl.cpp (renamed from src/network/ssl/qtlskey_openssl.cpp)8
-rw-r--r--src/plugins/tls/openssl/qtlskey_openssl_p.h (renamed from src/network/ssl/qtlskey_openssl_p.h)9
-rw-r--r--src/plugins/tls/openssl/qwindowscarootfetcher.cpp (renamed from src/network/ssl/qwindowscarootfetcher.cpp)19
-rw-r--r--src/plugins/tls/openssl/qwindowscarootfetcher_p.h (renamed from src/network/ssl/qwindowscarootfetcher_p.h)8
-rw-r--r--src/plugins/tls/openssl/qx509_openssl.cpp (renamed from src/network/ssl/qx509_openssl.cpp)34
-rw-r--r--src/plugins/tls/openssl/qx509_openssl_p.h (renamed from src/network/ssl/qx509_openssl_p.h)17
-rw-r--r--src/plugins/tls/schannel/CMakeLists.txt30
-rw-r--r--src/plugins/tls/schannel/qtls_schannel.cpp (renamed from src/network/ssl/qtls_schannel.cpp)165
-rw-r--r--src/plugins/tls/schannel/qtls_schannel_p.h (renamed from src/network/ssl/qtls_schannel_p.h)7
-rw-r--r--src/plugins/tls/schannel/qtlsbackend_schannel_p.h (renamed from src/network/ssl/qtlsbackend_schannel_p.h)6
-rw-r--r--src/plugins/tls/schannel/qtlskey_schannel.cpp (renamed from src/network/ssl/qtlskey_schannel.cpp)16
-rw-r--r--src/plugins/tls/schannel/qtlskey_schannel_p.h (renamed from src/network/ssl/qtlskey_schannel_p.h)4
-rw-r--r--src/plugins/tls/schannel/qx509_schannel.cpp (renamed from src/network/ssl/qx509_schannel.cpp)3
-rw-r--r--src/plugins/tls/schannel/qx509_schannel_p.h (renamed from src/network/ssl/qx509_schannel_p.h)8
-rw-r--r--src/plugins/tls/securetransport/CMakeLists.txt33
-rw-r--r--src/plugins/tls/securetransport/qtls_st.cpp (renamed from src/network/ssl/qtls_st.cpp)83
-rw-r--r--src/plugins/tls/securetransport/qtls_st_p.h (renamed from src/network/ssl/qtls_st_p.h)4
-rw-r--r--src/plugins/tls/securetransport/qtlsbackend_st.cpp (renamed from src/network/ssl/qtlsbackend_st.cpp)0
-rw-r--r--src/plugins/tls/securetransport/qtlsbackend_st_p.h (renamed from src/network/ssl/qtlsbackend_st_p.h)8
-rw-r--r--src/plugins/tls/securetransport/qtlskey_st.cpp (renamed from src/network/ssl/qtlskey_st.cpp)5
-rw-r--r--src/plugins/tls/securetransport/qtlskey_st_p.h (renamed from src/network/ssl/qtlskey_st_p.h)4
-rw-r--r--src/plugins/tls/securetransport/qx509_st.cpp (renamed from src/network/ssl/qx509_st.cpp)0
-rw-r--r--src/plugins/tls/securetransport/qx509_st_p.h (renamed from src/network/ssl/qx509_st_p.h)4
-rw-r--r--src/plugins/tls/shared/qasn1element.cpp (renamed from src/network/ssl/qasn1element.cpp)0
-rw-r--r--src/plugins/tls/shared/qasn1element_p.h (renamed from src/network/ssl/qasn1element_p.h)2
-rw-r--r--src/plugins/tls/shared/qdtls_base.cpp (renamed from src/network/ssl/qdtls_base.cpp)0
-rw-r--r--src/plugins/tls/shared/qdtls_base_p.h (renamed from src/network/ssl/qdtls_base_p.h)13
-rw-r--r--src/plugins/tls/shared/qsslsocket_mac_shared.cpp (renamed from src/network/ssl/qsslsocket_mac_shared.cpp)16
-rw-r--r--src/plugins/tls/shared/qsslsocket_qt.cpp (renamed from src/network/ssl/qsslsocket_qt.cpp)8
-rw-r--r--src/plugins/tls/shared/qtlskey_base.cpp (renamed from src/network/ssl/qtlskey_base.cpp)0
-rw-r--r--src/plugins/tls/shared/qtlskey_base_p.h (renamed from src/network/ssl/qtlskey_base_p.h)12
-rw-r--r--src/plugins/tls/shared/qtlskey_generic.cpp (renamed from src/network/ssl/qtlskey_generic.cpp)3
-rw-r--r--src/plugins/tls/shared/qtlskey_generic_p.h (renamed from src/network/ssl/qtlskey_generic_p.h)8
-rw-r--r--src/plugins/tls/shared/qwincrypt_p.h (renamed from src/network/ssl/qwincrypt_p.h)0
-rw-r--r--src/plugins/tls/shared/qx509_base.cpp (renamed from src/network/ssl/qx509_base.cpp)0
-rw-r--r--src/plugins/tls/shared/qx509_base_p.h (renamed from src/network/ssl/qx509_base_p.h)6
-rw-r--r--src/plugins/tls/shared/qx509_generic.cpp (renamed from src/network/ssl/qx509_generic.cpp)13
-rw-r--r--src/plugins/tls/shared/qx509_generic_p.h (renamed from src/network/ssl/qx509_generic_p.h)8
-rw-r--r--src/printsupport/CMakeLists.txt65
-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_mac.mm2
-rw-r--r--src/printsupport/dialogs/qprintdialog_unix.cpp10
-rw-r--r--src/printsupport/dialogs/qprintdialog_win.cpp6
-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/platform/macos/qprintengine_mac.mm8
-rw-r--r--src/sql/configure.json22
-rw-r--r--src/sql/kernel/qsqlfield.cpp6
-rw-r--r--src/sql/kernel/qsqlquery.cpp4
-rw-r--r--src/sql/models/qsqlquerymodel.cpp2
-rw-r--r--src/sql/models/qsqltablemodel.cpp3
-rw-r--r--src/testlib/configure.json34
-rw-r--r--src/testlib/doc/snippets/code/src_qtestlib_qtestcase.cpp8
-rw-r--r--src/testlib/qabstractitemmodeltester.cpp6
-rw-r--r--src/testlib/qabstracttestlogger_p.h2
-rw-r--r--src/testlib/qpropertytesthelper_p.h146
-rw-r--r--src/testlib/qtestaccessible.h11
-rw-r--r--src/testlib/qtestcase.cpp62
-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/tools/androiddeployqt/main.cpp178
-rw-r--r--src/tools/androidtestrunner/main.cpp69
-rw-r--r--src/tools/bootstrap/CMakeLists.txt7
-rw-r--r--src/tools/moc/collectjson.cpp6
-rw-r--r--src/tools/moc/collectjson.h2
-rw-r--r--src/tools/moc/generator.cpp7
-rw-r--r--src/tools/moc/main.cpp9
-rw-r--r--src/tools/moc/moc.cpp39
-rw-r--r--src/tools/moc/moc.h3
-rw-r--r--src/tools/qtpaths/qtpaths.cpp59
-rw-r--r--src/tools/rcc/main.cpp6
-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/cpp/cppwriteinitialization.cpp6
-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.h168
-rw-r--r--src/tools/uic/shared/language.cpp6
-rw-r--r--src/tools/uic/shared/language.h2
-rw-r--r--src/tools/uic/shared/writeincludesbase.cpp160
-rw-r--r--src/tools/uic/shared/writeincludesbase.h99
-rw-r--r--src/widgets/CMakeLists.txt369
-rw-r--r--src/widgets/configure.json647
-rw-r--r--src/widgets/dialogs/qfiledialog.cpp4
-rw-r--r--src/widgets/dialogs/qmessagebox.cpp31
-rw-r--r--src/widgets/dialogs/qmessagebox.h66
-rw-r--r--src/widgets/dialogs/qprogressdialog.cpp2
-rw-r--r--src/widgets/doc/src/widgets-and-layouts/stylesheet.qdoc10
-rw-r--r--src/widgets/graphicsview/qgraphicsitem.cpp10
-rw-r--r--src/widgets/graphicsview/qgraphicsscene.cpp2
-rw-r--r--src/widgets/graphicsview/qgraphicsscene_bsp.cpp2
-rw-r--r--src/widgets/graphicsview/qgraphicsview.cpp2
-rw-r--r--src/widgets/itemviews/qabstractitemview.cpp53
-rw-r--r--src/widgets/itemviews/qabstractitemview_p.h4
-rw-r--r--src/widgets/itemviews/qlistview.cpp83
-rw-r--r--src/widgets/itemviews/qtableview.cpp22
-rw-r--r--src/widgets/itemviews/qtablewidget.cpp9
-rw-r--r--src/widgets/itemviews/qtreeview.cpp4
-rw-r--r--src/widgets/itemviews/qtreewidget.cpp27
-rw-r--r--src/widgets/kernel/qapplication.cpp9
-rw-r--r--src/widgets/kernel/qapplication.h2
-rw-r--r--src/widgets/kernel/qboxlayout.cpp2
-rw-r--r--src/widgets/kernel/qlayout.cpp27
-rw-r--r--src/widgets/kernel/qlayout.h3
-rw-r--r--src/widgets/kernel/qlayoutitem.cpp30
-rw-r--r--src/widgets/kernel/qlayoutitem.h1
-rw-r--r--src/widgets/kernel/qmacgesturerecognizer.cpp2
-rw-r--r--src/widgets/kernel/qwidget.cpp32
-rw-r--r--src/widgets/kernel/qwidget.h2
-rw-r--r--src/widgets/kernel/qwidget_p.h8
-rw-r--r--src/widgets/styles/qcommonstyle.cpp10
-rw-r--r--src/widgets/styles/qstyle.cpp7
-rw-r--r--src/widgets/styles/qstyle.h1
-rw-r--r--src/widgets/styles/qstylesheetstyle.cpp184
-rw-r--r--src/widgets/widgets/qabstractscrollarea.cpp2
-rw-r--r--src/widgets/widgets/qcombobox.cpp43
-rw-r--r--src/widgets/widgets/qcombobox_p.h1
-rw-r--r--src/widgets/widgets/qdatetimeedit.cpp14
-rw-r--r--src/widgets/widgets/qdatetimeedit_p.h16
-rw-r--r--src/widgets/widgets/qdockwidget.cpp27
-rw-r--r--src/widgets/widgets/qlabel.cpp4
-rw-r--r--src/widgets/widgets/qlineedit.cpp8
-rw-r--r--src/widgets/widgets/qlineedit_p.cpp14
-rw-r--r--src/widgets/widgets/qlineedit_p.h2
-rw-r--r--src/widgets/widgets/qmdisubwindow.cpp33
-rw-r--r--src/widgets/widgets/qmdisubwindow_p.h1
-rw-r--r--src/widgets/widgets/qplaintextedit.cpp3
-rw-r--r--src/widgets/widgets/qpushbutton_p.h2
-rw-r--r--src/widgets/widgets/qsizegrip.cpp4
-rw-r--r--src/widgets/widgets/qtabbar.cpp29
-rw-r--r--src/widgets/widgets/qtextedit.cpp4
-rw-r--r--src/widgets/widgets/qwidgetlinecontrol.cpp18
-rw-r--r--src/widgets/widgets/qwidgettextcontrol.cpp5
-rw-r--r--src/xml/configure.json16
-rw-r--r--src/xml/dom/qdom.cpp2
-rw-r--r--sync.profile1
-rw-r--r--tests/auto/cmake/CMakeLists.txt61
-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_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_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.txt100
-rw-r--r--tests/auto/cmake/test_static_resources/test_static_resources_propagation/main.cpp59
-rw-r--r--tests/auto/cmake/tst_qaddpreroutine/CMakeLists.txt48
-rw-r--r--tests/auto/cmake/tst_qaddpreroutine/plugin.cpp70
-rw-r--r--tests/auto/cmake/tst_qaddpreroutine/plugin.json3
-rw-r--r--tests/auto/cmake/tst_qaddpreroutine/tst_qaddpreroutine.cpp69
-rw-r--r--tests/auto/concurrent/qtconcurrentiteratekernel/tst_qtconcurrentiteratekernel.cpp23
-rw-r--r--tests/auto/concurrent/qtconcurrentthreadengine/tst_qtconcurrentthreadengine.cpp124
-rw-r--r--tests/auto/corelib/CMakeLists.txt1
-rw-r--r--tests/auto/corelib/animation/qabstractanimation/CMakeLists.txt2
-rw-r--r--tests/auto/corelib/animation/qabstractanimation/tst_qabstractanimation.cpp91
-rw-r--r--tests/auto/corelib/animation/qpropertyanimation/CMakeLists.txt2
-rw-r--r--tests/auto/corelib/animation/qpropertyanimation/tst_qpropertyanimation.cpp25
-rw-r--r--tests/auto/corelib/animation/qsequentialanimationgroup/tst_qsequentialanimationgroup.cpp46
-rw-r--r--tests/auto/corelib/animation/qvariantanimation/CMakeLists.txt2
-rw-r--r--tests/auto/corelib/animation/qvariantanimation/tst_qvariantanimation.cpp29
-rw-r--r--tests/auto/corelib/global/qflags/tst_qflags.cpp68
-rw-r--r--tests/auto/corelib/global/qfloat16/CMakeLists.txt2
-rw-r--r--tests/auto/corelib/global/qfloat16/tst_qfloat16.cpp31
-rw-r--r--tests/auto/corelib/global/qglobal/tst_qglobal.cpp51
-rw-r--r--tests/auto/corelib/global/qnumeric/tst_qnumeric.cpp38
-rw-r--r--tests/auto/corelib/global/qrandomgenerator/tst_qrandomgenerator.cpp16
-rw-r--r--tests/auto/corelib/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.cpp83
-rw-r--r--tests/auto/corelib/io/qfileinfo/tst_qfileinfo.cpp136
-rw-r--r--tests/auto/corelib/io/qfilesystementry/tst_qfilesystementry.cpp13
-rw-r--r--tests/auto/corelib/io/qloggingregistry/tst_qloggingregistry.cpp30
-rw-r--r--tests/auto/corelib/io/qprocess/tst_qprocess.cpp3
-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/CMakeLists.txt1
-rw-r--r--tests/auto/corelib/io/qurl/tst_qurl.cpp8
-rw-r--r--tests/auto/corelib/itemmodels/qabstractproxymodel/CMakeLists.txt3
-rw-r--r--tests/auto/corelib/itemmodels/qabstractproxymodel/tst_qabstractproxymodel.cpp32
-rw-r--r--tests/auto/corelib/itemmodels/qitemselectionmodel/CMakeLists.txt3
-rw-r--r--tests/auto/corelib/itemmodels/qitemselectionmodel/tst_qitemselectionmodel.cpp69
-rw-r--r--tests/auto/corelib/itemmodels/qsortfilterproxymodel_common/tst_qsortfilterproxymodel.cpp198
-rw-r--r--tests/auto/corelib/itemmodels/qsortfilterproxymodel_common/tst_qsortfilterproxymodel.h14
-rw-r--r--tests/auto/corelib/itemmodels/qsortfilterproxymodel_regularexpression/CMakeLists.txt3
-rw-r--r--tests/auto/corelib/itemmodels/qsortfilterproxymodel_regularexpression/tst_qsortfilterproxymodel_regularexpression.cpp85
-rw-r--r--tests/auto/corelib/kernel/qjnienvironment/testdata/src/org/qtproject/qt/android/testdata/QtJniEnvironmentTestClass.java10
-rw-r--r--tests/auto/corelib/kernel/qjnienvironment/tst_qjnienvironment.cpp119
-rw-r--r--tests/auto/corelib/kernel/qjniobject/testdata/src/org/qtproject/qt/android/testdata/QtJniObjectTestClass.java22
-rw-r--r--tests/auto/corelib/kernel/qjniobject/tst_qjniobject.cpp335
-rw-r--r--tests/auto/corelib/kernel/qmetamethod/tst_qmetamethod.cpp25
-rw-r--r--tests/auto/corelib/kernel/qmetatype/tst_qmetatype2.cpp15
-rw-r--r--tests/auto/corelib/kernel/qobject/CMakeLists.txt3
-rw-r--r--tests/auto/corelib/kernel/qobject/tst_qobject.cpp11
-rw-r--r--tests/auto/corelib/kernel/qproperty/tst_qproperty.cpp294
-rw-r--r--tests/auto/corelib/kernel/qsharedmemory/tst_qsharedmemory.cpp22
-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/lib/CMakeLists.txt4
-rw-r--r--tests/auto/corelib/plugin/qlibrary/lib2/CMakeLists.txt6
-rw-r--r--tests/auto/corelib/plugin/qlibrary/tst/CMakeLists.txt2
-rw-r--r--tests/auto/corelib/plugin/qplugin/tst_qplugin.cpp3
-rw-r--r--tests/auto/corelib/serialization/json/tst_qtjson.cpp6
-rw-r--r--tests/auto/corelib/serialization/qcborvalue/tst_qcborvalue.cpp4
-rw-r--r--tests/auto/corelib/serialization/qtextstream/test/CMakeLists.txt10
-rw-r--r--tests/auto/corelib/serialization/qxmlstream/data/019.ref2
-rw-r--r--tests/auto/corelib/serialization/qxmlstream/data/024.ref4
-rw-r--r--tests/auto/corelib/serialization/qxmlstream/data/039.ref2
-rw-r--r--tests/auto/corelib/serialization/qxmlstream/data/041.ref2
-rw-r--r--tests/auto/corelib/serialization/qxmlstream/data/1.ref2
-rw-r--r--tests/auto/corelib/serialization/qxmlstream/data/2.ref2
-rw-r--r--tests/auto/corelib/serialization/qxmlstream/data/21.ref10
-rw-r--r--tests/auto/corelib/serialization/qxmlstream/data/namespaceCDATA.ref2
-rw-r--r--tests/auto/corelib/text/qbytearray/tst_qbytearray.cpp53
-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.cpp122
-rw-r--r--tests/auto/corelib/text/qstring/tst_qstring.cpp474
-rw-r--r--tests/auto/corelib/text/qstringapisymmetry/tst_qstringapisymmetry.cpp18
-rw-r--r--tests/auto/corelib/text/qstringlist/tst_qstringlist.cpp9
-rw-r--r--tests/auto/corelib/thread/qfuture/tst_qfuture.cpp4
-rw-r--r--tests/auto/corelib/thread/qpromise/tst_qpromise.cpp9
-rw-r--r--tests/auto/corelib/thread/qthread/tst_qthread.cpp5
-rw-r--r--tests/auto/corelib/thread/qthreadpool/tst_qthreadpool.cpp2
-rw-r--r--tests/auto/corelib/time/qdatetime/tst_qdatetime.cpp1195
-rw-r--r--tests/auto/corelib/time/qtimezone/tst_qtimezone.cpp29
-rw-r--r--tests/auto/corelib/tools/CMakeLists.txt3
-rw-r--r--tests/auto/corelib/tools/collections/tst_collections.cpp2
-rw-r--r--tests/auto/corelib/tools/qarraydata/simplevector.h17
-rw-r--r--tests/auto/corelib/tools/qarraydata/tst_qarraydata.cpp283
-rw-r--r--tests/auto/corelib/tools/qhash/tst_qhash.cpp19
-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.cpp388
-rw-r--r--tests/auto/corelib/tools/qsharedpointer/CMakeLists.txt11
-rw-r--r--tests/auto/corelib/tools/qsharedpointer/tst_qsharedpointer.cpp28
-rw-r--r--tests/auto/corelib/tools/qtimeline/CMakeLists.txt2
-rw-r--r--tests/auto/corelib/tools/qtimeline/tst_qtimeline.cpp302
-rw-r--r--tests/auto/dbus/qdbusservicewatcher/CMakeLists.txt3
-rw-r--r--tests/auto/dbus/qdbusservicewatcher/tst_qdbusservicewatcher.cpp71
-rw-r--r--tests/auto/gui/CMakeLists.txt1
-rw-r--r--tests/auto/gui/image/qicon/tst_qicon.cpp7
-rw-r--r--tests/auto/gui/image/qimage/tst_qimage.cpp102
-rw-r--r--tests/auto/gui/image/qimagewriter/tst_qimagewriter.cpp8
-rw-r--r--tests/auto/gui/itemmodels/qfilesystemmodel/tst_qfilesystemmodel.cpp15
-rw-r--r--tests/auto/gui/itemmodels/qstandarditemmodel/tst_qstandarditemmodel.cpp49
-rw-r--r--tests/auto/gui/kernel/qguiapplication/tst_qguiapplication.cpp6
-rw-r--r--tests/auto/gui/kernel/qhighdpi/tst_qhighdpi.cpp86
-rw-r--r--tests/auto/gui/kernel/qkeyevent/BLACKLIST6
-rw-r--r--tests/auto/gui/kernel/qwindow/tst_qwindow.cpp43
-rw-r--r--tests/auto/gui/math3d/qquaternion/tst_qquaternion.cpp36
-rw-r--r--tests/auto/gui/painting/qcolorspace/tst_qcolorspace.cpp81
-rw-r--r--tests/auto/gui/painting/qpainter/BLACKLIST3
-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/BLACKLIST3
-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/qtextdocument/tst_qtextdocument.cpp117
-rw-r--r--tests/auto/gui/text/qtextdocumentfragment/tst_qtextdocumentfragment.cpp32
-rw-r--r--tests/auto/gui/text/qtextlayout/tst_qtextlayout.cpp14
-rw-r--r--tests/auto/network/access/http2/http2srv.cpp32
-rw-r--r--tests/auto/network/access/http2/http2srv.h7
-rw-r--r--tests/auto/network/access/http2/tst_http2.cpp98
-rw-r--r--tests/auto/network/access/qdecompresshelper/BLACKLIST2
-rw-r--r--tests/auto/network/access/qdecompresshelper/tst_qdecompresshelper.cpp12
-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.cpp444
-rw-r--r--tests/auto/network/kernel/qauthenticator/tst_qauthenticator.cpp18
-rw-r--r--tests/auto/network/kernel/qnetworkinformation/tst_qnetworkinformation.cpp37
-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.cpp3
-rw-r--r--tests/auto/network/ssl/CMakeLists.txt2
-rw-r--r--tests/auto/network/ssl/qdtls/tst_qdtls.cpp7
-rw-r--r--tests/auto/network/ssl/qdtlscookie/tst_qdtlscookie.cpp10
-rw-r--r--tests/auto/network/ssl/qocsp/tst_qocsp.cpp13
-rw-r--r--tests/auto/network/ssl/qsslcertificate/tst_qsslcertificate.cpp63
-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.cpp81
-rw-r--r--tests/auto/network/ssl/qsslsocket/tst_qsslsocket.cpp460
-rw-r--r--tests/auto/network/ssl/shared/qopenssl_symbols.h823
-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/other/toolsupport/tst_toolsupport.cpp2
-rw-r--r--tests/auto/sql/models/qsqltablemodel/tst_qsqltablemodel.cpp99
-rw-r--r--tests/auto/testlib/qabstractitemmodeltester/tst_qabstractitemmodeltester.cpp11
-rw-r--r--tests/auto/testlib/selftests/benchliboptions/tst_benchliboptions.cpp6
-rw-r--r--tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp12
-rw-r--r--tests/auto/testlib/selftests/commandlinedata/tst_commandlinedata.cpp2
-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_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/CMakeLists.txt1
-rw-r--r--tests/auto/tools/moc/allmocs_baseline_in.json89
-rw-r--r--tests/auto/tools/moc/cxx11-trailing-return.h68
-rw-r--r--tests/auto/tools/moc/tst_moc.cpp43
-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/dialogs/qfiledialog2/tst_qfiledialog2.cpp2
-rw-r--r--tests/auto/widgets/dialogs/qmessagebox/tst_qmessagebox.cpp9
-rw-r--r--tests/auto/widgets/dialogs/qprogressdialog/tst_qprogressdialog.cpp24
-rw-r--r--tests/auto/widgets/itemviews/qabstractitemview/tst_qabstractitemview.cpp458
-rw-r--r--tests/auto/widgets/itemviews/qitemdelegate/tst_qitemdelegate.cpp14
-rw-r--r--tests/auto/widgets/itemviews/qlistview/tst_qlistview.cpp147
-rw-r--r--tests/auto/widgets/itemviews/qtreeview/tst_qtreeview.cpp4
-rw-r--r--tests/auto/widgets/itemviews/qtreewidget/tst_qtreewidget.cpp20
-rw-r--r--tests/auto/widgets/kernel/qgesturerecognizer/BLACKLIST3
-rw-r--r--tests/auto/widgets/kernel/qlayout/tst_qlayout.cpp41
-rw-r--r--tests/auto/widgets/kernel/qwidget/BLACKLIST3
-rw-r--r--tests/auto/widgets/kernel/qwidget/tst_qwidget.cpp11
-rw-r--r--tests/auto/widgets/styles/qstylesheetstyle/tst_qstylesheetstyle.cpp85
-rw-r--r--tests/auto/widgets/widgets/qabstractbutton/BLACKLIST5
-rw-r--r--tests/auto/widgets/widgets/qcombobox/tst_qcombobox.cpp46
-rw-r--r--tests/auto/widgets/widgets/qdatetimeedit/tst_qdatetimeedit.cpp28
-rw-r--r--tests/auto/widgets/widgets/qgroupbox/BLACKLIST13
-rw-r--r--tests/auto/widgets/widgets/qmdiarea/tst_qmdiarea.cpp43
-rw-r--r--tests/auto/widgets/widgets/qpushbutton/BLACKLIST3
-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/benchmarks/corelib/CMakeLists.txt1
-rw-r--r--tests/benchmarks/corelib/io/qdir/10000/bench_qdir_10000.cpp4
-rw-r--r--tests/benchmarks/corelib/io/qfileinfo/main.cpp15
-rw-r--r--tests/benchmarks/corelib/itemmodels/CMakeLists.txt1
-rw-r--r--tests/benchmarks/corelib/itemmodels/qsortfilterproxymodel/CMakeLists.txt6
-rw-r--r--tests/benchmarks/corelib/itemmodels/qsortfilterproxymodel/tst_qsortfilterproxymodel.cpp123
-rw-r--r--tests/benchmarks/corelib/kernel/qvariant/tst_qvariant.cpp2
-rw-r--r--tests/benchmarks/corelib/text/CMakeLists.txt1
-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/time/qdate/tst_bench_qdate.cpp10
-rw-r--r--tests/benchmarks/corelib/tools/qlist/main.cpp169
-rw-r--r--tests/benchmarks/gui/painting/lancebench/CMakeLists.txt89
-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/time/qdatetime/fromstring/main.cpp6
-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/highdpi/dprgadget/CMakeLists.txt1
-rw-r--r--tests/manual/highdpi/dprgadget/main.cpp161
-rw-r--r--tests/manual/highdpi/screengadget/CMakeLists.txt20
-rw-r--r--tests/manual/highdpi/screengadget/main.cpp244
-rw-r--r--tests/manual/highdpi/screengadget/screengadget.pro2
-rw-r--r--tests/manual/lance/CMakeLists.txt146
-rw-r--r--tests/manual/qcursor/qcursorhighdpi/CMakeLists.txt2
-rw-r--r--tests/manual/qcursor/qcursorhighdpi/qcursorhighdpi.pro2
-rw-r--r--tests/manual/qnetworkinformation/tst_qnetworkinformation.cpp8
-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.py61
-rwxr-xr-xutil/cmake/pro2cmake.py31
-rwxr-xr-xutil/edid/qedidvendortable.py8
-rw-r--r--util/locale_database/cldr.py102
-rwxr-xr-xutil/locale_database/cldr2qlocalexml.py9
-rwxr-xr-xutil/locale_database/cldr2qtimezone.py6
-rw-r--r--util/locale_database/enumdata.py38
-rw-r--r--util/locale_database/ldml.py14
-rw-r--r--util/locale_database/qlocalexml.py82
-rwxr-xr-xutil/locale_database/qlocalexml2cpp.py42
1356 files changed, 61889 insertions, 40426 deletions
diff --git a/.prev_configure.cmake b/.prev_configure.cmake
deleted file mode 100644
index f796eddc8a..0000000000
--- a/.prev_configure.cmake
+++ /dev/null
@@ -1,1083 +0,0 @@
-
-
-#### Inputs
-
-
-
-#### Libraries
-
-qt_find_package(ZLIB 1.0.8 PROVIDED_TARGETS ZLIB::ZLIB 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))
-# 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 ZLIB_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 0ea57bdf29..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
@@ -50,6 +54,9 @@ if(NOT QT_BUILD_STANDALONE_TESTS)
if(MACOS)
# Add module directory to pick up custom Info.plist template
list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake/macos")
+ elseif(IOS)
+ # Add module directory to pick up custom Info.plist template
+ list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake/ios")
endif()
## Find the build internals package.
@@ -78,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)
@@ -96,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.
@@ -153,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/bin/qt-cmake-standalone-test.in b/bin/qt-cmake-standalone-test.in
index d13c3eee40..b0fbea5ded 100755
--- a/bin/qt-cmake-standalone-test.in
+++ b/bin/qt-cmake-standalone-test.in
@@ -1,4 +1,4 @@
@__qt_cmake_standalone_test_os_prelude@
@__qt_cmake_standalone_test_script_relpath@
-@__qt_cmake_private_relpath@ @__qt_cmake_standalone_test_relpath@ -DQT_STANDALONE_TEST_PATH=@__qt_cmake_standalone_passed_args@
+@__qt_cmake_private_relpath@ @__qt_cmake_standalone_test_relpath@ -DQT_BUILD_STANDALONE_TESTS=ON -DQT_STANDALONE_TEST_PATH=@__qt_cmake_standalone_passed_args@
diff --git a/cmake/FindGSSAPI.cmake b/cmake/FindGSSAPI.cmake
index 90f1c62c99..82c3952e24 100644
--- a/cmake/FindGSSAPI.cmake
+++ b/cmake/FindGSSAPI.cmake
@@ -9,6 +9,7 @@ find_path(GSSAPI_INCLUDE_DIRS
find_library(GSSAPI_LIBRARIES
NAMES
GSS # framework
+ gss # solaris
gssapi_krb5
HINTS ${PC_GSSAPILIBDIR}
)
diff --git a/cmake/FindWrapAtomic.cmake b/cmake/FindWrapAtomic.cmake
index 56aa7323bf..c2582bdd6b 100644
--- a/cmake/FindWrapAtomic.cmake
+++ b/cmake/FindWrapAtomic.cmake
@@ -30,10 +30,10 @@ int main(int, char **)
check_cxx_source_compiles("${atomic_test_sources}" HAVE_STDATOMIC)
if(NOT HAVE_STDATOMIC)
- set(_req_libraries "${CMAKE_REQUIRE_LIBRARIES}")
- set(CMAKE_REQUIRE_LIBRARIES "atomic")
+ set(_req_libraries "${CMAKE_REQUIRED_LIBRARIES}")
+ set(CMAKE_REQUIRED_LIBRARIES "atomic")
check_cxx_source_compiles("${atomic_test_sources}" HAVE_STDATOMIC_WITH_LIB)
- set(CMAKE_REQUIRE_LIBRARIES "${_req_libraries}")
+ set(CMAKE_REQUIRED_LIBRARIES "${_req_libraries}")
endif()
add_library(WrapAtomic::WrapAtomic INTERFACE IMPORTED)
diff --git a/cmake/FindWrapBrotli.cmake b/cmake/FindWrapBrotli.cmake
index e01deee6e3..bc8e058f99 100644
--- a/cmake/FindWrapBrotli.cmake
+++ b/cmake/FindWrapBrotli.cmake
@@ -39,5 +39,59 @@ else()
target_link_libraries(WrapBrotli::WrapBrotliCommon INTERFACE PkgConfig::libbrotlicommon)
set(WrapBrotli_FOUND ON)
endif()
+ else()
+ find_path(BROTLI_INCLUDE_DIR NAMES "brotli/decode.h")
+
+ foreach(lib_name BrotliDec BrotliEnc BrotliCommon)
+ string(TOLOWER ${lib_name} lower_lib_name)
+
+ find_library(${lib_name}_LIBRARY_RELEASE
+ NAMES ${lower_lib_name} ${lower_lib_name}-static)
+
+ find_library(${lib_name}_LIBRARY_DEBUG
+ NAMES ${lower_lib_name}d ${lower_lib_name}-staticd
+ ${lower_lib_name} ${lower_lib_name}-static)
+
+ include(SelectLibraryConfigurations)
+ select_library_configurations(${lib_name})
+
+ if (BROTLI_INCLUDE_DIR AND ${lib_name}_LIBRARY)
+ set(${lib_name}_FOUND TRUE)
+ endif()
+
+ if (${lib_name}_FOUND AND NOT TARGET WrapBrotli::Wrap${lib_name})
+ add_library(WrapBrotli::Wrap${lib_name} UNKNOWN IMPORTED)
+ set_target_properties(WrapBrotli::Wrap${lib_name} PROPERTIES
+ INTERFACE_INCLUDE_DIRECTORIES "${BROTLI_INCLUDE_DIR}"
+ IMPORTED_LOCATION "${${lib_name}_LIBRARY}")
+
+ if(${lib_name}_LIBRARY_RELEASE)
+ foreach(config_name RELEASE RELWITHDEBINFO MINSIZEREL)
+ set_property(TARGET WrapBrotli::Wrap${lib_name} APPEND PROPERTY
+ IMPORTED_CONFIGURATIONS ${config_name})
+ set_target_properties(WrapBrotli::Wrap${lib_name} PROPERTIES
+ IMPORTED_LOCATION_${config_name} "${${lib_name}_LIBRARY_RELEASE}")
+ endforeach()
+ endif()
+
+ if(${lib_name}_LIBRARY_DEBUG)
+ set_property(TARGET WrapBrotli::Wrap${lib_name} APPEND PROPERTY
+ IMPORTED_CONFIGURATIONS DEBUG)
+ set_target_properties(WrapBrotli::Wrap${lib_name} PROPERTIES
+ IMPORTED_LOCATION_DEBUG "${${lib_name}_LIBRARY_DEBUG}")
+ endif()
+ endif()
+ endforeach()
+
+ include(FindPackageHandleStandardArgs)
+ find_package_handle_standard_args(WrapBrotli REQUIRED_VARS
+ BrotliDec_FOUND BrotliEnc_FOUND BrotliCommon_FOUND)
+
+ if (WrapBrotli_FOUND)
+ set_property(TARGET WrapBrotli::WrapBrotliDec APPEND PROPERTY
+ INTERFACE_LINK_LIBRARIES WrapBrotli::WrapBrotliCommon)
+ set_property(TARGET WrapBrotli::WrapBrotliEnc APPEND PROPERTY
+ INTERFACE_LINK_LIBRARIES WrapBrotli::WrapBrotliCommon)
+ endif()
endif()
endif()
diff --git a/cmake/FindWrapOpenSSL.cmake b/cmake/FindWrapOpenSSL.cmake
index a09aa99518..b4481f3c09 100644
--- a/cmake/FindWrapOpenSSL.cmake
+++ b/cmake/FindWrapOpenSSL.cmake
@@ -18,7 +18,7 @@ if(OpenSSL_FOUND)
else()
set(writableLib OpenSSL::Crypto)
endif()
- set_property(TARGET ${writableLib} APPEND PROPERTY INTERFACE_LINK_LIBRARIES Ws2_32 Crypt32)
+ set_property(TARGET ${writableLib} APPEND PROPERTY INTERFACE_LINK_LIBRARIES ws2_32 crypt32)
unset(libType)
unset(writableLib)
endif()
diff --git a/cmake/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/FindWrapZLIB.cmake b/cmake/FindWrapZLIB.cmake
new file mode 100644
index 0000000000..585dc5e95e
--- /dev/null
+++ b/cmake/FindWrapZLIB.cmake
@@ -0,0 +1,29 @@
+# We can't create the same interface imported target multiple times, CMake will complain if we do
+# that. This can happen if the find_package call is done in multiple different subdirectories.
+if(TARGET WrapZLIB::WrapZLIB)
+ set(WrapZLIB_FOUND ON)
+ return()
+endif()
+
+set(WrapZLIB_FOUND OFF)
+
+find_package(ZLIB ${WrapZLIB_FIND_VERSION})
+
+if(ZLIB_FOUND)
+ set(WrapZLIB_FOUND ON)
+
+ add_library(WrapZLIB::WrapZLIB INTERFACE IMPORTED)
+ if(APPLE)
+ # On Darwin platforms FindZLIB sets IMPORTED_LOCATION to the absolute path of the library
+ # within the framework. This ends up as an absolute path link flag, which we don't want,
+ # because that makes our .prl files un-relocatable and also breaks iOS simulator_and_device
+ # SDK switching in Xcode.
+ # Just pass a linker flag instead.
+ target_link_libraries(WrapZLIB::WrapZLIB INTERFACE "-lz")
+ else()
+ target_link_libraries(WrapZLIB::WrapZLIB INTERFACE ZLIB::ZLIB)
+ endif()
+endif()
+
+include(FindPackageHandleStandardArgs)
+find_package_handle_standard_args(WrapZLIB DEFAULT_MSG WrapZLIB_FOUND)
diff --git a/cmake/Qt3rdPartyLibraryHelpers.cmake b/cmake/Qt3rdPartyLibraryHelpers.cmake
index 27d615b2b4..87d1f89183 100644
--- a/cmake/Qt3rdPartyLibraryHelpers.cmake
+++ b/cmake/Qt3rdPartyLibraryHelpers.cmake
@@ -1,66 +1,94 @@
-# 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})
+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 +116,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 +123,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 +218,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)
diff --git a/cmake/QtAutoDetect.cmake b/cmake/QtAutoDetect.cmake
index fd62fcb406..6a94515e60 100644
--- a/cmake/QtAutoDetect.cmake
+++ b/cmake/QtAutoDetect.cmake
@@ -9,7 +9,6 @@
function(qt_auto_detect_wasm)
if("${QT_QMAKE_TARGET_MKSPEC}" STREQUAL "wasm-emscripten" AND DEFINED ENV{EMSDK})
if(NOT DEFINED QT_AUTODETECT_WASM)
- set(QT_AUTODETECT_WASM TRUE CACHE BOOL "")
# detect EMSCRIPTEN_ROOT path
file(READ "$ENV{EMSDK}/.emscripten" ver)
string(REGEX MATCH "EMSCRIPTEN_ROOT.*$" EMROOT "${ver}")
@@ -48,6 +47,7 @@ function(qt_auto_detect_wasm)
message(FATAL_ERROR "Cannot find the toolchain file Emscripten.cmake. "
"Please specify the toolchain file with -DCMAKE_TOOLCHAIN_FILE=<file>.")
endif()
+ set(QT_AUTODETECT_WASM TRUE CACHE BOOL "")
if(NOT DEFINED BUILD_SHARED_LIBS)
set(BUILD_SHARED_LIBS OFF CACHE BOOL "Build Qt statically or dynamically" FORCE)
@@ -105,9 +105,28 @@ endfunction()
function(qt_auto_detect_android)
# Auto-detect NDK root
- if(NOT DEFINED CMAKE_ANDROID_NDK_ROOT AND DEFINED ANDROID_SDK_ROOT)
- set(ndk_root "${ANDROID_SDK_ROOT}/ndk-bundle")
- if(IS_DIRECTORY "${ndk_root}")
+ if(NOT DEFINED ANDROID_NDK_ROOT AND DEFINED ANDROID_SDK_ROOT)
+ file(GLOB ndk_versions LIST_DIRECTORIES true RELATIVE "${ANDROID_SDK_ROOT}/ndk"
+ "${ANDROID_SDK_ROOT}/ndk/*")
+ unset(ndk_root)
+ if(NOT ndk_versions STREQUAL "")
+ # Use the NDK with the highest version number.
+ if(CMAKE_VERSION VERSION_LESS 3.18)
+ list(SORT ndk_versions)
+ list(REVERSE ndk_versions)
+ else()
+ list(SORT ndk_versions COMPARE NATURAL ORDER DESCENDING)
+ endif()
+ list(GET ndk_versions 0 ndk_root)
+ string(PREPEND ndk_root "${ANDROID_SDK_ROOT}/ndk/")
+ else()
+ # Fallback: use the deprecated "ndk-bundle" directory within the SDK root.
+ set(ndk_root "${ANDROID_SDK_ROOT}/ndk-bundle")
+ if(NOT IS_DIRECTORY "${ndk_root}")
+ unset(ndk_root)
+ endif()
+ endif()
+ if(DEFINED ndk_root)
message(STATUS "Android NDK detected: ${ndk_root}")
set(ANDROID_NDK_ROOT "${ndk_root}" CACHE STRING "")
endif()
@@ -125,6 +144,12 @@ function(qt_auto_detect_android)
endif()
endif()
+ if("${CMAKE_TOOLCHAIN_FILE}" STREQUAL ""
+ AND (DEFINED ANDROID_ABI OR DEFINED ANDROID_NATIVE_API_LEVEL))
+ message(FATAL_ERROR "An Android build was requested, but no Android toolchain file was "
+ "specified nor detected.")
+ endif()
+
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")
@@ -416,6 +441,15 @@ function(qt_auto_detect_pch)
option(BUILD_WITH_PCH "Build Qt using precompiled headers?" "${default_value}")
endfunction()
+function(qt_auto_detect_win32_arm)
+ if("${QT_QMAKE_TARGET_MKSPEC}" STREQUAL "win32-arm64-msvc")
+ set(CMAKE_SYSTEM_NAME "Windows" CACHE STRING "")
+ set(CMAKE_SYSTEM_VERSION "10" CACHE STRING "")
+ set(CMAKE_SYSTEM_PROCESSOR "arm64" CACHE STRING "")
+ endif()
+endfunction()
+
+
qt_auto_detect_cmake_generator()
qt_auto_detect_cyclic_toolchain()
qt_auto_detect_cmake_config()
@@ -426,3 +460,4 @@ qt_auto_detect_android()
qt_auto_detect_vpckg()
qt_auto_detect_pch()
qt_auto_detect_wasm()
+qt_auto_detect_win32_arm()
diff --git a/cmake/QtBaseConfigureTests.cmake b/cmake/QtBaseConfigureTests.cmake
index 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 23a2dfbcf4..62cb7d7392 100644
--- a/cmake/QtBaseGlobalTargets.cmake
+++ b/cmake/QtBaseGlobalTargets.cmake
@@ -3,6 +3,7 @@ qt_path_join(__GlobalConfig_build_dir ${QT_CONFIG_BUILD_DIR} ${__GlobalConfig_pa
qt_path_join(__GlobalConfig_install_dir ${QT_CONFIG_INSTALL_DIR} ${__GlobalConfig_path_suffix})
set(__GlobalConfig_install_dir_absolute "${__GlobalConfig_install_dir}")
set(__qt_bin_dir_absolute "${QT_INSTALL_DIR}/${INSTALL_BINDIR}")
+set(__qt_libexec_dir_absolute "${QT_INSTALL_DIR}/${INSTALL_LIBEXECDIR}")
if(QT_WILL_INSTALL)
# Need to prepend the install prefix when doing prefix builds, because the config install dir
# is relative then.
@@ -11,6 +12,8 @@ if(QT_WILL_INSTALL)
${__GlobalConfig_install_dir_absolute})
qt_path_join(__qt_bin_dir_absolute
${QT_BUILD_INTERNALS_RELOCATABLE_INSTALL_PREFIX} ${__qt_bin_dir_absolute})
+ qt_path_join(__qt_libexec_dir_absolute
+ ${QT_BUILD_INTERNALS_RELOCATABLE_INSTALL_PREFIX} ${__qt_libexec_dir_absolute})
endif()
# Compute relative path from $qt_prefix/bin dir to global CMake config install dir, to use in the
# unix-y qt-cmake shell script, to make it work even if the installed Qt is relocated.
@@ -131,11 +134,12 @@ 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()
set(__export_targets Platform
GlobalConfig
@@ -156,7 +160,9 @@ qt_internal_export_modern_cmake_config_targets_file(TARGETS ${__export_targets}
CONFIG_INSTALL_DIR
${__GlobalConfig_install_dir})
-## Install some QtBase specific CMake files:
+# Install internal CMake files.
+# The functions defined inside can not be used in public projects.
+# They can only be used while building Qt itself.
qt_copy_or_install(FILES
cmake/ModuleDescription.json.in
cmake/Qt3rdPartyLibraryConfig.cmake.in
@@ -168,7 +174,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
@@ -176,8 +181,6 @@ qt_copy_or_install(FILES
cmake/QtDbusHelpers.cmake
cmake/QtDocsHelpers.cmake
cmake/QtExecutableHelpers.cmake
- cmake/QtFeature.cmake
- cmake/QtFeatureCommon.cmake
cmake/QtFileConfigure.txt.in
cmake/QtFindPackageHelpers.cmake
cmake/QtFindWrapConfigExtra.cmake.in
@@ -211,7 +214,7 @@ qt_copy_or_install(FILES
cmake/QtPrecompiledHeadersHelpers.cmake
cmake/QtPriHelpers.cmake
cmake/QtPrlHelpers.cmake
- cmake/QtPublicTargetsHelpers.cmake
+ cmake/QtPlatformTargetHelpers.cmake
cmake/QtProcessConfigureArgs.cmake
cmake/QtQmakeHelpers.cmake
cmake/QtResourceHelpers.cmake
@@ -222,6 +225,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,7 +238,36 @@ qt_copy_or_install(FILES
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}")
@@ -253,6 +286,11 @@ if(MACOS)
cmake/macos/MacOSXBundleInfo.plist.in
DESTINATION "${__GlobalConfig_install_dir}/macos"
)
+elseif(IOS)
+ qt_copy_or_install(FILES
+ cmake/ios/MacOSXBundleInfo.plist.in
+ DESTINATION "${__GlobalConfig_install_dir}/ios"
+ )
endif()
# Install CI support files to libexec.
diff --git a/cmake/QtBuild.cmake b/cmake/QtBuild.cmake
index f31a215a4a..96d11196d9 100644
--- a/cmake/QtBuild.cmake
+++ b/cmake/QtBuild.cmake
@@ -260,9 +260,24 @@ function(qt_setup_tool_path_command)
list(APPEND command COMMAND)
list(APPEND command set PATH=${bindir}$<SEMICOLON>%PATH%)
set(QT_TOOL_PATH_SETUP_COMMAND "${command}" CACHE INTERNAL "internal command prefix for tool invocations" FORCE)
+ # QT_TOOL_PATH_SETUP_COMMAND is deprecated. Please use _qt_internal_wrap_tool_command
+ # instead.
endfunction()
qt_setup_tool_path_command()
+function(qt_internal_generate_tool_command_wrapper)
+ if(NOT CMAKE_HOST_WIN32 OR DEFINED QT_TOOL_COMMAND_WRAPPER_PATH)
+ return()
+ endif()
+ set(bindir "${QT_BUILD_INTERNALS_RELOCATABLE_INSTALL_PREFIX}/${INSTALL_BINDIR}")
+ file(TO_NATIVE_PATH "${bindir}" bindir)
+ set(QT_TOOL_COMMAND_WRAPPER_PATH "${QT_BUILD_DIR}/${INSTALL_LIBEXECDIR}/qt_setup_tool_path.bat"
+ CACHE INTERNAL "Path to the wrapper of the tool commands")
+ file(GENERATE OUTPUT "${QT_TOOL_COMMAND_WRAPPER_PATH}" CONTENT
+ "@echo off\r\nset PATH=${bindir}$<SEMICOLON>%PATH%\r\n%*")
+endfunction()
+qt_internal_generate_tool_command_wrapper()
+
# Platform define path, etc.
if(WIN32)
set(QT_DEFAULT_PLATFORM_DEFINITIONS WIN32 _ENABLE_EXTENDED_ALIGNED_STORAGE)
@@ -270,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)
@@ -329,6 +346,20 @@ elseif(NETBSD)
set(QT_DEFAULT_MKSPEC netbsd-g++)
elseif(OPENBSD)
set(QT_DEFAULT_MKSPEC openbsd-g++)
+elseif(SOLARIS)
+ if(GCC)
+ if(QT_64BIT)
+ set(QT_DEFAULT_MKSPEC solaris-g++-64)
+ else()
+ set(QT_DEFAULT_MKSPEC solaris-g++)
+ endif()
+ else()
+ if(QT_64BIT)
+ set(QT_DEFAULT_MKSPEC solaris-cc-64)
+ else()
+ set(QT_DEFAULT_MKSPEC solaris-cc)
+ endif()
+ endif()
endif()
if(NOT QT_QMAKE_TARGET_MKSPEC)
@@ -478,11 +509,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)
@@ -504,6 +535,7 @@ include(QtRpathHelpers)
include(QtSanitizerHelpers)
include(QtScopeFinalizerHelpers)
include(QtSimdHelpers)
+include(QtSingleRepoTargetSetBuildHelpers)
include(QtSyncQtHelpers)
include(QtTargetHelpers)
include(QtTestHelpers)
@@ -515,6 +547,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/QtBuildInternals/QtBuildInternalsConfig.cmake b/cmake/QtBuildInternals/QtBuildInternalsConfig.cmake
index 1953454b23..2547282dca 100644
--- a/cmake/QtBuildInternals/QtBuildInternalsConfig.cmake
+++ b/cmake/QtBuildInternals/QtBuildInternalsConfig.cmake
@@ -243,18 +243,19 @@ endmacro()
# find all targets defined in $subdir by recursing through all added subdirectories
# populates $qt_repo_targets with a ;-list of non-UTILITY targets
macro(qt_build_internals_get_repo_targets subdir)
+ get_directory_property(_targets DIRECTORY "${subdir}" BUILDSYSTEM_TARGETS)
+ if(_targets)
+ foreach(_target IN LISTS _targets)
+ get_target_property(_type ${_target} TYPE)
+ if(NOT (${_type} STREQUAL "UTILITY" OR ${_type} STREQUAL "INTERFACE"))
+ list(APPEND qt_repo_targets "${_target}")
+ endif()
+ endforeach()
+ endif()
+
get_directory_property(_directories DIRECTORY "${subdir}" SUBDIRECTORIES)
if (_directories)
foreach(_directory IN LISTS _directories)
- get_directory_property(_targets DIRECTORY "${_directory}" BUILDSYSTEM_TARGETS)
- if (_targets)
- foreach(_target IN LISTS _targets)
- get_target_property(_type ${_target} TYPE)
- if (NOT (${_type} STREQUAL "UTILITY" OR ${_type} STREQUAL "INTERFACE"))
- list(APPEND qt_repo_targets "${_target}")
- endif()
- endforeach()
- endif()
qt_build_internals_get_repo_targets("${_directory}")
endforeach()
endif()
@@ -323,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()
@@ -421,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()
@@ -595,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.
@@ -613,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}")
@@ -636,3 +772,213 @@ 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)
+ get_property(_qt_major_version TARGET ${QT_CMAKE_EXPORT_NAMESPACE}::Core PROPERTY INTERFACE_QT_MAJOR_VERSION)
+ set(PROJECT_VERSION ${Qt${_qt_major_version}Core_VERSION})
+
+ string(REPLACE "." ";" _qt_core_version_list ${PROJECT_VERSION})
+ list(GET _qt_core_version_list 0 PROJECT_VERSION_MAJOR)
+ list(GET _qt_core_version_list 1 PROJECT_VERSION_MINOR)
+ list(GET _qt_core_version_list 2 PROJECT_VERSION_PATCH)
+ endif()
+endif()
+
+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_run_common_config_tests)
+ qt_configure_add_summary_section(NAME "Common build options")
+ qt_internal_static_link_order_test()
+ qt_configure_end_summary_section()
+endfunction()
diff --git a/cmake/QtBuildInternals/QtStandaloneTestTemplateProject/CMakeLists.txt b/cmake/QtBuildInternals/QtStandaloneTestTemplateProject/CMakeLists.txt
index a84c567b5a..564ed610c8 100644
--- a/cmake/QtBuildInternals/QtStandaloneTestTemplateProject/CMakeLists.txt
+++ b/cmake/QtBuildInternals/QtStandaloneTestTemplateProject/CMakeLists.txt
@@ -3,19 +3,7 @@ project(qt_single_test VERSION 6.0.0 LANGUAGES C CXX ASM)
find_package(Qt6 REQUIRED COMPONENTS BuildInternals)
-# Includes QtSetup and friends for private CMake API.
-qt_build_internals_set_up_private_api()
-
-# Find all StandaloneTestsConfig.cmake files, and include them
-# This will find all Qt packages that are required for standalone tests.
-# It will find more packages that needed for a certain test, but will ensure any test can
-# be built.
-qt_get_standalone_tests_confg_files_path(standalone_tests_config_path)
-
-file(GLOB config_files "${standalone_tests_config_path}/*")
-foreach(file ${config_files})
- include("${file}")
-endforeach()
+include(${CMAKE_CURRENT_LIST_DIR}/Main.cmake)
# Get the absolute path of the passed-in project dir, relative to the current working directory
# of the calling script, rather than relative to this source directory.
@@ -27,10 +15,5 @@ else()
set(absolute_project_path "${QT_STANDALONE_TEST_PATH}")
endif()
-# Just before adding the test, change the local (non-cache) install prefix to something other than
-# the Qt install prefix, so that tests don't try to install and pollute the Qt install prefix.
-# Needs to be called after qt_get_standalone_tests_confg_files_path().
-qt_set_up_fake_standalone_tests_install_prefix()
-
# Add the test project path as a subdirectory project.
add_subdirectory("${absolute_project_path}" "build_dir")
diff --git a/cmake/QtBuildInternals/QtStandaloneTestTemplateProject/Main.cmake b/cmake/QtBuildInternals/QtStandaloneTestTemplateProject/Main.cmake
new file mode 100644
index 0000000000..38e1d75d87
--- /dev/null
+++ b/cmake/QtBuildInternals/QtStandaloneTestTemplateProject/Main.cmake
@@ -0,0 +1,18 @@
+# Includes QtSetup and friends for private CMake API.
+qt_build_internals_set_up_private_api()
+
+# Find all StandaloneTestsConfig.cmake files, and include them
+# This will find all Qt packages that are required for standalone tests.
+# It will find more packages that needed for a certain test, but will ensure any test can
+# be built.
+qt_get_standalone_tests_confg_files_path(standalone_tests_config_path)
+
+file(GLOB config_files "${standalone_tests_config_path}/*")
+foreach(file ${config_files})
+ include("${file}")
+endforeach()
+
+# Just before adding the test, change the local (non-cache) install prefix to something other than
+# the Qt install prefix, so that tests don't try to install and pollute the Qt install prefix.
+# Needs to be called after qt_get_standalone_tests_confg_files_path().
+qt_set_up_fake_standalone_tests_install_prefix()
diff --git a/cmake/QtBuildInternalsExtra.cmake.in b/cmake/QtBuildInternalsExtra.cmake.in
index fd91019ed7..b089f00fd6 100644
--- a/cmake/QtBuildInternalsExtra.cmake.in
+++ b/cmake/QtBuildInternalsExtra.cmake.in
@@ -21,9 +21,25 @@ get_filename_component(QT_BUILD_INTERNALS_RELOCATABLE_INSTALL_PREFIX
# This is an attempt to support Conan, aka handle installation of modules into a
# different installation prefix than the original one. Also allow to opt out via a special variable.
if(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT AND
- NOT QT_BUILD_INTERNALS_NO_FORCE_SET_INSTALL_PREFIX)
- set(CMAKE_INSTALL_PREFIX "${QT_BUILD_INTERNALS_RELOCATABLE_INSTALL_PREFIX}" CACHE PATH
+ NOT QT_BUILD_INTERNALS_NO_FORCE_SET_INSTALL_PREFIX)
+ set(qtbi_orig_prefix "@CMAKE_INSTALL_PREFIX@")
+ set(qtbi_new_prefix "${QT_BUILD_INTERNALS_RELOCATABLE_INSTALL_PREFIX}")
+ if(CMAKE_HOST_WIN32)
+ # Make sure we use exactly the original prefix if it points to the same directory as the new
+ # one. This is needed for the case where the original prefix is passed without drive letter
+ # to support installing with DESTDIR set.
+ get_filename_component(qtbi_real_orig_prefix "${qtbi_orig_prefix}" REALPATH)
+ get_filename_component(qtbi_real_new_prefix "${qtbi_new_prefix}" REALPATH)
+ if(qtbi_real_orig_prefix STREQUAL qtbi_real_new_prefix)
+ set(qtbi_new_prefix "${qtbi_orig_prefix}")
+ endif()
+ endif()
+ set(CMAKE_INSTALL_PREFIX "${qtbi_new_prefix}" CACHE PATH
"Install path prefix, prepended onto install directories." FORCE)
+ unset(qtbi_orig_prefix)
+ unset(qtbi_real_orig_prefix)
+ unset(qtbi_new_prefix)
+ unset(qtbi_real_new_prefix)
endif()
# Propagate developer builds to other modules via BuildInternals package.
@@ -49,5 +65,9 @@ set(QT_BUILD_EXAMPLES_BY_DEFAULT @QT_BUILD_EXAMPLES_BY_DEFAULT@ CACHE BOOL
# Propagate usage of ccache.
set(QT_USE_CCACHE @QT_USE_CCACHE@ CACHE BOOL "Enable the use of ccache")
+# Propagate usage of versioned hard link.
+set(QT_CREATE_VERSIONED_HARD_LINK "@QT_CREATE_VERSIONED_HARD_LINK@" CACHE BOOL
+ "Enable the use of versioned hard link")
+
# Extra set of exported variables
@QT_EXTRA_BUILD_INTERNALS_VARS@
diff --git a/cmake/QtCMakeVersionHelpers.cmake b/cmake/QtCMakeVersionHelpers.cmake
index 944060d15c..4d4113bb43 100644
--- a/cmake/QtCMakeVersionHelpers.cmake
+++ b/cmake/QtCMakeVersionHelpers.cmake
@@ -121,6 +121,12 @@ function(qt_internal_warn_about_unsuitable_cmake_versions)
# https://gitlab.kitware.com/cmake/cmake/-/issues/21977
list(APPEND unsuitable_versions "3.20.0")
+ # AUTOMOC can crash or hang when using a Qt that supports moc depfiles.
+ # Issues reported on Windows with Ninja and Makefiles, but it could be happening
+ # on other platforms too.
+ # https://gitlab.kitware.com/cmake/cmake/-/issues/22014
+ list(APPEND unsuitable_versions "3.20.1")
+
foreach(unsuitable_version ${unsuitable_versions})
if(CMAKE_VERSION VERSION_EQUAL unsuitable_version)
message(WARNING
diff --git a/cmake/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 00121013b2..b0b4dd3a82 100644
--- a/cmake/QtConfig.cmake.in
+++ b/cmake/QtConfig.cmake.in
@@ -44,12 +44,28 @@ list(APPEND CMAKE_MODULE_PATH "${_qt_import_prefix}/3rdparty/kwin")
if(APPLE AND (NOT CMAKE_SYSTEM_NAME OR CMAKE_SYSTEM_NAME STREQUAL "Darwin"))
# Add module directory to pick up custom Info.plist template for macOS
list(APPEND CMAKE_MODULE_PATH "${_qt_import_prefix}/macos")
+elseif(APPLE AND CMAKE_SYSTEM_NAME STREQUAL "iOS")
+ # Add module directory to pick up custom Info.plist template for iOS
+ list(APPEND CMAKE_MODULE_PATH "${_qt_import_prefix}/ios")
endif()
set(QT_ADDITIONAL_PACKAGES_PREFIX_PATH "" CACHE STRING "Additional directories where find(Qt6 ...) components are searched")
file(TO_CMAKE_PATH "${QT_ADDITIONAL_PACKAGES_PREFIX_PATH}" _qt_additional_packages_prefix_path)
file(TO_CMAKE_PATH "$ENV{QT_ADDITIONAL_PACKAGES_PREFIX_PATH}" _qt_additional_packages_prefix_path_env)
+# Public helpers available to all Qt packages.
+include("${CMAKE_CURRENT_LIST_DIR}/QtFeature.cmake")
+include("${CMAKE_CURRENT_LIST_DIR}/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()
+
# Find required dependencies, if any.
include(CMakeFindDependencyMacro)
if(EXISTS "${CMAKE_CURRENT_LIST_DIR}/@INSTALL_CMAKE_NAMESPACE@Dependencies.cmake")
@@ -94,3 +110,6 @@ 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()
+__qt_internal_check_link_order_matters()
diff --git a/cmake/QtConfigDependencies.cmake.in b/cmake/QtConfigDependencies.cmake.in
index 52d6421b5e..159d3c020c 100644
--- a/cmake/QtConfigDependencies.cmake.in
+++ b/cmake/QtConfigDependencies.cmake.in
@@ -10,6 +10,7 @@ foreach(_target_dep ${_third_party_deps})
list(GET _target_dep 1 is_optional)
list(GET _target_dep 2 version)
list(GET _target_dep 3 components)
+ list(GET _target_dep 4 optional_components)
set(find_package_args "${pkg}")
if(version)
list(APPEND find_package_args "${version}")
@@ -18,6 +19,10 @@ foreach(_target_dep ${_third_party_deps})
string(REPLACE " " ";" components "${components}")
list(APPEND find_package_args COMPONENTS ${components})
endif()
+ if(optional_components)
+ string(REPLACE " " ";" optional_components "${optional_components}")
+ list(APPEND find_package_args OPTIONAL_COMPONENTS ${optional_components})
+ endif()
# Already build an error message, because find_dependency calls return() on failure.
set(__@INSTALL_CMAKE_NAMESPACE@_message "\nPackage: ${pkg}")
@@ -27,6 +32,9 @@ foreach(_target_dep ${_third_party_deps})
if(components)
string(APPEND __@INSTALL_CMAKE_NAMESPACE@_message "\nComponents: ${components}")
endif()
+ if(optional_components)
+ string(APPEND __@INSTALL_CMAKE_NAMESPACE@_message "\nComponents: ${optional_components}")
+ endif()
set(@INSTALL_CMAKE_NAMESPACE@_DEPENDENCY_NOT_FOUND_MESSAGE
"${__@INSTALL_CMAKE_NAMESPACE@_message}")
diff --git a/cmake/QtDocsHelpers.cmake b/cmake/QtDocsHelpers.cmake
index 593a72c90e..d534ee3e8b 100644
--- a/cmake/QtDocsHelpers.cmake
+++ b/cmake/QtDocsHelpers.cmake
@@ -31,15 +31,22 @@ function(qt_internal_add_docs)
return()
endif()
- if(QT_SUPERBUILD)
- set(doc_tools_dir "${QtBase_BINARY_DIR}/${INSTALL_BINDIR}")
+ set(tool_dependencies_enabled TRUE)
+ if(NOT "${QT_HOST_PATH}" STREQUAL "")
+ set(tool_dependencies_enabled FALSE)
+ 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_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")
@@ -85,7 +92,6 @@ function(qt_internal_add_docs)
# qtattributionsscanner
add_custom_target(qattributionsscanner_${target}
- DEPENDS ${qattributionsscanner_bin}
COMMAND ${qtattributionsscanner_bin}
${PROJECT_SOURCE_DIR}
--filter "QDocModule=${doc_target}"
@@ -120,7 +126,6 @@ function(qt_internal_add_docs)
)
add_custom_target(prepare_docs_${target}
- DEPENDS ${qdoc_bin}
COMMAND ${CMAKE_COMMAND} -E env ${qdoc_env_args}
${qdoc_bin}
${prepare_qdoc_args}
@@ -139,8 +144,12 @@ function(qt_internal_add_docs)
)
foreach(target_prefix generate_top_level_docs generate_repo_docs generate_docs)
+ set(depends_arg "")
+ if(tool_dependencies_enabled)
+ set(depends_arg DEPENDS ${qdoc_bin})
+ endif()
add_custom_target(${target_prefix}_${target}
- DEPENDS ${qdoc_bin}
+ ${depends_arg}
COMMAND ${CMAKE_COMMAND} -E env ${qdoc_env_args} ${qdoc_bin} ${generate_qdocs_args})
endforeach()
@@ -158,8 +167,12 @@ function(qt_internal_add_docs)
set(qch_file_path ${qdoc_qch_output_dir}/${qch_file_name})
foreach(target_prefix qch_top_level_docs qch_repo_docs qch_docs)
+ set(depends_arg "")
+ if(tool_dependencies_enabled)
+ set(depends_arg DEPENDS ${qhelpgenerator_bin})
+ endif()
add_custom_target(${target_prefix}_${target}
- DEPENDS ${qhelpgenerator_bin}
+ ${depends_arg}
COMMAND ${qhelpgenerator_bin}
"${qdoc_output_dir}/${doc_target}.qhp"
-o "${qch_file_path}"
@@ -218,7 +231,9 @@ function(qt_internal_add_docs)
# Make sure that the necessary tools are built when running,
# for example 'cmake --build . --target generate_docs'.
- qt_internal_add_doc_tool_dependency(qattributionsscanner_${target} qtattributionsscanner)
- qt_internal_add_doc_tool_dependency(prepare_docs_${target} qdoc)
- qt_internal_add_doc_tool_dependency(qch_docs_${target} qhelpgenerator)
+ if(tool_dependencies_enabled)
+ qt_internal_add_doc_tool_dependency(qattributionsscanner_${target} qtattributionsscanner)
+ qt_internal_add_doc_tool_dependency(prepare_docs_${target} qdoc)
+ qt_internal_add_doc_tool_dependency(qch_docs_${target} qhelpgenerator)
+ endif()
endfunction()
diff --git a/cmake/QtExecutableHelpers.cmake b/cmake/QtExecutableHelpers.cmake
index c25a9ae8a3..d1fe6e8096 100644
--- a/cmake/QtExecutableHelpers.cmake
+++ b/cmake/QtExecutableHelpers.cmake
@@ -193,15 +193,57 @@ function(qt_internal_add_executable name)
${extra_libraries}
Qt::PlatformCommonInternal
)
- list(REMOVE_DUPLICATES libs)
+
+ set(deduped_libs "")
foreach(lib IN LISTS libs)
if(NOT TARGET "${lib}")
continue()
endif()
+
+ # Normalize module by stripping any leading "Qt::", because properties are set on the
+ # versioned target (either Gui when building the module, or Qt6::Gui when it's
+ # imported).
+ if(lib MATCHES "Qt::([-_A-Za-z0-9]+)")
+ set(new_lib "${QT_CMAKE_EXPORT_NAMESPACE}::${CMAKE_MATCH_1}")
+ if(TARGET "${new_lib}")
+ set(lib "${new_lib}")
+ endif()
+ endif()
+
+ # Unalias the target.
+ get_target_property(aliased_target ${lib} ALIASED_TARGET)
+ if(aliased_target)
+ set(lib ${aliased_target})
+ endif()
+
+ list(APPEND deduped_libs "${lib}")
+ endforeach()
+
+ list(REMOVE_DUPLICATES deduped_libs)
+
+ foreach(lib IN LISTS deduped_libs)
string(MAKE_C_IDENTIFIER "${name}_plugin_imports_${lib}" out_file)
string(APPEND out_file .cpp)
- set(class_names "$<GENEX_EVAL:$<TARGET_PROPERTY:${lib},_qt_repo_plugin_class_names>>")
- file(GENERATE OUTPUT ${out_file} CONTENT
+
+ # Initialize plugins that are built in the same repository as the Qt module 'lib'.
+ set(class_names_regular
+ "$<GENEX_EVAL:$<TARGET_PROPERTY:${lib},_qt_initial_repo_plugin_class_names>>")
+
+ # Initialize plugins that are built in the current Qt repository, but are associated
+ # with a Qt module from a different repository (qtsvg's QSvgPlugin associated with
+ # qtbase's QtGui).
+ string(MAKE_C_IDENTIFIER "${PROJECT_NAME}" current_project_name)
+ set(prop_prefix "_qt_repo_${current_project_name}")
+ set(class_names_current_project
+ "$<GENEX_EVAL:$<TARGET_PROPERTY:${lib},${prop_prefix}_plugin_class_names>>")
+
+ # Only add separator if first list is not empty, so we don't trigger the file generation
+ # when all lists are empty.
+ set(class_names_separator "$<$<NOT:$<STREQUAL:${class_names_regular},>>:;>" )
+ set(class_names
+ "${class_names_regular}${class_names_separator}${class_names_current_project}")
+
+ file(GENERATE OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${out_file} CONTENT
"// This file is auto-generated. Do not edit.
#include <QtPlugin>
@@ -210,9 +252,11 @@ Q_IMPORT_PLUGIN($<JOIN:${class_names},)\nQ_IMPORT_PLUGIN(>)
CONDITION "$<NOT:$<STREQUAL:${class_names},>>"
)
target_sources(${name} PRIVATE
- "$<$<NOT:$<STREQUAL:${class_names},>>:${out_file}>"
+ "$<$<NOT:$<STREQUAL:${class_names},>>:${CMAKE_CURRENT_BINARY_DIR}/${out_file}>"
)
- target_link_libraries(${name} PRIVATE "$<TARGET_PROPERTY:${lib},_qt_repo_plugins>")
+ target_link_libraries(${name} PRIVATE
+ "$<TARGET_PROPERTY:${lib},_qt_initial_repo_plugins>"
+ "$<TARGET_PROPERTY:${lib},${prop_prefix}_plugins>")
endforeach()
endif()
endfunction()
diff --git a/cmake/QtFeature.cmake b/cmake/QtFeature.cmake
index 7f4a9d8b52..747e0e9405 100644
--- a/cmake/QtFeature.cmake
+++ b/cmake/QtFeature.cmake
@@ -522,6 +522,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 +671,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 +690,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 +736,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 +815,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")
diff --git a/cmake/QtFindPackageHelpers.cmake b/cmake/QtFindPackageHelpers.cmake
index 2ccd61c938..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,17 +218,17 @@ 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.
- qt_internal_module_info(qtfied_target_name "${dep_target_name}")
- qt_record_extra_package_dependency("${main_target_name}" "${qtfied_target_name_versioned}"
- "${dep_package_version}")
+ # 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}")
endfunction()
# This function records a 'QtFooTools' package dependency for the ${main_target_name} target
@@ -249,12 +264,12 @@ function(qt_record_extra_qt_main_tools_package_dependency main_target_name
dep_non_versioned_package_name
dep_package_version)
# WaylandScannerTools -> Qt6WaylandScannerTools.
- qt_internal_module_info(qtfied_package_name "${dep_non_versioned_package_name}")
+ qt_internal_qtfy_target(qtfied_package_name "${dep_non_versioned_package_name}")
qt_record_extra_main_tools_package_dependency(
"${main_target_name}" "${qtfied_package_name_versioned}" "${dep_package_version}")
endfunction()
-# 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 7de3bd48f3..a932f2f988 100644
--- a/cmake/QtFinishPrlFile.cmake
+++ b/cmake/QtFinishPrlFile.cmake
@@ -10,15 +10,18 @@
# - Prepends '-l' to values that are not absolute paths, and don't start with a dash
# aka, '-lfoo', '-framework', '-pthread'.
#
+# The path to the final .prl file is stored in the input file as assignment to FINAL_PRL_FILE_PATH.
+#
# This file is to be used in CMake script mode with the following variables set:
-# IN_FILE: path to the preliminary .prl file
-# OUT_FILE: path to the final .prl file that's going to be installed
+# IN_FILE: path to the step 1 preliminary .prl file
+# OUT_FILE: path to the step 2 preliminary .prl file that is going to be created
# QT_LIB_DIRS: list of paths where Qt libraries are located.
# This includes the install prefix and the current repo build dir.
# These paths get replaced with relocatable paths or linker / framework flags.
# 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
include("${CMAKE_CURRENT_LIST_DIR}/QtGenerateLibHelpers.cmake")
@@ -70,7 +73,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..4679a00a1a 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)
diff --git a/cmake/QtFrameworkHelpers.cmake b/cmake/QtFrameworkHelpers.cmake
index 6289ce98b1..5fd8896ec4 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()
@@ -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..913b0ed90a 100644
--- a/cmake/QtGenerateLibHelpers.cmake
+++ b/cmake/QtGenerateLibHelpers.cmake
@@ -64,6 +64,12 @@ 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)
+ get_filename_component(dir "${library_path}" DIRECTORY)
+ # If library_path isn't in default link directories, we should add it to link flags.
+ list(FIND IMPLICIT_LINK_DIRECTORIES ${dir} 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..3c5e860e16 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
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 df9724765e..52d29a8673 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,17 @@ 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 "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
+ list(APPEND flags -no-integrated-cpp)
+ endif()
+
# Work-around for bug https://code.google.com/p/android/issues/detail?id=58135
if (ANDROID)
list(APPEND flags -Wno-error=literal-suffix)
@@ -148,13 +159,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
- "$<$<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)
@@ -317,8 +326,5 @@ function(qt_handle_apple_app_extension_api_only)
target_link_options(PlatformPluginInternal INTERFACE ${flags})
endif()
endfunction()
-function(qt_disable_apple_app_extension_api_only target)
- set_target_properties("${target}" PROPERTIES QT_NO_APP_EXTENSION_ONLY_API TRUE)
-endfunction()
qt_handle_apple_app_extension_api_only()
diff --git a/cmake/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..b31cef1dda 100644
--- a/cmake/QtModuleDependencies.cmake.in
+++ b/cmake/QtModuleDependencies.cmake.in
@@ -22,6 +22,7 @@ foreach(_target_dep ${_third_party_deps})
list(GET _target_dep 1 is_optional)
list(GET _target_dep 2 version)
list(GET _target_dep 3 components)
+ list(GET _target_dep 4 optional_components)
set(find_package_args "${pkg}")
if(version)
list(APPEND find_package_args "${version}")
@@ -30,6 +31,10 @@ foreach(_target_dep ${_third_party_deps})
string(REPLACE " " ";" components "${components}")
list(APPEND find_package_args COMPONENTS ${components})
endif()
+ if(optional_components)
+ string(REPLACE " " ";" optional_components "${optional_components}")
+ list(APPEND find_package_args OPTIONAL_COMPONENTS ${optional_components})
+ endif()
if(is_optional)
if(${CMAKE_FIND_PACKAGE_NAME}_FIND_QUIETLY)
@@ -63,7 +68,11 @@ foreach(_target_dep ${_tool_deps})
if(${CMAKE_FIND_PACKAGE_NAME}_FIND_REQUIRED)
list(APPEND find_package_args REQUIRED)
endif()
- find_package(${pkg} ${version} ${find_package_args})
+ find_package(${pkg} ${version} ${find_package_args}
+ PATHS
+ ${_qt_additional_packages_prefix_path}
+ ${_qt_additional_packages_prefix_path_env}
+ )
if (NOT ${pkg}_FOUND)
if(NOT "${QT_HOST_PATH}" STREQUAL "")
set(CMAKE_PREFIX_PATH ${BACKUP_@target@_CMAKE_PREFIX_PATH})
@@ -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(_@target@_target_deps "@target_deps@")
+set(_@target@_find_dependency_paths "${CMAKE_CURRENT_LIST_DIR}/..")
+_qt_internal_find_dependencies(_@target@_target_deps _@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 886e338b20..eec70f86d4 100644
--- a/cmake/QtModuleHelpers.cmake
+++ b/cmake/QtModuleHelpers.cmake
@@ -1,3 +1,38 @@
+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_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
+ ${__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,51 +49,105 @@
# 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})
+
+ 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}")
+
set(property_prefix "INTERFACE_")
if(NOT arg_HEADER_MODULE)
qt_set_common_target_properties(${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 +159,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 +187,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,14 +197,21 @@ 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
_qt_config_module_name ${arg_CONFIG_MODULE_NAME}_private)
set_property(TARGET "${target_private}" APPEND PROPERTY
EXPORT_PROPERTIES _qt_config_module_name)
+ elseif(arg_INTERNAL_MODULE)
+ # TODO: We need to create temporary private targets for the internal modules to keep the
+ # existing code compatible to the internal modules that don't have the 'Private' suffix yet.
+ # Remove this once the migration is complete.
+ add_library("${target_private}" INTERFACE)
+ qt_internal_add_target_aliases("${target_private}")
+ target_link_libraries(${target_private} INTERFACE ${target})
endif()
if(NOT arg_HEADER_MODULE)
@@ -159,7 +253,7 @@ 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
@@ -167,8 +261,6 @@ function(qt_internal_add_module target)
)
endif()
- _qt_internal_apply_win_prefix_and_suffix("${target}")
-
if (WIN32 AND BUILD_SHARED_LIBS)
_qt_internal_generate_win32_rc_file(${target})
endif()
@@ -285,7 +377,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 +394,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,10 +450,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}
)
- endif()
-
- if(MSVC)
- list(APPEND defines_for_extend_target _CRT_SECURE_NO_WARNINGS)
+ list(APPEND arg_LIBRARIES Qt::PlatformModuleInternal)
endif()
qt_internal_extend_target("${target}"
@@ -375,7 +466,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}
@@ -411,16 +502,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)
@@ -490,21 +585,12 @@ 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)
@@ -548,7 +634,8 @@ set(QT_CMAKE_EXPORT_NAMESPACE ${QT_CMAKE_EXPORT_NAMESPACE})")
file(COPY ${extra_cmake_files} DESTINATION "${config_build_dir}")
set(exported_targets ${target})
- if(NOT ${arg_NO_PRIVATE_MODULE})
+ #TODO: remove the 'OR arg_INTERNAL_MODULE' part once renaming of internal modules is finished.
+ if(NOT ${arg_NO_PRIVATE_MODULE} OR arg_INTERNAL_MODULE)
list(APPEND exported_targets ${target_private})
endif()
set(export_name "${INSTALL_CMAKE_NAMESPACE}${target}Targets")
@@ -589,12 +676,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)
@@ -603,7 +684,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}>")
@@ -620,11 +701,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}>"
@@ -640,7 +721,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()
@@ -675,7 +758,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"
@@ -689,11 +772,16 @@ endfunction()
# 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
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)
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/QtPlatformSupport.cmake b/cmake/QtPlatformSupport.cmake
index 94ff238418..e4c8ca123b 100644
--- a/cmake/QtPlatformSupport.cmake
+++ b/cmake/QtPlatformSupport.cmake
@@ -17,6 +17,7 @@ qt_set01(OPENBSD CMAKE_SYSTEM_NAME STREQUAL "OpenBSD") # FIXME: How to identify
qt_set01(FREEBSD CMAKE_SYSTEM_NAME STREQUAL "FreeBSD") # FIXME: How to identify this?
qt_set01(NETBSD CMAKE_SYSTEM_NAME STREQUAL "NetBSD") # FIXME: How to identify this?
qt_set01(WASM CMAKE_SYSTEM_NAME STREQUAL "Emscripten" OR EMSCRIPTEN)
+qt_set01(SOLARIS CMAKE_SYSTEM_NAME STREQUAL "SunOS")
qt_set01(BSD APPLE OR OPENBSD OR FREEBSD OR NETBSD)
diff --git a/cmake/QtPublicTargetsHelpers.cmake b/cmake/QtPlatformTargetHelpers.cmake
index 6558becf5c..0ff8761f33 100644
--- a/cmake/QtPublicTargetsHelpers.cmake
+++ b/cmake/QtPlatformTargetHelpers.cmake
@@ -4,6 +4,7 @@ function(qt_internal_setup_public_platform_target)
## QtPlatform Target:
add_library(Platform INTERFACE)
add_library(Qt::Platform ALIAS Platform)
+ add_library(${INSTALL_CMAKE_NAMESPACE}::Platform ALIAS Platform)
target_include_directories(Platform
INTERFACE
$<BUILD_INTERFACE:${QT_PLATFORM_DEFINITION_DIR_ABSOLUTE}>
@@ -29,4 +30,6 @@ function(qt_internal_setup_public_platform_target)
# 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()
diff --git a/cmake/QtPluginConfig.cmake.in b/cmake/QtPluginConfig.cmake.in
index e3fe9f06ae..7bd9a1d579 100644
--- a/cmake/QtPluginConfig.cmake.in
+++ b/cmake/QtPluginConfig.cmake.in
@@ -1,6 +1,6 @@
include_guard(DIRECTORY)
-if(DEFINED QT_REPO_DEPENDENCIES)
+if(DEFINED QT_REPO_DEPENDENCIES AND NOT QT_BUILD_STANDALONE_TESTS)
# We're building a Qt repository.
# Skip this plugin if it has not been provided by one of this repo's dependencies.
string(TOLOWER "@PROJECT_NAME@" lower_case_project_name)
diff --git a/cmake/QtPluginDependencies.cmake.in b/cmake/QtPluginDependencies.cmake.in
index 7bd1eef9aa..7dde52ba6a 100644
--- a/cmake/QtPluginDependencies.cmake.in
+++ b/cmake/QtPluginDependencies.cmake.in
@@ -8,6 +8,7 @@ foreach(_target_dep ${_third_party_deps})
list(GET _target_dep 1 is_optional)
list(GET _target_dep 2 version)
list(GET _target_dep 3 components)
+ list(GET _target_dep 4 optional_components)
set(find_package_args "${pkg}")
if(version)
list(APPEND find_package_args "${version}")
@@ -16,6 +17,10 @@ foreach(_target_dep ${_third_party_deps})
string(REPLACE " " ";" components "${components}")
list(APPEND find_package_args COMPONENTS ${components})
endif()
+ if(optional_components)
+ string(REPLACE " " ";" optional_components "${optional_components}")
+ list(APPEND find_package_args OPTIONAL_COMPONENTS ${optional_components})
+ endif()
if(is_optional)
if(${CMAKE_FIND_PACKAGE_NAME}_FIND_QUIETLY)
@@ -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(_@target@_target_deps "@target_deps@")
+set(_@target@_find_dependency_paths "@find_dependency_paths@")
+_qt_internal_find_dependencies(_@target@_target_deps _@target@_find_dependency_paths)
set(@target@_FOUND TRUE)
diff --git a/cmake/QtPluginHelpers.cmake b/cmake/QtPluginHelpers.cmake
index a3a4c94a80..11bfbfea11 100644
--- a/cmake/QtPluginHelpers.cmake
+++ b/cmake/QtPluginHelpers.cmake
@@ -119,10 +119,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}"
@@ -176,30 +172,69 @@ function(qt_internal_add_plugin target)
endif()
get_target_property(is_imported_qt_module ${qt_module_target} IMPORTED)
+ # Associate plugin with its Qt module when both are both built in the same repository.
+ # Check that by comparing the PROJECT_NAME of each.
+ # This covers auto-linking of the majority of plugins to executables and in-tree tests.
+ # Linking of plugins in standalone tests (when the Qt module will be an imported target)
+ # is handled instead by the complicated genex logic in QtModulePlugins.cmake.in.
+ set(is_plugin_and_module_in_same_project FALSE)
if(NOT is_imported_qt_module)
+ # This QT_PLUGINS assignment is only used by QtPostProcessHelpers to decide if a
+ # QtModulePlugins.cmake file should be generated (which only happens in static builds).
set_property(TARGET "${qt_module_target}" APPEND PROPERTY QT_PLUGINS "${target}")
+
get_target_property(module_source_dir ${qt_module_target} SOURCE_DIR)
get_directory_property(module_project_name
DIRECTORY ${module_source_dir}
DEFINITION PROJECT_NAME
)
+ if(module_project_name STREQUAL PROJECT_NAME)
+ set(is_plugin_and_module_in_same_project TRUE)
+ endif()
# When linking static plugins with the special logic in qt_internal_add_executable,
# make sure to skip non-default plugins.
- if(module_project_name STREQUAL PROJECT_NAME AND _default_plugin)
- set_property(TARGET ${qt_module_target} APPEND PROPERTY _qt_repo_plugins "${target}")
- set_property(TARGET ${qt_module_target} APPEND PROPERTY _qt_repo_plugin_class_names
- "$<TARGET_PROPERTY:${target},QT_PLUGIN_CLASS_NAME>"
- )
+ if(is_plugin_and_module_in_same_project AND _default_plugin)
+ set_property(TARGET ${qt_module_target} APPEND PROPERTY
+ _qt_initial_repo_plugins
+ "${target}")
+ set_property(TARGET ${qt_module_target} APPEND PROPERTY
+ _qt_initial_repo_plugin_class_names
+ "$<TARGET_PROPERTY:${target},QT_PLUGIN_CLASS_NAME>"
+ )
endif()
- else()
- # TODO: If a repo A provides an internal executable E and a plugin P, with the plugin
- # type belonging to a Qt module defined in a different repo, and executable E needs to
- # link to plugin P in a static build, currently that won't happen. The executable E
- # will link to plugins mentioned in the Qt module's _qt_repo_plugins property, but that
- # property will not list P because the Qt module will be an imported target and won't
- # have a SOURCE_DIR or PROJECT NAME, so the checks above will not be met.
- # Figure out how to handle such a scenario.
+ endif()
+
+ # Associate plugin with its Qt module when the plugin is built in the current repository
+ # but the module is built in a different repository (qtsvg's QSvgPlugin associated with
+ # qtbase's QtGui).
+ # The association is done in a separate property, to ensure that reconfiguring in-tree tests
+ # in qtbase doesn't accidentally cause linking to a plugin from a previously built qtsvg.
+ # Needed for in-tree tests like in qtsvg, qtimageformats.
+ # This is done for each Qt module regardless if it's an imported target or not, to handle
+ # both per-repo and top-level builds (in per-repo build of qtsvg QtGui is imported, in a
+ # top-level build Gui is not imported, but in both cases qtsvg tests need to link to
+ # QSvgPlugin).
+ #
+ # TODO: Top-level in-tree tests and qdeclarative per-repo in-tree tests that depend on
+ # static Qml plugins won't work due to the requirement of running qmlimportscanner
+ # at configure time, but qmlimportscanner is not built at that point. Moving the
+ # execution of qmlimportscanner to build time is non-trivial because qmlimportscanner
+ # not only generates a cpp file to compile but also outputs a list of static plugins
+ # that should be linked and there is no straightforward way to tell CMake to link
+ # against a list of libraries that was discovered at build time (apart from
+ # response files, which apparently might not work on all platforms).
+ # qmake doesn't have this problem because each project is configured separately so
+ # qmlimportscanner is always built by the time it needs to be run for a test.
+ if(NOT is_plugin_and_module_in_same_project AND _default_plugin)
+ string(MAKE_C_IDENTIFIER "${PROJECT_NAME}" current_project_name)
+ set(prop_prefix "_qt_repo_${current_project_name}")
+ set_property(TARGET ${qt_module_target} APPEND PROPERTY
+ ${prop_prefix}_plugins "${target}")
+ set_property(TARGET ${qt_module_target} APPEND PROPERTY
+ ${prop_prefix}_plugin_class_names
+ "$<TARGET_PROPERTY:${target},QT_PLUGIN_CLASS_NAME>"
+ )
endif()
endif()
@@ -283,8 +318,17 @@ 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)
+ endif()
endif()
if (NOT arg_SKIP_INSTALL)
@@ -303,7 +347,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}")
@@ -333,10 +377,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 4b6065e7a9..1cfba15be2 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
@@ -624,15 +630,27 @@ endif()
string(APPEND QT_EXTRA_BUILD_INTERNALS_VARS "${install_prefix_content}")
- if(NOT QT_SUPERBUILD AND NOT BUILD_SHARED_LIBS)
+ if(NOT BUILD_SHARED_LIBS)
+ # The top-level check needs to happen inside QtBuildInternals, because it's possible
+ # to configure a top-level build with a few repos and then configure another repo
+ # using qt-configure-module in a separate build dir, where QT_SUPERBUILD will not
+ # be set anymore.
string(APPEND QT_EXTRA_BUILD_INTERNALS_VARS
"
-if(DEFINED QT_REPO_MODULE_VERSION AND NOT DEFINED QT_REPO_DEPENDENCIES)
+if(DEFINED QT_REPO_MODULE_VERSION AND NOT DEFINED QT_REPO_DEPENDENCIES AND NOT QT_SUPERBUILD)
qt_internal_read_repo_dependencies(QT_REPO_DEPENDENCIES \"$\{PROJECT_SOURCE_DIR}\")
endif()
")
endif()
+ 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"
@@ -712,10 +730,15 @@ function(qt_internal_create_config_file_for_standalone_tests)
endfunction()
function(qt_internal_install_prl_files)
- # Install prl files
+ # Get locations relative to QT_BUILD_DIR from which prl files should be installed.
get_property(prl_install_dirs GLOBAL PROPERTY QT_PRL_INSTALL_DIRS)
+
+ # Clear the list of install dirs so the previous values don't pollute the list of install dirs
+ # for the next repository in a top-level build.
+ set_property(GLOBAL PROPERTY QT_PRL_INSTALL_DIRS "")
+
foreach(prl_install_dir ${prl_install_dirs})
- qt_install(DIRECTORY "${PROJECT_BINARY_DIR}/${prl_install_dir}/"
+ qt_install(DIRECTORY "${QT_BUILD_DIR}/${prl_install_dir}/"
DESTINATION ${prl_install_dir}
FILES_MATCHING PATTERN "*.prl"
)
diff --git a/cmake/QtPriHelpers.cmake b/cmake/QtPriHelpers.cmake
index 36f455bfa1..cfb5e85dc6 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,11 @@ 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")
+ else()
+ set(link_library_flag ${CMAKE_LINK_LIBRARY_FLAG})
+ endif()
add_custom_command(
OUTPUT "${private_pri_file_path}"
DEPENDS ${inputs}
@@ -383,8 +389,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=${CMAKE_CXX_IMPLICIT_LINK_DIRECTORIES}"
-P "${QT_CMAKE_DIR}/QtGenerateLibPri.cmake"
VERBATIM)
add_custom_target(${target}_lib_pri DEPENDS "${private_pri_file_path}")
@@ -598,6 +605,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 +799,11 @@ CONFIG += ${private_config_joined}
${CMAKE_SHARED_LIBRARY_SUFFIX}
${CMAKE_EXTRA_SHARED_LIBRARY_SUFFIXES}
${CMAKE_STATIC_LIBRARY_SUFFIX})
+ if(MSVC)
+ set(link_library_flag "-l")
+ else()
+ set(link_library_flag ${CMAKE_LINK_LIBRARY_FLAG})
+ endif()
add_custom_command(
OUTPUT "${qmodule_pri_target_path}"
DEPENDS ${inputs}
@@ -793,8 +812,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=${CMAKE_CXX_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 29555f1fb3..a74a2cf6fd 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)
@@ -329,7 +94,11 @@ function(qt_generate_prl_file target install_dir)
"${prl_meta_info_name_prefix}$<CONFIG>${prl_meta_info_name_suffix}")
# The final prl file name that will be embedded in the file above.
- set(final_prl_file_name "${prefix_for_final_prl_name}$<TARGET_FILE_BASE_NAME:${target}>.prl")
+ set(final_prl_file_name "${prefix_for_final_prl_name}$<TARGET_FILE_BASE_NAME:${target}>")
+ if(ANDROID)
+ string(APPEND final_prl_file_name "_${CMAKE_ANDROID_ARCH_ABI}")
+ endif()
+ string(APPEND final_prl_file_name ".prl")
qt_path_join(final_prl_file_path "${QT_BUILD_DIR}/${install_dir}" "${final_prl_file_name}")
# Generate the prl content and its final file name into configuration specific files
@@ -382,6 +151,11 @@ ${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")
+ else()
+ set(link_library_flag ${CMAKE_LINK_LIBRARY_FLAG})
+ endif()
add_custom_command(
OUTPUT "${prl_step2_path}"
DEPENDS "${prl_step1_path}"
@@ -394,8 +168,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=${CMAKE_CXX_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 8d4cef232b..ba056290cc 100644
--- a/cmake/QtProcessConfigureArgs.cmake
+++ b/cmake/QtProcessConfigureArgs.cmake
@@ -28,8 +28,10 @@ endmacro()
if("${MODULE_ROOT}" STREQUAL "")
# If MODULE_ROOT is not set, assume that we want to build qtbase or top-level.
get_filename_component(MODULE_ROOT ".." ABSOLUTE BASE_DIR "${CMAKE_CURRENT_LIST_DIR}")
+ set(qtbase_or_top_level_build TRUE)
else()
file(TO_CMAKE_PATH "${MODULE_ROOT}" MODULE_ROOT)
+ set(qtbase_or_top_level_build FALSE)
endif()
set(configure_filename "configure.cmake")
set(commandline_filename "qt_cmdline.cmake")
@@ -54,9 +56,10 @@ list(FILTER configure_args EXCLUDE REGEX "^[ \t]*$")
list(TRANSFORM configure_args STRIP)
list(TRANSFORM configure_args REPLACE "\\\\" "\\\\\\\\")
unset(generator)
-set(auto_detect_generator TRUE)
set(auto_detect_compiler TRUE)
+set(auto_detect_generator ${qtbase_or_top_level_build})
unset(device_options)
+unset(options_json_file)
set_property(GLOBAL PROPERTY UNHANDLED_ARGS "")
while(NOT "${configure_args}" STREQUAL "")
list(POP_FRONT configure_args arg)
@@ -68,6 +71,8 @@ while(NOT "${configure_args}" STREQUAL "")
set(auto_detect_compiler FALSE)
elseif(arg STREQUAL "-list-features")
set(list_features TRUE)
+ elseif(arg STREQUAL "-write-options-for-conan")
+ list(POP_FRONT configure_args options_json_file)
elseif(arg STREQUAL "-skip")
list(POP_FRONT configure_args qtrepo)
push("-DBUILD_${qtrepo}=OFF")
@@ -86,6 +91,14 @@ while(NOT "${configure_args}" STREQUAL "")
string(APPEND path "/mkspecs")
endif()
push("-DINSTALL_MKSPECSDIR=${path}")
+ elseif(arg STREQUAL "-developer-build")
+ set(developer_build TRUE)
+ # Treat this argument as "unhandled" to process it further.
+ set_property(GLOBAL APPEND PROPERTY UNHANDLED_ARGS "${arg}")
+ elseif(arg STREQUAL "-cmake-file-api")
+ set(cmake_file_api TRUE)
+ elseif(arg STREQUAL "-no-cmake-file-api")
+ set(cmake_file_api FALSE)
elseif(arg MATCHES "^-host.*dir")
message(FATAL_ERROR "${arg} is not supported anymore.")
elseif(arg STREQUAL "--")
@@ -150,6 +163,7 @@ defstub(qt_set01)
# Define functions/macros that are called in qt_cmdline.cmake files
####################################################################################################
+unset(commandline_known_options)
unset(commandline_custom_handlers)
set(commandline_nr_of_prefixes 0)
set(commandline_nr_of_assignments 0)
@@ -168,6 +182,7 @@ function(qt_commandline_option name)
set(multiValueArgs VALUES MAPPING)
cmake_parse_arguments(arg "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN})
+ set(commandline_known_options "${commandline_known_options};${name}" PARENT_SCOPE)
set(commandline_option_${name} "${arg_TYPE}" PARENT_SCOPE)
if(NOT "${arg_NAME}" STREQUAL "")
set(commandline_option_${name}_variable "${arg_NAME}" PARENT_SCOPE)
@@ -376,7 +391,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})
@@ -452,6 +467,76 @@ if(list_features)
return()
endif()
+function(write_options_json_file)
+ if(qtbase_or_top_level_build)
+ # Add options that are handled directly by this script.
+ qt_commandline_option(qt-host-path TYPE string)
+ qt_commandline_option(no-guess-compiler TYPE void)
+ endif()
+
+ set(indent " ")
+ set(content
+ "{"
+ "${indent}\"options\": {")
+ string(APPEND indent " ")
+ list(LENGTH commandline_known_options commandline_known_options_length)
+ set(i 1)
+ foreach(opt ${commandline_known_options})
+ list(APPEND content "${indent}\"${opt}\": {")
+ string(APPEND indent " ")
+ list(APPEND content "${indent}\"type\": \"${commandline_option_${opt}}\",")
+ if(NOT "${commandline_option_${opt}_values}" STREQUAL "")
+ set(values "${commandline_option_${opt}_values}")
+ list(TRANSFORM values PREPEND "\"")
+ list(TRANSFORM values APPEND "\"")
+ list(JOIN values ", " values)
+ list(APPEND content "${indent}\"values\": [${values}]")
+ elseif(NOT "${commandline_option_${opt}_mapping}" STREQUAL "")
+ list(LENGTH commandline_option_${opt}_mapping last)
+ math(EXPR last "${last} - 1")
+ set(values "")
+ list(APPEND content "${indent}\"values\": [")
+ foreach(k RANGE 0 "${last}" 2)
+ list(GET commandline_option_${opt}_mapping ${k} value)
+ list(APPEND values ${value})
+ endforeach()
+ list(TRANSFORM values PREPEND "\"")
+ list(TRANSFORM values APPEND "\"")
+ list(JOIN values ", " values)
+ list(APPEND content
+ "${indent} ${values}"
+ "${indent}]")
+ else()
+ list(APPEND content "${indent}\"values\": []")
+ endif()
+ string(SUBSTRING "${indent}" 4 -1 indent)
+ math(EXPR i "${i} + 1")
+ if(i LESS commandline_known_options_length)
+ list(APPEND content "${indent}},")
+ else()
+ list(APPEND content "${indent}}")
+ endif()
+ endforeach()
+ string(SUBSTRING "${indent}" 4 -1 indent)
+
+ set(features ${commandline_known_features})
+ list(TRANSFORM features PREPEND "\"")
+ list(TRANSFORM features APPEND "\"")
+ list(JOIN features ", " features)
+
+ list(APPEND content
+ "${indent}},"
+ "${indent}\"features\": [${features}]"
+ "}")
+ string(REPLACE ";" "\n" content "${content}")
+ file(WRITE "${options_json_file}" "${content}")
+endfunction()
+
+if(options_json_file)
+ write_options_json_file()
+ return()
+endif()
+
while(1)
qtConfHasNextCommandlineArg(has_next)
if(NOT has_next)
@@ -639,12 +724,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}")
@@ -786,6 +877,12 @@ translate_list_input(includes QT_EXTRA_INCLUDEPATHS)
translate_list_input(lpaths QT_EXTRA_LIBDIRS)
translate_list_input(rpaths QT_EXTRA_RPATHS)
+if(cmake_file_api OR (developer_build AND NOT DEFINED cmake_file_api))
+ foreach(file cache-v2 cmakeFiles-v1 codemodel-v2 toolchains-v1)
+ file(WRITE "${CMAKE_BINARY_DIR}/.cmake/api/v1/query/${file}" "")
+ endforeach()
+endif()
+
foreach(input ${config_inputs})
qt_feature_normalize_name("${input}" cmake_input)
push("-DINPUT_${cmake_input}=${INPUT_${input}}")
diff --git a/cmake/QtPublicDependencyHelpers.cmake b/cmake/QtPublicDependencyHelpers.cmake
new file mode 100644
index 0000000000..e5e41b92af
--- /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(target_dep IN LISTS ${target_dep_list})
+ list(GET target_dep 0 pkg)
+ list(GET target_dep 1 version)
+
+ if (NOT ${pkg}_FOUND)
+ set(pkg_names ${pkg})
+ if(pkg MATCHES "(.*)Private$")
+ set(pkg_names "${CMAKE_MATCH_1};${pkg}")
+ endif()
+ find_dependency(${pkg} ${version}
+ NAMES
+ ${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..919aee10c6
--- /dev/null
+++ b/cmake/QtPublicPluginHelpers.cmake
@@ -0,0 +1,417 @@
+# 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 is true, we link against the plug-in
+ set(plugin_genex "$<${full_plugin_condition}:${plugin_target}>")
+ target_link_libraries(${qt_module_target} INTERFACE "${plugin_genex}")
+endfunction()
+
+# Generates C++ import macro source code for given plugin
+function(__qt_internal_get_plugin_import_macro plugin_target out_var)
+ set(plugin_target_prefixed "${QT_CMAKE_EXPORT_NAMESPACE}::${plugin_target}")
+
+ # Query the class name of plugin targets prefixed with a Qt namespace and without, this is
+ # needed to support plugin object initializers created by user projects.
+ set(class_name"")
+ set(class_name_prefixed "")
+
+ if(TARGET ${plugin_target})
+ get_target_property(class_name "${plugin_target}" QT_PLUGIN_CLASS_NAME)
+ endif()
+
+ if(TARGET ${plugin_target_prefixed})
+ get_target_property(class_name_prefixed "${plugin_target_prefixed}" QT_PLUGIN_CLASS_NAME)
+ endif()
+
+ if(NOT class_name AND NOT class_name_prefixed)
+ message(FATAL_ERROR "No QT_PLUGIN_CLASS_NAME value on target: '${plugin_target}'")
+ endif()
+
+ # Qt prefixed target takes priority.
+ if(class_name_prefixed)
+ set(class_name "${class_name_prefixed}")
+ endif()
+
+ set(${out_var} "Q_IMPORT_PLUGIN(${class_name})" PARENT_SCOPE)
+endfunction()
+
+function(__qt_internal_get_plugin_include_prelude out_var)
+ set(${out_var} "#include <QtPlugin>\n" PARENT_SCOPE)
+endfunction()
+
+# Set up plugin initialization via usage requirements of associated Qt module.
+#
+# Adds the plugin init object library as an INTERFACE source of the plugin target.
+# This is similar to how it was done before, except instead of generating a C++ file and compiling
+# it as part of the user project, we just specify the pre-compiled object file as an INTERFACE
+# source so that user projects don't have to compile it. User project builds will thus be shorter.
+function(__qt_internal_add_static_plugin_import_macro
+ plugin_target
+ qt_module_target
+ qt_module_unprefixed)
+
+ __qt_internal_get_static_plugin_init_target_name("${plugin_target}" plugin_init_target)
+ set(objs_genex "$<TARGET_OBJECTS:${QT_CMAKE_EXPORT_NAMESPACE}::${plugin_init_target}>")
+
+ # TODO: Replace the target_sources call here with the more generalized approach that will be
+ # added to __qt_propagate_generated_resource (the one that determines whether to use
+ # target_sources or target_link_libraries depending on the CMake version).
+ target_sources(${QT_CMAKE_EXPORT_NAMESPACE}::${plugin_target} INTERFACE
+ "${objs_genex}")
+endfunction()
+
+# Get target name of object library which is used to initialize a qt plugin.
+function(__qt_internal_get_static_plugin_init_target_name plugin_target out_var)
+ # Keep the target name short, so we don't hit long path issues on Windows.
+ set(plugin_init_target "${plugin_target}_init")
+
+ set(${out_var} "${plugin_init_target}" PARENT_SCOPE)
+endfunction()
+
+# Create an object library that initializes a static qt plugin.
+#
+# The object library contains a single generated C++ file that calls Q_IMPORT_PLUGIN(plugin_class).
+# The object library is exported as part of the Qt build and consumed by user applications
+# that link to qt plugins.
+#
+# The created target name is assigned to 'out_var_plugin_init_target'.
+function(__qt_internal_add_static_plugin_init_object_library
+ plugin_target
+ out_var_plugin_init_target)
+
+ __qt_internal_get_plugin_import_macro(${plugin_target} import_macro)
+ __qt_internal_get_plugin_include_prelude(include_prelude)
+ set(import_content "${include_prelude}${import_macro}")
+
+ string(MAKE_C_IDENTIFIER "${plugin_target}" plugin_target_identifier)
+ set(generated_qt_plugin_file_name
+ "${CMAKE_CURRENT_BINARY_DIR}/${plugin_target_identifier}_init.cpp")
+
+ file(GENERATE
+ OUTPUT "${generated_qt_plugin_file_name}"
+ CONTENT "${import_content}"
+ )
+
+ __qt_internal_get_static_plugin_init_target_name("${plugin_target}" plugin_init_target)
+
+ add_library("${plugin_init_target}" OBJECT "${generated_qt_plugin_file_name}")
+ target_link_libraries(${plugin_init_target}
+ PRIVATE
+
+ # Core provides the symbols needed by Q_IMPORT_PLUGIN.
+ ${QT_CMAKE_EXPORT_NAMESPACE}::Core
+ )
+
+ set_property(TARGET ${plugin_init_target} PROPERTY _is_qt_plugin_init_target TRUE)
+ set_property(TARGET ${plugin_init_target} APPEND PROPERTY
+ EXPORT_PROPERTIES _is_qt_plugin_init_target
+ )
+
+ set(${out_var_plugin_init_target} "${plugin_init_target}" PARENT_SCOPE)
+endfunction()
+
+# Collect a list of genexes to link plugin libraries.
+function(__qt_internal_collect_plugin_libraries plugin_targets out_var)
+ set(plugins_to_link "")
+
+ foreach(plugin_target ${plugin_targets})
+ __qt_internal_get_static_plugin_condition_genex(
+ "${plugin_target}"
+ plugin_condition)
+
+ set(plugin_target_versioned "${QT_CMAKE_EXPORT_NAMESPACE}::${plugin_target}")
+
+ list(APPEND plugins_to_link "$<${plugin_condition}:${plugin_target_versioned}>")
+ endforeach()
+
+ set("${out_var}" "${plugins_to_link}" PARENT_SCOPE)
+endfunction()
+
+# Collect a list of genexes to link plugin initializer object libraries.
+#
+# The object libraries are only linked if the associated plugins are linked.
+function(__qt_internal_collect_plugin_init_libraries plugin_targets out_var)
+ set(plugin_inits_to_link "")
+
+ foreach(plugin_target ${plugin_targets})
+ __qt_internal_get_static_plugin_condition_genex(
+ "${plugin_target}"
+ plugin_condition)
+
+ __qt_internal_get_static_plugin_init_target_name("${plugin_target}" plugin_init_target)
+ set(plugin_init_target_versioned "${QT_CMAKE_EXPORT_NAMESPACE}::${plugin_init_target}")
+
+ list(APPEND plugin_inits_to_link "$<${plugin_condition}:${plugin_init_target_versioned}>")
+ endforeach()
+
+ set("${out_var}" "${plugin_inits_to_link}" PARENT_SCOPE)
+endfunction()
+
+# Collects all plugin targets discovered by walking the dependencies of ${target}.
+#
+# Walks immediate dependencies and their transitive dependencies.
+# Plugins are collected by inspecting the _qt_plugins property found on any dependency Qt target.
+function(__qt_internal_collect_plugin_targets_from_dependencies target out_var)
+ set(dep_targets "")
+
+ __qt_internal_collect_all_target_dependencies("${target}" dep_targets)
+
+ set(plugin_targets "")
+ foreach(dep_target ${dep_targets})
+ get_target_property(plugins ${dep_target} _qt_plugins)
+ if(plugins)
+ list(APPEND plugin_targets ${plugins})
+ endif()
+ endforeach()
+
+ # Plugins that are specified via qt_import_plugin's INCLUDE or INCLUDE_BY_TYPE can have
+ # dependencies on Qt modules. These modules in turn might bring in more default plugins to link
+ # So it's recursive. Do only one pass for now. Try to extract the included static plugins, walk
+ # their public and private dependencies, check if any of them are Qt modules that provide more
+ # plugins and extract the target names of those plugins.
+ __qt_internal_collect_plugin_targets_from_dependencies_of_plugins(
+ "${target}" recursive_plugin_targets)
+ if(recursive_plugin_targets)
+ list(APPEND plugin_targets ${recursive_plugin_targets})
+ endif()
+ list(REMOVE_DUPLICATES plugin_targets)
+
+ set("${out_var}" "${plugin_targets}" PARENT_SCOPE)
+endfunction()
+
+# Helper to collect plugin targets from encountered module dependencies as a result of walking
+# dependencies. These module dependencies might expose additional plugins.
+function(__qt_internal_collect_plugin_targets_from_dependencies_of_plugins target out_var)
+ set(assigned_plugins_overall "")
+
+ get_target_property(assigned_qt_plugins "${target}" QT_PLUGINS)
+
+ if(assigned_qt_plugins)
+ foreach(assigned_qt_plugin ${assigned_qt_plugins})
+ if(TARGET "${assigned_qt_plugin}")
+ list(APPEND assigned_plugins_overall "${assigned_qt_plugin}")
+ endif()
+ endforeach()
+ endif()
+
+ get_target_property(assigned_qt_plugins_by_type "${target}" _qt_plugins_by_type)
+
+ if(assigned_qt_plugins_by_type)
+ foreach(assigned_qt_plugin ${assigned_qt_plugins_by_type})
+ if(TARGET "${assigned_qt_plugin}")
+ list(APPEND assigned_plugins_overall "${assigned_qt_plugin}")
+ endif()
+ endforeach()
+ endif()
+
+ set(plugin_targets "")
+ foreach(target ${assigned_plugins_overall})
+ __qt_internal_walk_libs(
+ "${target}"
+ dep_targets
+ _discarded_out_var
+ "qt_private_link_library_targets"
+ "collect_targets")
+
+ foreach(dep_target ${dep_targets})
+ get_target_property(plugins ${dep_target} _qt_plugins)
+ if(plugins)
+ list(APPEND plugin_targets ${plugins})
+ endif()
+ endforeach()
+ endforeach()
+
+ list(REMOVE_DUPLICATES plugin_targets)
+
+ set("${out_var}" "${plugin_targets}" PARENT_SCOPE)
+endfunction()
+
+# Helper to check if the finalizer mode of plugin importing should be used.
+# If true or unset, use finalizer mode.
+# If false, use regular mode (usage requirement propagation via associated Qt module)
+function(__qt_internal_get_plugin_imports_finalizer_mode target out_var)
+ get_target_property(value ${target} _qt_static_plugins_use_finalizer_mode)
+ if("${value}" STREQUAL "value-NOTFOUND")
+ set(value "")
+ endif()
+ set(${out_var} "${value}" PARENT_SCOPE)
+endfunction()
+
+# Main logic of finalizer mode.
+function(__qt_internal_apply_plugin_imports_finalizer_mode target)
+ # Nothing to do in a shared build.
+ if(QT6_IS_SHARED_LIBS_BUILD)
+ return()
+ endif()
+
+ # Process a target only once.
+ get_target_property(processed ${target} _qt_plugin_finalizer_imports_processed)
+ if(processed)
+ return()
+ endif()
+
+ __qt_internal_get_plugin_imports_finalizer_mode(${target} use_finalizer_mode)
+
+ # By default if the project hasn't explicitly opted in or out, use finalizer mode.
+ # The precondition for this is that qt_finalize_target was called (either explicitly by the user
+ # or auto-deferred by CMake 3.19+).
+ if("${use_finalizer_mode}" STREQUAL "")
+ qt_enable_import_plugins_finalizer_mode(${target} TRUE)
+ endif()
+
+ # Check if the project chose a mode explicitly.
+ __qt_internal_get_plugin_imports_finalizer_mode(${target} use_finalizer_mode)
+ if(NOT use_finalizer_mode)
+ return()
+ endif()
+
+ __qt_internal_collect_plugin_targets_from_dependencies("${target}" plugin_targets)
+ __qt_internal_collect_plugin_init_libraries("${plugin_targets}" init_libraries)
+ __qt_internal_collect_plugin_libraries("${plugin_targets}" plugin_libraries)
+
+ target_link_libraries(${target} PRIVATE "${plugin_libraries}" "${init_libraries}")
+
+ set_target_properties(${target} PROPERTIES _qt_plugin_finalizer_imports_processed TRUE)
+endfunction()
diff --git a/cmake/QtPublicTargetHelpers.cmake b/cmake/QtPublicTargetHelpers.cmake
new file mode 100644
index 0000000000..5f09e97e0f
--- /dev/null
+++ b/cmake/QtPublicTargetHelpers.cmake
@@ -0,0 +1,256 @@
+function(__qt_internal_strip_target_directory_scope_token target out_var)
+ # In CMake versions earlier than CMake 3.18, a subdirectory scope id is appended to the
+ # target name if the target is referenced in a target_link_libraries command from a
+ # different directory scope than where the target was created.
+ # Strip it.
+ #
+ # For informational purposes, in CMake 3.18, the target name looks as follows:
+ # ::@(0x5604cb3f6b50);Threads::Threads;::@
+ # This case doesn't have to be stripped (at least for now), because when we iterate over
+ # link libraries, the tokens appear as separate target names.
+ #
+ # Example: Threads::Threads::@<0x5604cb3f6b50>
+ # Output: Threads::Threads
+ string(REGEX REPLACE "::@<.+>$" "" target "${target}")
+ set("${out_var}" "${target}" PARENT_SCOPE)
+endfunction()
+
+# Tests if linker could resolve circular dependencies between object files and static libraries.
+function(__qt_internal_static_link_order_public_test result)
+ # We could trust iOS linker
+ if(IOS)
+ set(QT_HAVE_LINK_ORDER_MATTERS "FALSE" CACHE BOOL "Link order matters")
+ endif()
+
+ if(DEFINED QT_HAVE_LINK_ORDER_MATTERS)
+ set(${result} "${QT_HAVE_LINK_ORDER_MATTERS}" PARENT_SCOPE)
+ return()
+ endif()
+
+ if(EXISTS "${QT_CMAKE_DIR}")
+ set(test_source_basedir "${QT_CMAKE_DIR}/..")
+ else()
+ set(test_source_basedir "${_qt_cmake_dir}/${QT_CMAKE_EXPORT_NAMESPACE}")
+ endif()
+
+ try_compile(${result}
+ "${CMAKE_CURRENT_BINARY_DIR}/config.tests/static_link_order"
+ "${test_source_basedir}/config.tests/static_link_order"
+ static_link_order_test
+ static_link_order_test
+ )
+ message(STATUS "Check if linker can resolve circular dependencies - ${${result}}")
+
+ # Invert the result
+ if(${result})
+ set(${result} FALSE)
+ else()
+ set(${result} TRUE)
+ endif()
+
+ set(QT_HAVE_LINK_ORDER_MATTERS "${${result}}" CACHE BOOL "Link order matters")
+
+ set(${result} "${${result}}" PARENT_SCOPE)
+endfunction()
+
+# Sets _qt_link_order_matters flag for the target.
+function(__qt_internal_set_link_order_matters target link_order_matters)
+ if(NOT TARGET ${target})
+ message(FATAL_ERROR "Unable to set _qt_link_order_matters flag. ${target} is not a target.")
+ endif()
+
+ get_target_property(aliased_target ${target} ALIASED_TARGET)
+ if(aliased_target)
+ set(target "${aliased_target}")
+ endif()
+
+ if(link_order_matters)
+ set(link_order_matters TRUE)
+ else()
+ set(link_order_matters FALSE)
+ endif()
+ set_target_properties(${target} PROPERTIES _qt_link_order_matters "${link_order_matters}")
+endfunction()
+
+# Function combines __qt_internal_static_link_order_public_test and
+# __qt_internal_set_link_order_matters calls on Qt::Platform target.
+function(__qt_internal_check_link_order_matters)
+ __qt_internal_static_link_order_public_test(
+ link_order_matters
+ )
+ __qt_internal_set_link_order_matters(
+ ${QT_CMAKE_EXPORT_NAMESPACE}::Platform "${link_order_matters}"
+ )
+
+ if("${ARGC}" GREATER "0" AND NOT ARGV0 STREQUAL "")
+ set(${ARGV0} ${link_order_matters} PARENT_SCOPE)
+ endif()
+endfunction()
+
+function(__qt_internal_process_dependency_object_libraries target)
+ # The CMake versions greater than 3.21 take care about the order of object files in a
+ # linker line, it's expected that all object files are located at the beginning of the linker
+ # line.
+ # So circular dependencies between static libraries and object files are resolved and no need
+ # to call the finalizer code.
+ # TODO: This check is added before the actual release of CMake 3.21. So need to confirm that the
+ # target version meets the expectations.
+ if(CMAKE_VERSION VERSION_GREATER_EQUAL 3.21)
+ return()
+ endif()
+ get_target_property(processed ${target} _qt_object_libraries_finalizer_processed)
+ if(processed)
+ return()
+ endif()
+ set_target_properties(${target} PROPERTIES _qt_object_libraries_finalizer_processed TRUE)
+
+ get_target_property(qt_link_order_matters
+ ${QT_CMAKE_EXPORT_NAMESPACE}::Platform _qt_link_order_matters
+ )
+ __qt_internal_check_finalizer_mode(${target}
+ use_finalizer_mode
+ object_libraries
+ DEFAULT_VALUE "${qt_link_order_matters}"
+ )
+
+ if(NOT use_finalizer_mode)
+ return()
+ endif()
+
+ __qt_internal_collect_dependency_object_libraries(${target} objects)
+ target_sources(${target} PRIVATE "${objects}")
+endfunction()
+
+function(__qt_internal_collect_dependency_object_libraries target out_var)
+ set_property(GLOBAL PROPERTY _qt_processed_object_libraries "")
+
+ __qt_internal_collect_object_libraries_recursively(object_libraries ${target} ${target})
+
+ # Collect object libraries of plugins and plugin dependencies.
+ __qt_internal_collect_plugin_targets_from_dependencies(${target} plugin_targets)
+ __qt_internal_collect_dependency_plugin_object_libraries(${target}
+ "${plugin_targets}"
+ plugin_objects
+ )
+
+ set_property(GLOBAL PROPERTY _qt_processed_object_libraries "")
+
+ list(REMOVE_DUPLICATES object_libraries)
+ set(objects "")
+ foreach(dep IN LISTS object_libraries)
+ list(PREPEND objects "$<TARGET_OBJECTS:${dep}>")
+ endforeach()
+
+ set(${out_var} "${plugin_objects};${objects}" PARENT_SCOPE)
+endfunction()
+
+function(__qt_internal_collect_dependency_plugin_object_libraries target plugin_targets out_var)
+ set(plugin_objects "")
+ foreach(plugin_target IN LISTS plugin_targets)
+ __qt_internal_collect_object_libraries_recursively(plugin_object_libraries
+ "${QT_CMAKE_EXPORT_NAMESPACE}::${plugin_target}"
+ ${target}
+ )
+ __qt_internal_get_static_plugin_condition_genex("${plugin_target}" plugin_condition)
+
+ foreach(plugin_object_library IN LISTS plugin_object_libraries)
+ list(APPEND plugin_objects
+ "$<${plugin_condition}:$<TARGET_OBJECTS:${plugin_object_library}>>"
+ )
+ endforeach()
+ endforeach()
+ set(${out_var} "${plugin_objects}" PARENT_SCOPE)
+endfunction()
+
+function(__qt_internal_collect_object_libraries_recursively out_var target initial_target)
+ get_property(processed_object_libraries GLOBAL PROPERTY _qt_processed_object_libraries)
+
+ set(interface_libs "")
+ set(libs "")
+ if(NOT "${target}" STREQUAL "${initial_target}")
+ get_target_property(interface_libs ${target} INTERFACE_LINK_LIBRARIES)
+ endif()
+ get_target_property(type ${target} TYPE)
+ if(NOT type STREQUAL "INTERFACE_LIBRARY")
+ get_target_property(libs ${target} LINK_LIBRARIES)
+ endif()
+
+ set(object_libraries "")
+ foreach(lib IN LISTS libs interface_libs)
+ if(TARGET ${lib})
+ get_target_property(aliased_target ${lib} ALIASED_TARGET)
+ if(aliased_target)
+ set(lib ${aliased_target})
+ endif()
+
+ if(${lib} IN_LIST processed_object_libraries)
+ continue()
+ else()
+ list(APPEND processed_object_libraries ${lib})
+ set_property(GLOBAL APPEND PROPERTY _qt_processed_object_libraries ${lib})
+ endif()
+
+ get_target_property(is_qt_propagated_object_library ${lib}
+ _is_qt_propagated_object_library
+ )
+ if(is_qt_propagated_object_library)
+ list(APPEND object_libraries ${lib})
+ else()
+ __qt_internal_collect_object_libraries_recursively(next_level_object_libraries
+ ${lib}
+ ${initial_target}
+ )
+ list(APPEND object_libraries ${next_level_object_libraries})
+ endif()
+ endif()
+ endforeach()
+ set(${out_var} "${object_libraries}" PARENT_SCOPE)
+endfunction()
+
+function(__qt_internal_promote_target_to_global target)
+ get_property(is_global TARGET ${target} PROPERTY IMPORTED_GLOBAL)
+ if(NOT is_global)
+ message(DEBUG "Promoting target to global: '${target}'")
+ set_property(TARGET ${target} PROPERTY IMPORTED_GLOBAL TRUE)
+ endif()
+endfunction()
+
+function(__qt_internal_promote_target_to_global_checked target)
+ # With CMake version 3.21 we use a different mechanism that allows us to promote all targets
+ # within a scope.
+ if(QT_PROMOTE_TO_GLOBAL_TARGETS AND CMAKE_VERSION VERSION_LESS 3.21)
+ __qt_internal_promote_target_to_global(${target})
+ endif()
+endfunction()
+
+function(__qt_internal_promote_targets_in_dir_scope_to_global)
+ # IMPORTED_TARGETS got added in 3.21.
+ if(CMAKE_VERSION VERSION_LESS 3.21)
+ return()
+ endif()
+
+ get_directory_property(targets IMPORTED_TARGETS)
+ foreach(target IN LISTS targets)
+ __qt_internal_promote_target_to_global(${target})
+ endforeach()
+endfunction()
+
+function(__qt_internal_promote_targets_in_dir_scope_to_global_checked)
+ if(QT_PROMOTE_TO_GLOBAL_TARGETS)
+ __qt_internal_promote_targets_in_dir_scope_to_global()
+ endif()
+endfunction()
+
+# This function ends up being called multiple times as part of a find_package(Qt6Foo) call,
+# due sub-packages depending on the Qt6 package. Ensure the finalizer is ran only once per
+# directory scope.
+function(__qt_internal_defer_promote_targets_in_dir_scope_to_global)
+ get_directory_property(is_deferred _qt_promote_targets_is_deferred)
+ if(NOT is_deferred)
+ set_property(DIRECTORY PROPERTY _qt_promote_targets_is_deferred TRUE)
+
+ if(CMAKE_VERSION VERSION_GREATER_EQUAL 3.19)
+ cmake_language(DEFER CALL __qt_internal_promote_targets_in_dir_scope_to_global_checked)
+ endif()
+ endif()
+endfunction()
diff --git a/cmake/QtPublicWalkLibsHelpers.cmake b/cmake/QtPublicWalkLibsHelpers.cmake
new file mode 100644
index 0000000000..19eef91356
--- /dev/null
+++ b/cmake/QtPublicWalkLibsHelpers.cmake
@@ -0,0 +1,293 @@
+# Add libraries to variable ${out_libs_var} in a way that duplicates
+# are added at the end. This ensures the library order needed for the
+# linker.
+function(__qt_internal_merge_libs out_libs_var)
+ foreach(dep ${ARGN})
+ list(REMOVE_ITEM ${out_libs_var} ${dep})
+ list(APPEND ${out_libs_var} ${dep})
+ endforeach()
+ set(${out_libs_var} ${${out_libs_var}} PARENT_SCOPE)
+endfunction()
+
+
+# Extracts value from per-target dict key and assigns it to out_var.
+# Assumes dict_name to be an existing INTERFACE target.
+function(__qt_internal_get_dict_key_values out_var target_infix dict_name dict_key)
+ get_target_property(values "${dict_name}" "INTERFACE_${target_infix}_${dict_key}")
+ set(${out_var} "${values}" PARENT_SCOPE)
+endfunction()
+
+
+# Assigns 'values' to per-target dict key, including for aliases of the target.
+# Assumes dict_name to be an existing INTERFACE target.
+function(__qt_internal_memoize_values_in_dict target dict_name dict_key values)
+ # Memoize the computed values for the target as well as its aliases.
+ #
+ # Aka assigns the contents of ${values} to INTERFACE_Core, INTERFACE_Qt::Core,
+ # INTERFACE_Qt6::Core.
+ #
+ # Yes, i know it's crazy that target names are legal property names.
+ #
+ # Assigning for library aliases is needed to avoid multiple recomputation of values.
+ # Scenario in the context of __qt_internal_walk_libs:
+ # 'values' are computed for Core target and memoized to INTERFACE_Core.
+ # When processing Gui, it depends on Qt::Core, but there are no values for INTERFACE_Qt::Core.
+ set_target_properties(${dict_name} PROPERTIES INTERFACE_${target}_${dict_key} "${values}")
+
+ get_target_property(versionless_alias "${target}" "_qt_versionless_alias")
+ if(versionless_alias)
+ __qt_internal_get_dict_key_values(
+ versionless_values "${versionless_alias}" "${dict_name}" "${dict_key}")
+ if(versionless_values MATCHES "-NOTFOUND$")
+ set_target_properties(${dict_name}
+ PROPERTIES INTERFACE_${versionless_alias}_${dict_key} "${values}")
+ endif()
+ endif()
+
+ get_target_property(versionfull_alias "${target}" "_qt_versionfull_alias")
+ if(versionfull_alias)
+ __qt_internal_get_dict_key_values(
+ versionfull_values "${versionfull_alias}" "${dict_name}" "${dict_key}")
+ if(versionfull_values MATCHES "-NOTFOUND$")
+ set_target_properties(${dict_name}
+ PROPERTIES INTERFACE_${versionfull_alias}_${dict_key} "${values}")
+ endif()
+ endif()
+endfunction()
+
+
+# Walks a target's public link libraries recursively, and performs some actions (poor man's
+# polypmorphism)
+#
+# Walks INTERFACE_LINK_LIBRARIES for all target types, as well as LINK_LIBRARIES for static
+# library targets.
+#
+# out_var: the name of the variable where the result will be assigned. The result is a list of
+# libraries, mostly in generator expression form.
+# rcc_objects_out_var: the name of the variable where the collected rcc object files will be
+# assigned (for the initial target and its dependencies)
+# dict_name: used for caching the results, and preventing the same target from being processed
+# twice
+# operation: a string to tell the function what additional behaviors to execute.
+# 'collect_libs' (default) operation is to collect linker file paths and flags.
+# Used for prl file generation.
+# 'promote_global' promotes walked imported targets to global scope.
+# 'collect_targets' collects all target names (discards framework or link flags)
+#
+#
+function(__qt_internal_walk_libs
+ target out_var rcc_objects_out_var dict_name operation)
+ set(collected ${ARGN})
+ if(target IN_LIST collected)
+ return()
+ endif()
+ list(APPEND collected ${target})
+
+ if(target STREQUAL "${QT_CMAKE_EXPORT_NAMESPACE}::EntryPointPrivate")
+ # We can't (and don't need to) process EntryPointPrivate because it brings in
+ # $<TARGET_PROPERTY:prop> genexes which get replaced with
+ # $<TARGET_PROPERTY:EntryPointPrivate,prop> genexes in the code below and that causes
+ # 'INTERFACE_LIBRARY targets may only have whitelisted properties.' errors with CMake
+ # versions equal to or lower than 3.18. These errors are super unintuitive to debug
+ # because there's no mention that it's happening during a file(GENERATE) call.
+ return()
+ endif()
+
+ if(NOT TARGET ${dict_name})
+ add_library(${dict_name} INTERFACE IMPORTED GLOBAL)
+ endif()
+ __qt_internal_get_dict_key_values(libs "${target}" "${dict_name}" "libs")
+ __qt_internal_get_dict_key_values(rcc_objects "${target}" "${dict_name}" "rcc_objects")
+
+ if(libs MATCHES "-NOTFOUND$")
+ unset(libs)
+ unset(rcc_objects)
+ get_target_property(target_libs ${target} INTERFACE_LINK_LIBRARIES)
+ if(NOT target_libs)
+ unset(target_libs)
+ endif()
+ get_target_property(target_type ${target} TYPE)
+ if(target_type STREQUAL "STATIC_LIBRARY")
+ get_target_property(link_libs ${target} LINK_LIBRARIES)
+ if(link_libs)
+ list(APPEND target_libs ${link_libs})
+ endif()
+ endif()
+
+ # Need to record the rcc object file info not only for dependencies, but also for
+ # the current target too. Otherwise the saved information is incomplete for prl static
+ # build purposes.
+ get_target_property(main_target_rcc_objects ${target} _qt_rcc_objects)
+ if(main_target_rcc_objects)
+ __qt_internal_merge_libs(rcc_objects ${main_target_rcc_objects})
+ endif()
+
+ foreach(lib ${target_libs})
+ # Cannot use $<TARGET_POLICY:...> in add_custom_command.
+ # Check the policy now, and replace the generator expression with the value.
+ while(lib MATCHES "\\$<TARGET_POLICY:([^>]+)>")
+ cmake_policy(GET ${CMAKE_MATCH_1} value)
+ if(value STREQUAL "NEW")
+ set(value "TRUE")
+ else()
+ set(value "FALSE")
+ endif()
+ string(REPLACE "${CMAKE_MATCH_0}" "${value}" lib "${lib}")
+ endwhile()
+
+ # Fix up $<TARGET_PROPERTY:FOO> expressions that refer to the "current" target.
+ # Those cannot be used with add_custom_command.
+ while(lib MATCHES "\\$<TARGET_PROPERTY:([^,>]+)>")
+ string(REPLACE "${CMAKE_MATCH_0}" "$<TARGET_PROPERTY:${target},${CMAKE_MATCH_1}>"
+ lib "${lib}")
+ endwhile()
+
+ # Skip static plugins.
+ set(_is_plugin_marker_genex "\\$<BOOL:QT_IS_PLUGIN_GENEX>")
+ if(lib MATCHES "${_is_plugin_marker_genex}")
+ continue()
+ endif()
+
+ # Strip any directory scope tokens.
+ __qt_internal_strip_target_directory_scope_token("${lib}" lib)
+
+ if(lib MATCHES "^\\$<TARGET_OBJECTS:")
+ # Skip object files.
+ continue()
+ elseif(lib MATCHES "^\\$<LINK_ONLY:(.*)>$")
+ set(lib_target ${CMAKE_MATCH_1})
+ else()
+ set(lib_target ${lib})
+ endif()
+
+ # Skip CMAKE_DIRECTORY_ID_SEP. If a target_link_libraries is applied to a target
+ # that was defined in a different scope, CMake appends and prepends a special directory
+ # id separator. Filter those out.
+ if(lib_target MATCHES "^::@")
+ continue()
+ elseif(TARGET ${lib_target})
+ if ("${lib_target}" MATCHES "^Qt::(.*)")
+ # If both, Qt::Foo and Foo targets exist, prefer the target name without
+ # namespace. Which one is preferred doesn't really matter. This code exists to
+ # avoid ending up with both, Qt::Foo and Foo in our dependencies.
+ set(namespaceless_lib_target "${CMAKE_MATCH_1}")
+ if(TARGET namespaceless_lib_target)
+ set(lib_target ${namespaceless_lib_target})
+ endif()
+ endif()
+ get_target_property(lib_target_type ${lib_target} TYPE)
+ if(lib_target_type STREQUAL "INTERFACE_LIBRARY")
+ __qt_internal_walk_libs(
+ ${lib_target}
+ lib_libs_${target}
+ lib_rcc_objects_${target}
+ "${dict_name}" "${operation}" ${collected})
+ if(lib_libs_${target})
+ __qt_internal_merge_libs(libs ${lib_libs_${target}})
+ set(is_module 0)
+ endif()
+ if(lib_rcc_objects_${target})
+ __qt_internal_merge_libs(rcc_objects ${lib_rcc_objects_${target}})
+ endif()
+ elseif(NOT lib_target_type STREQUAL "OBJECT_LIBRARY")
+
+ if(operation STREQUAL "collect_targets")
+ __qt_internal_merge_libs(libs ${lib_target})
+ else()
+ __qt_internal_merge_libs(libs "$<TARGET_LINKER_FILE:${lib_target}>")
+ endif()
+
+ get_target_property(target_rcc_objects "${lib_target}" _qt_rcc_objects)
+ if(target_rcc_objects)
+ __qt_internal_merge_libs(rcc_objects ${target_rcc_objects})
+ endif()
+
+ __qt_internal_walk_libs(
+ ${lib_target}
+ lib_libs_${target}
+ lib_rcc_objects_${target}
+ "${dict_name}" "${operation}" ${collected})
+ if(lib_libs_${target})
+ __qt_internal_merge_libs(libs ${lib_libs_${target}})
+ endif()
+ if(lib_rcc_objects_${target})
+ __qt_internal_merge_libs(rcc_objects ${lib_rcc_objects_${target}})
+ endif()
+ endif()
+ if(operation STREQUAL "promote_global")
+ set(lib_target_unaliased "${lib_target}")
+ get_target_property(aliased_target ${lib_target} ALIASED_TARGET)
+ if(aliased_target)
+ set(lib_target_unaliased ${aliased_target})
+ endif()
+
+ get_property(is_imported TARGET ${lib_target_unaliased} PROPERTY IMPORTED)
+
+ # 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(is_imported AND NOT should_not_promote)
+ __qt_internal_promote_target_to_global(${lib_target_unaliased})
+ endif()
+ endif()
+ elseif("${lib_target}" MATCHES "^Qt::(.*)")
+ message(FATAL_ERROR "The ${CMAKE_MATCH_1} target is mentioned as a dependency for \
+${target}, but not declared.")
+ else()
+ if(NOT operation STREQUAL "collect_targets")
+ set(final_lib_name_to_merge "${lib_target}")
+ if(lib_target MATCHES "/([^/]+).framework$")
+ set(final_lib_name_to_merge "-framework ${CMAKE_MATCH_1}")
+ endif()
+ __qt_internal_merge_libs(libs "${final_lib_name_to_merge}")
+ endif()
+ endif()
+ endforeach()
+ __qt_internal_memoize_values_in_dict("${target}" "${dict_name}" "libs" "${libs}")
+ __qt_internal_memoize_values_in_dict("${target}" "${dict_name}"
+ "rcc_objects" "${rcc_objects}")
+
+ endif()
+ set(${out_var} ${libs} PARENT_SCOPE)
+ set(${rcc_objects_out_var} ${rcc_objects} PARENT_SCOPE)
+endfunction()
+
+
+# Given ${target}, collect all its private dependencies that are CMake targets.
+#
+# Discards non-CMake-target dependencies like linker flags or file paths.
+# Does nothing when given an interface library.
+#
+# To be used to extract the full list of target dependencies of a library or executable.
+function(__qt_internal_collect_all_target_dependencies target out_var)
+ set(dep_targets "")
+
+ get_target_property(target_type ${target} TYPE)
+
+ if(NOT target_type STREQUAL "INTERFACE_LIBRARY")
+ get_target_property(link_libs ${target} LINK_LIBRARIES)
+ if(link_libs)
+ foreach(lib ${link_libs})
+ if(TARGET "${lib}")
+ list(APPEND dep_targets "${lib}")
+
+ __qt_internal_walk_libs(
+ "${lib}"
+ lib_walked_targets
+ _discarded_out_var
+ "qt_private_link_library_targets"
+ "collect_targets")
+
+ if(lib_walked_targets)
+ list(APPEND dep_targets ${lib_walked_targets})
+ endif()
+ endif()
+ endforeach()
+ endif()
+ endif()
+
+ list(REMOVE_DUPLICATES dep_targets)
+
+ set(${out_var} "${dep_targets}" PARENT_SCOPE)
+endfunction()
diff --git a/cmake/QtResourceHelpers.cmake b/cmake/QtResourceHelpers.cmake
index 3c719d1dd0..4b7d81cc7f 100644
--- a/cmake/QtResourceHelpers.cmake
+++ b/cmake/QtResourceHelpers.cmake
@@ -21,6 +21,10 @@ function(qt_internal_add_resource target resourceName)
EXPORT "${INSTALL_CMAKE_NAMESPACE}${target}Targets"
DESTINATION "${INSTALL_LIBDIR}"
)
+ qt_internal_add_targets_to_additional_targets_export_file(
+ TARGETS ${out_targets}
+ EXPORT_NAME_PREFIX "${INSTALL_CMAKE_NAMESPACE}${target}"
+ )
qt_internal_record_rcc_object_files("${target}" "${out_targets}"
INSTALL_DIRECTORY "${INSTALL_LIBDIR}")
diff --git a/cmake/QtRpathHelpers.cmake b/cmake/QtRpathHelpers.cmake
index 126ed2c50f..6e3414b50f 100644
--- a/cmake/QtRpathHelpers.cmake
+++ b/cmake/QtRpathHelpers.cmake
@@ -20,7 +20,7 @@ function(qt_compute_relative_rpath_base rpath install_location out_var)
# needed in the .prf files, but for CMake we need to prepend them ourselves.
if(APPLE)
set(rpath_rel_base "@loader_path")
- elseif(LINUX)
+ elseif(LINUX OR SOLARIS OR FREEBSD)
set(rpath_rel_base "$ORIGIN")
else()
message(WARNING "No known RPATH_REL_BASE for target platform.")
@@ -86,12 +86,13 @@ function(qt_apply_rpaths)
# Modify the install path to contain the nested structure of a framework.
get_target_property(is_framework "${target}" FRAMEWORK)
if(is_framework)
+ qt_internal_get_framework_info(fw ${target})
if(UIKIT)
# Shallow framework
- string(APPEND arg_INSTALL_PATH "/Qt${target}.framework")
+ string(APPEND arg_INSTALL_PATH "/${fw_dir}")
else()
# Full framework
- string(APPEND arg_INSTALL_PATH "/Qt${target}.framework/Versions/Current")
+ string(APPEND arg_INSTALL_PATH "/${fw_dir}/Versions/Current")
endif()
endif()
diff --git a/cmake/QtScopeFinalizerHelpers.cmake b/cmake/QtScopeFinalizerHelpers.cmake
index 59e89cc9e2..6dae635ba2 100644
--- a/cmake/QtScopeFinalizerHelpers.cmake
+++ b/cmake/QtScopeFinalizerHelpers.cmake
@@ -74,6 +74,9 @@ function(qt_watch_current_list_dir variable access value current_list_file stack
qt_finalize_plugin(${a1} ${a2} ${a3} ${a4} ${a5} ${a6} ${a7} ${a8} ${a9})
elseif(func STREQUAL "qt_internal_finalize_app")
qt_internal_finalize_app(${a1} ${a2} ${a3} ${a4} ${a5} ${a6} ${a7} ${a8} ${a9})
+ elseif(func STREQUAL "qt_internal_export_additional_targets_file_finalizer")
+ qt_internal_export_additional_targets_file_finalizer(
+ ${a1} ${a2} ${a3} ${a4} ${a5} ${a6} ${a7} ${a8} ${a9})
else()
message(FATAL_ERROR "qt_watch_current_list_dir doesn't know about ${func}. Consider adding it.")
endif()
diff --git a/cmake/QtSeparateDebugInfo.cmake b/cmake/QtSeparateDebugInfo.cmake
index 25c6debf7c..c31d618d00 100644
--- a/cmake/QtSeparateDebugInfo.cmake
+++ b/cmake/QtSeparateDebugInfo.cmake
@@ -48,8 +48,9 @@ function(qt_enable_separate_debug_info target installDestination)
if(APPLE)
get_target_property(is_framework ${target} FRAMEWORK)
if(is_framework)
+ qt_internal_get_framework_info(fw ${target})
set(debug_info_bundle_dir "$<TARGET_BUNDLE_DIR:${target}>.${debug_info_suffix}")
- set(BUNDLE_ID Qt${target})
+ set(BUNDLE_ID ${fw_name})
else()
set(debug_info_bundle_dir "$<TARGET_FILE:${target}>.${debug_info_suffix}")
set(BUNDLE_ID ${target})
diff --git a/cmake/QtSingleRepoTargetSetBuildHelpers.cmake b/cmake/QtSingleRepoTargetSetBuildHelpers.cmake
new file mode 100644
index 0000000000..789b23b6e6
--- /dev/null
+++ b/cmake/QtSingleRepoTargetSetBuildHelpers.cmake</