Skip to content

Commit 017a180

Browse files
keith-packardtpambor
authored andcommitted
cmake: Support both toolchain directory layouts
Until zephyrproject-rtos/sdk-ng#936 is merged, SDK 0.18 is incompatible with previous versions as the paths to find the cmake bits is different. Deal with that by checking for files in the wrong place as well as the right one. Signed-off-by: Keith Packard <[email protected]>
1 parent a27d82e commit 017a180

File tree

2 files changed

+10
-2
lines changed

2 files changed

+10
-2
lines changed

cmake/toolchain/zephyr/generic.cmake

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
# SPDX-License-Identifier: Apache-2.0
22

3-
include(${ZEPHYR_SDK_INSTALL_DIR}/cmake/zephyr/generic.cmake)
3+
if(EXISTS ${ZEPHYR_SDK_INSTALL_DIR}/cmake/zephyr/gnu/generic.cmake)
4+
include(${ZEPHYR_SDK_INSTALL_DIR}/cmake/zephyr/gnu/generic.cmake)
5+
else()
6+
include(${ZEPHYR_SDK_INSTALL_DIR}/cmake/zephyr/generic.cmake)
7+
endif()
48

59
set(TOOLCHAIN_KCONFIG_DIR ${ZEPHYR_SDK_INSTALL_DIR}/cmake/zephyr)
610

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
11
# SPDX-License-Identifier: Apache-2.0
22

3-
include(${ZEPHYR_SDK_INSTALL_DIR}/cmake/zephyr/target.cmake)
3+
if(EXISTS ${ZEPHYR_SDK_INSTALL_DIR}/cmake/zephyr/gnu/target.cmake)
4+
include(${ZEPHYR_SDK_INSTALL_DIR}/cmake/zephyr/gnu/target.cmake)
5+
else()
6+
include(${ZEPHYR_SDK_INSTALL_DIR}/cmake/zephyr/target.cmake)
7+
endif()

0 commit comments

Comments
 (0)