diff options
Diffstat (limited to 'classes')
-rw-r--r-- | classes/cmake.bbclass | 22 | ||||
-rw-r--r-- | classes/package_rpm.bbclass | 2 |
2 files changed, 21 insertions, 3 deletions
diff --git a/classes/cmake.bbclass b/classes/cmake.bbclass index faa4768d90..b5b7b8655b 100644 --- a/classes/cmake.bbclass +++ b/classes/cmake.bbclass @@ -3,10 +3,26 @@ DEPENDS += " cmake-native " # We want the staging and installing functions from autotools inherit autotools +# Use in-tree builds by default but allow this to be changed +# since some packages do not support them (e.g. llvm 2.5). +OECMAKE_SOURCEPATH ?= "." + +# If declaring this, make sure you also set EXTRA_OEMAKE to +# "-C ${OECMAKE_BUILDPATH}". So it will run the right makefiles. +OECMAKE_BUILDPATH ?= "" + cmake_do_configure() { - cmake . -DCMAKE_INSTALL_PREFIX:PATH=${prefix} -Wno-dev \ - -DCMAKE_FIND_ROOT_PATH=${STAGING_DIR_HOST} \ - ${EXTRA_OECMAKE} + if [ ${OECMAKE_BUILDPATH} ] + then + mkdir ${OECMAKE_BUILDPATH} + cd ${OECMAKE_BUILDPATH} + fi + + cmake ${OECMAKE_SOURCEPATH} \ + -DCMAKE_INSTALL_PREFIX:PATH=${prefix} \ + -DCMAKE_FIND_ROOT_PATH=${STAGING_DIR_HOST} \ + ${EXTRA_OECMAKE} \ + -Wno-dev } EXPORT_FUNCTIONS do_configure diff --git a/classes/package_rpm.bbclass b/classes/package_rpm.bbclass index 7f55e384fe..71fa76010f 100644 --- a/classes/package_rpm.bbclass +++ b/classes/package_rpm.bbclass @@ -121,6 +121,8 @@ python write_specfile() { fd.write("%files\n") for file in files: + if file[0] != '/': + fd.write('/') fd.write("%s\n" % file) fd.close() |