]> code.ossystems Code Review - openembedded-core.git/commitdiff
cmake.bbclass, perlnative.bbclass: arrange for cmake to find perl-native
authorPhil Blundell <philb@gnu.org>
Mon, 15 Aug 2011 16:16:31 +0000 (17:16 +0100)
committerSaul Wold <sgw@linux.intel.com>
Wed, 17 Aug 2011 05:53:50 +0000 (22:53 -0700)
When CMake is looking for perl, it only searches in the specific directories
that it's told about and ignores ${PATH}.  If perlnative is in use, ensure
that the appropriate installation path is added to the list of places that
cmake will look for perl, otherwise it won't ever be found.

Signed-off-by: Phil Blundell <philb@gnu.org>
meta/classes/cmake.bbclass
meta/classes/perlnative.bbclass

index 89a154f73c52c8c8df42bb2f28ce7ea3b1d52d8e..ab23bedb380e2354734728cc7598300414c9657b 100644 (file)
@@ -25,6 +25,7 @@ OECMAKE_C_FLAGS_RELEASE ?= "${SELECTED_OPTIMIZATION} ${CPPFLAGS} -DNDEBUG"
 OECMAKE_CXX_FLAGS_RELEASE ?= "${SELECTED_OPTIMIZATION} ${CXXFLAGS} -DNDEBUG"
 
 OECMAKE_RPATH ?= ""
+OECMAKE_PERLNATIVE_DIR ??= ""
 
 cmake_do_generate_toolchain_file() {
        cat > ${WORKDIR}/toolchain.cmake <<EOF
@@ -41,7 +42,7 @@ set( CMAKE_CXX_FLAGS_RELEASE "${OECMAKE_CXX_FLAGS_RELEASE}" CACHE STRING "CXXFLA
 
 # only search in the paths provided so cmake doesnt pick
 # up libraries and tools from the native build machine
-set( CMAKE_FIND_ROOT_PATH ${STAGING_DIR_HOST} ${STAGING_DIR_NATIVE} ${CROSS_DIR} )
+set( CMAKE_FIND_ROOT_PATH ${STAGING_DIR_HOST} ${STAGING_DIR_NATIVE} ${CROSS_DIR} ${OECMAKE_PERLNATIVE_DIR})
 set( CMAKE_FIND_ROOT_PATH_MODE_PROGRAM ONLY )
 set( CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY )
 set( CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY )
index 522344d9af019c273facc914412e383b1a5b5f9b..2211b72135bfe661fc233ff156bc1e43cf5ca9c5 100644 (file)
@@ -1,2 +1,3 @@
 PATH_prepend = "${STAGING_BINDIR_NATIVE}/perl-native:"
 DEPENDS += "perl-native"
+OECMAKE_PERLNATIVE_DIR = "${STAGING_BINDIR_NATIVE}/perl-native"