forked from intel/hyperscan
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCMakeLists.txt
27 lines (22 loc) · 845 Bytes
/
CMakeLists.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
find_library(PCAP_LIBRARY pcap)
if (NOT PCAP_LIBRARY)
message(STATUS "Could not find libpcap - some examples will not be built")
endif()
add_executable(simplegrep simplegrep.c)
set_source_files_properties(simplegrep.c PROPERTIES COMPILE_FLAGS
"-Wall -Wno-unused-parameter")
target_link_libraries(simplegrep hs)
if (PCAP_LIBRARY)
add_executable(pcapscan pcapscan.cc)
set_source_files_properties(pcapscan.cc PROPERTIES COMPILE_FLAGS
"-Wall -Wno-unused-parameter")
target_link_libraries(pcapscan hs pcap)
endif()
if (PCAP_LIBRARY)
add_executable(patbench patbench.cc)
set_source_files_properties(patbench.cc PROPERTIES COMPILE_FLAGS
"-Wall -Wno-unused-parameter")
target_link_libraries(patbench hs pcap)
endif()
install(FILES simplegrep.c pcapscan.cc patbench.cc README.md
DESTINATION ${CMAKE_INSTALL_DOCDIR}/examples)