[Development] Installing Qt5Config.cmake from the Qt repo?

Stephen Kelly stephen.kelly at kdab.com
Wed Nov 2 11:20:41 CET 2011


On Tuesday, November 01, 2011 17:44:29 André Pönitz wrote:
> On Tuesday 01 November 2011 15:44:18 ext Stephen Kelly wrote:
> > > == Clarification ==
> > > 
> > > To avoid misunderstanding:
> > > 
> > > * This proposal is not about porting the Qt build system to CMake.
> > > * This would not make Qt depend on CMake at all
> > > * I am proposing to add some plain text files to the Qt repo for
> > > installation * Those plain text files would need to be generated
> > > while
> > > building Qt (using existing mechanisms, like perl).
> > 
> > In the branch, I do depend on cmake at configure-time to generate the
> > Targets files. These are platform specific files that cmake uses to
> > build against libraries in debug and release versions.
> > 
> > I would like to add this non-optional configure time dependency on cmake
> > to Qt.
> This seems to invalidate the initial "Clarification" as it _does_ make
> building Qt from source depending on cmake.

Yes I could have been more clear here. When I wrote the 'Clarification' it was 
before I'd started any prototyping.

 When I started working on it I realised that using cmake directly makes 
several things easier, so I wanted feedback on backtracking on that point.

<snip>

> 
> > Depending on CMake would also mean that I could use configure_file() and
> > file(WRITE ...), which would make the stuff work across platforms
> > already
> > (currently it depends on sed being available). So I would be able to
> > clean up the branch considerably.
> > 
> > Additionally, it would be easier to create a similar Config.cmake file
> > for Qt libraries outside of qtbase.git (such as QtWebKit) as I could
> > simply install the Qt5BasicConfig.cmake from qtbase and use it from the
> > other repos.
> > 
> > I would make this dependency on CMake non-optional because it is
> > important to be able to use find_package(Qt5) without having to care
> > about whether the person who built it had cmake installed at the time.
> > find_package(Qt5)  needs to work for each Qt5 build, so the config
> > files need to be all the time.
> > 
> > Let me know if this is acceptable for Qt.
> 
> A non-optional dependency on cmake for Qt 5.0 is not acceptable from my
> perspective.
> 
> Andre'

Ok. I wrote before that the other option is generating the files at 
'maintenance time' and checking them in.

Another option is generating them without using cmake, so that's what I've now 
done in the branch:

https://qt.gitorious.org/+kdab-developers/qt/kdab-developers-
qtbase/commit/d567a9b01d9023dcb17a8de0c752534b0ab062a9

This has some remaining issues:

* I'll have to maintain very platform specific stuff 
in the scripts, including to platforms I don't use and it might be hard to get 
right (see create_cmake_basic_config_files.sh).
* Modules outside of qtbase.git also need some way of generating the cmake 
files. The easiest way would be to install create_cmake_basic_config_files.sh 
somewhere and use that. The alternative would be to copy it where it's needed, 
which doesn't seem like the smart way.

What do you think?

Thanks,

-- 
Stephen Kelly <stephen at kdab.com> | Software Engineer
KDAB (Deutschland) GmbH & Co.KG, a KDAB Group Company
www.kdab.com || Germany +49-30-521325470 || Sweden (HQ) +46-563-540090
KDAB - Qt Experts - Platform-Independent Software Solutions
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.qt-project.org/pipermail/development/attachments/20111102/11374456/attachment.sig>


More information about the Development mailing list