diff options
-rw-r--r-- | meta/recipes-devtools/cmake/cmake/OEToolchainConfig.cmake | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/meta/recipes-devtools/cmake/cmake/OEToolchainConfig.cmake b/meta/recipes-devtools/cmake/cmake/OEToolchainConfig.cmake index 0ce6573818..6518408c70 100644 --- a/meta/recipes-devtools/cmake/cmake/OEToolchainConfig.cmake +++ b/meta/recipes-devtools/cmake/cmake/OEToolchainConfig.cmake | |||
@@ -10,8 +10,10 @@ set( CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY ) | |||
10 | set( CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY ) | 10 | set( CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY ) |
11 | set( CMAKE_FIND_ROOT_PATH_MODE_PACKAGE ONLY ) | 11 | set( CMAKE_FIND_ROOT_PATH_MODE_PACKAGE ONLY ) |
12 | 12 | ||
13 | string(REGEX MATCH "sysroots/([a-zA-Z0-9]+)" CMAKE_SYSTEM_PROCESSOR $ENV{SDKTARGETSYSROOT}) | 13 | # Set CMAKE_SYSTEM_PROCESSOR from the sysroot name (assuming processor-distro-os). |
14 | string(REGEX REPLACE "sysroots/" "" CMAKE_SYSTEM_PROCESSOR ${CMAKE_SYSTEM_PROCESSOR}) | 14 | if ($ENV{SDKTARGETSYSROOT} MATCHES "/sysroots/([a-zA-Z0-9_-]+)-.+-.+") |
15 | set(CMAKE_SYSTEM_PROCESSOR ${CMAKE_MATCH_1}) | ||
16 | endif() | ||
15 | 17 | ||
16 | # Include the toolchain configuration subscripts | 18 | # Include the toolchain configuration subscripts |
17 | file( GLOB toolchain_config_files "${CMAKE_TOOLCHAIN_FILE}.d/*.cmake" ) | 19 | file( GLOB toolchain_config_files "${CMAKE_TOOLCHAIN_FILE}.d/*.cmake" ) |