How to choose a set of plug-in libraries depending on the selected Kit
Solved
General and Desktop
-
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:
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 } }
-
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 } }
-