summaryrefslogtreecommitdiffstats
path: root/cmake
Commit message (Collapse)AuthorAgeFilesLines
* CMake: Propagate qtbase's CMAKE_STAGING_PREFIX to Qt modulesJoerg Bornemann2022-01-182-12/+9
| | | | | | | | | | | | | | | | | | | | | | | When qtbase is configured with CMAKE_STAGING_PREFIX set, then Qt modules built against this qtbase should also get CMAKE_STAGING_PREFIX by default. Like CMAKE_INSTALL_PREFIX in regular builds, this prefix will be determined by the location of QtBuildInternalsExtra.cmake to support building Qt modules against an installer-provided Qt. CMAKE_INSTALL_PREFIX on the other hand must be exactly the value that was provided when building qtbase. If CMAKE_STAGING_PREFIX is specified by the user, honor it. To opt out of automatically setting CMAKE_STAGING_PREFIX, set QT_BUILD_INTERNALS_NO_FORCE_SET_STAGING_PREFIX to ON. Remove the old code that was supposed to set CMAKE_STAGING_PREFIX. Pick-to: 6.2 6.3 Fixes: QTBUG-99666 Change-Id: I20edef54c102ca9784fcdef0decf0bd83266ae11 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* wasm: modernize pthreads optionMorten Johan Sørvig2022-01-171-2/+2
| | | | | | | | | | | Use “-pthreads” instead of “-s USE_PTHREADS=1”. This is both a compile and linker option. Pick-to: 6.3 Change-Id: Iaf7cb4ec41577fe596c3e81fda05c03fe0074c08 Reviewed-by: David Skoland <david.skoland@qt.io> Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io> Reviewed-by: Lorn Potter <lorn.potter@gmail.com>
* CMake: Add C/C++ compiler options to C/C++ sources onlyJoerg Bornemann2022-01-081-2/+7
| | | | | | | | | | | | When compiling CUDA sources in a user project, the Qt6::Platform target would pull in C/C++ related compiler flags, leading to compiler errors. Make sure that we only add those flags to C/C++ source files. Pick-to: 6.2 6.3 Fixes: QTBUG-99548 Change-Id: Idbccd65fe8f66abd1da3fce95e563065d1ed3cc6 Reviewed-by: Kai Koehne <kai.koehne@qt.io>
* Enable -bigobj by default for QtAlexey Edelev2022-01-071-1/+8
| | | | | | | | | Add '-bigobj' for MSVC and '-Wa,-mbig-obj' for MINGW to the PlatformCommonInternal compiler options. Pick-to: 6.3 Change-Id: I706b83d189a116a3ab6f93d59593e237e66b0e2e Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* CMake: Fix WrapOpenSSL packageJoerg Bornemann2022-01-071-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | Since f19ce3898e0257dac1112754b1a84c24486bda01 we link OpenSSL to QTlsBackendOpenSSLPlugin instead of QtNetwork itself. In dependent Qt repositories this leads to the following situation: QTlsBackendOpenSSLPlugin's dependencies call find_dependency(WrapOpenSSLHeaders), and OpenSSL_FOUND is set to ON in that scope. Later, we call find_package(WrapOpenSSL) in a different scope. find_package(WrapOpenSSLHeaders) bails out early, because the target WrapOpenSSLHeaders::WrapOpenSSLHeaders exists. find_package(OpenSSL) is not called again. The check for OpenSSL_FOUND fails, because the variable is not visible in the scope of FindWrapOpenSSL.cmake, and we don't create the WrapOpenSSL::WrapOpenSSL target. Fix this by checking for the existence of the target OpenSSL::SSL instead of the OpenSSL_FOUND variable. Pick-to: 6.2 6.3 Fixes: QTBUG-99623 Change-Id: Idd0e8a60fabd0c7772413d557442c0012b0b436c Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
* Update copyright year to 2022Kai Köhne2022-01-041-1/+1
| | | | | | | Pick-to: 5.15 6.2 6.3 Change-Id: If6f1d6f9f82a601f8e2b6d36650d6e737518aa60 Reviewed-by: Paul Wicking <paul.wicking@qt.io> Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
* Introduce qt-testrunner.pyDimitrios Apostolou2022-01-032-0/+3
| | | | | | | | Script that wraps Qt test execution in order to iron-out flakiness. Task-number: QTBUG-96353 Change-Id: Ie8ee780e3f4f8d086c080a7784f9f68fd1867be2 Reviewed-by: Daniel Smith <Daniel.Smith@qt.io>
* Exclude sources from HEADER_MODULE if cmake version is less than 3.19Alexey Edelev2022-01-031-3/+12
| | | | | | | | | | | | | CMake versions less than 3.19 don't support adding the source files to the PRIVATE scope of the INTERFACE libraries. It looks like these PRIVATE sources are only used by IDEs to display them in a project tree. Skip them to avoid configuring issues. Fixes: QTBUG-99316 Pick-to: 6.3 Change-Id: Id03f540ac9c94e920adfae5de4f364bd7aba4613 Reviewed-by: Andrei Golubev <andrei.golubev@qt.io> Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* Replace ANDROID_ABI argument with the QT_ANDROID_ABI target propertyAlexey Edelev2022-01-032-0/+10
| | | | | | | | | | | | | | | | | | | | | | This change tries to make the API more user friendly and prevent wrong use of multi-abi API. ANDROID_ABI argument of qt6_add_executable was position-depend and needed to be placed after the executable 'sources'. Using the target property we solve this problem and provide more consistent and common way to enable multi-abi build for the single target. This meanwhile also requires to execute multi-abi build configuration in the finalizer, since the property might be set at any point. Also the priority of the QT_ANDROID_ABI target property now is higher than the priority of the QT_ANDROID_BUILD_ALL_ABIS variable. So target will only build packages with the ABIs specified in QT_ANDROID_ABI property if both are set. Pick-to: 6.3 Task-number: QTBUG-88841 Change-Id: I3515297ed267974498913c59619433dc234ec217 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* CMake: Add CryptoTokenKit framework for macOSIevgenii Meshcheriakov2021-12-231-0/+1
| | | | | | | | | Set ${FWCryptoTokenKit} when the framework has been found. This is useful for WIP card reader support in QtConnectivity. Task-number: QTBUG-97946 Change-Id: I0e85e0fd2e0fc45fb3069bbdaa2d8b2c927a6c2d Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* CMake: Remove WinRT leftovers from build systemYuhang Zhao2021-12-183-15/+1
| | | | | | | Qt's WinRT support was removed long time ago. Change-Id: I60b220e970072c3450e3793862d6f68801d2b5b3 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* CMake: Fix exit code to be shown properly on test failureAlexandru Croitor2021-12-171-1/+1
| | | | | | | | | | | | | | | | | | | | The result variable was expanded at configure time rather than at script execution time due to missing escaping. A tidbit of information, the result variable can contain not only an exit code, but a string as well. For example on arm macOS with a crashed test it contains 'SIGTRAP'. Curiously if the crashing executable is executed directly without CMake, 'Trace/BPT trap: 5' is shown instead, perhaps because of the shell. Amends 3ef6af024be43bc18352796df61542a241192583 Pick-to: 6.2 6.3 Change-Id: I50e57922abfc6eccde205c6252eebfda510bad41 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* CMake: Fix errors about missing qt_setup_tool_path_command.bat.inJoerg Bornemann2021-12-152-6/+3
| | | | | | | | | | | | | | | | This amends commit 0bea727cac6b22af05e0ae68b02de6684c98667b or rather reverts it and applies a different fix for QTBUG-98843. Use file(WRITE) instead of configure_file or file(CONFIGURE). This command doesn't have the line endings issues in CMake 3.19 (see QTBUG-98843). It's not problematic that the .bat file gets a new timestamp on every configuration step, since we don't add dependencies on it. Fixes: QTBUG-99223 Task-number: QTBUG-98843 Change-Id: Ibdcd0e4703bf6df42c6a6d0bb2f35c5144bbe30a Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
* QtTestHelpers: print exit code upon failureFabian Kosmale2021-12-151-1/+1
| | | | | | | | This might give a few insights into why the process has failed, at least if distinct return values are used for different errors. Change-Id: I61fe0ede812c4dda3d0cf0f2c96a479d198d340d Reviewed-by: Kai Koehne <kai.koehne@qt.io>
* MSVC: Optimize global data to reduce binary sizeYuhang Zhao2021-12-151-1/+1
| | | | | | | | | | | | | | | | | | | | Package global data in COMDAT sections for optimization. According to the docs, this can significantly reduce the size of the resulting binary executable. I've tested build Qt with /Gw locally with and without LTCG, the result shows /Gw can reduce the binary size indeed, but not "significantly". The result also reveals that exes can benefit much more from /Gw than dlls. The result can be seen from the QTBUG-98894 bug report. Microsoft Docs: https://docs.microsoft.com/en-us/cpp/build/reference/gw-optimize-global-data?view=msvc-170 Task-number: QTBUG-98894 Change-Id: Ibce34c98e791e519d669a5fe39c0027d1459c382 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Kai Koehne <kai.koehne@qt.io>
* Support configure -platform linux-clang-libc++Allan Sandfeld Jensen2021-12-143-0/+22
| | | | | | | | Detect libc++ config and add appropriate compiler and linker flags. Pick-to: 6.3 Change-Id: I9ec91b3ace987599d4e79e43b1b75aa67cd5caeb Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Use the highest-available android SDK version as the 'target' SDKAlexey Edelev2021-12-141-15/+26
| | | | | | | | | | | | When building Qt we want to use the highest available 'target' SDK version. If the version of the available SDK is lower than the minimum required 'target' SDK version, we need to throw an error. Pick-to: 6.2 6.3 Fixes: QTBUG-99165 Task-number: QTBUG-98870 Change-Id: Ib75567a6f33ac6d23d9f79e8ed8535839c08b91d Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* CMake: Fix build on Windows with CMake 3.19Joerg Bornemann2021-12-132-10/+6
| | | | | | | | | | | | | | | | qt_setup_tool_path.bat did not have proper line endings on Windows with CMake 3.19, breaking the invocation of tools that use the wrapper, for example qmltyperegistrar. The reason was that file(CONFIGURE) doesn't properly write line endings with CMake 3.19. See upstream issue #21769. Use configure_file with a proper input file to work around this issue. Pick-to: 6.2 Fixes: QTBUG-98843 Change-Id: I2a4da15f306dc844cf83ca9721a77196c42af2ad Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* wasm: remove deprecated argument for source mapsLorn Potter2021-12-131-1/+1
| | | | | | | | | -g4 was deprecated in Emscripten 2.0.17, and since we are well past that version we can safely use -gsource-map instead. Change-Id: I497155619d6320661f6be0e220b52fa7d6ca0b8e Reviewed-by: David Skoland <david.skoland@qt.io> Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
* wasm: update recommended emscripten to 3.0.0Lorn Potter2021-12-091-1/+1
| | | | | | | [ChangeLog][wasm] Recommended emscripten version is now 3.0.0 Change-Id: I9ae082509415d8f00b8e9970b730ad4a472da310 Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
* MSVC: Use dubbed FH4 to make C++ exception handling smallerYuhang Zhao2021-12-041-2/+5
| | | | | | | | | | | | | | | | | | | | | | | | Visual Studio 2019 introduced the dubbed FH4 feature which can make C++ exception handling smaller on x64. According to the article [1], it's enabled by default for UWP applications, and Microsoft also use it in their own widely-known commercial products such as Office to reduce the binary size. So make use of this feature for Qt when possible, to get smaller binary. As a drive-by, add "/EHs-c-" explicitly to the flags when we want to disable C++ exception handling. [1] Official article that introduces dubbed FH4: https://devblogs.microsoft.com/cppblog/making-cpp-exception-handling-smaller-x64/ Change-Id: I2e3330de477f78372cf7903d0ef7a732b09552a9 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: André de la Rocha <andre.rocha@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
* Install MSVC debug information for resource object librariesJoerg Bornemann2021-12-022-1/+32
| | | | | | | | | | | | | | | | Building against a static debug MSVC Qt produced LNK4099 warnings (PDB was not found with object file). This was because we did not install the .pdb files for the object libraries that are created for Qt resources. Now, these .pdb files are named like the object library targets and are installed next to the object files. Pick-to: 6.2 Fixes: QTBUG-97699 Change-Id: I7e23f8392b7ac657be1d2fb3b33e051ae2e4d407 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* Enable warnings-are-errors for Visual Studio 2022Kai Köhne2021-11-301-2/+2
| | | | | Change-Id: Id0b143f668f69481f6037f94aedbfd2e87331497 Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
* CMake: Fix Android platform detectionJoerg Bornemann2021-11-291-1/+28
| | | | | | | | | | | | | | | ...if an Android platform < 10 is installed. The existing platform detection code preferred android-9 over android-31, because the sorting did not use natural comparison. Natural comparison was added to CMake in version 3.18. We simulate this feature for older CMake versions. Pick-to: 6.2 Fixes: QTBUG-98726 Change-Id: Ib2eb87bd47220feb672275fa5203df4f2b6d7ca7 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Long live Q_GADGET_EXPORT!Marc Mutz2021-11-271-1/+1
| | | | | | | | | | | | | | | | | | | | | | Like Q_NAMESPACE_EXPORT for Q_NAMESPACE, this variant of Q_GADGET allows passing an export macro. This is useful to avoid exporting the whole class just to get the staticMetaObject hidden therein exported. Before anyone asks: No, we don't need Q_OBJECT_EXPORT, because QObject subclasses, being polymorphic, always need to have a class-level export macro (to export their vtable), but while that technique also works for value classes (the Q_GADGET audience), it is not desirable for them, because it makes inline functions exported in Windows debug builds, which is not what we want, because it needlessly restricts what you can to with the inline functions (e.g. remove). [ChangeLog][QtCore] Added the Q_GADGET_EXPORT macro, which is like Q_GADGET, but allows passing an export macro (like Q_NAMESPACE_EXPORT for Q_NAMESPACE). Fixes: QTBUG-55458 Change-Id: I546297de1e8aa45d83381991bcd3fbca61e1eef0 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* Add missing dependency of ${target}_check to ${target}_make_apkAlexey Edelev2021-11-261-0/+3
| | | | | | | | | | When building for and running the '_check' target in Android we need to make sure that target apk is assembled and ready for deployment. Pick-to: 6.2 Change-Id: Ifc63aac230f0bb8375d319ec443174c5a436485e Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io> Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* qt_internal_add_module: Document HEADER_MODULE and STATICFabian Kosmale2021-11-261-0/+8
| | | | | | Task-number: QTBUG-94863 Change-Id: If52ed7e17ea77d8cb6e0255e988feb0b1bd0aa76 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* Win32: Enable large address aware explicitlyYuhang Zhao2021-11-261-1/+1
| | | | | | | | | | | | | | | | | Large address aware is enabled by default in 64-bit compilers, but not 32-bit compilers. But Qt users may build 32-bit Qt themself, in this case large address aware is disabled in fact, and it may cause some issues. So we pass /LARGEADDRESSAWARE to the linker unconditionally to make sure large address aware is enabled for both 32-bit and 64-bit builds. Microsoft Docs: https://docs.microsoft.com/en-us/cpp/build/reference/largeaddressaware-handle-large-addresses?view=msvc-170 Change-Id: Idb2603d9ba0ba9ef4477ce1c3174b7c7e8ba76f6 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
* wasm: remove duplicate “--bind” optionMorten Johan Sørvig2021-11-191-2/+0
| | | | | | | | | Not a compile option, and also added to the linker options above. Change-Id: Iab2107d4b5ee4bc73e85b3cd5070f1a96b3a5a3b Reviewed-by: David Skoland <david.skoland@qt.io> Reviewed-by: Lorn Potter <lorn.potter@gmail.com>
* Delete -Wextra compilation flag for GHS compilerTatiana Borisova2021-11-181-1/+5
| | | | | | | | - GHS compiler doesn't have -Wextra flag and it leads to huge count of warnings. Pick-to: 6.2 Change-Id: Id2ba654a49fb163bebc75e3a22ecaa1895ecdbe8 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Rename and restructure the baseline (lancelot) testing codeEirik Aavitsland2021-11-161-0/+3
| | | | | | | | | | | | | | | | | | | | In preparation for addition of new baseline tests, establish a new test category, "baseline". This is similar to the category "benchmarks" in that it contains tests that use the QTest framework, but conceptually are not unit tests, in contrast to those under auto/. Move the existing QPainter baseline test, tst_lancelot, into this new category, and rename it accordingly. Baseline tests use the QBaselineTest extension to QTest. Move that extension too into the tests/baseline directory, allowing the clean out of the baselineserver directory. Pick-to: 6.2 Change-Id: I1b527f5867c953b1d22be73798fcf7d1494712ea Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io> Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Android: bump default QT_ANDROID_API_VERSION to 31Assam Boudjelthia2021-11-121-1/+1
| | | | | | | | | To allow using Android 12 APIs. Pick-to: 6.2 5.15 Change-Id: I5e9da66c84457888ec723125d16876891232a99b Reviewed-by: Ivan Solovev <ivan.solovev@qt.io> Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* configure: Fix --foo=bar argumentsJoerg Bornemann2021-11-101-1/+1
| | | | | | | | | | This amends commit c5409964b0c627b25131c73f95794314feb51b5d. When detecting a variable assignment, we must ignore arguments that start with a dash. Otherwise, arguments like --prefix=~/Qt are ignored. Change-Id: I3b143113b94ca0d8af92679c1f567fbcec298349 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* CMake: Add CoreBluetooth framework for macOSJuha Vuolle2021-11-101-0/+1
| | | | | | | | | | The Qt bluetooth module uses ${FWCoreBluetooth} when building for iOS, but that evaluated to empty. Pick-to: 6.2 Change-Id: I93ff2c30697a912bed454087ae260fae9cc41b0f Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io> Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* cmake: Don't notify/warn the user when Xcode is not foundTor Arne Vestbø2021-11-101-3/+0
| | | | | | | | | | We can technically build without Xcode, as long as the command line tools are installed. We reflect that by an empty QT_MAC_XCODE_VERSION variable. Pick-to: 6.2 Change-Id: I40ffa28a628157e0a2c63656065ea7c41a680e01 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Bump WINVER, _WIN32_WINNT and _WIN32_IE to _WIN32_WINNT_WIN10 (0x0A00)Yuhang Zhao2021-11-102-1/+26
| | | | | | | | | | | And bump NTDDI_VERSION to 0x0A00000B (NTDDI_WIN10_CO) at the same time, to unblock the developers from accessing the latest Windows APIs. Pick-to: 6.2 Change-Id: Ifbc28c8f8b073866871685c020301f5f20dc9591 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* CMake: Fix default install prefix of top-level non-developer buildsJoerg Bornemann2021-11-081-1/+3
| | | | | | | | | | | | | | | A top-level non-developer build is supposed to default to a prefix like "/usr/local/Qt-6.3.0". That wasn't the case. In QtSetup.cmake we check CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT, set CMAKE_INSTALL_PREFIX and did the same thing later in QtBuildInternalsExtra.cmake, with a different value. Make sure we run the latter code only in per-repo builds. Pick-to: 6.2 Fixes: QTBUG-98087 Change-Id: I4a1291dfd126aa11c21d69809f2cf7b075c98d2e Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Assume qhelpgenerator in libexec instead of binJoerg Bornemann2021-11-081-1/+1
| | | | | | Task-number: QTBUG-88791 Change-Id: I0f6dc14401e715a98322abc21da3f88e34118e27 Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
* Provide a qtpaths wrapper script when cross-building QtJoerg Bornemann2021-11-082-16/+18
| | | | | | | | | | | | | The qtpaths tool is supposed to replace "qmake -query", and it must be available for cross-builds as a wrapper script like qmake. Re-use the existing facility for creating the qmake wrapper script for creating the qtpaths wrapper script. Pick-to: 6.2 Fixes: QTBUG-97821 Change-Id: I460bae61a531994422e1c0fba09c79e4aa65713f Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* configure: Allow specifying arbitrary variable assignmentsJoerg Bornemann2021-11-051-0/+13
| | | | | | | | | | | | | | It's now possible to call configure with arbitrary variable assignments "FOO=BAR" that get passed as "-DFOO=BAR" to CMake. There is no error anymore for unknown variables. CMake already warns about those: "Manually-specified variables were not used by the project: FOO". [ChangeLog][configure] Users can directly assign CMake variables with configure, for example "configure CMAKE_CXX_COMPILE=clang++-11". Fixes: QTBUG-88210 Change-Id: Ib15e63a895df717919dd2b6623fa4d284209776f Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* CMake/qconfig.cpp: use raw strings so we support any inputThiago Macieira2021-11-041-12/+12
| | | | | Change-Id: I2bbf422288924c198645fffd16aa04379315e69e Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* wasm: increase default initial memoryLorn Potter2021-11-041-2/+6
| | | | | | | | | | | | | | | | Some apps may need more initial memory when linking, emscripten will fail with: wasm-ld: error: initial memory too small This increases the default initial memory form 16MB to 20MB. Larger apps might still get this error, in which case QT_WASM_INITIAL_MEMORY can be set. Pick-to: 6.2 Fixes: QTBUG-97457 Change-Id: Icdc56c41fb3a3852a9a83f7a3dc15820e83e1148 Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
* wasm: enable event dispatcher asyncify supportMorten Johan Sørvig2021-11-041-1/+1
| | | | | | | | | | | | | | | | | | | | | Misc. fixes, including: Fix a couple of typos in the JavaScript code. Also, macros- within-macros don’t work, (without resorting to preprocessor token pasting), so remove the debug output for now. Limit the exec() “simulateInfiniteLoop” workaround to top-level application exec() only. This way, asyncify can be used for nested QEventLoop::exec() calls. (Emscripten supports one level of suspend only, so we don’t want to use that for the top-level exec(), but instead use it for dialogs and such). Use the new QEventLoop::ProcessEventsFlag::ApplicationExec enum value to detect the exec() call type. Change-Id: Ic702bfc31faf2e9f84ac5d3ccf43d067c5c61bf0 Reviewed-by: Lorn Potter <lorn.potter@gmail.com>
* Move qt_finalize_framework_headers_copy to the scope finalizerAlexey Edelev2021-11-031-4/+1
| | | | | | | | | | | | | | The qt_finalize_framework_headers_copy function uses the module QT_COPIED_FRAMEWORK_HEADERS property to generate the dependency list for the ${target}_framework_headers target. In a common case elements can be added to the QT_COPIED_FRAMEWORK_HEADERS property after the qt_internal_add_module command call, that's why we need to make sure that qt_finalize_framework_headers_copy is called after collecting all headers assigned to the module. Pick-to: 6.2 Change-Id: I2878fa6b8d4b11677c3f48345bf6e239221074c2 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* CMake: QtDocsHelpers: Rename generate_qdocs_args variableTopi Reinio2021-11-031-2/+2
| | | | | | | | | To be consistent with prepare_qdoc_args. Pick-to: 6.2 Change-Id: Ibd40d6c26f6f6fa49ea78b6476f396153b7c4ee5 Reviewed-by: Paul Wicking <paul.wicking@qt.io> Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* CMake: Improve comment about how to disable warningsKai Köhne2021-11-021-3/+5
| | | | | | Change-Id: I4367f2b585b7fdfaba2a815be885157a1db990cd Reviewed-by: Alexey Edelev <alexey.edelev@qt.io> Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* CMake: Don't create targets if dependencies are not foundAlexandru Croitor2021-11-021-1/+1
| | | | | | | | | | | | | | | | | | If one of the dependencies in QtFooModuleDependencies.cmake is not found, QtFoo_FOUND will be set to False by find_dependency. In that case, we should not create imported targets that belong to that package. It would be misleading for projects that do target existence checks instead of package_FOUND checks as well as generally being incorrect. The created imported targets might be referencing other targets that would not exist. Pick-to: 6.2 Fixes: QTBUG-97896 Change-Id: I09198aa3f19be047b27c29329b6e62c30fa09dc0 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Craig Scott <craig.scott@qt.io>
* configure: Remove unused facility to define variable assignmentsJoerg Bornemann2021-11-011-29/+0
| | | | | | | | | | | | The function qt_commandline_assignment and everything related to it is removed from configure. It was only used in qtbase, and all usage has been removed. More general variable assignments will be added in a subsequent commit. Task-number: QTBUG-88210 Change-Id: I7cfa782e89914f2b0dc0277c46e425c8a825557e Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Remove CFBundleGetInfoString from CMake Info.plist templatesTor Arne Vestbø2021-11-012-4/+0
| | | | | | | | | | | It's been deprecated since Mac OS X 10.5. qmake templates fixed in 0768a28fbfe4c7227182b6b4b7cacbc6772c54f4. Task-number: QTBUG-74872 Pick-to: 6.2 Change-Id: If7d988f27f07b6fa095b2ea51a87c306361d63d1 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* qconfig.cpp: use qOffsetStringArrayThiago Macieira2021-10-291-25/+12
| | | | | | | | | | It's been there for ages, we may as well use it and remove unnecessary complexity from CMake. Pick-to: 6.2 Change-Id: I2bbf422288924c198645fffd16a9742567a7e4af Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>