src: port netsniff-ng to libnl3
[netsniff-ng.git] / src / cmake / modules / FindLibnl.cmake
blob6ee0fdf44b0d66d5da93f5d0fb33dad4507604f5
2 # netsniff-ng - the packet sniffing beast
3 # By Emmanuel Roullit <emmanuel@netsniff-ng.org>
4 # Copyright 2009, 2011 Emmanuel Roullit.
5 # Subject to the GPL, version 2.
8 # Find libnl includes and library. This module defines:
9 #  LIBNL_FOUND       - whether the libnl library was found
10 #  LIBNL_LIBRARIES   - the libnl library
11 #  LIBNL_INCLUDE_DIR - the include path of the libnl library
13 find_library(LIBNL_LIBRARY nl-genl-3)
15 set(LIBNL_LIBRARIES ${LIBNL_LIBRARY})
17 find_path(
18   LIBNL_INCLUDE_DIR
19   NAMES netlink/version.h
20   PATH_SUFFIXES include/libnl3
23 include(FindPackageHandleStandardArgs)
25 find_package_handle_standard_args(
26   Libnl DEFAULT_MSG
27   LIBNL_LIBRARY
28   LIBNL_INCLUDE_DIR
31 mark_as_advanced(
32   LIBNL_INCLUDE_DIR
33   LIBNL_LIBRARY