aboutsummaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorTrygve Laugstøl <trygvis@inamo.no>2017-04-07 13:27:55 +0200
committerTrygve Laugstøl <trygvis@inamo.no>2017-04-07 13:27:55 +0200
commitbed4c80f31051ec47463caa3e9511374062c6536 (patch)
tree467481d54a95a5409516ceb53dba7f453170a48e /CMakeLists.txt
parent9eb76adec8d6a6f15a461da7c5e1e6920a92105a (diff)
downloadwifi-triangulator-bed4c80f31051ec47463caa3e9511374062c6536.tar.gz
wifi-triangulator-bed4c80f31051ec47463caa3e9511374062c6536.tar.bz2
wifi-triangulator-bed4c80f31051ec47463caa3e9511374062c6536.tar.xz
wifi-triangulator-bed4c80f31051ec47463caa3e9511374062c6536.zip
o Better CMake checks.
o Checking command line arguments.
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt14
1 files changed, 11 insertions, 3 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 9712cca..ba802f4 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1,13 +1,21 @@
cmake_minimum_required(VERSION 3.6)
-project(wifi_triangulator)
+include(CheckIncludeFiles)
+include(CheckLibraryExists)
+project(wifi-triangulator)
set(CMAKE_CXX_STANDARD 14)
+check_include_files("pcap.h" HAVE_PCAP_H)
+
+if(NOT HAVE_PCAP_H)
+ message(FATAL_ERROR "Missing pcap.h. You should probably install libpcap-dev or similar.")
+endif()
+
set(SOURCE_FILES main.cpp
third-party/radiotap-library/radiotap.c
third-party/radiotap-library/radiotap.h
third-party/radiotap-library/radiotap_iter.h
third-party/radiotap-library/platform.h)
-add_executable(wifi_triangulator ${SOURCE_FILES})
+add_executable(wifi-triangulator ${SOURCE_FILES})
-target_link_libraries(wifi_triangulator PUBLIC pcap)
+target_link_libraries(wifi-triangulator PUBLIC pcap)