From 68856adf1d609635b835f58ee22a027df9d34aa5 Mon Sep 17 00:00:00 2001 From: Alexandru Croitor Date: Mon, 24 Feb 2025 18:35:30 +0100 Subject: [PATCH] CMake: Add a new SBOM entity type: THIRD_PARTY_SOURCES 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 Task-number: QTBUG-122899 Change-Id: I8f7f9f7386ffdc18dd8ae6ee32e39019639f5303 Reviewed-by: Joerg Bornemann Reviewed-by: Alexey Edelev (cherry picked from commit 8b06d37fb08d22e9f81ae2653aeafc105fc5bb61) Reviewed-by: Qt Cherry-pick Bot --- cmake/QtPublicSbomFileHelpers.cmake | 2 ++ cmake/QtPublicSbomHelpers.cmake | 4 ++++ 2 files changed, 6 insertions(+) diff --git a/cmake/QtPublicSbomFileHelpers.cmake b/cmake/QtPublicSbomFileHelpers.cmake index 746dbfad486..838a94ae42f 100644 --- a/cmake/QtPublicSbomFileHelpers.cmake +++ b/cmake/QtPublicSbomFileHelpers.cmake @@ -51,6 +51,7 @@ function(_qt_internal_sbom_handle_target_binary_files target) # This will be meant for user projects, and are not currently used by Qt's sbom. THIRD_PARTY_LIBRARY THIRD_PARTY_LIBRARY_WITH_FILES + THIRD_PARTY_SOURCES EXECUTABLE LIBRARY TRANSLATIONS @@ -71,6 +72,7 @@ function(_qt_internal_sbom_handle_target_binary_files target) QT_CUSTOM_NO_INFIX SYSTEM_LIBRARY THIRD_PARTY_LIBRARY + THIRD_PARTY_SOURCES TRANSLATIONS RESOURCES CUSTOM diff --git a/cmake/QtPublicSbomHelpers.cmake b/cmake/QtPublicSbomHelpers.cmake index dd93b4336d1..ebd99269a5a 100644 --- a/cmake/QtPublicSbomHelpers.cmake +++ b/cmake/QtPublicSbomHelpers.cmake @@ -1616,6 +1616,8 @@ function(_qt_internal_sbom_get_package_infix type out_infix) set(package_infix "3rdparty-library") elseif(type STREQUAL "THIRD_PARTY_LIBRARY_WITH_FILES") set(package_infix "3rdparty-library-with-files") + elseif(type STREQUAL "THIRD_PARTY_SOURCES") + set(package_infix "3rdparty-sources") elseif(type STREQUAL "TRANSLATIONS") set(package_infix "translations") elseif(type STREQUAL "RESOURCES") @@ -1665,6 +1667,8 @@ function(_qt_internal_sbom_get_package_purpose type out_purpose) set(package_purpose "LIBRARY") elseif(type STREQUAL "THIRD_PARTY_LIBRARY_WITH_FILES") set(package_purpose "LIBRARY") + elseif(type STREQUAL "THIRD_PARTY_SOURCES") + set(package_purpose "LIBRARY") elseif(type STREQUAL "TRANSLATIONS") set(package_purpose "OTHER") elseif(type STREQUAL "RESOURCES")