I've a project built with QtCreator. A myapp and a staticlib mylib. Both are handled within a SUBDIRS template project.
TEMPLATE = subdirs
SUBDIRS = \
mylib \
myapp
CONFIG += ordered
CONFIG += qt
myapp.depends = mylib
myapp
is also linked against mylib2
, a static-lib built separately outsideof Qt framework.
So, somewhere in myapp.pro I've:
# Paths to PGA libs and contrib
INCLUDEPATH += ./include
INCLUDEPATH += $$PWD/../mylib2/include
...
unix {
LIBS += "-L$$PWD/../mylib2/lib/" -lmylib2$${DBG} # DBG=d if debug mode
...
}
That way, everything works fine. I'm happy.
But to get it working, I need top ensure myself that mylib2
is already built when I build myapp
.
What I wish to achieve, is to make a call to the makefile oy mylib2 when it needs to built. i.e. make -C /path/to/mylib2 -f mylib2.mak
What should I need to add in my .pro file ? Is it related with custom targets ? But how to make a custom target automatically built with the qmake target ?
Z.