diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index 4823437574..b55fbac646 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -66,11 +66,15 @@ if(CMAKE_USE_PTHREADS_INIT) set(API_TEST_DEPS ${API_TEST_DEPS} Threads::Threads) endif() +if(OQS_USE_OPENSSL AND BUILD_SHARED_LIBS) + set(API_TEST_DEPS ${API_TEST_DEPS} ${OPENSSL_CRYPTO_LIBRARY}) +endif() + # KEM API tests add_executable(example_kem example_kem.c) target_link_libraries(example_kem PRIVATE ${API_TEST_DEPS}) -add_executable(kat_kem kat_kem.c) +add_executable(kat_kem kat_kem.c ${COMMON_OBJS}) # need to access SHA3 code for HQC target_link_libraries(kat_kem PRIVATE ${API_TEST_DEPS}) add_executable(test_kem test_kem.c)