From 762c23b98bd5bcdc5d680939d5b44cc2d92fb850 Mon Sep 17 00:00:00 2001 From: Gerald Combs Date: Thu, 7 Sep 2023 17:52:39 -0700 Subject: [PATCH] fix(cmake): Make some dependency scopes private Make the base sinsp dependency scopes PRIVATE. This fixes compilation here on macOS when BUILD_SHARED_LIBS=ON. Signed-off-by: Gerald Combs --- userspace/libsinsp/CMakeLists.txt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/userspace/libsinsp/CMakeLists.txt b/userspace/libsinsp/CMakeLists.txt index e75ceb39f7..d92fc4fbeb 100644 --- a/userspace/libsinsp/CMakeLists.txt +++ b/userspace/libsinsp/CMakeLists.txt @@ -201,7 +201,7 @@ set_sinsp_target_properties(sinsp) target_link_libraries(sinsp PUBLIC scap - INTERFACE + PRIVATE "${CURL_LIBRARIES}" "${JSONCPP_LIB}" "${RE2_LIB}" @@ -337,8 +337,8 @@ else() endif() # NOT WIN32 if(APPLE) - target_link_libraries(sinsp INTERFACE "-framework CoreFoundation") - target_link_libraries(sinsp INTERFACE "-framework SystemConfiguration") + target_link_libraries(sinsp PRIVATE "-framework CoreFoundation") + target_link_libraries(sinsp PRIVATE "-framework SystemConfiguration") set_target_properties(sinsp PROPERTIES LINK_FLAGS "-Wl,-F/Library/Frameworks") endif()