Skip to content

Commit 8fbee2b

Browse files
GitHub Copilotdzenanz
andcommitted
ENH: Address code review - fix comment, URLs, add extracted license info
- Fix comment to say 'configure time' not 'build time' - Use HTTPS for libpng and libtiff download URLs - Add hasExtractedLicensingInfo section for custom LicenseRef identifiers Co-authored-by: dzenanz <1792121+dzenanz@users.noreply.github.com>
1 parent e7b8e62 commit 8fbee2b

File tree

1 file changed

+23
-4
lines changed

1 file changed

+23
-4
lines changed

CMake/ITKSBOMGeneration.cmake

Lines changed: 23 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
includes component names, versions, licenses, and dependency relationships.
77
88
Usage:
9-
option(ITK_GENERATE_SBOM "Generate SPDX SBOM at build time" ON)
9+
option(ITK_GENERATE_SBOM "Generate SPDX SBOM at configure time" ON)
1010
include(ITKSBOMGeneration)
1111
1212
The generated file is written to:
@@ -233,7 +233,7 @@ function(_itk_sbom_get_thirdparty_metadata module_name
233233

234234
elseif("${module_name}" STREQUAL "ITKPNG")
235235
set(_license "Libpng-2.0")
236-
set(_download "http://www.libpng.org/pub/png/libpng.html")
236+
set(_download "https://www.libpng.org/pub/png/libpng.html")
237237
set(_supplier "Organization: libpng contributors")
238238
set(_copyright "Copyright libpng contributors")
239239
# Try to detect PNG version from CMake variable
@@ -253,7 +253,7 @@ function(_itk_sbom_get_thirdparty_metadata module_name
253253

254254
elseif("${module_name}" STREQUAL "ITKTIFF")
255255
set(_license "libtiff")
256-
set(_download "http://www.libtiff.org")
256+
set(_download "https://libtiff.maptools.org")
257257
set(_supplier "Organization: libtiff contributors")
258258
set(_copyright "Copyright libtiff contributors")
259259
# Try to detect TIFF version from CMake variable
@@ -449,7 +449,26 @@ function(itk_generate_sbom)
449449
string(APPEND _json " }")
450450
endforeach()
451451

452-
string(APPEND _json "\n ]\n")
452+
string(APPEND _json "\n ],\n")
453+
454+
# --- hasExtractedLicensingInfo for custom LicenseRef identifiers ---
455+
string(APPEND _json " \"hasExtractedLicensingInfo\": [\n")
456+
string(APPEND _json " {\n")
457+
string(APPEND _json " \"licenseId\": \"LicenseRef-NIFTI-Public-Domain\",\n")
458+
string(APPEND _json " \"name\": \"NIFTI Public Domain License\",\n")
459+
string(APPEND _json " \"extractedText\": \"This software is in the public domain. The NIFTI header and library are released into the public domain.\"\n")
460+
string(APPEND _json " },\n")
461+
string(APPEND _json " {\n")
462+
string(APPEND _json " \"licenseId\": \"LicenseRef-NITRC-Public-Domain\",\n")
463+
string(APPEND _json " \"name\": \"NITRC GIFTI Public Domain License\",\n")
464+
string(APPEND _json " \"extractedText\": \"The GIFTI library is released into the public domain under the NITRC project.\"\n")
465+
string(APPEND _json " },\n")
466+
string(APPEND _json " {\n")
467+
string(APPEND _json " \"licenseId\": \"LicenseRef-Netlib-SLATEC\",\n")
468+
string(APPEND _json " \"name\": \"Netlib SLATEC Public Domain License\",\n")
469+
string(APPEND _json " \"extractedText\": \"The SLATEC Common Mathematical Library is issued by the U.S. Government and is in the public domain.\"\n")
470+
string(APPEND _json " }\n")
471+
string(APPEND _json " ]\n")
453472

454473
# --- Close JSON document ---
455474
string(APPEND _json "}\n")

0 commit comments

Comments
 (0)