cmake: Fix build failure when -DNUTTX_APPS_DIR is specified

Fix cmake build failure that apps directory is not found
when -DNUTTX_APPS_DIR is specified.
This commit is contained in:
SPRESENSE 2024-06-25 11:56:32 +09:00 committed by Xiang Xiao
parent 97726d9747
commit 8c816dee14

View file

@ -153,7 +153,7 @@ endif()
include(nuttx_kconfig)
nuttx_export_kconfig_by_value(${NUTTX_DEFCONFIG} "CONFIG_APPS_DIR")
if(NOT CONFIG_APPS_DIR)
if((NOT NUTTX_APPS_DIR) AND (NOT CONFIG_APPS_DIR))
if(EXISTS "${NUTTX_DIR}/../apps")
set(NUTTX_APPS_DIR "${NUTTX_DIR}/../apps")
elseif(EXISTS "${NUTTX_DIR}/../nuttx-apps")