summaryrefslogtreecommitdiffstats
path: root/meta/classes
diff options
context:
space:
mode:
authorRoss Burton <ross.burton@intel.com>2014-06-24 21:21:32 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2014-06-25 13:51:46 +0100
commitf3d2e32a144ae10705db8cfdb945661f04222eae (patch)
treef5e610cf0e407b52d379f95f67463f4a903e2e06 /meta/classes
parent540b7a196a00c4dc1bf8f7c87e68e80ab310756e (diff)
downloadpoky-f3d2e32a144ae10705db8cfdb945661f04222eae.tar.gz
cmake.bbclass: restore OECMAKE_SOURCEPATH
Some packages put their CMakeLists.txt file in a subdirectory, so assuming that it is in ${S} won't work. Restore OECMAKE_SOURCEPATH (defaulting to ${S}) so that the location of CMakeLists.txt can be set if required. Based on a patch by Miroslav Keš <miroslav.kes@gmail.com> (From OE-Core rev: 2c23d7ab913a636aa0ab6a6e899cf6211d1e2714) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes')
-rw-r--r--meta/classes/cmake.bbclass9
1 files changed, 6 insertions, 3 deletions
diff --git a/meta/classes/cmake.bbclass b/meta/classes/cmake.bbclass
index c9c15f3076..ab2adec782 100644
--- a/meta/classes/cmake.bbclass
+++ b/meta/classes/cmake.bbclass
@@ -1,3 +1,6 @@
1# Path to the CMake file to process.
2OECMAKE_SOURCEPATH ?= "${S}"
3
1DEPENDS_prepend = "cmake-native " 4DEPENDS_prepend = "cmake-native "
2B = "${WORKDIR}/build" 5B = "${WORKDIR}/build"
3 6
@@ -65,8 +68,8 @@ EOF
65addtask generate_toolchain_file after do_patch before do_configure 68addtask generate_toolchain_file after do_patch before do_configure
66 69
67cmake_do_configure() { 70cmake_do_configure() {
68 if [ "${OECMAKE_BUILDPATH}" -o "${OECMAKE_SOURCEPATH}" ]; then 71 if [ "${OECMAKE_BUILDPATH}" ]; then
69 bbnote "cmake.bbclass no longer uses OECMAKE_SOURCEPATH and OECMAKE_BUILDPATH. The default behaviour is now out-of-tree builds with B=WORKDIR/build." 72 bbnote "cmake.bbclass no longer uses OECMAKE_BUILDPATH. The default behaviour is now out-of-tree builds with B=WORKDIR/build."
70 fi 73 fi
71 74
72 if [ "${S}" != "${B}" ]; then 75 if [ "${S}" != "${B}" ]; then
@@ -84,7 +87,7 @@ cmake_do_configure() {
84 87
85 cmake \ 88 cmake \
86 ${OECMAKE_SITEFILE} \ 89 ${OECMAKE_SITEFILE} \
87 ${S} \ 90 ${OECMAKE_SOURCEPATH} \
88 -DCMAKE_INSTALL_PREFIX:PATH=${prefix} \ 91 -DCMAKE_INSTALL_PREFIX:PATH=${prefix} \
89 -DCMAKE_INSTALL_BINDIR:PATH=${bindir} \ 92 -DCMAKE_INSTALL_BINDIR:PATH=${bindir} \
90 -DCMAKE_INSTALL_SBINDIR:PATH=${sbindir} \ 93 -DCMAKE_INSTALL_SBINDIR:PATH=${sbindir} \