> On Aug 10, 2015, at 11:59 PM, yocto yocto <yoctomailingl...@gmail.com> wrote:
> 
> Maybe this is of interest, here is my solution:
> 
> In CMakeLists.txt
> 
> SET(BITBAKE_SYSROOT "" CACHE STRING "Description")
> SET(SOCI_INCLUDEDIR ${BITBAKE_SYSROOT}/usr/include/soci)
> 
> So if BITBAKE_SYSROOT is not passed the compiler takes /usr/include/soci as 
> usual. My *.bb contains:

its your package you are free to choose the name but instead of BITBAKE_SYSROOT 
call it OE_SYSROOT

> 
> EXTRA_OECMAKE = "-DBITBAKE_SYSROOT:STRING=${STAGING_DIR_HOST}"
> 
> So when using bitbake the appropriate prefix will be added.
> 
> 
> 
> 2015-08-11 8:36 GMT+02:00 yocto yocto <yoctomailingl...@gmail.com 
> <mailto:yoctomailingl...@gmail.com>>:
> But not within CMakeLists.txt? At least this is not working, cmake is 
> handling "=" as a normal character. I guess I have to pass a parameter within 
> my *.bb to cmake containing the sysroot path
> 
> 2015-08-10 22:36 GMT+02:00 Khem Raj <raj.k...@gmail.com 
> <mailto:raj.k...@gmail.com>>:
> On Mon, Aug 10, 2015 at 12:08 PM, yocto yocto
> <yoctomailingl...@gmail.com <mailto:yoctomailingl...@gmail.com>> wrote:
> > SET(SOCI_INCLUDEDIR
> > /home/my-PC/development/2015-08-04_edison-src/edison-src/build/tmp/sysroots/edison/usr/include/soci)
> >
> > everything worked fine. Is there any way to get the path
> > "/home/my-PC/development/2015-08-04_edison-src/edison-src/build/tmp/sysroots/edison/"
> > within CMakeLists.txt automatically?
> 
> you can use =/usr/include/soci which will prepend sysroot automatically.
> 
> 

Attachment: signature.asc
Description: Message signed with OpenPGP using GPGMail

-- 
_______________________________________________
yocto mailing list
yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/yocto

Reply via email to