Skip to content

Commit 95697a5

Browse files
committed
openscap: Link to CAP_LIBRARIES if found
This fixes undefined reference errors when libcap libraries found in the system ../../../../src/libopenscap.so.25.0.0: undefined reference to `cap_get_flag' undefined reference to `cap_get_pid' undefined reference to `cap_free' undefined reference to `cap_to_name'
1 parent 8b9eace commit 95697a5

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/CMakeLists.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,9 @@ endif()
118118
if(ACL_FOUND)
119119
target_link_libraries(openscap ${ACL_LIBRARY})
120120
endif()
121+
if(CAP_FOUND)
122+
target_link_libraries(openscap ${CAP_LIBRARIES})
123+
endif()
121124

122125
if(WIN32)
123126
set(OPENSCAP_INSTALL_DESTINATION ".")

0 commit comments

Comments
 (0)