[karchive] /: Show how qmake integration can be done.

Alexander Neundorf neundorf at kde.org
Sun Jan 5 19:39:37 UTC 2014


On Sunday 05 January 2014, Nicolás Alvarez wrote:
> 2014/1/4 David Faure <faure at kde.org>:
> > On Saturday 04 January 2014 23:13:49 Stephen Kelly wrote:
> >> David Faure wrote:
> >> > I'd be happy to hear about how I can do it in a nice way: ideally I'd
> >> > want to automatically get the "VARIABLE_PREFIX" passed to
> >> > ecm_setup_version, since I need that to get the version numbers.
> >> 
> >> It seems odd to me to use UPPERCASE KARCHIVE_* for those variables
> >> instead of KArchive_*.
> > 
> > No no, I only need VARIABLE_PREFIX to be able to get
> > ${${VARIABLE_PREFIX}_VERSION_MAJOR}
> > For instance ${KARCHIVE_VERSION_MAJOR}, which is where the version number
> > is stored.
> > Everything else uses KArchive_*.
> 
> You're asking to make ecm_setup_version() store the VARIABLE_PREFIX in
> a framework-name-agnostic variable, so you can get it later and do
> ${${VARIABLE_PREFIX}_VERSION_MAJOR}.
> Instead, what about making ecm_setup_version() store the version
> number in a set of framework-name-agnostic variables, in addition to
> the framework-name-prefixed veriables? PROJECT_VERSION_MAJOR? Maybe
> FRAMEWORK_VERSION_*?

how about extending the project( <name> [lang1 ... langN]) command ?
It already sets PROJECT_(SOURCE|BINARY)_DIR and <name>_(SOURCE|BINARY)_DIR 
variables.

It could be 
project(foo VERSION 1.2.3 C CXX)
and it could set the PROJECT_VERSION_... variables, and also foo_VERSION_... 
variables.

This under the assumption that cmake will not support a programming language 
called "VERSION".

Alex


More information about the Kde-buildsystem mailing list