diff --git a/source/CMakeLists.txt b/source/CMakeLists.txt index e63255e..3b2c5fe 100644 --- a/source/CMakeLists.txt +++ b/source/CMakeLists.txt @@ -1,30 +1,9 @@ cmake_minimum_required(VERSION 3.6) -find_package(Qt5Widgets) - set(CMAKE_CXX_STANDARD 11) -set(CMAKE_INCLUDE_CURRENT_DIR ON) -set(CMAKE_AUTOMOC ON) -set(CMAKE_AUTOUIC ON) add_definitions(-DRPI) -add_executable(qSniff - qsniff.cpp - mainwindow.cpp - mainwindow.h - mainwindow.ui - sniffthread.cpp - sniffthread.h -) - -target_link_libraries(qSniff - sniffer - rc-switch - wiringPi - Qt5::Widgets -) - add_executable(Sniff sniff.cpp ) @@ -37,4 +16,5 @@ target_link_libraries(Sniff add_subdirectory(RCSwitch) add_subdirectory(sniffer) +add_subdirectory(qsniff) diff --git a/source/RCSwitch/CMakeLists.txt b/source/RCSwitch/CMakeLists.txt index ae85280..0834e87 100644 --- a/source/RCSwitch/CMakeLists.txt +++ b/source/RCSwitch/CMakeLists.txt @@ -1,11 +1,16 @@ +project(rc-switch) cmake_minimum_required(VERSION 3.6) -add_library(rc-switch +add_library(${PROJECT_NAME} rc-switch/RCSwitch.cpp rc-switch/RCSwitch.h ) -target_include_directories(rc-switch +target_link_libraries(${PROJECT_NAME} + wiringPi +) + +target_include_directories(${PROJECT_NAME} PUBLIC . ) diff --git a/source/qsniff/CMakeLists.txt b/source/qsniff/CMakeLists.txt new file mode 100644 index 0000000..dfeb3ab --- /dev/null +++ b/source/qsniff/CMakeLists.txt @@ -0,0 +1,24 @@ +project(qSniff) +cmake_minimum_required(VERSION 3.6) + +find_package(Qt5Widgets) + +set(CMAKE_CXX_STANDARD 11) +set(CMAKE_INCLUDE_CURRENT_DIR ON) +set(CMAKE_AUTOMOC ON) +set(CMAKE_AUTOUIC ON) + +add_executable(${PROJECT_NAME} + qsniff.cpp + mainwindow.cpp + mainwindow.h + mainwindow.ui + sniffthread.cpp + sniffthread.h +) + +target_link_libraries(${PROJECT_NAME} + sniffer + Qt5::Widgets +) + diff --git a/source/mainwindow.cpp b/source/qsniff/mainwindow.cpp similarity index 100% rename from source/mainwindow.cpp rename to source/qsniff/mainwindow.cpp diff --git a/source/mainwindow.h b/source/qsniff/mainwindow.h similarity index 100% rename from source/mainwindow.h rename to source/qsniff/mainwindow.h diff --git a/source/mainwindow.ui b/source/qsniff/mainwindow.ui similarity index 100% rename from source/mainwindow.ui rename to source/qsniff/mainwindow.ui diff --git a/source/qsniff.cpp b/source/qsniff/qsniff.cpp similarity index 100% rename from source/qsniff.cpp rename to source/qsniff/qsniff.cpp diff --git a/source/sniffthread.cpp b/source/qsniff/sniffthread.cpp similarity index 100% rename from source/sniffthread.cpp rename to source/qsniff/sniffthread.cpp diff --git a/source/sniffthread.h b/source/qsniff/sniffthread.h similarity index 100% rename from source/sniffthread.h rename to source/qsniff/sniffthread.h