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