#ifdef'ing between Desktop and Device builds
-
Hi, was wondering what's The way to do conditional compilation between Desktop and Device environments? I know there is Q_OS_LINUX but since I am developing on Ubuntu for Harmattan, I assume this would be defined for both :)
Perhaps it's possible to #define a custom flag in the .pro file using unix: { } and the makespec somehow, anyone done this?
- M
-
You will find a list of platform specific defines "here":http://doc.qt.nokia.com/latest/qtglobal.html#Q_OS_AIX.
@
// .pro
contains(MEEGO_EDITION,harmattan) {
DEFINES += BUILD_DEVICE
} else {
DEFINES += BUILD_DESKTOP
}// .cpp
#if defined(BUILD_DEVICE)
...
#elif defined(BUILD_DESKTOP)
...
#else
#error Unsupported platform.
#endif
@