diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 5d59bf3f03..f31ce8040e 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -59,7 +59,7 @@ if (ENABLE_PROBES) ) endif() endif() -if (HAVE_MMAN_H AND (GCRYPT_FOUND OR NSS_FOUND)) +if (HAVE_MMAN_H) list(APPEND OBJECTS_TO_LINK_AGAINST $ ) diff --git a/src/OVAL/probes/CMakeLists.txt b/src/OVAL/probes/CMakeLists.txt index e505908f58..25e3ca56a0 100644 --- a/src/OVAL/probes/CMakeLists.txt +++ b/src/OVAL/probes/CMakeLists.txt @@ -1,7 +1,7 @@ add_subdirectory("SEAP") add_subdirectory("probe") -if (HAVE_MMAN_H AND CRYPTO_FOUND) +if (HAVE_MMAN_H) add_subdirectory("crapi") endif() diff --git a/src/OVAL/probes/crapi/CMakeLists.txt b/src/OVAL/probes/crapi/CMakeLists.txt index 1f3e5a963b..3fb6f123c8 100644 --- a/src/OVAL/probes/crapi/CMakeLists.txt +++ b/src/OVAL/probes/crapi/CMakeLists.txt @@ -1,4 +1,9 @@ -file(GLOB_RECURSE CRAPI_SOURCES "*.c") +if (CRYPTO_FOUND) + file(GLOB_RECURSE CRAPI_SOURCES "*.c") +else() + # crapi_init has a no-op implementation for builds without a digest backend. + set(CRAPI_SOURCES "crapi.c") +endif() file(GLOB_RECURSE CRAPI_HEADERS "*.h") add_library(crapi_object OBJECT ${CRAPI_SOURCES} ${CRAPI_HEADERS})