summaryrefslogtreecommitdiffstats
path: root/meta/classes/cmake.bbclass
diff options
context:
space:
mode:
authorKoen Kooi <koen.kooi@linaro.org>2015-07-01 08:57:25 +0200
committerRichard Purdie <richard.purdie@linuxfoundation.org>2015-07-02 23:08:40 +0100
commitd4516271325bb52acee97c0bea1101261e974b83 (patch)
tree9cfac7b7e493ca7ef3d9f311542c125fbe8a60e6 /meta/classes/cmake.bbclass
parent6b76ee08ae0d9c3562e714121fd226d2c92a4088 (diff)
downloadpoky-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/cmake.bbclass')
-rw-r--r--meta/classes/cmake.bbclass5
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 ?= ""
27OECMAKE_PERLNATIVE_DIR ??= "" 27OECMAKE_PERLNATIVE_DIR ??= ""
28OECMAKE_EXTRA_ROOT_PATH ?= "" 28OECMAKE_EXTRA_ROOT_PATH ?= ""
29 29
30OECMAKE_FIND_ROOT_PATH_MODE_PROGRAM = "ONLY"
31OECMAKE_FIND_ROOT_PATH_MODE_PROGRAM_class-native = "BOTH"
32
30cmake_do_generate_toolchain_file() { 33cmake_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
51set( CMAKE_FIND_ROOT_PATH ${STAGING_DIR_HOST} ${STAGING_DIR_NATIVE} ${CROSS_DIR} ${OECMAKE_PERLNATIVE_DIR} ${OECMAKE_EXTRA_ROOT_PATH} ${EXTERNAL_TOOLCHAIN}) 54set( CMAKE_FIND_ROOT_PATH ${STAGING_DIR_HOST} ${STAGING_DIR_NATIVE} ${CROSS_DIR} ${OECMAKE_PERLNATIVE_DIR} ${OECMAKE_EXTRA_ROOT_PATH} ${EXTERNAL_TOOLCHAIN})
52set( CMAKE_FIND_ROOT_PATH_MODE_PACKAGE ONLY ) 55set( CMAKE_FIND_ROOT_PATH_MODE_PACKAGE ONLY )
53set( CMAKE_FIND_ROOT_PATH_MODE_PROGRAM ONLY ) 56set( CMAKE_FIND_ROOT_PATH_MODE_PROGRAM ${OECMAKE_FIND_ROOT_PATH_MODE_PROGRAM} )
54set( CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY ) 57set( CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY )
55set( CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY ) 58set( CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY )
56 59