qt - How to specify libraries only for Android platform build in .pro file? -
i'm trying use qtcreator (2.7.2) + qt (5.1.0) build application runs on both desktop (linux) , mobile (android) platforms.
to achieve this, need use different pre-built libraries depending on target platform. how specify in .pro file?
the wizard offers linux/mac/windows platform choice like
unix:!mac { message("* using settings unix/linux.") libs += -l/path/to/linux/libs }
i've tried
android { message("* using settings android.") libs += -l/path/to/android/libs }
but both build targets unix:!mac
gets executed/evaluated.
so question is: how detect build target (called "kits" in qtcreator) in .pro file , change library definitions accordingly?
i've far found out how specify platform (which seems platform i'm building on , not for) or build variant release/debug. other things i've found should prefix lib+=
target platform win32:lib+=
. again, won't work android
. maybe i'm using wrong syntax platform (android 4.2 on arm-v7).
this works me (qt 5.3.2)
linux:!android { message("* using settings unix/linux.") libs += -l/path/to/linux/libs } android { message("* using settings android.") libs += -l/path/to/android/libs }
Comments
Post a Comment