1 cmake_minimum_required ( VERSION 3.4.3 ) 2 project ( tp_appid_example CXX ) 3 4 set (CMAKE_CXX_STANDARD 11) 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 tp_appid_example MODULE 17 tp_appid_example.cc 18 ) 19 20 if ( APPLE ) 21 set_target_properties ( 22 tp_appid_example 23 PROPERTIES 24 LINK_FLAGS "-undefined dynamic_lookup" 25 ) 26 endif ( APPLE ) 27 28 set_target_properties ( 29 tp_appid_example 30 PROPERTIES 31 PREFIX "" 32 ) 33 34 set_property(TARGET tp_appid_example PROPERTY ENABLE_EXPORTS 1) 35 36 target_include_directories ( 37 tp_appid_example PUBLIC 38 ${SNORT3_INCLUDE_DIRS} 39 ) 40 41 install ( 42 TARGETS tp_appid_example 43 LIBRARY 44 DESTINATION "${LIB_INSTALL_PATH}/misc/${CMAKE_PROJECT_NAME}" 45 )