Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Regarding How to specify condition in .pro file for android and ios libraries in debug and release mode
Forum Updated to NodeBB v4.3 + New Features

Regarding How to specify condition in .pro file for android and ios libraries in debug and release mode

Scheduled Pinned Locked Moved Unsolved General and Desktop
4 Posts 3 Posters 998 Views 4 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • Pradeep KumarP Offline
    Pradeep KumarP Offline
    Pradeep Kumar
    wrote on last edited by
    #1

    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
    Qt,QML Developer

    D 1 Reply Last reply
    0
    • Pradeep KumarP Pradeep Kumar

      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,

      D Offline
      D Offline
      Devopia53
      wrote on last edited by
      #2

      @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 += ...
      }
      
      1 Reply Last reply
      2
      • Pradeep KumarP Offline
        Pradeep KumarP Offline
        Pradeep Kumar
        wrote on last edited by
        #3

        @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,

        Pradeep Kumar
        Qt,QML Developer

        1 Reply Last reply
        0
        • SGaistS Offline
          SGaistS Offline
          SGaist
          Lifetime Qt Champion
          wrote on last edited by
          #4

          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
          

          Interested in AI ? www.idiap.ch
          Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

          1 Reply Last reply
          0

          • Login

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • Users
          • Groups
          • Search
          • Get Qt Extensions
          • Unsolved