This repository has been archived by the owner on Sep 21, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeListsPrivate.txt
121 lines (104 loc) · 6.91 KB
/
CMakeListsPrivate.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
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
# !!! WARNING !!! AUTO-GENERATED FILE, PLEASE DO NOT MODIFY IT AND USE
# https://docs.platformio.org/page/projectconf/section_env_build.html#build-flags
#
# If you need to override existing CMake configuration or add extra,
# please create `CMakeListsUser.txt` in the root of project.
# The `CMakeListsUser.txt` will not be overwritten by PlatformIO.
set(CMAKE_CONFIGURATION_TYPES "nano1;nano2;mega;" CACHE STRING "Build Types reflect PlatformIO Environments" FORCE)
# Convert "Home Directory" that may contain unescaped backslashes on Windows
SET(CMAKE_C_COMPILER "$ENV{HOME}/.platformio/packages/toolchain-atmelavr/bin/avr-gcc")
SET(CMAKE_CXX_COMPILER "$ENV{HOME}/.platformio/packages/toolchain-atmelavr/bin/avr-g++")
SET(CMAKE_CXX_FLAGS "-fno-exceptions -fno-threadsafe-statics -fpermissive -std=gnu++11 -Os -Wall -ffunction-sections -fdata-sections -flto -mmcu=atmega328p")
SET(CMAKE_C_FLAGS "-std=gnu11 -fno-fat-lto-objects -Os -Wall -ffunction-sections -fdata-sections -flto -mmcu=atmega328p")
SET(CMAKE_C_STANDARD 11)
set(CMAKE_CXX_STANDARD 11)
if (CMAKE_BUILD_TYPE MATCHES "nano1")
add_definitions(-DPLATFORMIO=50205)
add_definitions(-DARDUINO_AVR_NANO)
add_definitions(-DF_CPU=16000000L)
add_definitions(-DARDUINO_ARCH_AVR)
add_definitions(-DARDUINO=10808)
add_definitions(-D__AVR_ATmega328P__)
include_directories("${CMAKE_CURRENT_LIST_DIR}/include")
include_directories("${CMAKE_CURRENT_LIST_DIR}/src")
include_directories("${CMAKE_CURRENT_LIST_DIR}/.pio/libdeps/nano1/Adafruit SSD1306")
include_directories("${CMAKE_CURRENT_LIST_DIR}/.pio/libdeps/nano1/Adafruit GFX Library")
include_directories("${CMAKE_CURRENT_LIST_DIR}/.pio/libdeps/nano1/Adafruit BusIO")
include_directories("$ENV{HOME}/.platformio/packages/framework-arduino-avr/libraries/Wire/src")
include_directories("${CMAKE_CURRENT_LIST_DIR}/.pio/libdeps/nano1/FastLED/src")
include_directories("$ENV{HOME}/.platformio/packages/framework-arduino-avr/libraries/SoftwareSerial/src")
include_directories("$ENV{HOME}/.platformio/packages/framework-arduino-avr/libraries/SPI/src")
include_directories("$ENV{HOME}/.platformio/packages/framework-arduino-avr/cores/arduino")
include_directories("$ENV{HOME}/.platformio/packages/framework-arduino-avr/variants/eightanaloginputs")
include_directories("$ENV{HOME}/.platformio/packages/framework-arduino-avr/libraries/EEPROM/src")
include_directories("$ENV{HOME}/.platformio/packages/framework-arduino-avr/libraries/HID/src")
include_directories("$ENV{HOME}/.platformio/packages/toolchain-atmelavr/lib/gcc/avr/7.3.0/include-fixed")
include_directories("$ENV{HOME}/.platformio/packages/toolchain-atmelavr/lib/gcc/avr/7.3.0/include")
include_directories("$ENV{HOME}/.platformio/packages/toolchain-atmelavr/avr/include")
include_directories("$ENV{HOME}/.platformio/packages/tool-unity")
FILE(GLOB_RECURSE EXTRA_LIB_SOURCES
${CMAKE_CURRENT_LIST_DIR}/.pio/libdeps/nano1/*.*
)
endif()
if (CMAKE_BUILD_TYPE MATCHES "mega")
add_definitions(-DPLATFORMIO=50205)
add_definitions(-DARDUINO_AVR_MEGA2560)
add_definitions(-DF_CPU=16000000L)
add_definitions(-DARDUINO_ARCH_AVR)
add_definitions(-DARDUINO=10808)
add_definitions(-D__AVR_ATmega2560__)
include_directories("${CMAKE_CURRENT_LIST_DIR}/include")
include_directories("${CMAKE_CURRENT_LIST_DIR}/src")
include_directories("${CMAKE_CURRENT_LIST_DIR}/.pio/libdeps/mega/Adafruit SSD1306")
include_directories("${CMAKE_CURRENT_LIST_DIR}/.pio/libdeps/mega/Adafruit GFX Library")
include_directories("${CMAKE_CURRENT_LIST_DIR}/.pio/libdeps/mega/Adafruit BusIO")
include_directories("$ENV{HOME}/.platformio/packages/framework-arduino-avr/libraries/Wire/src")
include_directories("${CMAKE_CURRENT_LIST_DIR}/.pio/libdeps/mega/FastLED/src")
include_directories("$ENV{HOME}/.platformio/packages/framework-arduino-avr/libraries/SoftwareSerial/src")
include_directories("$ENV{HOME}/.platformio/packages/framework-arduino-avr/libraries/SPI/src")
include_directories("$ENV{HOME}/.platformio/packages/framework-arduino-avr/cores/arduino")
include_directories("$ENV{HOME}/.platformio/packages/framework-arduino-avr/variants/mega")
include_directories("$ENV{HOME}/.platformio/packages/framework-arduino-avr/libraries/EEPROM/src")
include_directories("$ENV{HOME}/.platformio/packages/framework-arduino-avr/libraries/HID/src")
include_directories("$ENV{HOME}/.platformio/packages/toolchain-atmelavr/lib/gcc/avr/7.3.0/include-fixed")
include_directories("$ENV{HOME}/.platformio/packages/toolchain-atmelavr/lib/gcc/avr/7.3.0/include")
include_directories("$ENV{HOME}/.platformio/packages/toolchain-atmelavr/avr/include")
include_directories("$ENV{HOME}/.platformio/packages/tool-unity")
FILE(GLOB_RECURSE EXTRA_LIB_SOURCES
${CMAKE_CURRENT_LIST_DIR}/.pio/libdeps/mega/*.*
)
endif()
if (CMAKE_BUILD_TYPE MATCHES "nano2")
add_definitions(-DPLATFORMIO=50205)
add_definitions(-DARDUINO_AVR_NANO)
add_definitions(-DF_CPU=16000000L)
add_definitions(-DARDUINO_ARCH_AVR)
add_definitions(-DARDUINO=10808)
add_definitions(-D__AVR_ATmega328P__)
include_directories("${CMAKE_CURRENT_LIST_DIR}/include")
include_directories("${CMAKE_CURRENT_LIST_DIR}/src")
include_directories("${CMAKE_CURRENT_LIST_DIR}/.pio/libdeps/nano2/Adafruit SSD1306")
include_directories("${CMAKE_CURRENT_LIST_DIR}/.pio/libdeps/nano2/Adafruit GFX Library")
include_directories("${CMAKE_CURRENT_LIST_DIR}/.pio/libdeps/nano2/Adafruit BusIO")
include_directories("$ENV{HOME}/.platformio/packages/framework-arduino-avr/libraries/Wire/src")
include_directories("${CMAKE_CURRENT_LIST_DIR}/.pio/libdeps/nano2/FastLED/src")
include_directories("$ENV{HOME}/.platformio/packages/framework-arduino-avr/libraries/SoftwareSerial/src")
include_directories("$ENV{HOME}/.platformio/packages/framework-arduino-avr/libraries/SPI/src")
include_directories("$ENV{HOME}/.platformio/packages/framework-arduino-avr/cores/arduino")
include_directories("$ENV{HOME}/.platformio/packages/framework-arduino-avr/variants/eightanaloginputs")
include_directories("$ENV{HOME}/.platformio/packages/framework-arduino-avr/libraries/EEPROM/src")
include_directories("$ENV{HOME}/.platformio/packages/framework-arduino-avr/libraries/HID/src")
include_directories("$ENV{HOME}/.platformio/packages/toolchain-atmelavr/lib/gcc/avr/7.3.0/include-fixed")
include_directories("$ENV{HOME}/.platformio/packages/toolchain-atmelavr/lib/gcc/avr/7.3.0/include")
include_directories("$ENV{HOME}/.platformio/packages/toolchain-atmelavr/avr/include")
include_directories("$ENV{HOME}/.platformio/packages/tool-unity")
FILE(GLOB_RECURSE EXTRA_LIB_SOURCES
${CMAKE_CURRENT_LIST_DIR}/.pio/libdeps/nano2/*.*
)
endif()
FILE(GLOB_RECURSE SRC_LIST
${CMAKE_CURRENT_LIST_DIR}/src/*.*
${CMAKE_CURRENT_LIST_DIR}/lib/*.*
${CMAKE_CURRENT_LIST_DIR}/test/*.*
)
list(APPEND SRC_LIST ${EXTRA_LIB_SOURCES})