cmake-auto-align-paths.bbclass: initial add
The initial implementation aligns paths in *.cmake. These were detected by the rework of cmake-extra-sanity.bbclass Signed-off-by: Andreas Müller <schnitzeltony@googlemail.com>
This commit is contained in:
19
classes/cmake-auto-align-paths.bbclass
Normal file
19
classes/cmake-auto-align-paths.bbclass
Normal file
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user