espressif / esp-mdf

Espressif Mesh Development Framework, limited maintain, recommend to use https://github.com/espressif/esp-mesh-lite
Other
774 stars 253 forks source link

CMakeLists issue in examples #306

Open PavanMadushanka opened 2 years ago

PavanMadushanka commented 2 years ago

Hi, this is a general issue I saw while compiling the examples. In the CMakeLists.txt files in examples, there is a check to see if $ENV{MDF_PATH} already exists.

# 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.5)

if(NOT DEFINED $ENV{MDF_PATH})
    message(STATUS "foo include dir: $ENV{MDF_PATH}")
    set(ENV{MDF_PATH} ${CMAKE_CURRENT_LIST_DIR}/../..)
endif()
include($ENV{MDF_PATH}/project.cmake)

project(get_started)

I think that if statement does not work as intended due to $ at the beginning. Believe the correct Cmake syntax should be:

if(NOT DEFINED ENV{MDF_PATH})
vitorrussi commented 2 years ago

I think you're right too, i've opened a PR #253 fixing the examples some time ago but i've got no answer

PavanMadushanka commented 2 years ago

I think you're right too, i've opened a PR #253 fixing the examples some time ago but i've got no answer

Seems this repo is not actively monitored.