[CMake] providing host binary and target library cmake-package when cross compiling

Owen Alanzo Hogarth gurenchan at gmail.com
Mon Oct 19 12:45:25 EDT 2015


this is not an in source build.

to do matrix vector multiplication matrix module needs to have access to
the vector class.


I'll add the source code for these modules here:
http://pastebin.com/aj01ycRQ

I think the structure should be a little clearer with all that I've
provided.
This is the previous link to the cmake folder structure and cmakelists.txt
files: http://pastebin.com/BnVTnegP


On Tue, Oct 20, 2015 at 12:33 AM, Hendrik Sattler <post at hendrik-sattler.de>
wrote:

>
>
> Am 19. Oktober 2015 17:33:55 MESZ, schrieb Owen Alanzo Hogarth <
> gurenchan at gmail.com>:
> >This is the entire project as it stands right now. I have tried
> >changing
> >from using relative to more absolute directory names in my project but
> >I
> >still get the same build errors.
> >
> >This pastebin has all the relevant code: http://pastebin.com/BnVTnegP
>
> a.
> You user in-source build, don't do that.
>
> b.
> You have the vector3 target defined in the matrix4 folder and vice versa?
> Why?
>
> c.
> Because of b. the targets are defined in wrong order. That's why he tries
> to find a library that is not present.
>
> >Anyone can see anything wrong with this?
> >
> >On Mon, Oct 19, 2015 at 10:11 PM, Pascal Bach <pascal.bach at siemens.com>
> >wrote:
> >
> >> Hello
> >>
> >> I'm working on CMake support for Apache Thrift [1].
> >> It is currently already buildable using CMake. However while trying
> >to add
> >> support for generating a ThriftConfig.cmake I ran into some issues
> >> related to cross compilation.
> >>
> >> Thrift has the following components relevant to the problem:
> >>
> >> C++ library (.so library)
> >> Thrift compiler (binary)
> >>
> >> End users/developers usually us thrift in the following way:
> >> Thrift IDL ==[Thrift compiler]==> C++ files ==[GCC + Link with
> >> thrift.so]==> final.so
> >>
> >> My idea for the resulting ThriftConfig.cmake was to provide two
> >imported
> >> targets Thrift::libthrift and Thrift::compiler.
> >> Thrift::compiler can be used to generate C++ files from Thrift IDLs
> >and
> >> Thrift::libthrift is what the resulting binary should link against.
> >> This works well if no cross compilation is involved.
> >>
> >>
> >> Now for the cross compilation case. I'm using OpenEmbedded [2] which
> >> provides two sysroot directories:
> >> 1. sysroot_x86 containing binaries and libraries for the host:
> >> libthrift.so (x86 library), thrift (x86 executable)
> >> 2. sysroot_arm containing binaries and libraries for the target:
> >> libthrift.so (arm library), thrift (arm executable)
> >>
> >> In the cross compiling case the Thrift::compiler target must be
> >executable
> >> on the HOST and Thrift::libthrift must be a target library.
> >> This means the library should be from sysroot_arm but the binary from
> >> sysroot_x86.
> >> I'm not able express this an a good way.
> >>
> >> Does anyone know how to do this? Is there an example how this could
> >be
> >> done?
> >>
> >> Thanks for your help.
> >>
> >> Regards
> >> Pascal
> >>
> >>
> >> [1] http://thrift.apache.org/
> >> [2] http://www.openembedded.org/wiki/Main_Page
> >> --
> >>
> >> Powered by www.kitware.com
> >>
> >> Please keep messages on-topic and check the CMake FAQ at:
> >> http://www.cmake.org/Wiki/CMake_FAQ
> >>
> >> Kitware offers various services to support the CMake community. For
> >more
> >> information on each offering, please visit:
> >>
> >> CMake Support: http://cmake.org/cmake/help/support.html
> >> CMake Consulting: http://cmake.org/cmake/help/consulting.html
> >> CMake Training Courses: http://cmake.org/cmake/help/training.html
> >>
> >> Visit other Kitware open-source projects at
> >> http://www.kitware.com/opensource/opensource.html
> >>
> >> Follow this link to subscribe/unsubscribe:
> >> http://public.kitware.com/mailman/listinfo/cmake
> >>
> >
> >
> >------------------------------------------------------------------------
>
> --
>
> Powered by www.kitware.com
>
> Please keep messages on-topic and check the CMake FAQ at:
> http://www.cmake.org/Wiki/CMake_FAQ
>
> Kitware offers various services to support the CMake community. For more
> information on each offering, please visit:
>
> CMake Support: http://cmake.org/cmake/help/support.html
> CMake Consulting: http://cmake.org/cmake/help/consulting.html
> CMake Training Courses: http://cmake.org/cmake/help/training.html
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Follow this link to subscribe/unsubscribe:
> http://public.kitware.com/mailman/listinfo/cmake
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/cmake/attachments/20151020/a29d156c/attachment.html>


More information about the CMake mailing list