Include a file using variables into the Makefile created by qmake
Hello,
I need some help with qmake and the Makefile generated by Qt. I was searching in Qt Assistant but I didn't find anything to solve my problem.
I'd like to include a file using variables into the Makefile created by "qmake" command. Something like that:
.pro example
Code:
TEMPLATE = lib
TARGET =
DEPENDPATH += .
LIBS += …
[B]include ( var.include )[/B]
INCLUDEPATH += .
Is that possible?
By the way, is there something to include my own variable into the Makefile? Example:
.pro example
Code:
TEMPLATE = lib
TARGET =
DEPENDPATH += .
LIBS += …
[B]MYOWNVARIABLE = $(ROOT)[/B]
INCLUDEPATH += .
Thank you very much.
Re: Include a file using variables into the Makefile created by qmake
Quote:
Originally Posted by
tarod
I'd like to include a file using variables into the Makefile created by "qmake" command.
include(file.pri) should work fine.
Quote:
By the way, is there something to include my own variable into the Makefile?
What does "my own variable" mean? Read qmake docs and the [WIKI]Undocumented qmake[/WIKI] article in our wiki.
Re: Include a file using variables into the Makefile created by qmake
Hello again,
I was trying to include a file using include(file.pri) but the file is processed when my idea is only read the variables that contains that file. Any solution?
Quote:
What does "my own variable" mean? Read qmake docs and the Undocumented qmake article in our wiki.
I'd like to include variables like MYINCLUDE = hello.h, MYCOMPILER = g++ and so into the .pro provided by qmake. These variables sould appear in the Makefile.
Is that possible?
Thank you very much.
Re: Include a file using variables into the Makefile created by qmake
If you make a variable assignment in a .pro file, it is copied to the resulting Makefile.