aboutsummaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorTrygve Laugstøl <trygvis@inamo.no>2017-04-07 21:49:36 +0200
committerTrygve Laugstøl <trygvis@inamo.no>2017-04-07 21:49:36 +0200
commit4eba89add8db804c33e8692edf5b27c2d3a2e365 (patch)
tree5fba0a0fa4d6010d13f99215508212086a116063 /CMakeLists.txt
parent36e59a1991f075e36e117a08321d5e4c4dc00eac (diff)
downloadwifi-triangulator-master.tar.gz
wifi-triangulator-master.tar.bz2
wifi-triangulator-master.tar.xz
wifi-triangulator-master.zip
o Cleaning up code, fixing many small bugs.HEADmaster
o Making a better envelope format. o Reading out the interface's channel.
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt10
1 files changed, 8 insertions, 2 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 141beda..df5472a 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -16,9 +16,15 @@ if (NOT HAVE_PCAP_H)
endif ()
find_package(Protobuf REQUIRED)
-include_directories(${Protobuf_INCLUDE_DIRS} ${Protobuf_INCLUDE_DIR})
+
+check_include_files("iwlib.h" HAVE_IWLIB_H)
+
+if (NOT HAVE_IWLIB_H)
+ message(FATAL_ERROR "Missing iwlib.h. You should probably install libiw-dev.")
+endif ()
# lib wifi-triangulator
+include_directories(${Protobuf_INCLUDE_DIRS} ${Protobuf_INCLUDE_DIR})
protobuf_generate_cpp(PROTO_SRC PROTO_HEADER wifi-triangulator.proto)
add_library(wifi-triangulator
@@ -35,7 +41,7 @@ target_link_libraries(wifi-triangulator PUBLIC pcap ${Protobuf_LIBRARIES})
# capture
add_executable(capture src/capture.cpp)
-target_link_libraries(capture PUBLIC wifi-triangulator)
+target_link_libraries(capture PUBLIC wifi-triangulator iw)
# transmitter
add_executable(transmitter src/transmitter.cpp)