diff options
author | Koen Kooi <koen.kooi@linaro.org> | 2015-07-01 08:57:25 +0200 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2015-07-02 23:08:40 +0100 |
commit | d4516271325bb52acee97c0bea1101261e974b83 (patch) | |
tree | 9cfac7b7e493ca7ef3d9f311542c125fbe8a60e6 /meta/classes | |
parent | 6b76ee08ae0d9c3562e714121fd226d2c92a4088 (diff) | |
download | poky-d4516271325bb52acee97c0bea1101261e974b83.tar.gz |
cmake bbclass: fix support for native builds
For native builds of recipes (e.g. mariadb-native) cmake *must* look outside of its sysroot to find the compiler, so instruct it to do so.
(From OE-Core rev: 907828acebcf07d7a9367432432d04e0dab283d3)
Signed-off-by: Koen Kooi <koen.kooi@linaro.org>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes')
-rw-r--r-- | meta/classes/cmake.bbclass | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/meta/classes/cmake.bbclass b/meta/classes/cmake.bbclass index b0a3972d47..c1742461ab 100644 --- a/meta/classes/cmake.bbclass +++ b/meta/classes/cmake.bbclass | |||
@@ -27,6 +27,9 @@ OECMAKE_RPATH ?= "" | |||
27 | OECMAKE_PERLNATIVE_DIR ??= "" | 27 | OECMAKE_PERLNATIVE_DIR ??= "" |
28 | OECMAKE_EXTRA_ROOT_PATH ?= "" | 28 | OECMAKE_EXTRA_ROOT_PATH ?= "" |
29 | 29 | ||
30 | OECMAKE_FIND_ROOT_PATH_MODE_PROGRAM = "ONLY" | ||
31 | OECMAKE_FIND_ROOT_PATH_MODE_PROGRAM_class-native = "BOTH" | ||
32 | |||
30 | cmake_do_generate_toolchain_file() { | 33 | cmake_do_generate_toolchain_file() { |
31 | cat > ${WORKDIR}/toolchain.cmake <<EOF | 34 | cat > ${WORKDIR}/toolchain.cmake <<EOF |
32 | # CMake system name must be something like "Linux". | 35 | # CMake system name must be something like "Linux". |
@@ -50,7 +53,7 @@ set( CMAKE_CXX_LINK_FLAGS "${OECMAKE_CXX_LINK_FLAGS}" CACHE STRING "LDFLAGS" ) | |||
50 | # up libraries and tools from the native build machine | 53 | # up libraries and tools from the native build machine |
51 | set( CMAKE_FIND_ROOT_PATH ${STAGING_DIR_HOST} ${STAGING_DIR_NATIVE} ${CROSS_DIR} ${OECMAKE_PERLNATIVE_DIR} ${OECMAKE_EXTRA_ROOT_PATH} ${EXTERNAL_TOOLCHAIN}) | 54 | set( CMAKE_FIND_ROOT_PATH ${STAGING_DIR_HOST} ${STAGING_DIR_NATIVE} ${CROSS_DIR} ${OECMAKE_PERLNATIVE_DIR} ${OECMAKE_EXTRA_ROOT_PATH} ${EXTERNAL_TOOLCHAIN}) |
52 | set( CMAKE_FIND_ROOT_PATH_MODE_PACKAGE ONLY ) | 55 | set( CMAKE_FIND_ROOT_PATH_MODE_PACKAGE ONLY ) |
53 | set( CMAKE_FIND_ROOT_PATH_MODE_PROGRAM ONLY ) | 56 | set( CMAKE_FIND_ROOT_PATH_MODE_PROGRAM ${OECMAKE_FIND_ROOT_PATH_MODE_PROGRAM} ) |
54 | set( CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY ) | 57 | set( CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY ) |
55 | set( CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY ) | 58 | set( CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY ) |
56 | 59 | ||