diff options
author | Koen Kooi <koen@openembedded.org> | 2010-03-28 20:43:19 +0200 |
---|---|---|
committer | Koen Kooi <koen@openembedded.org> | 2010-03-28 20:43:19 +0200 |
commit | ba23d4de95a33db5feccd19359bd9b907c2d90bd (patch) | |
tree | d7f53cdaedf53041f63937c79fab31130d1e2218 | |
parent | 4640c864144af9dacb0fc86e90d3f21abc77a4f1 (diff) |
cmake bbclass: add rudimentary support for cmake site files
-rw-r--r-- | classes/cmake.bbclass | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/classes/cmake.bbclass b/classes/cmake.bbclass index 255deba62e..bfa8acde69 100644 --- a/classes/cmake.bbclass +++ b/classes/cmake.bbclass @@ -54,7 +54,16 @@ cmake_do_configure() { cd ${OECMAKE_BUILDPATH} fi - cmake ${OECMAKE_SOURCEPATH} \ + # Just like autotools cmake can use a site file to cache result that need generated binaries to run + if [ -e ${WORKDIR}/site-file.cmake ] ; then + OECMAKE_SITEFILE=" -C ${WORKDIR}/site-file.cmake" + else + OECMAKE_SITEFILE="" + fi + + cmake \ + ${OECMAKE_SITEFILE} \ + ${OECMAKE_SOURCEPATH} \ -DCMAKE_INSTALL_PREFIX:PATH=${prefix} \ -DCMAKE_INSTALL_SO_NO_EXE=0 \ -DCMAKE_TOOLCHAIN_FILE=${WORKDIR}/toolchain.cmake \ |