PDA

View Full Version : Conditional inclusion of a library path



nuliknol
17th August 2016, 15:04
Hi all.
I am compiling my app for 2 platforms, Destop and Android. The app uses a library. Right now I specify double library paths like this:

LIBS += -L/home/niko/wrkgr/intel/wrklib -L/home/niko/wrkgr/android/wrklib

How would I mofify the config file so the library path is included depending on the build architecture ?

something like:


IF (INTEL) {
LIBS += -L/home/niko/wrkgr/intel/wrklib
ENDIF

IF (ANDROID_ARM) {
LIBS += -L/home/niko/wrkgr/intel/wrklib
}

IF (ANDROID_X86 {
LIBS += -L/home/niko/wrkgr/intel/wrklib
}


What is the correct syntax?

anda_skoa
17th August 2016, 20:34
If you are referring to a QMake .pro file, maybe this will help
http://doc.qt.io/qt-5/qmake-language.html#scopes-and-conditions

Cheers,
_