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 lib

    CONFIG += android
    then add android lib?
    Android and ios libraries both in DEBUG and RELEASE mode

    Please Help me,

    Thanks,



  • @Pradeep-Kumar

    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 += ...
    }
    


  • @Devopia53

    Thanks for ur reply,

    CONFIG(debug, debug|release)
    {
    android : LIBS += -L$$PWD/libraries/buidAndroid/ -libName

    INCLUDEPATH += $$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/ -libName

    INCLUDEPATH += $$PWD/libraries/buidAndroid
    DEPENDPATH += $$PWD/libraries/buidAndroid
    
    ios :  LIBS += -L$$PWD/libraries/buidIOS/ -libName
    
    INCLUDEPATH += $$PWD/libraries/buidIOS
    DEPENDPATH += $$PWD/libraries/buidIOS
    

    }

    Thanks,


  • Lifetime Qt Champion

    Hi,

    You have to use:

    ios {
        LIBS += -L$$PWD/libraries/buidIOS/ -libName
    
        INCLUDEPATH += $$PWD/libraries/buidIOS
        DEPENDPATH += $$PWD/libraries/buidIOS
    }
    

    Otherwise your INCLUDEPATHand DEPENDPATH 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
    

Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.