Skip to content

Commit

Permalink
interfaces-plugin: update CMake libnl find script to include local in…
Browse files Browse the repository at this point in the history
…stall paths
  • Loading branch information
zinccyy committed Oct 15, 2022
1 parent 1afc258 commit 84c9943
Showing 1 changed file with 22 additions and 4 deletions.
26 changes: 22 additions & 4 deletions CMakeModules/FindNL.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,30 @@ find_path(NL_INCLUDE_DIRS netlink/netlink.h
/usr/include/libnl3
/usr/local/include
/usr/local/include/libnl3
${CMAKE_INCLUDE_PATH}
${CMAKE_PREFIX_PATH}/include/libnl3
)

find_library(NL_LIBRARY NAMES nl nl-3)
find_library(NL_ROUTE_LIBRARY NAMES nl-route nl-route-3)
find_library(NL_NETFILTER_LIBRARY NAMES nl-nf nl-nf-3)
find_library(NL_GENL_LIBRARY NAMES nl-genl nl-genl-3)
find_library(
NL_LIBRARY
NAMES nl nl-3
PATHS /usr/lib /usr/lib64 /usr/local/lib /usr/local/lib64 /opt/local/lib /sw/lib ${CMAKE_LIBRARY_PATH} ${CMAKE_INSTALL_PREFIX}/lib
)
find_library(
NL_ROUTE_LIBRARY
NAMES nl-route nl-route-3
PATHS /usr/lib /usr/lib64 /usr/local/lib /usr/local/lib64 /opt/local/lib /sw/lib ${CMAKE_LIBRARY_PATH} ${CMAKE_INSTALL_PREFIX}/lib
)
find_library(
NL_NETFILTER_LIBRARY
NAMES nl-nf nl-nf-3
PATHS /usr/lib /usr/lib64 /usr/local/lib /usr/local/lib64 /opt/local/lib /sw/lib ${CMAKE_LIBRARY_PATH} ${CMAKE_INSTALL_PREFIX}/lib
)
find_library(
NL_GENL_LIBRARY
NAMES nl-genl nl-genl-3
PATHS /usr/lib /usr/lib64 /usr/local/lib /usr/local/lib64 /opt/local/lib /sw/lib ${CMAKE_LIBRARY_PATH} ${CMAKE_INSTALL_PREFIX}/lib
)

if (NL_INCLUDE_DIRS AND NL_LIBRARY)
set(NL_FOUND TRUE)
Expand Down

0 comments on commit 84c9943

Please sign in to comment.