-
Notifications
You must be signed in to change notification settings - Fork 1
/
CMakeLists.txt
96 lines (78 loc) · 2.17 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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
cmake_minimum_required(VERSION 3.0.0)
set(CMAKE_SYSTEM_NAME Linux)
set(CMAKE_SYSTEM_PROCESSOR arm)
set(CMAKE_C_COMPILER "/home/alex/x-tools/armv7-rpi2-linux-gnueabihf/bin/armv7-rpi2-linux-gnueabihf-gcc")
set(CMAKE_CXX_COMPILER "/home/alex/x-tools/armv7-rpi2-linux-gnueabihf/bin/armv7-rpi2-linux-gnueabihf-gcc")
set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
set(CMAKE_FIND_ROOT_PATH_MODE_PACKAGE ONLY)
message("-- ${CMAKE_BUILD_TYPE}")
add_compile_options(-c -x c "-D_GNU_SOURCE" -fPIC -std=c99)
SET(CMAKE_EXE_LINKER_FLAGS_Debug "-g -Wl,-Rlibs/ -Wl,--dynamic-list=${CMAKE_CURRENT_SOURCE_DIR}/exports.txt")
SET(CMAKE_EXE_LINKER_FLAGS_Release "-Wl,-Rlibs/ -Wl,--dynamic-list=${CMAKE_CURRENT_SOURCE_DIR}/exports.txt")
set(CMAKE_VERBOSE_MAKEFILE ON)
project(zwave-automation-engine VERSION 0.1.0)
include(CTest)
enable_testing()
include_directories(
libZaeUtil
/home/alex/x-tools/armv7-rpi2-linux-gnueabihf/include
/home/alex/x-tools/armv7-rpi2-linux-gnueabihf/include/libzway
)
link_directories(
/home/alex/x-tools/armv7-rpi2-linux-gnueabihf/lib
/home/alex/x-tools/armv7-rpi2-linux-gnueabihf/lib/libzway
)
add_subdirectory(libZaeUtil)
add_subdirectory(services)
add_subdirectory(vdev)
add_subdirectory(scripts)
add_subdirectory(homebridge-zae)
FILE(GLOB AllSrc *.c BuiltinServices/*.c)
add_executable(zwave-automation-engine ${AllSrc})
add_dependencies(zwave-automation-engine
Cron
DateTime
IFTTT
Mail
SMS
Timer
Weather
BlinkCamera
Button
SecuritySystem
Sensor
SurveillanceStation
homebridge-zae
scripts
)
target_link_libraries(zwave-automation-engine
ZaeUtil
zway
zcommons
xml2
z
m
crypto
archive
lzma
nettle
acl
attr
lzo2
bz2
curl
json-c
dl
python3.9
pthread
util
)
set_target_properties(zwave-automation-engine PROPERTIES LINK_FLAGS "-Wl,-Rlibs/ -Wl,--dynamic-list=${CMAKE_CURRENT_SOURCE_DIR}/exports.txt")
set(CPACK_PROJECT_NAME ${PROJECT_NAME})
set(CPACK_PROJECT_VERSION ${PROJECT_VERSION})
include(CPack)
add_custom_command(TARGET zwave-automation-engine POST_BUILD
COMMAND scp ${CMAKE_CURRENT_BINARY_DIR}/zwave-automation-engine osmc@osmc:/home/osmc/Projects/zwave-automation-engine/
)