From adfbf84fb43e75c83896bc9d38a39b9efc5989b1 Mon Sep 17 00:00:00 2001 From: Trygve Laugstøl Date: Fri, 10 Jul 2015 22:03:29 +0200 Subject: o Adding support for installing the code. --- sensor/CMakeLists.txt | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) (limited to 'sensor/CMakeLists.txt') 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) -- cgit v1.2.3