From e44813dddbf5ba063d29ae1e40862e7a7cbb6f43 Mon Sep 17 00:00:00 2001 From: Trygve Laugstøl Date: Fri, 20 Feb 2015 22:56:22 +0100 Subject: Reorganizing the source code: o Moving main to apps/ o Moving the library sources to ble/ o Creating cmake files for each piece. --- apps/CMakeLists.txt | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 apps/CMakeLists.txt (limited to 'apps/CMakeLists.txt') 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) -- cgit v1.2.3