Search code examples
c++qtdependenciesqmake

How do a specify a library file dependency for qmake in Qt?


Have a SomeLib.pro file that contains:

CONFIG  += debug
TEMPLATE = lib
TARGET = SomeLib
..

Then in a dependent SomeApp.pro:

..
debug:LIBS += -lSomeLib_debug
..

How can I force SomeApp to build if I touched SomeLib in qmake?


Solution

  • It's ugly because you need to give the exact library file name, but this should work:

    TARGETDEPS += libfoo.a