forked from GhostESP-Revival/GhostESP
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCMakeLists.txt
More file actions
31 lines (24 loc) · 1.01 KB
/
CMakeLists.txt
File metadata and controls
31 lines (24 loc) · 1.01 KB
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
cmake_minimum_required(VERSION 3.16.0)
# Set IDF_TARGET from environment variable if defined
if(DEFINED ENV{IDF_TARGET})
set(IDF_TARGET $ENV{IDF_TARGET})
message(STATUS "Setting IDF_TARGET to ${IDF_TARGET} from environment variable")
endif()
# Partition table settings
add_link_options("-Wl,-z,muldefs")
if(DEFINED ENV{FLAPPY_GHOST_WEB_HOOK})
set(FLAPPY_GHOST_WEB_HOOK "$ENV{FLAPPY_GHOST_WEB_HOOK}")
add_compile_definitions(FLAPPY_GHOST_WEB_HOOK=\"${FLAPPY_GHOST_WEB_HOOK}\")
endif()
set(SDKCONFIG_DEFAULTS "sdkconfig.defaults")
add_compile_definitions(HOLD_LIMIT=1000) # For joystick hold duration
add_compile_definitions(LED_ORDER=0) # 2 for RGB, 0 for GRB
add_compile_definitions(DNS_SERVER_MAX_ITEMS=1)
add_compile_definitions(MAX_WPS_NETWORKS=15)
# define esp32s2 target macro globally for legacy guards
if("${IDF_TARGET}" STREQUAL "esp32s2")
add_compile_definitions(CONFIG_IDF_TARGET_ESP32S2)
endif()
# Include project settings
include($ENV{IDF_PATH}/tools/cmake/project.cmake)
project(Ghost_ESP_IDF)