implemented configurable checksum algorithm, defaults to sha256, introduces openssl dependency to build module

This commit is contained in:
Chris Punches
2025-03-15 21:27:21 -04:00
parent 1f4f73ff0f
commit aad077a24a
6 changed files with 213 additions and 10 deletions

View File

@@ -10,6 +10,9 @@ else()
set(DPM_ROOT_DIR "${CMAKE_SOURCE_DIR}")
endif()
# Find OpenSSL
find_package(OpenSSL REQUIRED)
# Module version - used by DPM
add_library(build MODULE
build.cpp
@@ -17,6 +20,7 @@ add_library(build MODULE
src/cli_parsers.cpp
src/commands.cpp
src/package_staging.cpp
src/checksums.cpp
)
# Set output properties
@@ -30,10 +34,11 @@ set_target_properties(
target_include_directories(build PRIVATE
${CMAKE_CURRENT_SOURCE_DIR}/include
${DPM_ROOT_DIR}
${OPENSSL_INCLUDE_DIR}
)
# Link with filesystem library
target_link_libraries(build stdc++fs)
# Link with filesystem library and OpenSSL
target_link_libraries(build stdc++fs ${OPENSSL_LIBRARIES})
# Standalone version - used for debugging
add_executable(build_standalone
@@ -42,6 +47,7 @@ add_executable(build_standalone
src/cli_parsers.cpp
src/commands.cpp
src/package_staging.cpp
src/checksums.cpp
)
# Define the BUILD_STANDALONE macro for the standalone build
@@ -51,10 +57,11 @@ target_compile_definitions(build_standalone PRIVATE BUILD_STANDALONE)
target_include_directories(build_standalone PRIVATE
${CMAKE_CURRENT_SOURCE_DIR}/include
${DPM_ROOT_DIR}
${OPENSSL_INCLUDE_DIR}
)
# Link with filesystem library for standalone
target_link_libraries(build_standalone stdc++fs)
# Link with filesystem library and OpenSSL for standalone
target_link_libraries(build_standalone stdc++fs ${OPENSSL_LIBRARIES})
# Set the output name for the standalone executable
set_target_properties(