forked from goncalossilva/levd
-
Notifications
You must be signed in to change notification settings - Fork 1
/
CMakeLists.txt
51 lines (45 loc) · 1.28 KB
/
CMakeLists.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
cmake_minimum_required (VERSION 2.6)
project (kraken_linux)
# The version number.
set (Levd_VERSION_MAJOR 0)
set (Levd_VERSION_MINOR 4)
set(CMAKE_CXX_STANDARD 14)
set(CMAKE_CXX_FLAGS "-fmax-errors=2")
set(KRAKEN_LIB_LIBRARIES
:libsensors.so
:libyaml-cpp.so
:libglog.so.0
:libusb-1.0.so.0)
# configure a header file to pass some of the CMake settings
# to the source code
configure_file(
${PROJECT_SOURCE_DIR}/version.h.in
${PROJECT_BINARY_DIR}/version.h)
set(KRAKEN_LIB_SOURCES
${PROJECT_SOURCE_DIR}/leviathan_service.cpp
${PROJECT_SOURCE_DIR}/leviathan_config.cpp
${PROJECT_SOURCE_DIR}/usb_descriptor_utils.cpp
${PROJECT_SOURCE_DIR}/kraken_driver.cpp
${PROJECT_SOURCE_DIR}/main.cpp)
add_executable (kraken ${KRAKEN_LIB_SOURCES})
target_link_libraries(kraken ${KRAKEN_LIB_LIBRARIES})
install(
TARGETS kraken
RUNTIME DESTINATION /usr/bin
)
# TODO: Find a shorter way to install!
install(
DIRECTORY config/
DESTINATION /usr/bin
FILES_MATCHING PATTERN "kraken-start.sh"
PERMISSIONS WORLD_READ WORLD_WRITE WORLD_EXECUTE
GROUP_EXECUTE GROUP_READ
OWNER_EXECUTE OWNER_READ)
install(
DIRECTORY config/
DESTINATION /etc/leviathan
FILES_MATCHING PATTERN "levd.cfg")
install(
DIRECTORY config/
DESTINATION /etc/systemd/system
FILES_MATCHING PATTERN "levd.service")