aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--apps/CMakeLists.txt8
-rw-r--r--ble/CMakeLists.txt2
-rw-r--r--sensor/CMakeLists.txt18
3 files changed, 21 insertions, 7 deletions
diff --git a/apps/CMakeLists.txt b/apps/CMakeLists.txt
index 01252cf..8ba5a0a 100644
--- a/apps/CMakeLists.txt
+++ b/apps/CMakeLists.txt
@@ -69,5 +69,11 @@ target_link_libraries(launcher ${CMAKE_THREAD_LIBS_INIT})
foreach(app ${APPS})
add_custom_command(
TARGET launcher POST_BUILD
- COMMAND ln -sf launcher ${app})
+ COMMAND ln -sf ../libexec/launcher ${app})
+
+ install(FILES ${CMAKE_CURRENT_BINARY_DIR}/${app} DESTINATION bin)
endforeach()
+
+set_target_properties(launcher PROPERTIES INSTALL_RPATH "\\$ORIGIN/../lib/trygvis")
+install(TARGETS launcher
+ RUNTIME DESTINATION libexec)
diff --git a/ble/CMakeLists.txt b/ble/CMakeLists.txt
index 543e85d..3d8f7c9 100644
--- a/ble/CMakeLists.txt
+++ b/ble/CMakeLists.txt
@@ -1,4 +1,4 @@
-file(GLOB SOURCE_FILES RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} *.cpp *.h)
+file(GLOB SOURCE_FILES RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} *.cpp *.h ../include/ble/*.h)
add_library(ble ${SOURCE_FILES})
include_directories("${PROJECT_SOURCE_DIR}/include")
diff --git a/sensor/CMakeLists.txt b/sensor/CMakeLists.txt
index d571e38..c814687 100644
--- a/sensor/CMakeLists.txt
+++ b/sensor/CMakeLists.txt
@@ -1,14 +1,22 @@
file(GLOB_RECURSE INCLUDES RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} include/*.h)
add_library(trygvis-sensor
- main/sensor.cpp
- main/io.cpp
- ${INCLUDES})
+ STATIC
+ main/sensor.cpp
+ main/io.cpp
+ ${INCLUDES})
-include_directories("${PROJECT_SOURCE_DIR}/json/src")
-include_directories(include)
+target_include_directories(trygvis-sensor PUBLIC "${PROJECT_SOURCE_DIR}/json/src")
+target_include_directories(trygvis-sensor PUBLIC include)
# Boost
find_package(Boost COMPONENTS regex system REQUIRED)
add_subdirectory(test)
+
+install(TARGETS trygvis-sensor
+ RUNTIME DESTINATION bin
+ LIBRARY DESTINATION lib/trygvis
+ ARCHIVE DESTINATION lib/trygvis)
+
+install(DIRECTORY include/trygvis DESTINATION include)