From: Samuli Piippo Date: Tue, 16 Jun 2020 14:07:25 +0000 (+0300) Subject: cmake: allow chainloading of the toolchain file X-Git-Tag: lucaceresoli/bug-15201-perf-libtraceevent-missing~10758 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2d7597ee23b7c2adf40d77e8c35114a4d63aa854;p=thirdparty%2Fopenembedded%2Fopenembedded-core-contrib.git cmake: allow chainloading of the toolchain file Use path from CMAKE_CURRENT_LIST_FILE to load the cmake subscripts. This allows the toolchain file to be chainloaded from another toolchain file. Signed-off-by: Samuli Piippo Signed-off-by: Richard Purdie --- diff --git a/meta/recipes-devtools/cmake/cmake/OEToolchainConfig.cmake b/meta/recipes-devtools/cmake/cmake/OEToolchainConfig.cmake index 398069eef28..8f6f3a272db 100644 --- a/meta/recipes-devtools/cmake/cmake/OEToolchainConfig.cmake +++ b/meta/recipes-devtools/cmake/cmake/OEToolchainConfig.cmake @@ -19,7 +19,7 @@ if ($ENV{SDKTARGETSYSROOT} MATCHES "/sysroots/([a-zA-Z0-9_-]+)-.+-.+") endif() # Include the toolchain configuration subscripts -file( GLOB toolchain_config_files "${CMAKE_TOOLCHAIN_FILE}.d/*.cmake" ) +file( GLOB toolchain_config_files "${CMAKE_CURRENT_LIST_FILE}.d/*.cmake" ) foreach(config ${toolchain_config_files}) include(${config}) endforeach()