Unsolved Regarding How to specify condition in .pro file for android and ios libraries in debug and release mode
-
Hi,
I am using Mac and have both android and ios set up.
In my app , i have a android and ios libraries for both debug and release mode.
Based on the kit(android kit and ios kit) selected how to specify the condition in .pro file.will i have to use CONFIG+= ios
then add ios libCONFIG += android
then add android lib?
Android and ios libraries both in DEBUG and RELEASE modePlease Help me,
Thanks,
-
Hi.
You can use the Platform Scope values.
These are based on platform specifications provided in Qt's mkspecs directory.
For exmaple: win32, macx, linux and etc.like this:
CONFIG(debug, debug|release) { android: LIBS += ... macx: LIBS += ... else: LIBS += ... }
-
Thanks for ur reply,
CONFIG(debug, debug|release)
{
android : LIBS += -L$$PWD/libraries/buidAndroid/ -libNameINCLUDEPATH += $$PWD/libraries/buidAndroid DEPENDPATH += $$PWD/libraries/buidAndroid ios : LIBS += -L$$PWD/libraries/buidIOS/ -libName INCLUDEPATH += $$PWD/libraries/buidIOS DEPENDPATH += $$PWD/libraries/buidIOS
}
This is what is provided in .pro file.
again for the libraries in release mode do we need to specify
as below ?.CONFIG(release, debug|release)
{
android : LIBS += -L$$PWD/libraries/buidAndroid/ -libNameINCLUDEPATH += $$PWD/libraries/buidAndroid DEPENDPATH += $$PWD/libraries/buidAndroid ios : LIBS += -L$$PWD/libraries/buidIOS/ -libName INCLUDEPATH += $$PWD/libraries/buidIOS DEPENDPATH += $$PWD/libraries/buidIOS
}
Thanks,
-
Hi,
You have to use:
ios { LIBS += -L$$PWD/libraries/buidIOS/ -libName INCLUDEPATH += $$PWD/libraries/buidIOS DEPENDPATH += $$PWD/libraries/buidIOS }
Otherwise your
INCLUDEPATH
andDEPENDPATH
variable are going to contain useless stuff.Not that you could factor some things out. Like for example:
ios: BASE_PATH = $$PWD/libraries/buidIOS android: BASE_PATH = $$PWD/libraries/buidAndroid/ LIBS += -L$$BASE_PATH/ -libName INCLUDEPATH += $$BASE_PATH DEPENDPATH += $$BASE_PATH