No subject


Sun Oct 30 02:27:13 EDT 2011


implemented it. My work is in the KDAB Qt5 clone on gitorious[1].

[1]https://qt.gitorious.org/+kdab-developers/qt/kdab-developers-
qtbase/commit/e79663d1352e7322839dfdfa2fa36bb30aaf4aac

At the moment it's a bit hacky but it does work on linux and it can be cleaned 
up. At this point I'm looking for some initial feedback on the cmake 
dependency (see below).

I was able to build a library in kdelibs framework branch with code similar 
to:

find_package(Qt5 REQUIRED Core Gui Widgets)
include(${Qt5_USE_FILE})

add_library(itemmodels SHARED ${itemmodels_SRCS})
target_link_libraries(itemmodels
    ${Qt5Core_LIBRARY} 
    ${Qt5Gui_LIBRARY} 
    ${Qt5Widgets_LIBRARY}
)

So, as a proof of concept, I think I can call this a sucess.

> 
> == 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.

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.

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.

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
--nextPart12460276.bYznRPKUYo
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: This is a digitally signed message part.

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)

iEYEABECAAYFAk6wBcIACgkQQrN9chptvdX3OwCfV5vptCHsOb4kc0Y6mxrMrymb
TpUAnA575sk+PXsSxQTvXQGxVOSLQHHf
=3Xij
-----END PGP SIGNATURE-----

--nextPart12460276.bYznRPKUYo--



More information about the cmake-developers mailing list