From da91462013061324ad20b41ac0b0327f00e36826 Mon Sep 17 00:00:00 2001 From: Felix Fietkau Date: Mon, 16 Mar 2015 07:51:45 +0000 Subject: [PATCH] cmake: include external toolchain directory in CMAKE_FIND_ROOT_PATH (fixes #19074) Signed-off-by: Felix Fietkau SVN-Revision: 44825 --- include/cmake.mk | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/include/cmake.mk b/include/cmake.mk index 862a6a9b3f..c1fd7d9e51 100644 --- a/include/cmake.mk +++ b/include/cmake.mk @@ -31,6 +31,8 @@ CMAKE_AR:=$(call cmake_tool,$(TARGET_AR)) CMAKE_NM:=$(call cmake_tool,$(TARGET_NM)) CMAKE_RANLIB:=$(call cmake_tool,$(TARGET_RANLIB)) +CMAKE_FIND_ROOT_PATH:=$(STAGING_DIR);$(TOOLCHAIN_DIR)$(if $(CONFIG_EXTERNAL_TOOLCHAIN),;$(CONFIG_TOOLCHAIN_ROOT)) + define Build/Configure/Default (cd $(PKG_BUILD_DIR); \ CFLAGS="$(TARGET_CFLAGS) $(EXTRA_CFLAGS)" \ @@ -53,7 +55,7 @@ define Build/Configure/Default -DCMAKE_AR="$(CMAKE_AR)" \ -DCMAKE_NM="$(CMAKE_NM)" \ -DCMAKE_RANLIB="$(CMAKE_RANLIB)" \ - -DCMAKE_FIND_ROOT_PATH="$(STAGING_DIR);$(TOOLCHAIN_DIR)" \ + -DCMAKE_FIND_ROOT_PATH="$(CMAKE_FIND_ROOT_PATH)" \ -DCMAKE_FIND_ROOT_PATH_MODE_PROGRAM=BOTH \ -DCMAKE_FIND_ROOT_PATH_MODE_LIBRARY=ONLY \ -DCMAKE_FIND_ROOT_PATH_MODE_INCLUDE=ONLY \ -- 2.25.1