-
-
Notifications
You must be signed in to change notification settings - Fork 21
/
CMakeLists.txt
46 lines (40 loc) · 1.63 KB
/
CMakeLists.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
cmake_minimum_required(VERSION 3.16)
include($ENV{IDF_PATH}/tools/cmake/project.cmake)
project(esphome-tion)
idf_build_set_property(CXX_COMPILE_OPTIONS "-std=gnu++2a" APPEND)
add_definitions(
-DTION_ESPHOME
-DTION_ENABLE_HEARTBEAT
-DTION_ENABLE_SCHEDULER
-DTION_ENABLE_DIAGNOSTIC
-DTION_ENABLE_ANTIFREEZE
-DUSE_VPORT_BLE
-DUSE_VPORT_UART
-DUSE_VPORT_JTAG
-DUSE_QINGPING_EXPLORER
-DESPHOME_LOG_LEVEL=ESPHOME_LOG_LEVEL_VERY_VERBOSE
-DUSE_ESP32
-DUSE_ESP_IDF
-DUSE_ESP32_FRAMEWORK_ESP_IDF
-DUSE_ESP32_VARIANT_ESP32
-DAUDIO_NO_SD_FS
-DHAVE_CONFIG_H
)
FILE(GLOB_RECURSE app_sources
${CMAKE_SOURCE_DIR}/components/**/*.cpp
${CMAKE_SOURCE_DIR}/components/**/*.h
)
target_sources(esphome-tion.elf PRIVATE ${app_sources})
# idf_component_register(SRCS ${app_sources})
set(WORKSPACE_DIR "${CMAKE_SOURCE_DIR}")
set(ESPHOME_DATA_DIR "${WORKSPACE_DIR}/.build/esphome")
include_directories("${WORKSPACE_DIR}") # will include esphome
include_directories("${WORKSPACE_DIR}/lib/esphome-components")
include_directories("${WORKSPACE_DIR}/lib/components-alias")
include_directories("${WORKSPACE_DIR}/lib/etl/include")
# include_directories("${WORKSPACE_DIR}/lib/gsl-lite/include")
# include_directories(SYSTEM "${ESPHOME_DATA_DIR}/libdeps/esp32-arduino/ArduinoJson/src")
include_directories(SYSTEM "${WORKSPACE_DIR}/lib/ArduinoJson/src")
set("PIO_ESP32" $ENV{HOME}/.platformio/packages/framework-arduinoespressif32)
include_directories(SYSTEM "${PIO_ESP32}/tools/sdk/esp32/include/esp32-camera/driver/include")
include_directories(SYSTEM "${PIO_ESP32}/tools/sdk/esp32/include/esp32-camera/conversions/include")