cmake-native-dummy.bbclass: initial add
Some CMake projects make references on executables they create. These references are absolut and therefore CMake complains when using in depending packages. To have a valid reference we create a dummy binary in native sysroot (cross sysroot cannot not contain executables by oe design). Note this will not work for references really used - we do that only for CMake's over enthusiatic behaviour to check all files referenced regardless these files are used or not. Signed-off-by: Andreas Müller <schnitzeltony@googlemail.com>
This commit is contained in:
22
classes/cmake-native-dummy.bbclass
Normal file
22
classes/cmake-native-dummy.bbclass
Normal file
@@ -0,0 +1,22 @@
|
||||
#
|
||||
# Class to create dummy native binaries so cmake can reference them
|
||||
# Inspired by binconfig-disabled.bbclass
|
||||
#
|
||||
|
||||
inherit native
|
||||
|
||||
# The list of scripts which should be disabled.
|
||||
CMAKE_DUMMY_BINARIES ?= ""
|
||||
|
||||
do_install () {
|
||||
install -d ${D}${bindir}
|
||||
for x in ${CMAKE_DUMMY_BINARIES}; do
|
||||
echo "#!/bin/sh" > ${D}${bindir}/$x
|
||||
# Make the disabled script emit invalid parameters for those configure
|
||||
# scripts which call it without checking the return code.
|
||||
echo "echo '--should-not-have-used-$x'" >> ${D}${bindir}/$x
|
||||
echo "exit 1" >> ${D}${bindir}/$x
|
||||
chmod 755 ${D}${bindir}/$x
|
||||
done
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user