[cmake-developers] Installing Toolchain files (Was: Building with Qt for the Raspberry Pi with CMake)
Stephen Kelly
steveire at gmail.com
Mon Apr 15 15:34:56 EDT 2013
Alexander Neundorf wrote:
> On Monday 15 April 2013, Stephen Kelly wrote:
>> Alexander Neundorf wrote:
>> > I think that's a good idea.
>> > Qt, once built, knows where the compiler is and what the target
>> > operating system is, so it is a good source of information for that.
>> > It also knows at least some part of CMAKE_FIND_ROOT_PATH, that would be
>> > its own install locations, maybe it knows even more about where things
>> > are to be found for the target ?
>>
>> I've uploaded the change I've worked on for Qt:
>>
>> https://codereview.qt-project.org/#change,53858
>>
>> The CMAKE_FIND_ROOT_PATH is indeed known, as is the CMAKE_PREFIX_PATH and
>> all relevant compilers. That seems to be all the relevant information for
>> a toolchain.
>
> Mostly. CMAKE_FIND_ROOT_PATH can also contain additional user-specific
> directories, but I guess it's ok.
> It's actually great, since this should make cross-compiling with Qt much
> easier :-)
Yes, that's the plan :). If needed, one could wrap the Qt5Toolchain.cmake
anyway I think.
>> When building Qt, a sysroot can be passed to the configure script, and a
>> so- called 'host-prefix' can be passed too. Cross compiled libraries get
>> installed into the prefix, and host-compiled tools like moc and qmake get
>> installed to the hostprefix. In my patch, I install the toolchain file to
>>
>>$$hostprefix/cmake/Qt5Toolchain.cmake
>
> Is hostprefix somewhere in lib/ ?
No. It's specified when configuring Qt. See the paragraph above.
Thanks,
Steve.
More information about the cmake-developers
mailing list