Thank you for the quick suggestion. Unfortunately, I tried setting OECMAKE_FIND_ROOT_PATH_MODE_LIBRARY to "ONLY", "NEVER", and "BOTH" separately, and none of the above worked. I must be doing something fundamentally wrong.
Any other suggestions? On Thu, Mar 28, 2019 at 12:30 PM Patrick Boettcher < patrick.boettc...@posteo.de> wrote: > Hi > > On Thu, 28 Mar 2019 12:20:43 -0400 > A <aaron.bi...@gmail.com> wrote: > > > I'm having issues with a yocto build that is combining recipes that > > should depend on each other, and I need a sanity check. Is this an > > ok forum for stupid user questions? > > > > The main idea is to have one recipe install some prebuilt libraries, > > and have another cmake-based recipe use those libraries. > > > > As a caveat, this is a native version of the build that I seem to be > > having trouble with, but I assume that is mostly irrelevant: > > > > In ProjectA, the meat of the matter is a do_install that copies > > ProjectA*.so into STAGING_LIBDIR. I don't recall why I chose that > > instead of ${D}${libdir}... is it ok this way? > > In ProjectB, I'd like CMake's find_library() to find Project A's > > libraries, and I seem to be having trouble. > > > > How would you approach this? The recipe for Project B contains > > "inherit cmake" and some variables I pass in with an EXTRA_OECMAKE > > and an EXTRA_OECMAKE-native. > > > > I also have there: > > DEPENDS += "ProjectA" > > DEPENDS_class-native = "ProjectA-native" > > > > However,in ProjectB's find_library() call, I am uncertain how to > > direct it to find those libraries - what PATHS or HINTS or whatever? > > I was having similar problems with this (a dependency for zeromq in my > case). > > DEPENDS = "zeromq" # build dependency > > I had to add the following variable to my recipes: > > OECMAKE_FIND_ROOT_PATH_MODE_PROGRAM = "BOTH" > > this, iiuc, tells cmake that in case of cross-compiling (via a > toolchain-file) that it shall also look in the sysroot for header > and library-files when doing find_library(). Not sure if it will work > with all find_package()-modules. > > It worked, I haven't investigated further why, but I should have. > > HTH. > -- > Patrick. >
-- _______________________________________________ yocto mailing list yocto@yoctoproject.org https://lists.yoctoproject.org/listinfo/yocto