Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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?

like image 510
Derick Schoonbee Avatar asked Apr 23 '09 12:04

Derick Schoonbee


People also ask

How do you qmake in Qt?

Building a Project For simple projects, you only need to run qmake in the top level directory of your project to generate a Makefile. You can then run your platform's make tool to build the project according to the Makefile.

How do I create a qmake file?

Makefile is a set of commands (similar to terminal commands) with variable names and targets to create object file and to remove them. In a single make file we can create multiple targets to compile and to remove object, binary files. You can compile your project (program) any number of times by using Makefile.


1 Answers

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

TARGETDEPS += libfoo.a

like image 72
Ariya Hidayat Avatar answered Oct 13 '22 00:10

Ariya Hidayat