1 cmake_minimum_required ( VERSION 3.4.3 ) 2 project ( appid_listener CXX ) 3 4 set (CMAKE_CXX_STANDARD 14) 5 set (CMAKE_CXX_STANDARD_REQUIRED ON) 6 set (CMAKE_CXX_EXTENSIONS OFF) 7 8 if ( APPLE ) 9 set ( CMAKE_MACOSX_RPATH OFF ) 10 endif ( APPLE ) 11 12 include ( FindPkgConfig ) 13 pkg_search_module ( SNORT3 REQUIRED snort>=3 ) 14 15 add_library ( 16 appid_listener MODULE 17 appid_listener.cc 18 appid_listener.h 19 appid_listener_event_handler.cc 20 appid_listener_event_handler.h 21 ) 22 23 if ( APPLE ) 24 set_target_properties ( 25 appid_listener 26 PROPERTIES 27 LINK_FLAGS "-undefined dynamic_lookup" 28 ) 29 endif ( APPLE ) 30 31 set_target_properties ( 32 appid_listener 33 PROPERTIES 34 PREFIX "" 35 ) 36 37 target_include_directories ( 38 appid_listener PUBLIC 39 ${SNORT3_INCLUDE_DIRS} 40 ) 41 42 install ( 43 TARGETS appid_listener 44 LIBRARY 45 DESTINATION "${INSPECTOR_INSTALL_PATH}" 46 )