From 47e6b940bb368a2a4df5f3e8ac5b2f6f219d59a6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20M=C3=BCller?= Date: Sun, 6 Sep 2015 00:18:31 +0200 Subject: [PATCH] cmake-auto-align-paths.bbclass: initial add MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The initial implementation aligns paths in *.cmake. These were detected by the rework of cmake-extra-sanity.bbclass Signed-off-by: Andreas Müller --- classes/cmake-auto-align-paths.bbclass | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 classes/cmake-auto-align-paths.bbclass diff --git a/classes/cmake-auto-align-paths.bbclass b/classes/cmake-auto-align-paths.bbclass new file mode 100644 index 00000000..86a969d6 --- /dev/null +++ b/classes/cmake-auto-align-paths.bbclass @@ -0,0 +1,19 @@ +# do_configure_append_class-cross does not work so hack +do_configure_prepend_class-native() { + no_cmake_auto_align_paths=true +} + +do_configure_prepend_class-nativesdk() { + no_cmake_auto_align_paths=true +} + +do_configure_append() { + # remove absolute paths from exported cmake files + for f in `find ${B}/CMakeFiles/Export -name '*.cmake'` ; do + sed -i 's:${STAGING_INCDIR_NATIVE}:${includedir}:g' "$f" + sed -i 's:${STAGING_INCDIR}:${includedir}:g' "$f" + sed -i 's:${STAGING_LIBDIR_NATIVE}:${libdir}:g' "$f" + sed -i 's:${STAGING_LIBDIR}:${libdir}:g' "$f" + done +} +