Merge branch 'org.openembedded.dev' of git://git.openembedded.org/openembedded into...
[vuplus_openembedded] / classes / cmake.bbclass
1 DEPENDS += " cmake-native "
2
3 # We want the staging and installing functions from autotools
4 inherit autotools
5
6 # Use in-tree builds by default but allow this to be changed
7 # since some packages do not support them (e.g. llvm 2.5).
8 OECMAKE_SOURCEPATH ?= "."
9
10 # If declaring this, make sure you also set EXTRA_OEMAKE to
11 # "-C ${OECMAKE_BUILDPATH}". So it will run the right makefiles.
12 OECMAKE_BUILDPATH ?= ""
13
14 cmake_do_configure() {
15   if [ ${OECMAKE_BUILDPATH} ]
16   then
17     mkdir ${OECMAKE_BUILDPATH}
18     cd ${OECMAKE_BUILDPATH}
19   fi
20
21   cmake ${OECMAKE_SOURCEPATH} \
22     -DCMAKE_INSTALL_PREFIX:PATH=${prefix} \
23     -DCMAKE_FIND_ROOT_PATH=${STAGING_DIR_HOST} \
24     ${EXTRA_OECMAKE} \
25     -Wno-dev
26 }
27
28 EXPORT_FUNCTIONS do_configure