]> git.stg.codes - stg.git/blob - cmake/modules/FindMNL.cmake
Use std::lock_guard instead of STG_LOCKER.
[stg.git] / cmake / modules / FindMNL.cmake
1 find_path ( MNL_INCLUDE_DIR NAMES libmnl/libmnl.h DOC "Path to MNL header files." )
2 mark_as_advanced ( MNL_INCLUDE_DIR )
3
4 find_library ( MNL_LIB NAMES mnl DOC "Location of MNL library." )
5 mark_as_advanced ( MNL_LIB )
6
7 include ( FindPackageHandleStandardArgs )
8 find_package_handle_standard_args ( MNL
9                                     REQUIRED_VARS MNL_LIB MNL_INCLUDE_DIR
10                                     VERSION_VAR MNL_VERSION )
11
12 # Create the imported target
13 if ( MNL_FOUND )
14     set ( MNL_INCLUDE_DIRS ${MNL_INCLUDE_DIR} )
15     set ( MNL_LIBRARIES ${MNL_LIB} )
16     if ( NOT TARGET MNL::MNL )
17         add_library ( MNL::MNL UNKNOWN IMPORTED )
18         set_target_properties ( MNL::MNL PROPERTIES
19                                 IMPORTED_LOCATION "${MNL_LIB}"
20                                 INTERFACE_INCLUDE_DIRECTORIES "${MNL_INCLUDE_DIR}" )
21     endif ( NOT TARGET MNL::MNL )
22 endif ( MNL_FOUND )