From 5d056ed2b909aaf8e17c66d4a8042e49c7672d90 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ant=C3=B3nio=20Oliveira?= <46893569+amsobr@users.noreply.github.com> Date: Wed, 2 Aug 2023 21:06:05 +0100 Subject: [PATCH] build(cmake): allow correct use of LV_CONF_PATH (#4428) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: António Oliveira Co-authored-by: António Oliveira --- env_support/cmake/custom.cmake | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/env_support/cmake/custom.cmake b/env_support/cmake/custom.cmake index 2fdc428fe..a9b79858d 100644 --- a/env_support/cmake/custom.cmake +++ b/env_support/cmake/custom.cmake @@ -6,10 +6,11 @@ option(LV_LVGL_H_INCLUDE_SIMPLE option(LV_CONF_INCLUDE_SIMPLE "Use #include \"lv_conf.h\" instead of #include \"../../lv_conf.h\"" ON) -# Option to set LV_CONF_PATH, if set parent path LV_CONF_DIR is added to -# includes -option(LV_CONF_PATH "Path defined for lv_conf.h") -get_filename_component(LV_CONF_DIR ${LV_CONF_PATH} DIRECTORY) +# Option LV_CONF_PATH, which should be the path for lv_conf.h +# If set parent path LV_CONF_DIR is added to includes +if( LV_CONF_PATH ) + get_filename_component(LV_CONF_DIR ${LV_CONF_PATH} DIRECTORY) +endif( LV_CONF_PATH ) # Option to build shared libraries (as opposed to static), default: OFF option(BUILD_SHARED_LIBS "Build shared libraries" OFF)