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.
  • Loading branch information
Apteryks committed May 4, 2024
1 parent 0e603e4 commit bf7c46a
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 bf7c46a

Please sign in to comment.