Skip to content

Commit

Permalink
chore(userspace/libsinsp): only link libanl if present.
Browse files Browse the repository at this point in the history
Signed-off-by: Federico Di Pierro <[email protected]>
  • Loading branch information
FedeDP authored and poiana committed Sep 5, 2024
1 parent 8f6f9df commit 0c67af0
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions userspace/libsinsp/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -270,8 +270,14 @@ if(NOT WIN32)
)

if(NOT MUSL_OPTIMIZED_BUILD)
target_link_libraries(sinsp INTERFACE rt anl)
list(APPEND SINSP_PKGCONFIG_LIBRARIES rt anl)
find_library(LIB_ANL anl)
if(LIB_ANL)
target_link_libraries(sinsp INTERFACE rt anl)
list(APPEND SINSP_PKGCONFIG_LIBRARIES rt anl)
else()
target_link_libraries(sinsp INTERFACE rt)
list(APPEND SINSP_PKGCONFIG_LIBRARIES rt)
endif()
endif()

else()
Expand Down

0 comments on commit 0c67af0

Please sign in to comment.