-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeListsPrivate.txt
61 lines (48 loc) · 3.07 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
# !!! 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 "circuitplay_classic" 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 -mmcu=atmega32u4 -Os -Wall -ffunction-sections -fdata-sections -flto")
SET(CMAKE_C_FLAGS "-std=gnu11 -fno-fat-lto-objects -mmcu=atmega32u4 -Os -Wall -ffunction-sections -fdata-sections -flto")
SET(CMAKE_C_STANDARD 11)
set(CMAKE_CXX_STANDARD 11)
if (CMAKE_BUILD_TYPE MATCHES "circuitplay_classic")
add_definitions(-DPLATFORMIO=60106)
add_definitions(-DARDUINO_AVR_CIRCUIT_PLAYGROUND_CLASSIC)
add_definitions(-DF_CPU=8000000L)
add_definitions(-DARDUINO_ARCH_AVR)
add_definitions(-DARDUINO=10808)
add_definitions(-DUSB_VID=0x239A)
add_definitions(-DUSB_PID=0x8011)
add_definitions(-DUSB_PRODUCT=\"Adafruit\")
add_definitions(-DUSB_MANUFACTURER=\"Adafruit\")
add_definitions(-D__AVR_ATmega32U4__)
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/circuitplay32u4")
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/circuitplay_classic/*.*
)
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})