I also did further research. The problem is that FIND_PACKAGE does not work
for soci. For that reason one has to specify CMake variable such as
SOCI_INCLUDEDIR manually. Using namespaces such as #include <soci/soci.h>
is no solution: When enabling further backends such as postgresql this
approach fails since these backends also require sth. like #include
<soci.h>. Therefore changes in the soci sources files would be necessary.

After manually changing CMakeLists.txt:

SET(SOCI_INCLUDEDIR /usr/include/soci)

to

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?


2015-08-10 19:56 GMT+02:00 Khem Raj <raj.k...@gmail.com>:

>
> On Aug 10, 2015, at 4:50 AM, yocto yocto <yoctomailingl...@gmail.com>
> wrote:
>
> Please see the attachment for a simplified example. A library (consisting
> of 1 cpp and 1 header) is being built using soci. Compiling fails since
> soci.h is not found.
>
> 2015-08-10 13:16 GMT+02:00 Burton, Ross <ross.bur...@intel.com>:
>
>>
>> On 10 August 2015 at 12:13, yocto yocto <yoctomailingl...@gmail.com>
>> wrote:
>>
>>> However, when compiling my own recipe I get compiling errors ("soci.h
>>> not found"). I am 100% sure that I specified the correct paths.
>>>
>>
>> The headers are likely installed in the sysroot, but your script can't
>> find them.  The first step would be to verify that the sysroot does in fact
>> have the headers installed in, and then you'll have to debug your configure
>> scripts to find out why they don't find the headers.  Sharing your recipe
>> and sources will help here.
>>
>
> yeah the CMakeLists.txt seems to not include search paths for
> <sysroot>/usr/include/soci one way you could do it is refer to soci files
> with namespace when using them in source code like #include <soci/soci.h>
> then it will automatically apply the default sysroot search paths to
> includedir and reach it. Alternative is that you can defile a .cmake file
> for soci
> and include that in soci recipe and then just find the module in your
> package’s CMakeLists.txt
>
>
>> Ross
>>
>
> <soci-example.tar.bz2>--
> _______________________________________________
> yocto mailing list
> yocto@yoctoproject.org
> https://lists.yoctoproject.org/listinfo/yocto
>
>
>
-- 
_______________________________________________
yocto mailing list
yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/yocto

Reply via email to