[OE-core] [[PATCH V2]] cmake: install path variables should be relative to the prefix path

Jack Mitchell ml at embed.me.uk
Mon Aug 22 14:26:25 UTC 2016


From: Jack Mitchell <jack at embed.me.uk>

---
 meta/classes/cmake.bbclass | 18 +++++++++---------
 1 file changed, 9 insertions(+), 9 deletions(-)

diff --git a/meta/classes/cmake.bbclass b/meta/classes/cmake.bbclass
index b18152a..bc194db 100644
--- a/meta/classes/cmake.bbclass
+++ b/meta/classes/cmake.bbclass
@@ -108,15 +108,15 @@ cmake_do_configure() {
 	  ${OECMAKE_SITEFILE} \
 	  ${OECMAKE_SOURCEPATH} \
 	  -DCMAKE_INSTALL_PREFIX:PATH=${prefix} \
-	  -DCMAKE_INSTALL_BINDIR:PATH=${bindir} \
-	  -DCMAKE_INSTALL_SBINDIR:PATH=${sbindir} \
-	  -DCMAKE_INSTALL_LIBEXECDIR:PATH=${libexecdir} \
-	  -DCMAKE_INSTALL_SYSCONFDIR:PATH=${sysconfdir} \
-	  -DCMAKE_INSTALL_SHAREDSTATEDIR:PATH=${sharedstatedir} \
-	  -DCMAKE_INSTALL_LOCALSTATEDIR:PATH=${localstatedir} \
-	  -DCMAKE_INSTALL_LIBDIR:PATH=${libdir} \
-	  -DCMAKE_INSTALL_INCLUDEDIR:PATH=${includedir} \
-	  -DCMAKE_INSTALL_DATAROOTDIR:PATH=${datadir} \
+	  -DCMAKE_INSTALL_BINDIR:PATH=${@'${bindir}'.replace('${prefix}/', '')} \
+	  -DCMAKE_INSTALL_SBINDIR:PATH=${@'${sbindir}'.replace('${prefix}/', '')} \
+	  -DCMAKE_INSTALL_LIBEXECDIR:PATH=${@'${libexecdir}'.replace('${prefix}/', '')} \
+	  -DCMAKE_INSTALL_SYSCONFDIR:PATH=${@'${sysconfdir}'.replace('${prefix}/', '')} \
+	  -DCMAKE_INSTALL_SHAREDSTATEDIR:PATH=${@'${sharedstatedir}'.replace('${prefix}/', '')} \
+	  -DCMAKE_INSTALL_LOCALSTATEDIR:PATH=${@'${localstatedir}'.replace('${prefix}/', '')} \
+	  -DCMAKE_INSTALL_LIBDIR:PATH=${@'${libdir}'.replace('${prefix}/', '')} \
+	  -DCMAKE_INSTALL_INCLUDEDIR:PATH=${@'${includedir}'.replace('${prefix}/', '')} \
+	  -DCMAKE_INSTALL_DATAROOTDIR:PATH=${@'${datadir}'.replace('${prefix}/', '')} \
 	  -DCMAKE_INSTALL_SO_NO_EXE=0 \
 	  -DCMAKE_TOOLCHAIN_FILE=${WORKDIR}/toolchain.cmake \
 	  -DCMAKE_VERBOSE_MAKEFILE=1 \
-- 
2.9.3




More information about the Openembedded-core mailing list