diff --git a/CMakeLists.txt b/CMakeLists.txt index 9a865728a9..a72cc93823 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -609,11 +609,6 @@ add_library(UTIL ${OPENAIR_DIR}/common/utils/LOG/vcd_signal_dumper.c ${OPENAIR2_DIR}/UTIL/OPT/probe.c ) -if (ENABLE_LTTNG) - find_package(LTTngUST 2.3.8 EXACT REQUIRED) -else() - message(STATUS "LTTNG support disabled") -endif() pkg_check_modules(cap libcap) if (cap_FOUND) diff --git a/common/utils/LOG/CMakeLists.txt b/common/utils/LOG/CMakeLists.txt index ff224329de..6c4527f760 100644 --- a/common/utils/LOG/CMakeLists.txt +++ b/common/utils/LOG/CMakeLists.txt @@ -4,7 +4,10 @@ target_link_libraries(log_headers INTERFACE T_headers) set(log_sources log.c) if (ENABLE_LTTNG) + find_package(LTTngUST 2.3.8 EXACT REQUIRED) set(log_sources ${log_sources} lttng-tp.c) +else() + message(STATUS "LTTNG support disabled") endif() add_library(LOG ${log_sources}) target_include_directories(LOG PUBLIC .)