Skip to content

Commit

Permalink
Force liboqs as a debian package dependency requirement only if it is…
Browse files Browse the repository at this point in the history
… not a static linked library. (open-quantum-safe#493)

Signed-off-by: Frederik Wedel-Heinen <frederik.wedel-heinen@dencrypt.dk>
  • Loading branch information
fwh-dc authored Aug 24, 2024
1 parent a0f475d commit 4fa4ab1
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
3 changes: 2 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,8 @@ endif()
# Add required include for liboqs
find_package(liboqs REQUIRED)
get_target_property(LIBOQS_INCLUDE_DIR OQS::oqs INTERFACE_INCLUDE_DIRECTORIES)
message(STATUS "liboqs found: Include dir at ${LIBOQS_INCLUDE_DIR}")
get_target_property(LIBOQS_LIBRARY_TYPE OQS::oqs TYPE)
message(STATUS "liboqs found: Include dir at ${LIBOQS_INCLUDE_DIR} (${LIBOQS_LIBRARY_TYPE})")
include_directories(${LIBOQS_INCLUDE_DIR})

# Hints the compiler on the fact that the provider is being compiled into a static library.
Expand Down
6 changes: 5 additions & 1 deletion oqsprov/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,11 @@ install(TARGETS oqsprovider
set(CPACK_GENERATOR "DEB")
set(CPACK_PACKAGE_VENDOR "www.openquantumsafe.org")
set(CPACK_PACKAGE_VERSION ${OQSPROVIDER_VERSION_TEXT})
set(CPACK_DEBIAN_PACKAGE_DEPENDS "libc6, openssl (>= 3.0.0), liboqs (>= 0.8.0)")
set(CPACK_DEBIAN_PACKAGE_DEPENDS "libc6, openssl (>= 3.0.0)")
if (NOT "${LIBOQS_LIBRARY_TYPE}" STREQUAL "STATIC_LIBRARY")
message("Adding liboqs as dynamic dependency for the debian package")
string(APPEND CPACK_DEBIAN_PACKAGE_DEPENDS ", liboqs (>= 0.8.0)")
endif ()
set(CPACK_DEBIAN_PACKAGE_MAINTAINER "www.openquantumsafe.org")
include(CPack)

Expand Down

0 comments on commit 4fa4ab1

Please sign in to comment.