-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathCMakeListsPrivate.txt
65 lines (52 loc) · 3.9 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
# !!! 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 "nodemcuv2" 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-xtensa@1.40802.0/bin/xtensa-lx106-elf-gcc.exe")
SET(CMAKE_CXX_COMPILER "${ENV_HOME_PATH}/.platformio/packages/toolchain-xtensa@1.40802.0/bin/xtensa-lx106-elf-g++.exe")
SET(CMAKE_CXX_FLAGS "-fno-rtti -fno-exceptions -std=c++11 -Os -mlongcalls -mtext-section-literals -falign-functions=4 -U__STRICT_ANSI__ -ffunction-sections -fdata-sections")
SET(CMAKE_C_FLAGS "-std=gnu99 -Wpointer-arith -Wno-implicit-function-declaration -Wl,-EL -fno-inline-functions -nostdlib -Os -mlongcalls -mtext-section-literals -falign-functions=4 -U__STRICT_ANSI__ -ffunction-sections -fdata-sections")
SET(CMAKE_C_STANDARD 99)
set(CMAKE_CXX_STANDARD 11)
if (CMAKE_BUILD_TYPE MATCHES "nodemcuv2")
add_definitions(-DPLATFORMIO=50205)
add_definitions(-DESP8266)
add_definitions(-DARDUINO_ARCH_ESP8266)
add_definitions(-DARDUINO_ESP8266_NODEMCU_ESP12E)
add_definitions(-DF_CPU=80000000L)
add_definitions(-D__ets__)
add_definitions(-DICACHE_FLASH)
include_directories("${CMAKE_CURRENT_LIST_DIR}/include")
include_directories("${CMAKE_CURRENT_LIST_DIR}/src")
include_directories("${ENV_HOME_PATH}/.platformio/packages/framework-esp8266-rtos-sdk/include")
include_directories("${ENV_HOME_PATH}/.platformio/packages/framework-esp8266-rtos-sdk/extra_include")
include_directories("${ENV_HOME_PATH}/.platformio/packages/framework-esp8266-rtos-sdk/driver_lib/include")
include_directories("${ENV_HOME_PATH}/.platformio/packages/framework-esp8266-rtos-sdk/include/espressif")
include_directories("${ENV_HOME_PATH}/.platformio/packages/framework-esp8266-rtos-sdk/include/lwip")
include_directories("${ENV_HOME_PATH}/.platformio/packages/framework-esp8266-rtos-sdk/include/lwip/ipv4")
include_directories("${ENV_HOME_PATH}/.platformio/packages/framework-esp8266-rtos-sdk/include/lwip/ipv6")
include_directories("${ENV_HOME_PATH}/.platformio/packages/framework-esp8266-rtos-sdk/include/nopoll")
include_directories("${ENV_HOME_PATH}/.platformio/packages/framework-esp8266-rtos-sdk/include/spiffs")
include_directories("${ENV_HOME_PATH}/.platformio/packages/framework-esp8266-rtos-sdk/include/ssl")
include_directories("${ENV_HOME_PATH}/.platformio/packages/framework-esp8266-rtos-sdk/include/json")
include_directories("${ENV_HOME_PATH}/.platformio/packages/framework-esp8266-rtos-sdk/include/openssl")
include_directories("${ENV_HOME_PATH}/.platformio/packages/toolchain-xtensa@1.40802.0/xtensa-lx106-elf/include/c++/4.8.2")
include_directories("${ENV_HOME_PATH}/.platformio/packages/toolchain-xtensa@1.40802.0/xtensa-lx106-elf/include/c++/4.8.2/xtensa-lx106-elf")
include_directories("${ENV_HOME_PATH}/.platformio/packages/toolchain-xtensa@1.40802.0/lib/gcc/xtensa-lx106-elf/4.8.2/include")
include_directories("${ENV_HOME_PATH}/.platformio/packages/toolchain-xtensa@1.40802.0/lib/gcc/xtensa-lx106-elf/4.8.2/include-fixed")
include_directories("${ENV_HOME_PATH}/.platformio/packages/toolchain-xtensa@1.40802.0/xtensa-lx106-elf/include")
FILE(GLOB_RECURSE EXTRA_LIB_SOURCES
${CMAKE_CURRENT_LIST_DIR}/.pio/libdeps/nodemcuv2/*.*
)
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})