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. How to choose a set of plug-in libraries depending on the selected Kit
Forum Updated to NodeBB v4.3 + New Features

How to choose a set of plug-in libraries depending on the selected Kit

Scheduled Pinned Locked Moved Solved General and Desktop
2 Posts 1 Posters 159 Views 1 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.
  • 8Observer88 Offline
    8Observer88 Offline
    8Observer8
    wrote on last edited by 8Observer8
    #1

    I have compiled OpenAL-Soft for desktop (MinGW), android emulator (x86_64 ABI) and for real android device (armeabi-v7a). All three sets of libraries work. Music plays. At the moment, to change a set of libraries, I need to remove the rest using comments, like this:

    #INCLUDEPATH += $$PWD/libs/openal-soft-desktop-1.23.1/include
    #LIBS += -L$$PWD/libs/openal-soft-desktop-1.23.1/lib/x64
    #LIBS += -lOpenAL32.dll
    
    #INCLUDEPATH += $$PWD/libs/openal-soft-android/include
    #contains(ANDROID_TARGET_ARCH, armeabi-v7a)
    #{
    #    ANDROID_EXTRA_LIBS += $$PWD/jniLibs/armeabi-v7a/libopenal.so
    #}
    
    INCLUDEPATH += $$PWD/libs/openal-soft-android/include
    contains(ANDROID_TARGET_ARCH, x86_64)
    {
        ANDROID_EXTRA_LIBS += $$PWD/jniLibs/x86_64/libopenal.so
    }
    

    How to make sure that the required set of libraries is selected automatically depending on the selected Kit:

    bb59668f-d205-47c9-8858-d9999bbff90d-image.png

    I mean something like this:

    
    IF (DESKTOP)
    {
        INCLUDEPATH += $$PWD/libs/openal-soft-desktop-1.23.1/include
        LIBS += -L$$PWD/libs/openal-soft-desktop-1.23.1/lib/x64
        LIBS += -lOpenAL32.dll
    }
    ELSE IF (ANDROID_ABI == armeabi-v7a)
    {
        INCLUDEPATH += $$PWD/libs/openal-soft-android/include
        contains(ANDROID_TARGET_ARCH, armeabi-v7a)
        {
            ANDROID_EXTRA_LIBS += $$PWD/jniLibs/armeabi-v7a/libopenal.so
        }
    }
    ELSE IF (ANDROID_ABI == x86_64)
    {
        INCLUDEPATH += $$PWD/libs/openal-soft-android/include
        contains(ANDROID_TARGET_ARCH, x86_64)
        {
            ANDROID_EXTRA_LIBS += $$PWD/jniLibs/x86_64/libopenal.so
        }
    }
    
    
    1 Reply Last reply
    0
    • 8Observer88 Offline
      8Observer88 Offline
      8Observer8
      wrote on last edited by 8Observer8
      #2

      I found a solution here: Qt .pro file get Qtkit name

      CONFIG("windows") {
          INCLUDEPATH += $$PWD/libs/openal-soft-desktop-1.23.1/include
          LIBS += -L$$PWD/libs/openal-soft-desktop-1.23.1/lib/x64
          LIBS += -lOpenAL32.dll
      }
      
      CONFIG("armeabi-v7a") {
          INCLUDEPATH += $$PWD/libs/openal-soft-android/include
          contains(ANDROID_TARGET_ARCH, armeabi-v7a)
          {
              ANDROID_EXTRA_LIBS += $$PWD/jniLibs/armeabi-v7a/libopenal.so
          }
      }
      
      CONFIG("x86_64") {
          INCLUDEPATH += $$PWD/libs/openal-soft-android/include
          contains(ANDROID_TARGET_ARCH, x86_64)
          {
              ANDROID_EXTRA_LIBS += $$PWD/jniLibs/x86_64/libopenal.so
          }
      }
      
      1 Reply Last reply
      0
      • 8Observer88 8Observer8 has marked this topic as solved on

      • Login

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