Skip to content

Commit

Permalink
Fix build for tests
Browse files Browse the repository at this point in the history
Signed-off-by: Songling Han <[email protected]>
  • Loading branch information
songlingatpan committed Sep 21, 2024
1 parent e24b16a commit fdacd10
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/common/common.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ extern "C" {
* standard C library functions otherwise.
*/
#if defined(OQS_USE_OPENSSL) && defined(OPENSSL_VERSION_NUMBER)
#include <openssl/crypto.h>
#include <openssl/crypto.h>

/**
* Allocates memory of a given size.
Expand Down
9 changes: 8 additions & 1 deletion tests/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,14 @@ if(NOT WIN32)
endif()

# List oqs-internal after oqs so that oqs has linking precedence.
set(TEST_DEPS oqs oqs-internal ${LIBM} OpenSSL::Crypto)
find_package(OpenSSL REQUIRED)

if(NOT OpenSSL_FOUND)
set(TEST_DEPS oqs oqs-internal ${LIBM})
else()
set(TEST_DEPS oqs oqs-internal ${LIBM} OpenSSL::Crypto)
endif()

if(OQS_USE_PTHREADS)
set(TEST_DEPS ${TEST_DEPS} Threads::Threads)
endif()
Expand Down

0 comments on commit fdacd10

Please sign in to comment.