diff options
-rw-r--r-- | apps/CMakeLists.txt | 27 |
1 files changed, 13 insertions, 14 deletions
diff --git a/apps/CMakeLists.txt b/apps/CMakeLists.txt index ec45a6b..e2082e1 100644 --- a/apps/CMakeLists.txt +++ b/apps/CMakeLists.txt @@ -1,16 +1,15 @@ -set(APPS - ble-inspect-device - sample-convert - sm-db-insert - sm-db-select - sm-get-value - sm-serial-read) - list(APPEND APPS log4cplus-test) - -list(APPEND shared_sources SoilMoisture.cpp) -list(APPEND shared_sources SoilMoistureIo.cpp) -list(APPEND shared_sources apps.cpp) +list(APPEND APPS ble-inspect-device) +list(APPEND APPS sample-convert) +list(APPEND APPS sm-db-insert) +list(APPEND APPS sm-db-select) +list(APPEND APPS sm-get-value) +list(APPEND APPS sm-serial-read) + +add_library(trygvis-apps + SoilMoisture.cpp + SoilMoistureIo.cpp + apps.cpp) # Boost find_package(Boost COMPONENTS regex system program_options REQUIRED) @@ -47,10 +46,10 @@ foreach(app ${APPS}) include_directories("${PROJECT_SOURCE_DIR}/include") include_directories("${CMAKE_BINARY_DIR}/apps/json/src/JSON/src") - add_executable(${app} ${app}.cpp ${shared_sources}) - add_dependencies(${app} ble) + add_executable(${app} ${app}.cpp) target_link_libraries(${app} ble) + target_link_libraries(${app} trygvis-apps) target_link_libraries(${app} ${Boost_LIBRARIES}) target_link_libraries(${app} ${BLUEZ_LIBRARIES}) target_link_libraries(${app} ${PQXX_LIBRARIES}) |