]> git.stg.codes - stg.git/blob - cmake/modules/FindNFQueue.cmake
Add missing include.
[stg.git] / cmake / modules / FindNFQueue.cmake
1 find_path ( NFQueue_INCLUDE_DIR NAMES libnetfilter_queue/libnetfilter_queue.h DOC "Path to NFQueue header files." )
2 mark_as_advanced ( NFQueue_INCLUDE_DIR )
3
4 find_library ( NFQueue_LIB NAMES netfilter_queue DOC "Location of NFQueue library." )
5 mark_as_advanced ( NFQueue_LIB )
6
7 include ( FindPackageHandleStandardArgs )
8 find_package_handle_standard_args ( NFQueue
9                                     REQUIRED_VARS NFQueue_LIB NFQueue_INCLUDE_DIR
10                                     VERSION_VAR NFQueue_VERSION )
11
12 # Create the imported target
13 if ( NFQueue_FOUND )
14     set ( NFQueue_INCLUDE_DIRS ${NFQueue_INCLUDE_DIR} )
15     set ( NFQueue_LIBRARIES ${NFQueue_LIB} )
16     if ( NOT TARGET NF::Queue )
17         add_library ( NF::Queue UNKNOWN IMPORTED )
18         set_target_properties ( NF::Queue PROPERTIES
19                                 IMPORTED_LOCATION "${NFQueue_LIB}"
20                                 INTERFACE_INCLUDE_DIRECTORIES "${NFQueue_INCLUDE_DIR}" )
21     endif ( NOT TARGET NF::Queue )
22 endif ( NFQueue_FOUND )