[yocto] shared cmake modules

Henrik Lindblom henriklindblomster at gmail.com
Mon Apr 8 10:05:15 PDT 2019


>
> FILES_${PN}-dev = "${MODULES_DEST_PATH}/*"
>

Does your library recipe explicitly depend on <cmake_module>-dev? Can you
share the failing recipe?

Cheers,
Henrik

On Wed, Apr 3, 2019 at 1:18 PM Gabriele Zampieri <gabbla.malist at gmail.com>
wrote:

> Hi all,
>
> I'm setting up a layer that will compile our applications and libraries.
> All the applications are based on cmake and they share modules. Before
> using yocto I kept the modules in <workspace>/cmake (under version control)
> alongside applications and libraries. With yocto I wrote a recipe that
> checkout the module repo and install them in
> "${STAGING_DATADIR}/cmake/Modules/". I took this path from
> "meta/classes/cmake.bbclass". If i build the module target, I get the files
> installed in the target recipe datadir. If I want to build a library (that
> depends also on my modules recipe) the task do_configure fails because
> cmake cannot find none of my include. Digging around I found that the
> toolchain.cmake file points to a module location that doesn't exist in the
> library workdir, but in module recipe (${STAGING_DATADIR}/cmake/Modules/).
>
> The module recipe looks like as follow:
>
> MODULES_DEST_PATH = "${STAGING_DATADIR}/cmake/Modules"
> FILES_${PN}-dev = "${MODULES_DEST_PATH}/*"
>
> do_install() {
>     DEST_DIR=${MODULES_DEST_PATH}
>
>     # Create the destination folder
>     install -d $DEST_DIR
>     install -m 0444 ${S}/my/module.cmake $DEST_DIR
>     ......
> }
>
> So my question is: where should I install the shared modules
> (MODULE_DEST_PATH int the above snippet)? and how to update the
> CMAKE_MODULE_PATH properly to append that location?
>
> Thanks,
> Gabriele
> --
> _______________________________________________
> yocto mailing list
> yocto at yoctoproject.org
> https://lists.yoctoproject.org/listinfo/yocto
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.yoctoproject.org/pipermail/yocto/attachments/20190408/61105dc7/attachment.html>


More information about the yocto mailing list