forked from rszimm/sprinklers_pi
-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
62 lines (56 loc) · 1.53 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
cmake_minimum_required(VERSION 3.9)
project(sprinklers_pi)
set(CMAKE_CXX_STANDARD 11)
file (STRINGS "version.txt" BUILD_VERSION)
add_definitions(-DLOGGING)
add_definitions(-DVERSION=\"${BUILD_VERSION}\")
add_definitions(-DRELPATH)
add_executable(sprinklers_pi
config.h
core.cpp
core.h
Event.cpp
Event.h
Logging.cpp
Logging.h
port.cpp
port.h
settings.cpp
settings.h
sprinklers_pi.cpp
sysreset.cpp
sysreset.h
Weather.cpp
Weather.h
Wunderground.cpp
Wunderground.h
Aeris.cpp
Aeris.h
DarkSky.cpp
DarkSky.h
OpenWeather.cpp
OpenWeather.h
web.cpp
web.h
json.hpp)
TARGET_LINK_LIBRARIES(sprinklers_pi
sqlite3
wiringPi
crypt
rt)
set (source "${CMAKE_SOURCE_DIR}/scripts")
set (destination "${CMAKE_CURRENT_BINARY_DIR}/scripts")
add_custom_command(
TARGET ${PROJECT_NAME} POST_BUILD
COMMAND ${CMAKE_COMMAND} -E create_symlink ${source} ${destination}
DEPENDS ${destination}
COMMENT "symbolic link resources folder from ${source} => ${destination}"
)
set (source "${CMAKE_SOURCE_DIR}/web")
set (destination "${CMAKE_CURRENT_BINARY_DIR}/web")
add_custom_command(
TARGET ${PROJECT_NAME} POST_BUILD
COMMAND ${CMAKE_COMMAND} -E create_symlink ${source} ${destination}
DEPENDS ${destination}
COMMENT "symbolic link resources folder from ${source} => ${destination}"
)