summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrew Gabbasov <andrew_gabbasov@mentor.com>2011-09-28 16:10:12 +0400
committerRichard Purdie <richard.purdie@linuxfoundation.org>2011-09-28 21:41:44 +0100
commit2d59e4d36e508cef04674e763159f718abb48878 (patch)
treecb99abe0feffa585d510a63c61f584b18131048f
parent504ebf0d7024a17d85cd103f5fe02bce0346bbae (diff)
downloadpoky-2d59e4d36e508cef04674e763159f718abb48878.tar.gz
cmake.bbclass: adding extendable extra variable to root path
Introducing a hook variable for various .conf files to add extra path elements to cmake. For example, it can be used in external toolchain conf file to add ${TOOLCHAIN_PATH} to cmake root path search. (From OE-Core rev: 23be60dad6a705f151520e3eda2da5e02230f5fd) Signed-off-by: Andrew Gabbasov <andrew_gabbasov@mentor.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--meta/classes/cmake.bbclass3
1 files changed, 2 insertions, 1 deletions
diff --git a/meta/classes/cmake.bbclass b/meta/classes/cmake.bbclass
index ab23bedb38..432427e913 100644
--- a/meta/classes/cmake.bbclass
+++ b/meta/classes/cmake.bbclass
@@ -26,6 +26,7 @@ OECMAKE_CXX_FLAGS_RELEASE ?= "${SELECTED_OPTIMIZATION} ${CXXFLAGS} -DNDEBUG"
26 26
27OECMAKE_RPATH ?= "" 27OECMAKE_RPATH ?= ""
28OECMAKE_PERLNATIVE_DIR ??= "" 28OECMAKE_PERLNATIVE_DIR ??= ""
29OECMAKE_EXTRA_ROOT_PATH ?= ""
29 30
30cmake_do_generate_toolchain_file() { 31cmake_do_generate_toolchain_file() {
31 cat > ${WORKDIR}/toolchain.cmake <<EOF 32 cat > ${WORKDIR}/toolchain.cmake <<EOF
@@ -42,7 +43,7 @@ set( CMAKE_CXX_FLAGS_RELEASE "${OECMAKE_CXX_FLAGS_RELEASE}" CACHE STRING "CXXFLA
42 43
43# only search in the paths provided so cmake doesnt pick 44# only search in the paths provided so cmake doesnt pick
44# up libraries and tools from the native build machine 45# up libraries and tools from the native build machine
45set( CMAKE_FIND_ROOT_PATH ${STAGING_DIR_HOST} ${STAGING_DIR_NATIVE} ${CROSS_DIR} ${OECMAKE_PERLNATIVE_DIR}) 46set( CMAKE_FIND_ROOT_PATH ${STAGING_DIR_HOST} ${STAGING_DIR_NATIVE} ${CROSS_DIR} ${OECMAKE_PERLNATIVE_DIR} ${OECMAKE_EXTRA_ROOT_PATH} )
46set( CMAKE_FIND_ROOT_PATH_MODE_PROGRAM ONLY ) 47set( CMAKE_FIND_ROOT_PATH_MODE_PROGRAM ONLY )
47set( CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY ) 48set( CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY )
48set( CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY ) 49set( CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY )