aboutsummaryrefslogtreecommitdiff
path: root/apps/CMakeLists.txt
diff options
context:
space:
mode:
authorTrygve Laugstøl <trygvis@inamo.no>2015-02-20 22:56:22 +0100
committerTrygve Laugstøl <trygvis@inamo.no>2015-02-20 22:56:22 +0100
commite44813dddbf5ba063d29ae1e40862e7a7cbb6f43 (patch)
tree67009d481b8b106af6937a5f386fe4e2e15b1fcc /apps/CMakeLists.txt
parentb6f080193d71334e8afea95ae26afbc03c27fac3 (diff)
downloadble-toys-e44813dddbf5ba063d29ae1e40862e7a7cbb6f43.tar.gz
ble-toys-e44813dddbf5ba063d29ae1e40862e7a7cbb6f43.tar.bz2
ble-toys-e44813dddbf5ba063d29ae1e40862e7a7cbb6f43.tar.xz
ble-toys-e44813dddbf5ba063d29ae1e40862e7a7cbb6f43.zip
Reorganizing the source code:
o Moving main to apps/ o Moving the library sources to ble/ o Creating cmake files for each piece.
Diffstat (limited to 'apps/CMakeLists.txt')
-rw-r--r--apps/CMakeLists.txt22
1 files changed, 22 insertions, 0 deletions
diff --git a/apps/CMakeLists.txt b/apps/CMakeLists.txt
new file mode 100644
index 0000000..a138336
--- /dev/null
+++ b/apps/CMakeLists.txt
@@ -0,0 +1,22 @@
+set(APPS sm-get-value ble-inspect-device)
+
+# Boost
+find_package(Boost COMPONENTS system log thread REQUIRED)
+
+# Bluez
+pkg_check_modules(BLUEZ bluez REQUIRED)
+
+# pthreads
+find_package(Threads REQUIRED)
+
+foreach(app ${APPS})
+ include_directories("${PROJECT_SOURCE_DIR}/ble")
+
+ add_executable(${app} ${app}.cpp)
+ add_dependencies(${app} ble)
+
+ target_link_libraries(${app} ble)
+ target_link_libraries(${app} ${Boost_LIBRARIES})
+ target_link_libraries(${app} ${BLUEZ_LIBRARIES})
+ target_link_libraries(${app} ${CMAKE_THREAD_LIBS_INIT})
+endforeach(app)