aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTrygve Laugstøl <trygvis@inamo.no>2015-03-06 21:19:36 +0100
committerTrygve Laugstøl <trygvis@inamo.no>2015-03-06 21:19:36 +0100
commit1cd0616a0ca9ecffcd1b523f1fc069a22fa4609d (patch)
tree5965dde4809778a929ec2c85917968779ffa0b28
parenta83e6f5960a549d54991495336bd12d549127d91 (diff)
downloadble-toys-1cd0616a0ca9ecffcd1b523f1fc069a22fa4609d.tar.gz
ble-toys-1cd0616a0ca9ecffcd1b523f1fc069a22fa4609d.tar.bz2
ble-toys-1cd0616a0ca9ecffcd1b523f1fc069a22fa4609d.tar.xz
ble-toys-1cd0616a0ca9ecffcd1b523f1fc069a22fa4609d.zip
o Building a library of all the utility code, speeds up the build time.
-rw-r--r--apps/CMakeLists.txt27
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})