diff options
author | Trygve Laugstøl <trygvis@inamo.no> | 2015-03-22 16:57:09 +0100 |
---|---|---|
committer | Trygve Laugstøl <trygvis@inamo.no> | 2015-03-22 16:57:09 +0100 |
commit | aad1eaa291460509a5cf94092609ae22ebef5494 (patch) | |
tree | 72d6308a84449e85b00de84f27f0a613b46ef669 | |
parent | 0dc2cc6503386c809266ad6564ba675803cf8cc7 (diff) | |
download | ble-toys-aad1eaa291460509a5cf94092609ae22ebef5494.tar.gz ble-toys-aad1eaa291460509a5cf94092609ae22ebef5494.tar.bz2 ble-toys-aad1eaa291460509a5cf94092609ae22ebef5494.tar.xz ble-toys-aad1eaa291460509a5cf94092609ae22ebef5494.zip |
o Renaming SoilMoistureIo to SensorSample, moving to its own library.
-rw-r--r-- | CMakeLists.txt | 1 | ||||
-rw-r--r-- | apps/CMakeLists.txt | 11 | ||||
-rw-r--r-- | apps/sample-convert.cpp | 2 | ||||
-rw-r--r-- | apps/sample-select.cpp | 2 | ||||
-rw-r--r-- | apps/sample-timestamp.cpp | 2 | ||||
-rw-r--r-- | apps/sm-get-value.cpp | 2 | ||||
-rw-r--r-- | apps/sm-serial-read-all.cpp | 2 | ||||
-rw-r--r-- | apps/sm-serial-read.cpp | 2 | ||||
-rw-r--r-- | sensor/CMakeLists.txt | 8 | ||||
-rw-r--r-- | sensor/include/SensorSample.h (renamed from apps/SoilMoistureIo.h) | 0 | ||||
-rw-r--r-- | sensor/main/SensorSample.cpp (renamed from apps/SoilMoistureIo.cpp) | 2 | ||||
-rw-r--r-- | sensor/test/SoilMoistureIoTest.cpp (renamed from test/SoilMoistureIoTest.cpp) | 2 |
12 files changed, 23 insertions, 13 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 0d48449..9da7eb6 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -42,5 +42,6 @@ endif(DOXYGEN_FOUND) add_subdirectory(ble) add_subdirectory(apps) +add_subdirectory(sensor) add_subdirectory(test) enable_testing() diff --git a/apps/CMakeLists.txt b/apps/CMakeLists.txt index 3891d79..15a1f0b 100644 --- a/apps/CMakeLists.txt +++ b/apps/CMakeLists.txt @@ -11,7 +11,6 @@ list(APPEND APPS sm-serial-read-all) add_library(trygvis-apps SoilMoisture.cpp - SoilMoistureIo.cpp apps.cpp) # Boost @@ -35,18 +34,20 @@ if(LOG4CPLUS_LIBRARIES MATCHES NOTFOUND) message(FATAL_ERROR "Could not find log4cplus library files") endif() -foreach(app ${APPS}) - include_directories("${PROJECT_SOURCE_DIR}/include") - include_directories("${PROJECT_SOURCE_DIR}/json/src") +include_directories("${PROJECT_SOURCE_DIR}/include") +include_directories("${PROJECT_SOURCE_DIR}/json/src") +include_directories("${PROJECT_SOURCE_DIR}/sensor/include") +include_directories("${LOG4CPLUS_INCLUDE_DIRECTORIES}") +foreach(app ${APPS}) add_executable(${app} ${app}.cpp) target_link_libraries(${app} ble) target_link_libraries(${app} trygvis-apps) + target_link_libraries(${app} trygvis-sensor) target_link_libraries(${app} ${Boost_LIBRARIES}) target_link_libraries(${app} ${BLUEZ_LIBRARIES}) target_link_libraries(${app} ${PQXX_LIBRARIES}) - include_directories("${LOG4CPLUS_INCLUDE_DIRECTORIES}") target_link_libraries(${app} ${LOG4CPLUS_LIBRARIES}) target_link_libraries(${app} ${CMAKE_THREAD_LIBS_INIT}) endforeach(app) diff --git a/apps/sample-convert.cpp b/apps/sample-convert.cpp index 9e2ad55..4834732 100644 --- a/apps/sample-convert.cpp +++ b/apps/sample-convert.cpp @@ -1,4 +1,4 @@ -#include "SoilMoistureIo.h" +#include "SensorSample.h" #include "json.hpp" #include "apps.h" #include <fstream> diff --git a/apps/sample-select.cpp b/apps/sample-select.cpp index d1954b3..8180709 100644 --- a/apps/sample-select.cpp +++ b/apps/sample-select.cpp @@ -1,4 +1,4 @@ -#include "SoilMoistureIo.h" +#include "SensorSample.h" #include "apps.h" #include <boost/tokenizer.hpp> diff --git a/apps/sample-timestamp.cpp b/apps/sample-timestamp.cpp index 0242021..018ecb0 100644 --- a/apps/sample-timestamp.cpp +++ b/apps/sample-timestamp.cpp @@ -1,4 +1,4 @@ -#include "SoilMoistureIo.h" +#include "SensorSample.h" #include "apps.h" #include <fstream> #include <sys/stat.h> diff --git a/apps/sm-get-value.cpp b/apps/sm-get-value.cpp index 9f9308a..b8fa983 100644 --- a/apps/sm-get-value.cpp +++ b/apps/sm-get-value.cpp @@ -5,7 +5,7 @@ #include <thread> #include "ble/Bluetooth.h" #include "SoilMoisture.h" -#include "SoilMoistureIo.h" +#include "SensorSample.h" #include "json.hpp" #include "apps.h" diff --git a/apps/sm-serial-read-all.cpp b/apps/sm-serial-read-all.cpp index 8050c85..7241864 100644 --- a/apps/sm-serial-read-all.cpp +++ b/apps/sm-serial-read-all.cpp @@ -1,4 +1,4 @@ -#include "SoilMoistureIo.h" +#include "SensorSample.h" #include "json.hpp" #include "apps.h" #include <thread> diff --git a/apps/sm-serial-read.cpp b/apps/sm-serial-read.cpp index 4edd940..a8d528a 100644 --- a/apps/sm-serial-read.cpp +++ b/apps/sm-serial-read.cpp @@ -1,4 +1,4 @@ -#include "SoilMoistureIo.h" +#include "SensorSample.h" #include "json.hpp" #include "apps.h" #include <chrono> diff --git a/sensor/CMakeLists.txt b/sensor/CMakeLists.txt new file mode 100644 index 0000000..5d7612f --- /dev/null +++ b/sensor/CMakeLists.txt @@ -0,0 +1,8 @@ +add_library(trygvis-sensor + main/SensorSample.cpp) + +include_directories("${PROJECT_SOURCE_DIR}/json/src") +include_directories(include) + +# Boost +find_package(Boost COMPONENTS regex system program_options REQUIRED) diff --git a/apps/SoilMoistureIo.h b/sensor/include/SensorSample.h index 386296a..386296a 100644 --- a/apps/SoilMoistureIo.h +++ b/sensor/include/SensorSample.h diff --git a/apps/SoilMoistureIo.cpp b/sensor/main/SensorSample.cpp index 1d9281b..6ec6dfc 100644 --- a/apps/SoilMoistureIo.cpp +++ b/sensor/main/SensorSample.cpp @@ -1,4 +1,4 @@ -#include "SoilMoistureIo.h" +#include "SensorSample.h" #include "json.hpp" #include <set> diff --git a/test/SoilMoistureIoTest.cpp b/sensor/test/SoilMoistureIoTest.cpp index e7889d0..574885c 100644 --- a/test/SoilMoistureIoTest.cpp +++ b/sensor/test/SoilMoistureIoTest.cpp @@ -1,4 +1,4 @@ -#include "SoilMoistureIo.h" +#include "SensorSample.h" #define BOOST_TEST_MODULE "SoilMoistureIoTest" |