From 929bd97e0d18d3c0c637cd11c1a9697ed1bfbbd4 Mon Sep 17 00:00:00 2001 From: Rafal Zajac Date: Thu, 10 May 2018 11:04:51 +0200 Subject: [PATCH] Update CMakeLists.txt Make sure ESPROOT is set. --- CMakeLists.txt | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index e786572..cd82de9 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -12,6 +12,11 @@ # License for the specific language governing permissions and limitations # under the License. +# Make sure ESPROOT environemt varaiabnle is set. +if (NOT EXISTS $ENV{ESPROOT}) + message("The ESPROOT environment varaible is not set. Using ${HOME}/esproot.") + set(ENV{ESPROOT} "${HOME}/esproot") +endif() # Bootstrap before call to project(). include("$ENV{ESPROOT}/esp-cmake/ESP8266.bootstrap.cmake")