summaryrefslogtreecommitdiffstats
path: root/cmake
Commit message (Collapse)AuthorAgeFilesLines
...
* Avoid using the PROJECT_VERSION_MAJOR as the HostInfo variable prefixAlexey Edelev2025-03-248-17/+44
| | | | | | | | | | | | | Manage the HostInfo variable prefix the correct way. The prefix takes the HostInfo PROJECT_VERSION_MAJOR as the version specifier, which is not necessary is the same as the PROJECT_VERSION_MAJOR of the project that uses respective API. Instead of relying on the current PROJECT_VERSION, use the version info stored in HostInfo package and adjust the prefix accordingly. This will allow version mismatching between the project that uses API and HostInfo version. Change-Id: Idbaec1c7bb203448ceb0f15c9173ad3985c7112d Reviewed-by: Alexandru Croitor <[email protected]>
* Make HostInfo versionedAlexey Edelev2025-03-241-1/+9
| | | | | | | | | | Generate and install the HostInfoConfigVersion file for the HostInfo package. The package had no strict version compatibility as Qt modules before, so we avoid adding them here too. Pick-to: 6.5 6.8 6.9 Change-Id: Iaee43639dd87d911946c8ce72c4849f43599d08e Reviewed-by: Alexandru Croitor <[email protected]>
* Avoid using the PROJECT_VERSION when accessing the HostInfo package variablesAlexey Edelev2025-03-213-5/+5
| | | | | | | | | | | | | The related functionality meant to be enabled by BuildInternals, which makes the lookup of the pre-defined HostInfo version based on either calculated or pre-defined INSTALL_CMAKE_NAMESPACE. The PROJECT_VESION(_MAJOR) meanwhile is hardcoded by the current Qt repo, which is not necessary aligned with BuildInternals/HostInfo. Pick-to: 6.5 6.8 6.9 Change-Id: I61052c93ce2d6ee3c6d8025da2e078edcde48d0d Reviewed-by: Alexandru Croitor <[email protected]>
* Make the HostInfo package lookup properly versionedAlexey Edelev2025-03-213-5/+6
| | | | | | | | | | | | | Avoid hardcoding the HostInfo package version, use the INSTALL_CMAKE_NAMESPACE as the reference for the find_package calls. If we assume that the package follows the versioning in the future, we should consider the Qt version, to avoid any version related issues. Pick-to: 6.5 6.8 6.9 Change-Id: If84550ab82f8de51ff5af41c7f31838c4ed53a67 Reviewed-by: Alexandru Croitor <[email protected]>
* CMake: Fix dbus and vk headers to be excluded from doc generationAlexandru Croitor2025-03-203-5/+36
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Before this change, if someone called ninja Gui_generate_docs, it would implicitly depend on sync_all_public_headers -> Gui_sync_headers which would generate dbus headers. This caused trouble with the new 'build doc tools from qttools/dev/HEAD' approach, because an older pre-built dbus tool might be passed a newer option when integrating a qtbase change that passes the new option. To avoid that, we now filter out the dbus headers from the list of headers that should be processed by syncqt when building a documentation target. We do the same for the qvkgen generated headers. This also removes the dependency on the ${target}_sync_headers target, which means there is a potential issue when someone manually calls `ninja sync_all_public_headers Gui_sync_headers` or something like it, which would spawn two syncqt processes that access the same files concurrently. This is an edge case that should not happen, but if it ends up happening, we will have to implement some kind of lock file mechanism. Pick-to: 6.8 6.9 Fixes: QTBUG-134672 Task-number: QTBUG-128730 Change-Id: I9061f9495e2faa77744f5f5c0de8fedd362ba228 Reviewed-by: Alexey Edelev <[email protected]>
* CMake: Fix generation of precompiled headers in per-repo Qt buildsJoerg Bornemann2025-03-202-5/+60
| | | | | | | | | | | | | | | | | | | | | | | | | When a Qt module Foo links against a Qt module Bar then we add the ${QT_BUILD_DIR}/include/QtBar/QtBar header to the list of precompiled header files. However, this only works if Foo and Bar are in the same build system, e.g. in the same repository or in a top-level build. For example, the QtCore header was never precompiled when in a per-repo build of QtSvg. Now, we determine whether Foo and Bar are in the same build system. If they are, we proceed as before. Otherwise, we calculate the QtBar header's location from the following data: - the location of Qt6BarConfig.cmake - the relative path to Bar's include directory The Q*Application tests' project files had to be adjusted to use NO_PCH_SOURCES now, because they use the source file apphelper_plugin.cpp that specifically checks that pre-compiled headers are not used for its compilation. Fixes: QTBUG-134424 Change-Id: I04ede51e4d853e8b813f660f29be8cfeb684c0b2 Reviewed-by: Alexandru Croitor <[email protected]> Reviewed-by: Alexey Edelev <[email protected]>
* CMake: Add NO_PCH_SOURCES argument to qt_internal_add_cmake_libraryJoerg Bornemann2025-03-201-19/+22
| | | | | | | | Forward NO_PCH_SOURCES to qt_internal_extend_target and port to _qt_internal_forward_function_args while we're at it. Change-Id: I0c62e84c5a22f937904c1949ff34d0171a1a937f Reviewed-by: Alexandru Croitor <[email protected]>
* Suppress the Private module warning if QT_FIND_PRIVATE_MODULES is ONAlexey Edelev2025-03-191-1/+1
| | | | | | | | | | | | If users set QT_FIND_PRIVATE_MODULES we may assume that they know what they are doing and it's the conscious decision, and the Private module warning is not needed. Ammends a9f26c3f9a9eb6758e3ef116e319a6cca8715a1c Change-Id: I2d7bf86060b87365bda0a8355427c52b1b38c456 Reviewed-by: Joerg Bornemann <[email protected]> Reviewed-by: Tor Arne Vestbø <[email protected]>
* CMake: Show the "Docker image ... not found" warning only onceJoerg Bornemann2025-03-181-5/+7
| | | | | | | | | | | | | | | ...if docker / docker-compose are not installed. This amends commit 3223c06d43b1be658032c179397eaf6ed3b1f27c, which fixed the multiple warnings only for the docker image existence check. Remove the QT_TEST_DOCKER_WARNING_SHOWN global property and set the QT_SKIP_DOCKER_COMPOSE cache variable to ON instead. Now, we'll see the warning only once, and further re-configuration attempts won't even try to find the docker tools. Change-Id: I98a584ae91899ae8c4c347ee62601d791105d301 Reviewed-by: Alexey Edelev <[email protected]>
* CMake: Remove unused variable from qt_internal_add_moduleJoerg Bornemann2025-03-171-5/+0
| | | | | | | | | The targets_to_export variable is unused. Remove it. Amends commit fbbf4ace0188b9718b6d7808021c0b887fd52d9f. Change-Id: I67f171738532c274e2b4fe8943fffd0c03cce55a Reviewed-by: Alexey Edelev <[email protected]>
* ECMEnableSanitizers.cmake: fix GCC's "note: variable tracking size limit ↵Marc Mutz2025-03-173-0/+97
| | | | | | | | | | | | | | | | | | | | | | | exceeded" when using asan Upstream pull requests: - https://invent.kde.org/frameworks/extra-cmake-modules/-/merge_requests/519 - https://invent.kde.org/frameworks/extra-cmake-modules/-/merge_requests/521 Says the commit message: > Set the max-vartrack-size parameter to 0 (= unlimited) to avoid > GCC's "note: variable tracking size limit exceeded with > -fvar-tracking-assignments, retrying without" message you get when > you compile with asan sometimes. > > This is reported¹ to speed up compilation, not slow it down. > > ¹ https://stackoverflow.com/a/75704837/134841 Pick-to: 6.9 6.8 6.5 5.15 Change-Id: I2489bbe3d3cb12cc52d7041499e38bb05c73aa3a Reviewed-by: Alexandru Croitor <[email protected]>
* Fix the condition that enables/defaults exceptionsAlexey Edelev2025-03-174-4/+4
| | | | | | | | | | | | | Not sure why it worked at implementation time. But now it definitely doesn't. We may check the EXCEPTIONS flag value, since it's the equivalent of its presence/non-presence in the argument list. Amends f98fd705290ac7bd9434552a07e38b775e6a6dbf Task-number: QTBUG-118901 Pick-to: 6.9 Change-Id: I9769b4921a2f72d31aea2b0bffd2511edd89f88f Reviewed-by: Alexandru Croitor <[email protected]>
* Fix header generation issue with multiple qt6_add_win_app_sdk callsMorteza Jamshidi2025-03-131-17/+15
| | | | | | | | | | | | Use EXISTS path insead of using find_path because find_path finds the last target's generated headers, but we want to generate headers for each target separetely. Ammends 95c70bbc5bed906fc3d24eebfb00592d48b30a74 Pick-to: 6.9 Fixes: QTBUG-124800 Change-Id: Ib2b9ceefbc6d11f9bf67fdc6ce25dea3366afe3d Reviewed-by: Alexey Edelev <[email protected]>
* CMake: Warn on creation of private modules without private headersJoerg Bornemann2025-03-131-0/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | Private modules without private headers don't make much sense and needlessly create CMake packages and QMake module pri files. In qt_finalize_module we check whether the module has any private headers. But the private module was already created before in qt_internal_add_module. Moving the creation of the private module or the CMake package files to the finalization phase would be a bigger refactoring that's probably not worth the hassle. An easier way to avoid the package creation issue is to mandate that a Qt module must be created with NO_PRIVATE_MODULE if it doesn't have any private headers. Add a warning if a Qt module without private headers is created without NO_PRIVATE_MODULE. Also warn if a Qt module with private headers is created with NO_PRIVATE_MODULE. This allows us to easily spot the places where NO_PRIVATE_MODULE is missing. Task-number: QTBUG-132526 Change-Id: I897f25790a99eaa320c39cd8c2728f26bceb824e Reviewed-by: Alexandru Croitor <[email protected]>
* Ensure optional_arg is reset in qt_internal_add_global_definitionAlexey Edelev2025-03-121-1/+1
| | | | | | | | | Othewise there is a risk that variable is taken from other scopes. (Random finding). Pick-to: 6.5 6.8 6.9 Change-Id: I2517adec5d82639e95ac2758633109413811cf9a Reviewed-by: Alexandru Croitor <[email protected]>
* CMake: Show the "Docker image ... not found" warning only onceJoerg Bornemann2025-03-121-0/+5
| | | | | | | | | ...when configuring Qt with QT_BUILD_TESTS=ON and without QT_SKIP_DOCKER_COMPOSE=ON. There's no point in flooding the output with the same warning. Change-Id: Ic7ab38dc0ca7d6cec31501da4c79170cf26e66a1 Reviewed-by: Alexandru Croitor <[email protected]>
* Build system: reduce verbosity of documentation commandsVolker Hilsheimer2025-03-121-0/+3
| | | | | | | | | | | Cmake will print the entire command line for custom targets if no COMMENT field is set. Add that to reduce the verbosity and make the output a bit more manageable; verbose builds will still print the entire command. Change-Id: Ifedcb75fed4614788ffa9a6b121e2b435810a379 Reviewed-by: Alexandru Croitor <[email protected]> Reviewed-by: Tor Arne Vestbø <[email protected]>
* Disable -Werror=tsan on GCC < 15Giuseppe D'Angelo2025-03-081-0/+8
| | | | | | | | | | | | | | | | | | | | | QGlobalStatic has a warning suppression for -Wtsan because of its usage of std::atomic_thread_fence, which TSAN doesn't support. That header is included in QtCore's PCH, and that triggers a GCC bug that causes the warning to be emitted despite the suppression [1]. In a developer build, the warning turns fatal. We could either disable PCHs in such a build configuration (TSAN+developer-build+GCC < 15), or: simply make the warning non-fatal on earlier compiler versions. [1] https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64117 Pick-to: 6.9 6.8 6.5 Fixes: QTBUG-134415 Change-Id: If80a4acdb1372d00804a60361f6c3d6893b96106 Reviewed-by: David Faure <[email protected]> Reviewed-by: Alexandru Croitor <[email protected]>
* CMake: fix missing _GNU_SOURCE macro in CYGWINCarlo Bramini2025-03-071-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | Compiling qtbase in CYGWIN shows several errors like this one: In file included from qtbase/include/QtCore/6.9.0/QtCore/private/qcore_unix_p.h:1, from qtbase/src/corelib/global/qlogging.cpp:61: qtbase/src/corelib/kernel/qcore_unix_p.h: In function ‘int qt_safe_pipe(int*, int)’: qtbase/src/corelib/kernel/qcore_unix_p.h:283:14: error: ‘::pipe2’ has not been declared; did you mean ‘pipe’? 233 | return ::pipe2(pipefd, flags); // pipe2 is documented not to return EINTR | ^~~~~ | pipe Actually, the error happens because pipe2() is available only when _GNU_SOURCE is defined: https://man7.org/linux/man-pages/man2/pipe.2.html CYGWIN doesn't define this macro by default, so this is reason because the error happens. In my opinion, the best way for fixing the trouble is adding the missing _GNU_SOURCE macro by using CMake. Using qplatformdefs.h, which is also broken for cygwin-g++ target, doesn't fix the issue, so the only way to solve the problem is to set it with CMake or forcing it externally by using CPPFLAGS. Change-Id: I6917630999b29582556258eee11d9989f439c37c Reviewed-by: Thiago Macieira <[email protected]>
* CMake: Fix -no-prefix build with CMake < 3.26 on macOSJoerg Bornemann2025-03-071-6/+9
| | | | | | | | | | | | | | | | | | On macOS, Core has plugins that link against CorePrivate. In a non-prefix build, user projects failed on find_package(Qt6 REQUIRED COMPONENTS Core), because CorePrivate is required for these plugins in a non-prefix build, but it's not automatically pulled in. This is only an issue for CMake < 3.26, because these older CMake versions lack the BUILD_LOCAL_INTERFACE generator expression. Fix this by pulling in the private modules for non-prefix builds when using CMake < 3.26. Also, issue a warning in this situation. Fixes: QTBUG-134407 Change-Id: I7f182c9518686390e657663b452cad8101d870a2 Reviewed-by: Alexey Edelev <[email protected]> Reviewed-by: Alexandru Croitor <[email protected]>
* CMake: Fix permissions of qt-internal-(strip|ninja).bat.in on UnicesJoerg Bornemann2025-03-071-3/+13
| | | | | | | | | These files should not have executable permissions. Pick-to: 6.9 Fixes: QTBUG-125534 Change-Id: I893d4d373ee098864b64200dc6c88b57d05d6209 Reviewed-by: Alexey Edelev <[email protected]>
* Use `_qt_internal_dealias_target`Cristian Le2025-03-068-48/+12
| | | | | | Pick-to: 6.9 6.8 Change-Id: Iffc1148ed7655c724ea0609be01978ab7d5e7f8f Reviewed-by: Alexandru Croitor <[email protected]>
* Add helper function `_qt_internal_get_real_target`Cristian Le2025-03-061-0/+16
| | | | | | | | Also a shortcut `_qt_internal_dealias_target` Pick-to: 6.9 6.8 Change-Id: Ic772896f7bf2f3fb05dd4799b1a8aabbc4379930 Reviewed-by: Alexandru Croitor <[email protected]>
* CMake: Add a special skip genex marker when walking libsAlexandru Croitor2025-03-061-2/+9
| | | | | | | | | | | | | | Useful to annotate certain linking expressions that need to be skipped for inclusion in prl file generation. E.g. $<TARGET_OBJECTS> expressions that represent propagated object libraries, which are handled by the rcc_objects walk lib code path, and thus need to end up in prl RCC_OBJECTS section, instead of the QMAKE_PRL_LIBS_FOR_CMAKE one. Pick-to: 6.8 6.9 Change-Id: Ib08b00200b6b06d32eab15ecb15c0820eec2a908 Reviewed-by: Fabian Kosmale <[email protected]> Reviewed-by: Alexey Edelev <[email protected]>
* Android: bump Android target API level to 35Rami Potinkara2025-03-061-1/+1
| | | | | | | | | | | | This patch -updated target API level to 35 into build tools -updated target API level to 35 in build.gradle files Task-number: QTBUG-129461 Task-number: QTBUG-130284 Pick-to: 6.9 6.9.0 Change-Id: Iebdc99e6f607352652c3f0022f17de60eae97d58 Reviewed-by: Assam Boudjelthia <[email protected]>
* CMake: map more -sanitize options in the docGiuseppe D'Angelo2025-03-051-2/+4
| | | | | | | | These were supported by Qt 5's configure. Pick-to: 6.9 6.8 Change-Id: I3d902bb9e211f1dfecbf0835203e7b9e60fb41f6 Reviewed-by: Alexandru Croitor <[email protected]>
* CMake: Remove semicolon from SBOM external document referencesAlexandru Croitor2025-03-031-1/+1
| | | | | | | | | | | | | | | | The external doc references need to be appended as strings, not list elements, otherwise there will be semicolons in the output SPDX file. This issue was inherited as-is from the upstream SBOM generation project. We are fortunate the json converted files are missing the semicolons due to implementation specifics. Pick-to: 6.8 6.9 Task-number: QTBUG-122899 Change-Id: I2b91775d59d64709b72ff7130dd4f6b506ef8244 Reviewed-by: Alexey Edelev <[email protected]>
* Make `qt_internal_set_warnings_are_errors_flags` genex-edCristian Le2025-03-032-76/+123
| | | | | | Fixes: QTBUG-132705 Change-Id: I57987f1ae1c6d6adc4a2d0151f365c24605b940e Reviewed-by: Alexandru Croitor <[email protected]>
* Add `qt_internal_add_compiler_dependent_flags` helperCristian Le2025-03-031-0/+350
| | | | | | | | Helper function that groups together compiler specific options and conditions Pick-to: 6.8 6.9 Change-Id: Ibec52a19852ad528007f50316a52d2f867b5fe37 Reviewed-by: Alexandru Croitor <[email protected]>
* CMake: Fix building tests with qt-cmake-standalone-testJoerg Bornemann2025-02-281-0/+3
| | | | | | | | | | | | | We now require user projects to use find_package(Qt6FooPrivate) if the Qt6::FooPrivate target is used. We don't require this for Qt's autotests. But configuring such a test with qt-cmake-standalone-test failed. Fix this by setting QT_FIND_PRIVATE_MODULES to ON in the CMake project template for standalone tests. Change-Id: I778cbfc16638a94b5fe538c175394501df106b82 Reviewed-by: Alexey Edelev <[email protected]>
* Copy `qt_set01` to a central locationCristian Le2025-02-281-0/+8
| | | | | Change-Id: I05b3ef4d02dd1f8583eea9960c3776409f2f3b2e Reviewed-by: Alexandru Croitor <[email protected]>
* Allow Feature to be alias of Cache variableCristian Le2025-02-281-22/+90
| | | | | Change-Id: I09b65cb038567a9f68a140e53a9e06eb15c8fc13 Reviewed-by: Alexandru Croitor <[email protected]>
* Forward other `qt_feature` options in `qt_feature_alias`Cristian Le2025-02-281-2/+21
| | | | | Change-Id: Ic0b7479e071fc17020a04ea48386054f0bbf3151 Reviewed-by: Alexandru Croitor <[email protected]>
* Add `NEGATE` to `qt_feature_alias`Cristian Le2025-02-281-7/+39
| | | | | Change-Id: I9e10618a3bc76d285d7bd59ebbf5bc5e56de62d0 Reviewed-by: Alexandru Croitor <[email protected]>
* Add `qt_feature_alias`Cristian Le2025-02-282-4/+185
| | | | | | | | | | | Unlike chaining a feature into its `CONDITION`, it has a guaranteed one-to-one equivalence with the original target. - An alias cannot be set if the main feature is already set - Multiple aliases of a feature cannot be set at the same time Change-Id: I5b17ec3af51761880a7edb0c47ad8144815f1f93 Reviewed-by: Alexandru Croitor <[email protected]>
* CMake: Add function to set up SBOM generation defaultsAlexandru Croitor2025-02-282-11/+43
| | | | | | | | | | Move the setting up of options like QT_GENERATE_SBOM into a separate function, that can be called by projects other than Qt. Pick-to: 6.8 6.9 Task-number: QTBUG-122899 Change-Id: I337c4e9b0b3154ff97f494887bf88ee01e8ed00c Reviewed-by: Alexey Edelev <[email protected]>
* CMake: Include license and license file attribution in SBOM commentAlexandru Croitor2025-02-282-3/+10
| | | | | | | | | | | Some attribution entries don't have a SPDX license id specified, in that case it's good to at least include the free-form license name and file path. Pick-to: 6.8 6.9 Task-number: QTBUG-122899 Change-Id: I75bb5c30645684ea74fe94da92ea30eb29965ad4 Reviewed-by: Alexey Edelev <[email protected]>
* CMake: Handle installing files with same name during SBOM generationAlexandru Croitor2025-02-271-0/+5
| | | | | | | | | | | | | | | | | | | | | | It's possible for a project to install a custom file with the same name into different destination directories, and want to include them in the SBOM. Previously this failed at CMake generation time with an error like: CMake Error: Files to be generated by multiple different commands: qt_sbom/SPDXRef-PackagedFile-foo-bar.cmake This happened due to using a non-unique filename for the generated SBOM building file, as well as the spdx id the file name is based on. Include a short hash based on the installed relative path of the file to avoid spdx id clashes, and thus generated file name clashes. Pick-to: 6.8 6.9 Task-number: QTBUG-122899 Change-Id: I4c2ecd4652708504ef299af9b6f53d680d542382 Reviewed-by: Alexey Edelev <[email protected]> Reviewed-by: Joerg Bornemann <[email protected]>
* CMake: Handle DIRECTORIES in SBOM custom file setsAlexandru Croitor2025-02-271-12/+48
| | | | | | | | | | | | | Previously one could only pass an explicit list of FILES to _qt_internal_sbom_add_files. Add a new DIRECTORIES option, which will glob the given directory paths, and include the found files in the SBOM. Pick-to: 6.8 6.9 Task-number: QTBUG-122899 Change-Id: Ia27afa93460d9f2e4462a49e30e4d6338300e8f7 Reviewed-by: Joerg Bornemann <[email protected]> Reviewed-by: Alexey Edelev <[email protected]>
* CMake: Extract Qt-specific license concluded handlingAlexandru Croitor2025-02-272-5/+32
| | | | | | | | | | | Extract the handling of the license concluded expression for Qt entities into the Qt specific handling file. Pick-to: 6.8 6.9 Task-number: QTBUG-122899 Change-Id: Ib6f9a64f66dae0c971c43e8fffbc54362487b271 Reviewed-by: Alexey Edelev <[email protected]> Reviewed-by: Joerg Bornemann <[email protected]>
* CMake: Unqtify THIRD_PARTY_SOURCES handling for SBOM attributionsAlexandru Croitor2025-02-272-8/+16
| | | | | | | | | | | | | Nested SBOM attribution targets were always created with the QT_THIRD_PARTY_SOURCES type even in user projects. Set an appropriate type depending on whether we are handling a qt entity type or not. Pick-to: 6.8 6.9 Task-number: QTBUG-122899 Change-Id: Id8144d1b8093de78f2987a611a6de8e6d4777084 Reviewed-by: Alexey Edelev <[email protected]> Reviewed-by: Joerg Bornemann <[email protected]>
* CMake: Add a new SBOM entity type: THIRD_PARTY_SOURCESAlexandru Croitor2025-02-272-0/+6
| | | | | | | | | | | | It mirrors the Qt-specific QT_THIRD_PARTY_SOURCES one, to be used when creating an SBOM attribution target that references a 3rd party library's sources, as opposed to a complete 3rd party library. Pick-to: 6.8 6.9 Task-number: QTBUG-122899 Change-Id: I8f7f9f7386ffdc18dd8ae6ee32e39019639f5303 Reviewed-by: Joerg Bornemann <[email protected]> Reviewed-by: Alexey Edelev <[email protected]>
* CMake: Remove leftover code after refactoringAlexandru Croitor2025-02-271-5/+0
| | | | | | | | | | | | The assignment is not used anywhere. Amends f1ac316191c010b1389f6f3549c9f0b4424b9936 Pick-to: 6.8 6.9 Task-number: QTBUG-122899 Change-Id: I3e6326b2782ab42dee8219353953ee6f4378ccfb Reviewed-by: Joerg Bornemann <[email protected]> Reviewed-by: Alexey Edelev <[email protected]>
* CMake: Re-order SBOM embedded qt_attribution.json fieldsAlexandru Croitor2025-02-271-12/+16
| | | | | | | | | | | Put the attribution file path and entry first, followed by the id, and the rest of the fields. Pick-to: 6.8 6.9 Task-number: QTBUG-122899 Change-Id: I478a48980e6207646189d6b80ec57dbc9efb4902 Reviewed-by: Joerg Bornemann <[email protected]> Reviewed-by: Alexey Edelev <[email protected]>
* CMake: Allow creating nested SBOM attribution targets for all entitiesAlexandru Croitor2025-02-272-12/+13
| | | | | | | | | | | | | | | Allow creating nested SBOM attribution targets also for non-Qt targets in user projects. This will allow using qt_attribution.json files in user projects. Rename PARENT_TARGET to ATTRIBUTION_PARENT_TARGET to make it clear what the parent target is for. Pick-to: 6.8 6.9 Task-number: QTBUG-122899 Change-Id: Ia08ee934a9dc03827fcc26d0fc90e072499e8a21 Reviewed-by: Joerg Bornemann <[email protected]> Reviewed-by: Alexey Edelev <[email protected]>
* CMake: Allow including specific attribution ids in SBOMsAlexandru Croitor2025-02-272-0/+47
| | | | | | | | | | | | | | | | | | | | | | Previously one could attach all attributions from a qt_attribution.json file to a target, or a specific entry based on a given numeric index. This is not always practical, as the index of an entry can change, and including all entries might be too much. Allow specifying a list of attribution ids to include in the SBOM. This will parse all the attribution entries and only include those that match the given ids. If a list of ids is provided, and any of them is not found, an error will be shown. Pick-to: 6.8 6.9 Task-number: QTBUG-122899 Change-Id: I2ca442fe0cd6d18773861f90f32ab7380aaeacdd Reviewed-by: Alexey Edelev <[email protected]> Reviewed-by: Joerg Bornemann <[email protected]>
* CMake: Sanitize nested SBOM attribution target namesAlexandru Croitor2025-02-271-0/+5
| | | | | | | | | | | To avoid issues with characters like "/" which might come from attribution ids. Pick-to: 6.8 6.9 Task-number: QTBUG-122899 Change-Id: I65bec3b301f7fe1008cfd06aba3e1fbbb93f38c3 Reviewed-by: Alexey Edelev <[email protected]> Reviewed-by: Joerg Bornemann <[email protected]>
* CMake: Remove type restriction on attribution file extra SBOM infoAlexandru Croitor2025-02-271-6/+1
| | | | | | | | | | So it can be used in other non-Qt projects. Pick-to: 6.8 6.9 Task-number: QTBUG-122899 Change-Id: I11d81d2c6819906fffbffe81f4db1b7af28cb99b Reviewed-by: Joerg Bornemann <[email protected]> Reviewed-by: Alexey Edelev <[email protected]>
* CMake: Remove type restriction on attribution download locationAlexandru Croitor2025-02-271-3/+1
| | | | | | | | | | | So it can be read / used in other non-Qt projects. We don't have such a restriction on other keys read from the qt attribution files. Pick-to: 6.8 6.9 Task-number: QTBUG-122899 Change-Id: I225d83b26c68323761a8b13b3e6442057b5f7c7f Reviewed-by: Alexey Edelev <[email protected]> Reviewed-by: Joerg Bornemann <[email protected]>
* Make `AdditionalTargetInfo.cmake` optionalCristian Le2025-02-252-2/+2
| | | | | | | | Pick-to: 6.8 6.9 Change-Id: I8b8d6383b6c50e9403bc90e76d4da8eb6c314854 Reviewed-by: Alexey Edelev <[email protected]> Reviewed-by: Joerg Bornemann <[email protected]> Reviewed-by: Alexandru Croitor <[email protected]>