]> git.stg.codes - stg.git/blob - cmake/modules/FindNFNetLink.cmake
Use async-radius.
[stg.git] / cmake / modules / FindNFNetLink.cmake
1 find_path ( NFNetLink_INCLUDE_DIR NAMES libnfnetlink/libnfnetlink.h DOC "Path to NFNetLink header files." )
2 mark_as_advanced ( NFNetLink_INCLUDE_DIR )
3
4 find_library ( NFNetLink_LIB NAMES nfnetlink DOC "Location of NFNetLink library." )
5 mark_as_advanced ( NFNetLink_LIB )
6
7 include ( FindPackageHandleStandardArgs )
8 find_package_handle_standard_args ( NFNetLink
9                                     REQUIRED_VARS NFNetLink_LIB NFNetLink_INCLUDE_DIR
10                                     VERSION_VAR NFNetLink_VERSION )
11
12 # Create the imported target
13 if ( NFNetLink_FOUND )
14     set ( NFNetLink_INCLUDE_DIRS ${NFNetLink_INCLUDE_DIR} )
15     set ( NFNetLink_LIBRARIES ${NFNetLink_LIB} )
16     if ( NOT TARGET NF::NetLink )
17         add_library ( NF::NetLink UNKNOWN IMPORTED )
18         set_target_properties ( NF::NetLink PROPERTIES
19                                 IMPORTED_LOCATION "${NFNetLink_LIB}"
20                                 INTERFACE_INCLUDE_DIRECTORIES "${NFNetLink_INCLUDE_DIR}" )
21     endif ( NOT TARGET NF::NetLink )
22 endif ( NFNetLink_FOUND )