Registered Member
|
Hello.
Is it is possible to use the results of the system check made by CMake in the C++ preprocessor? I want to build a class differently according if the KDE version for which the package is build is >=4.2 or not - writing than in the source code something like this: #ifdef OLDKDE [special code for libkde 4.0 and 4.1] #else [special code for libkde 4.2 or newer - making use of function not yet available in 4.0/4.1] #endif Is CMake able to make the results of it's system check available to the preprocessor in some way - or to do something similar? Regards. Tim
Last edited by urwald on Wed Nov 19, 2008 1:04 pm, edited 1 time in total.
urwald, proud to be a member of KDE forums since 2008-Oct.
|
KDE Developer
|
You could include kdeversion.h and use KDE_IS_VERSION
for example
Cheers, _
anda_skoa, proud to be a member of KDE forums since 2008-Oct.
|
Registered Member
|
Thanks, that's working fine.
(By the way - for other users interested in this question: http://api.kde.org/4.x-api/kdelibs-apid ... 11efe3b015 has the documentation.)
Last edited by urwald on Wed Nov 26, 2008 11:58 am, edited 1 time in total.
urwald, proud to be a member of KDE forums since 2008-Oct.
|
Registered users: Bing [Bot], claydoh, Google [Bot], markhm, rblackwell, sethaaaa, Sogou [Bot], Yahoo [Bot]