cmake: use zephyr base in relative path
To be more robust in the placement of MCUBoot directory,
use the ZEPHYR_BASE env variable to locate
nrfxlib directory.
Signed-off-by: Håkon Øye Amundsen <haakon.amundsen@nordicsemi.no>
diff --git a/boot/zephyr/CMakeLists.txt b/boot/zephyr/CMakeLists.txt
index 5f21aea..7906a24 100644
--- a/boot/zephyr/CMakeLists.txt
+++ b/boot/zephyr/CMakeLists.txt
@@ -60,7 +60,7 @@
set(NRF_DIR "${MCUBOOT_DIR}/ext/nrf")
if(CONFIG_BOOT_USE_NRF_CC310_BL)
-set(NRFXLIB_DIR ${MCUBOOT_DIR}/../nrfxlib)
+set(NRFXLIB_DIR $ENV{ZEPHYR_BASE}/../nrfxlib)
assert_exists(NRFXLIB_DIR)
# Don't include this if we are using west
add_subdirectory(${NRFXLIB_DIR} ${PROJECT_BINARY_DIR}/nrfxlib)