Skip to content

Commit

Permalink
build: Generated SBOM is once again NTIA compliant
Browse files Browse the repository at this point in the history
  • Loading branch information
sithlord48 committed May 19, 2024
1 parent f68a919 commit c9fca73
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ env:
QtTools: 'tools_ifw'
QtKey: "6.6.3-ifw46"
BuildType: RelWithDebInfo
cmakeConfigure: "cmake -S. -Bbuild -DDEMOS=ON -DQT_DEFAULT_MAJOR_VERSION=6 -DCMAKE_BUILD_TYPE=RelWithDebInfo -G Ninja"
cmakeConfigure: "cmake -S. -Bbuild -DDEMOS=ON -DQT_DEFAULT_MAJOR_VERSION=6 -DCMAKE_BUILD_TYPE=RelWithDebInfo -G Ninja -DSBOM_LINT=ON"
debianRequirments: "build-essential git zlib1g-dev cmake doxygen graphviz qt6-tools-dev qt6-tools-dev-tools qt6-l10n-tools qt6-declarative-dev qt6-base-dev libqt6svg6-dev qt6-base-dev-tools qt6-translations-l10n libqt6core5compat6-dev libgl1-mesa-dev rename devscripts ninja-build clang"
jobs:
precheck:
Expand Down
5 changes: 5 additions & 0 deletions cmake/sbom.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,11 @@ function(sbom_generate)
set(SBOM_GENERATE_PROJECT "${PROJECT_NAME}")
endif()

string(REGEX MATCH "^Package-" HAS_MATCH ${SBOM_GENERATE_PROJECT})
if("${HAS_MATCH}" STREQUAL "")
string(PREPEND SBOM_GENERATE_PROJECT "Package-")
endif()

if("${SBOM_GENERATE_SUPPLIER}" STREQUAL "")
set(SBOM_GENERATE_SUPPLIER "${SBOM_SUPPLIER}")
elseif("${SBOM_SUPPLIER_URL}" STREQUAL "")
Expand Down

0 comments on commit c9fca73

Please sign in to comment.