[yocto] How to set the prefix of a (cmake) recipe?

Burton, Ross ross.burton at intel.com
Thu Jul 7 06:59:46 PDT 2016


On 7 July 2016 at 14:24, <S.Jaritz at esa-grimma.de> wrote:

> I want to install my software packages to the usr/local/bin dir. That is
> why I need to change the prefix form usr to usr/local. How to archive that?
>
> The software is build through a cmake. Is there somethingt I need to think
> extra for setting the prefix?


This depends on the software sadly, cmake doesn't have a standard way of
setting the prefix.

cmake.bbclass sets CMAKE_INSTALL_PREFIX etc for you on the assumption that
the CMakeLists might be using the GNUInstallDirs macro, but if they are not
then you'll have to read the CMakeLists to identify how to set the prefix
(if you can).

That isn't an inconsistency you've found: autotools defaults to /usr/local
because the assumption is that hand-compiled software shouldn't replace the
operating system, so installs to /usr/local.  If you're building software
using OE then you *are building* the operating system, so prefix is set to
/usr.

Ross
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.yoctoproject.org/pipermail/yocto/attachments/20160707/da0a669a/attachment.html>


More information about the yocto mailing list