cmake: fix the wrong arg name when calling check_zephyr_package()

check_zephyr_package() accepts an one-value arg named "WORKSPACE_DIR".
But it is called with "CURRENT_WORKSPACE_DIR".

Signed-off-by: Ming Shao <smrtos@163.com>
This commit is contained in:
Ming Shao 2022-12-09 22:29:19 +08:00 committed by Carles Cufí
parent 95697b5fcf
commit 3c9aa927ee
2 changed files with 2 additions and 2 deletions

View file

@ -137,7 +137,7 @@ if(NOT IS_INCLUDED)
# common path with the current sample.
# and if so, we will return here, and let CMake call into the other registered package for real
# version checking.
check_zephyr_package(CURRENT_WORKSPACE_DIR ${CURRENT_WORKSPACE_DIR})
check_zephyr_package(WORKSPACE_DIR ${CURRENT_WORKSPACE_DIR})
if(ZEPHYR_PREFER)
check_zephyr_package(SEARCH_PARENTS CANDIDATES_PREFERENCE_LIST ${ZEPHYR_PREFER})

View file

@ -115,7 +115,7 @@ if(NOT IS_INCLUDED)
# Project is a Zephyr workspace app.
# This means this Zephyr is likely the correct one, but there could be an alternative installed along-side
# Thus, check if there is an even better candidate.
check_zephyr_package(CURRENT_WORKSPACE_DIR ${CURRENT_WORKSPACE_DIR} VERSION_CHECK)
check_zephyr_package(WORKSPACE_DIR ${CURRENT_WORKSPACE_DIR} VERSION_CHECK)
# We are the best candidate, so let's check our own version.
check_zephyr_version()