diff --git a/userspace/engine/CMakeLists.txt b/userspace/engine/CMakeLists.txt index d0486652790..cca3fd8a884 100644 --- a/userspace/engine/CMakeLists.txt +++ b/userspace/engine/CMakeLists.txt @@ -36,6 +36,14 @@ if(EMSCRIPTEN) target_compile_options(falco_engine PRIVATE "-sDISABLE_EXCEPTION_CATCHING=0") endif() +set(ENGINE_LIBRARIES sinsp nlohmann_json::nlohmann_json yaml-cpp) + +if(CMAKE_SYSTEM_NAME MATCHES "Linux" AND NOT MINIMAL_BUILD) + # Used by falco_utils.cpp + add_dependencies(falco_engine openssl) + list(APPEND ENGINE_LIBRARIES "${OPENSSL_LIBRARIES}") +endif() + target_include_directories(falco_engine PUBLIC ${CMAKE_CURRENT_SOURCE_DIR} ${TBB_INCLUDE_DIR}) -target_link_libraries(falco_engine PUBLIC sinsp nlohmann_json::nlohmann_json yaml-cpp) +target_link_libraries(falco_engine PUBLIC ${ENGINE_LIBRARIES}) diff --git a/userspace/falco/CMakeLists.txt b/userspace/falco/CMakeLists.txt index e6196aac0f9..9f4082bcb64 100644 --- a/userspace/falco/CMakeLists.txt +++ b/userspace/falco/CMakeLists.txt @@ -68,7 +68,7 @@ set(FALCO_INCLUDE_DIRECTORIES ) set(FALCO_DEPENDENCIES cxxopts) -set(FALCO_LIBRARIES falco_engine sinsp yaml-cpp) +set(FALCO_LIBRARIES falco_engine) if(USE_JEMALLOC) list(APPEND FALCO_DEPENDENCIES jemalloc) @@ -127,7 +127,6 @@ if(CMAKE_SYSTEM_NAME MATCHES "Linux" AND NOT MINIMAL_BUILD) "${GRPC_LIBRARIES}" "${PROTOBUF_LIB}" "${CARES_LIB}" - "${OPENSSL_LIBRARIES}" ) endif()