[OE-core] cmake.bbclass questions

Matt Madison matt at madison.systems
Tue Feb 10 22:53:12 UTC 2015


I just finished some recipes for some CMake-built packages (from the
Kurento project).  I managed to get everything building, but I had to
modify how cmake.bbclass does things, and I'm wondering if there's a better
way to solve some of these.

Each of the packages generates a pkg-config file and a CMake module that
are then used by other packages (later in the build) to locate their
dependencies.  I see that cmake.bbclass hard-codes the CMAKE_MODULE_PATH
setting to point to just the location in the native sysroot, but target
packages can't install their CMake modules there.  I tweaked the definition
so that when building non-native packages, CMAKE_MODULE_PATH points into
both the target sysroot and the native sysroot.  This seemed to do the
trick, but wasn't sure it was the correct way to solve this.

The generated pkg-config files were a bit trickier - the CMakefiles that
generate them assume that the CMAKE_INSTALL_xxxDIR variables are always
relative paths, but cmake.bbclass passes in absolute paths -- which, by my
read of the CMake docs, is allowed.  I think in this case the Kurento
CMakefiles need fixing, but there were a lot of them, so it was simpler to
change cmake.bbclass to strip the prefix off the front of those variable
settings.

I don't know that much about CMake, so if anyone has any advice, I'd
appreciate it.

Thanks,
-Matt
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openembedded.org/pipermail/openembedded-core/attachments/20150210/c5c05572/attachment-0002.html>


More information about the Openembedded-core mailing list