libsdl-x11: use newer sdl.m4 macro from svn
[openembedded.git] / classes / cmake.bbclass
blobf21c4d65459eeb5b36cca34894419949fb472c28
1 DEPENDS += " cmake-native "
3 # We want the staging and installing functions from autotools
4 inherit autotools_stage
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 ?= "."
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 ?= ""
14 cmake_do_configure() {
15   if [ ${OECMAKE_BUILDPATH} ]
16   then
17     mkdir ${OECMAKE_BUILDPATH}
18     cd ${OECMAKE_BUILDPATH}
19   fi
21   cmake ${OECMAKE_SOURCEPATH} \
22     -DCMAKE_INSTALL_PREFIX:PATH=${prefix} \
23     -DCMAKE_FIND_ROOT_PATH:PATH=${STAGING_DIR_HOST} \
24     ${EXTRA_OECMAKE} \
25     -Wno-dev
28 cmake_do_compile()  {
29   if [ ${OECMAKE_BUILDPATH} ]
30   then
31      cd ${OECMAKE_BUILDPATH}
32   fi
33   
34   base_do_compile
37 cmake_do_install() {
38   if [ ${OECMAKE_BUILDPATH} ];
39   then
40      cd ${OECMAKE_BUILDPATH}
41   fi
42   
43   autotools_do_install
46 EXPORT_FUNCTIONS do_configure do_compile do_install