Skip to content

Commit

Permalink
libscap: Guard against install_lib_link_libraries-NOTFOUND.
Browse files Browse the repository at this point in the history
Previously, an erroneous -linstall_lib_link_libraries-NOTFOUND
directive could be added to the configured libscap.pc pkg-config file.

* cmake/modules/libscap.cmake: Ensure ${install_lib_link_library} is
true.

Signed-off-by: Maxim Cournoyer <[email protected]>
  • Loading branch information
Apteryks committed May 19, 2024
1 parent c36a473 commit a44c05c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cmake/modules/libscap.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ foreach(libscap_install_lib ${LIBSCAP_INSTALL_LIBS})
list(APPEND libscap_link_libraries ${libscap_install_lib})
get_target_property(install_lib_link_libraries ${libscap_install_lib} LINK_LIBRARIES)
foreach (install_lib_link_library ${install_lib_link_libraries})
if (NOT ${install_lib_link_library} IN_LIST libscap_subdir_targets)
if (${install_lib_link_library} AND (NOT ${install_lib_link_library} IN_LIST libscap_subdir_targets))
if(${install_lib_link_library} MATCHES "/")
# We have a path. Convert it to -L<dir> + -l<lib>.
get_filename_component(scap_lib_dir ${install_lib_link_library} DIRECTORY)
Expand Down

0 comments on commit a44c05c

Please sign in to comment.