domotic/CMakeLists.txt
2025-11-15 14:10:40 +01:00

52 lines
1.9 KiB
CMake
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# The following lines of boilerplate have to be in your project's CMakeLists
# in this exact order for cmake to work correctly
cmake_minimum_required(VERSION 3.16)
if($ENV{IDF_TARGET} STREQUAL "esp32p4")
include($ENV{IDF_PATH}/tools/cmake/project.cmake)
# "Trim" the build. Include the minimal set of components, main and anything it depends on.
set(COMPONENTS main)
set(EXTRA_COMPONENT_DIRS
/home/marc/esp-dev-kits/examples/esp32-p4-function-ev-board/examples/common_components
$ENV{IDF_PATH}/examples/protocols/linux_stubs/esp_stubs
)
project(rgb_lcd)
add_link_options("-Wl,--disable-non-contiguous-regions")
else()
# PROJECT_PLATFORM_LINUX
# PROJECT_PLATFORM_ESP32
add_compile_definitions(PROJECT_PLATFORM_LINUX)
set(EXCLUDE_COMPONENTS main driver bh1750 espressif__bh1750 wifi_logger)
set(EXTRA_COMPONENT_DIRS
$ENV{IDF_PATH}/examples/protocols/linux_stubs/esp_stubs
${CMAKE_CURRENT_SOURCE_DIR}/FreeRTOS
"/home/marc/esp-protocols/common_components/linux_compat"
"/home/marc/esp-protocols/components/mdns/tests/host_test/components"
)
project(rgb_lcd)
add_executable(domotic_display
components/domotic_display/ihm.c
# ajoute dautres fichiers si nécessaire
)
# -- FreeRTOS config
add_library(freertos_config INTERFACE)
target_include_directories(freertos_config INTERFACE
${CMAKE_CURRENT_SOURCE_DIR}/FreeRTOSConfig
)
add_subdirectory(FreeRTOS/FreeRTOS/Source)
add_subdirectory(components/meteofrance)
add_subdirectory(components/stateManagement)
add_subdirectory(managed_components/lvgl__lvgl)
target_include_directories(domotic_display PRIVATE components/domotic_display/include)
# --- Liens nécessaires ---
target_link_libraries(domotic_display PRIVATE freertos_kernel lvgl m pthread meteofrance)
endif()