| Summary: | cmake projects will not build as CMAKE_MODULE_PATH is set to wrong location | ||
|---|---|---|---|
| Product: | [Yocto Project Subprojects] eSDK | Reporter: | Henry Bruce <henry.bruce> |
| Component: | eSDK | Assignee: | Ross Burton <ross.burton> |
| Status: | RESOLVED FIXED | QA Contact: | Francisco Pedraza <francisco.j.pedraza.gonzalez> |
| Severity: | normal | ||
| Priority: | Medium | CC: | randy.macleod, ross.burton, sgw |
| Version: | 2.1.1 | ||
| Target Milestone: | 2.2 | ||
| Hardware: | x86 | ||
| OS: | Multiple | ||
| Whiteboard: | |||
| OS type for building Yocto: | --- | Type of Regression: | --- |
| Verified: | Documentation change: | No (bug/feature does not impact docs) | |
Looking at cmake.bbclass, it looks like this *is* target specific, list(APPEND CMAKE_MODULE_PATH "${STAGING_DATADIR}/cmake/Modules/")
which means we make need to install target cmake modules files into the sdk in order to support cmake?
So I've spent *way* too long learning all about the horrible ways that cmake does stupid things to piss you off. That message is *so* misleading it's not even funny. I'll note that for some reason the cmake files for opencv are part of opencv-apps, so it's entirely possible that they're not in the SDK. Can you verify that you have a /usr/share/OpenCV/OpenCVConfig.cmake inside your SDK's target sysroot? https://patchwork.openembedded.org/patch/132795/ is my fix to opencv to put the cmake files into opencv-dev. Nice work. Ross. I have validated that the patch solves the problem. I'll leave open until patch is merged into meta-oe. How do I request a backport for krogoth? Once it's merged remind me and I'll backport it. Marking as 2.2 as this isn't actually a oe-core but, but meta-oe. Fix to opencv merged in meta-oe fded4cf6a8cf1ff065af97f3283b55aeba458d28. |
Observed behavior ----------------- When building a cmake application within eSDK, CMAKE_MODULE_PATH is set to /path/to/esdk/tmp/sysroots/$MACHINE/usr/share/cmake/Modules, but nativesdk-cmake installs files to /path/to/esdk/tmp/sysroots/x86_64-linux/usr/share/cmake-${PN}/Modules. As a result all cmake package detection calls will fail with errors such as | By not providing "FindOpenCV.cmake" in CMAKE_MODULE_PATH this project has | asked CMake to find a package configuration file provided by "OpenCV", but | CMake did not find one. Expected behavior ----------------- cmake project will be built as on native host.