diff --git a/src/dice/hash/blake/internal/blake3/CMakeLists.txt b/src/dice/hash/blake/internal/blake3/CMakeLists.txt index 5231822..ce05dcc 100644 --- a/src/dice/hash/blake/internal/blake3/CMakeLists.txt +++ b/src/dice/hash/blake/internal/blake3/CMakeLists.txt @@ -41,15 +41,22 @@ set(blake3_files blake3_sse41_x86-64_windows_msvc.asm libblake3.pc.in ) +set(blake3_license_files + LICENSE_A2 + LICENSE_A2LLVM + LICENSE_CC0 +) foreach(file ${blake3_files}) file(DOWNLOAD "https://raw.githubusercontent.com/BLAKE3-team/BLAKE3/${blake3_rev}/c/${file}" "${CMAKE_CURRENT_BINARY_DIR}/src/blake3/${file}" TLS_VERIFY ON) endforeach() -file(DOWNLOAD "https://raw.githubusercontent.com/BLAKE3-team/BLAKE3/${blake3_rev}/LICENSE_A2" - "${CMAKE_CURRENT_BINARY_DIR}/src/blake3/LICENSE" +foreach(file ${blake3_license_files}) + file(DOWNLOAD "https://raw.githubusercontent.com/BLAKE3-team/BLAKE3/${blake3_rev}/${file}" + "${CMAKE_CURRENT_BINARY_DIR}/src/blake3/${file}" TLS_VERIFY ON) +endforeach() # architecture lists for which to enable assembly / SIMD sources set(BLAKE3_AMD64_NAMES amd64 AMD64 x86_64) @@ -207,6 +214,12 @@ endif() # cmake install support install(FILES ${CMAKE_CURRENT_BINARY_DIR}/src/blake3/blake3.h DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}") +install(FILES + ${CMAKE_CURRENT_BINARY_DIR}/LICENSE_A2 + ${CMAKE_CURRENT_BINARY_DIR}/LICENSE_A2LLVM + ${CMAKE_CURRENT_BINARY_DIR}/LICENSE_CC0 + DESTINATION "${CMAKE_INSTALL_DATADIR}/licenses" +) install(TARGETS blake3 EXPORT blake3-targets) install(EXPORT blake3-targets NAMESPACE BLAKE3::