diff --git a/cmake/QtPublicSbomAttributionHelpers.cmake b/cmake/QtPublicSbomAttributionHelpers.cmake index 0d35edeb9b3..363a0c7e5a9 100644 --- a/cmake/QtPublicSbomAttributionHelpers.cmake +++ b/cmake/QtPublicSbomAttributionHelpers.cmake @@ -25,12 +25,8 @@ function(_qt_internal_sbom_handle_qt_attribution_files out_prefix_outer) return() endif() - set(opt_args - CREATE_SBOM_FOR_EACH_ATTRIBUTION - ) - set(single_args - PARENT_TARGET - ) + set(opt_args "") + set(single_args "") set(multi_args "") _qt_internal_get_sbom_specific_options(sbom_opt_args sbom_single_args sbom_multi_args) @@ -64,8 +60,8 @@ function(_qt_internal_sbom_handle_qt_attribution_files out_prefix_outer) set(propagate_sbom_options_to_new_attribution_targets TRUE) if(arg_CREATE_SBOM_FOR_EACH_ATTRIBUTION) set(propagate_sbom_options_to_new_attribution_targets FALSE) - if(NOT arg_PARENT_TARGET) - message(FATAL_ERROR "PARENT_TARGET must be set") + if(NOT arg_ATTRIBUTION_PARENT_TARGET) + message(FATAL_ERROR "ATTRIBUTION_PARENT_TARGET must be set") endif() endif() @@ -185,7 +181,7 @@ function(_qt_internal_sbom_handle_qt_attribution_files out_prefix_outer) # If no Id was retrieved, just add a numeric one, to make the sbom target # unique. - set(attribution_target "${arg_PARENT_TARGET}_Attribution_") + set(attribution_target "${arg_ATTRIBUTION_PARENT_TARGET}_Attribution_") if(NOT ${out_prefix}_attribution_id) string(APPEND attribution_target "${file_index}_${entry_index}") else() @@ -222,7 +218,10 @@ function(_qt_internal_sbom_handle_qt_attribution_files out_prefix_outer) # depending on which file and index is currently being processed. _qt_internal_get_sbom_specific_options( sbom_opt_args sbom_single_args sbom_multi_args) - list(REMOVE_ITEM sbom_opt_args NO_CURRENT_DIR_ATTRIBUTION) + list(REMOVE_ITEM sbom_opt_args + NO_CURRENT_DIR_ATTRIBUTION + CREATE_SBOM_FOR_EACH_ATTRIBUTION + ) list(REMOVE_ITEM sbom_single_args ATTRIBUTION_ENTRY_INDEX) list(REMOVE_ITEM sbom_multi_args ATTRIBUTION_IDS @@ -259,7 +258,7 @@ function(_qt_internal_sbom_handle_qt_attribution_files out_prefix_outer) ${sbom_args} ) - _qt_internal_extend_sbom_dependencies(${arg_PARENT_TARGET} + _qt_internal_extend_sbom_dependencies(${arg_ATTRIBUTION_PARENT_TARGET} SBOM_DEPENDENCIES ${attribution_target} ) endif() diff --git a/cmake/QtPublicSbomHelpers.cmake b/cmake/QtPublicSbomHelpers.cmake index b56657d1bf1..32777438a25 100644 --- a/cmake/QtPublicSbomHelpers.cmake +++ b/cmake/QtPublicSbomHelpers.cmake @@ -545,6 +545,7 @@ macro(_qt_internal_get_sbom_add_target_common_options opt_args single_args multi SBOM_INCOMPLETE_3RD_PARTY_DEPENDENCIES IS_QT_3RD_PARTY_HEADER_MODULE USE_ATTRIBUTION_FILES + CREATE_SBOM_FOR_EACH_ATTRIBUTION __QT_INTERNAL_HANDLE_QT_ENTITY_TYPE_PACKAGE_VERSION __QT_INTERNAL_HANDLE_QT_ENTITY_TYPE_SUPPLIER __QT_INTERNAL_HANDLE_QT_ENTITY_TYPE_DOWNLOAD_LOCATION @@ -563,6 +564,7 @@ macro(_qt_internal_get_sbom_add_target_common_options opt_args single_args multi QT_LICENSE_ID DOWNLOAD_LOCATION ATTRIBUTION_ENTRY_INDEX + ATTRIBUTION_PARENT_TARGET SBOM_PACKAGE_COMMENT ) set(${multi_args} @@ -694,7 +696,7 @@ function(_qt_internal_sbom_add_target target) if(arg_USE_ATTRIBUTION_FILES) set(attribution_args - PARENT_TARGET "${target}" + ATTRIBUTION_PARENT_TARGET "${target}" ) if(is_qt_entity_type AND arg___QT_INTERNAL_HANDLE_QT_ENTITY_ATTRIBUTION_FILES)