aboutsummaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
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)