-
Notifications
You must be signed in to change notification settings - Fork 5
/
CMakeLists.txt
103 lines (88 loc) · 2.94 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
97
98
99
100
101
102
103
# For CLion see http://stackoverflow.com/questions/26918459/using-local-makefile-for-clion-instead-of-cmake
cmake_minimum_required(VERSION 3.2)
project(galileo_terremoti)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
add_Definitions(-DDEBUG)
#set(CMAKE_VERBOSE_MAKEFILE ON)
#add_subdirectory(arduino)
#link_directories(build)
#set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY "${PROJECT_SOURCE_DIR}/build/")
#set(CMAKE_LIBRARY_OUTPUT_DIRECTORY "${PROJECT_SOURCE_DIR}/build/")
#set(CMAKE_RUNTIME_OUTPUT_DIRECTORY "${PROJECT_SOURCE_DIR}/build/")
set(SOURCE_FILES
galileo-core.cpp
Config.h
Log.h
net/NTP.h
net/HTTPClient.h
Log.cpp
Config.cpp
net/NTP.cpp
net/HTTPClient.cpp
net/NetworkManager.cpp
net/NetworkManager.h
LED.h
Seismometer.cpp
Seismometer.h
Utils.cpp
Utils.h
CommandInterface.cpp
CommandInterface.h
common.h
net/IPaddr.cpp
net/IPaddr.h
net/Udp.cpp
net/Udp.h
net/Tcp.cpp
net/Tcp.h
net/IPaddr.h
net/IPaddr.cpp
Accelerometer.h
vendor/galileo/AcceleroMMA7361.cpp
vendor/galileo/AcceleroMMA7361.h
vendor/galileo/LED.cpp
vendor/galileo/generic.cpp
vendor/galileo/vendor_specific.h
vendor/linux-x86/DummyAccelerometer.cpp
vendor/linux-x86/DummyAccelerometer.h
vendor/linux-x86/LED.cpp
vendor/linux-x86/generic.cpp
vendor/linux-x86/vendor_specific.h
vendor/mac-osx/DummyAccelerometer.cpp
vendor/mac-osx/DummyAccelerometer.h
vendor/mac-osx/LED.cpp
vendor/mac-osx/generic.cpp
vendor/mac-osx/vendor_specific.h
vendor/raspi/ADXL345Accelerometer.cpp
vendor/raspi/ADXL345Accelerometer.h
vendor/raspi/LED.cpp
vendor/raspi/generic.cpp
vendor/raspi/smbus.cpp
vendor/raspi/smbus.h
vendor/raspi/vendor_specific.h
generic.h
Watchdog.cpp
Watchdog.h
net/TraceAccumulator.cpp net/TraceAccumulator.h)
add_executable(galileo_gen1 EXCLUDE_FROM_ALL ${SOURCE_FILES})
#target_compile_options(galileo_gen1 PUBLIC "-DGALILEO_GEN=1")
#target_include_directories(galileo_gen1 PUBLIC ${GALILEO_GEN1_INCLUDE})
#target_link_libraries(galileo_gen1 ArduinoGalileo1 ArduinoGalileo1Ethernet)
#add_executable(galileo_gen2 ${SOURCE_FILES})
#target_compile_options(galileo_gen2 PUBLIC "-DGALILEO_GEN=2")
#target_include_directories(galileo_gen2 PUBLIC ${GALILEO_GEN2_INCLUDE})
#target_link_libraries(galileo_gen2 ArduinoGalileo2 ArduinoGalileo2Ethernet)
#add_custom_target(gen1image COMMAND genimage.sh ${PROJECT_SOURCE_DIR})
include_directories(vendor/linux-x86/)
add_custom_target(generic_x86 ALL
COMMAND make PLATFORM="linux-x86" -C ${PROJECT_SOURCE_DIR}
SOURCES ${SOURCE_FILES})
add_custom_target(galileo1 ALL
COMMAND make PLATFORM="galileo" VARIANT="galileo_fab_d" -C ${PROJECT_SOURCE_DIR}
SOURCES ${SOURCE_FILES})
add_custom_target(galileo2 ALL
COMMAND make PLATFORM="galileo" VARIANT="galileo_fab_g" -C ${PROJECT_SOURCE_DIR}
SOURCES ${SOURCE_FILES})
add_custom_target(clear ALL
COMMAND make clean -C ${PROJECT_SOURCE_DIR}
SOURCES ${SOURCE_FILES})