sagacity
23rd June 2009, 15:08
I am using several 3rd party libraries in my application. Some of these are binary-only (dll's, for instance). I would like to create a "3rdparty.pro" that just copies some file across.
However, I cannot seem to create a makefile that doesn't also want to compile something.
For instance, I have created a test.pro that looks like this:
mytarget.target = output.txt
mytarget.commands = $(COPY) input.txt $$mytarget.target
mytarget.depends = input.txt
QMAKE_EXTRA_TARGETS += mytarget
POST_TARGETDEPS += output.txt
Now, it copies input.txt to output.txt correctly, so that's nice. But it will also try to compile (and link, if I don't specify CONFIG += no_link) test.cpp. How can I make a "copy-only" makefile?
I have attached a very small test project to illustrate what I would like to do.
However, I cannot seem to create a makefile that doesn't also want to compile something.
For instance, I have created a test.pro that looks like this:
mytarget.target = output.txt
mytarget.commands = $(COPY) input.txt $$mytarget.target
mytarget.depends = input.txt
QMAKE_EXTRA_TARGETS += mytarget
POST_TARGETDEPS += output.txt
Now, it copies input.txt to output.txt correctly, so that's nice. But it will also try to compile (and link, if I don't specify CONFIG += no_link) test.cpp. How can I make a "copy-only" makefile?
I have attached a very small test project to illustrate what I would like to do.