I am trying to use QtCreator (2.7.2) + QT (5.1.0) to create an application that runs on both desktop (Linux) and mobile (Android) platforms.
To achieve this, I need to use different pre-created libraries depending on the target platform. How to specify this in a .pro file?
The wizard offers only linux / mac / windows as a platform choice, for example
unix:!mac { message("* Using settings for Unix/Linux.") LIBS += -L/path/to/linux/libs }
I tried
android { message("* Using settings for Android.") LIBS += -L/path/to/android/libs }
But for both construction purposes, only unix:!mac execution is performed unix:!mac .
So my question is: how to determine the purpose of the assembly (called "Kits" now in QtCreator) in the .pro file and modify the library definitions accordingly?
So far, I have learned how to specify the platform (which seems to be the platform on which I build ON, not FOR) or the RELEASE / DEBUG build option. Other things I found say that I must prefix LIB+= with the target platform, for example win32:LIB+= . But then again, this will not work with android . Maybe I'm using the wrong syntax for the platform (android 4.2 on arm-v7).
android qt cmake qt-creator
Chaos_99
source share