[Development] Installing Qt5Config.cmake from the Qt repo?
André Pönitz
andre.poenitz at nokia.com
Tue Nov 1 17:44:29 CET 2011
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.
That's not so much an issue on Linux, where it's easy to install cmake
from the distribution, but it _is_ an issue on e.g. Windows where there is
no proper package management available, and cause extra effort for
e.g. the SDK maintainers or for the random non-cmake using user of
Qt on Windows who compiles himself.
Don't get me wrong. I have no problems with adding a few files to Qt
that make the life of cmake users easier. But maintainance has to be
done by the people introducing these files, not by imposing additional
burden on others.
> The alternative would be to maintain Targets files for multiple platforms by
> generating those files at maintenance time (ie, running the script to generate
> them, copy the result into place and check it in).
>
> This maintenance burden is not really justifiable. The CMake dependency is
> already available where Qt is available.
Qt does not depend on cmake _anywhere_. The fact that cmake is _available_
does not mean depending on it is free.
> 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'
More information about the Development
mailing list