<div dir="ltr"><div dir="ltr"><div dir="ltr"><div>Hi all,</div><div><br></div><div>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/). <br></div><div><br></div><div>The module recipe looks like as follow:</div><div><br></div><div>MODULES_DEST_PATH = "${STAGING_DATADIR}/cmake/Modules"<br>FILES_${PN}-dev = "${MODULES_DEST_PATH}/*"<br><br>do_install() {<br>    DEST_DIR=${MODULES_DEST_PATH}<br><br>    # Create the destination folder<br>    install -d $DEST_DIR<br></div><div>    install -m 0444 ${S}/my/module.cmake $DEST_DIR</div><div>    ......</div><div>}<br></div><div>    <br></div><div>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?</div><div><br></div><div>Thanks, <br></div><div>Gabriele<br></div></div></div></div>