From 1d2084a0174405d9de44a40ceaf12bf35a62759e Mon Sep 17 00:00:00 2001 From: Michael Mandl Date: Thu, 19 Oct 2017 14:10:00 +0200 Subject: [PATCH] Moved sniffer to separate sub-project --- source/CMakeLists.txt | 18 ++++++++++++------ source/sniffer/CMakeLists.txt | 16 ++++++++++++++++ source/{ => sniffer}/sniffer.cpp | 0 source/{ => sniffer}/sniffer.h | 0 4 files changed, 28 insertions(+), 6 deletions(-) create mode 100644 source/sniffer/CMakeLists.txt rename source/{ => sniffer}/sniffer.cpp (100%) rename source/{ => sniffer}/sniffer.h (100%) diff --git a/source/CMakeLists.txt b/source/CMakeLists.txt index 20fa876..e63255e 100644 --- a/source/CMakeLists.txt +++ b/source/CMakeLists.txt @@ -16,19 +16,25 @@ add_executable(qSniff mainwindow.ui sniffthread.cpp sniffthread.h - sniffer.cpp - sniffer.h ) -target_link_libraries(qSniff rc-switch wiringPi Qt5::Widgets) +target_link_libraries(qSniff + sniffer + rc-switch + wiringPi + Qt5::Widgets +) add_executable(Sniff sniff.cpp - sniffer.cpp - sniffer.h ) -target_link_libraries(Sniff rc-switch wiringPi) +target_link_libraries(Sniff + sniffer + rc-switch + wiringPi +) add_subdirectory(RCSwitch) +add_subdirectory(sniffer) diff --git a/source/sniffer/CMakeLists.txt b/source/sniffer/CMakeLists.txt new file mode 100644 index 0000000..4cca14a --- /dev/null +++ b/source/sniffer/CMakeLists.txt @@ -0,0 +1,16 @@ +project(sniffer) +cmake_minimum_required(VERSION 3.6) + +add_library(${PROJECT_NAME} + sniffer.cpp + sniffer.h +) + +target_link_libraries(${PROJECT_NAME} + rc-switch +) + +target_include_directories(${PROJECT_NAME} + PUBLIC . +) + diff --git a/source/sniffer.cpp b/source/sniffer/sniffer.cpp similarity index 100% rename from source/sniffer.cpp rename to source/sniffer/sniffer.cpp diff --git a/source/sniffer.h b/source/sniffer/sniffer.h similarity index 100% rename from source/sniffer.h rename to source/sniffer/sniffer.h