-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeListsPrivate.txt
57 lines (44 loc) · 2.82 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
# !!! 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 "uno" CACHE STRING "Build Types reflect PlatformIO Environments" FORCE)
# Convert "Home Directory" that may contain unescaped backslashes on Windows
file(TO_CMAKE_PATH $ENV{HOMEDRIVE}$ENV{HOMEPATH} ENV_HOME_PATH)
SET(CMAKE_C_COMPILER "${ENV_HOME_PATH}/.platformio/packages/toolchain-atmelavr/bin/avr-gcc.exe")
SET(CMAKE_CXX_COMPILER "${ENV_HOME_PATH}/.platformio/packages/toolchain-atmelavr/bin/avr-g++.exe")
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 "uno")
add_definitions(-DPLATFORMIO=50204)
add_definitions(-DARDUINO_AVR_UNO)
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("${ENV_HOME_PATH}/.platformio/packages/framework-arduino-avr/cores/arduino")
include_directories("${ENV_HOME_PATH}/.platformio/packages/framework-arduino-avr/variants/standard")
include_directories("${ENV_HOME_PATH}/.platformio/packages/framework-arduino-avr/libraries/EEPROM/src")
include_directories("${ENV_HOME_PATH}/.platformio/packages/framework-arduino-avr/libraries/HID/src")
include_directories("${ENV_HOME_PATH}/.platformio/packages/framework-arduino-avr/libraries/SPI/src")
include_directories("${ENV_HOME_PATH}/.platformio/packages/framework-arduino-avr/libraries/SoftwareSerial/src")
include_directories("${ENV_HOME_PATH}/.platformio/packages/framework-arduino-avr/libraries/Wire/src")
include_directories("${ENV_HOME_PATH}/.platformio/packages/toolchain-atmelavr/lib/gcc/avr/7.3.0/include")
include_directories("${ENV_HOME_PATH}/.platformio/packages/toolchain-atmelavr/lib/gcc/avr/7.3.0/include-fixed")
include_directories("${ENV_HOME_PATH}/.platformio/packages/toolchain-atmelavr/avr/include")
FILE(GLOB_RECURSE EXTRA_LIB_SOURCES
${CMAKE_CURRENT_LIST_DIR}/.pio/libdeps/uno/*.*
)
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})