[Qt-interest] qmake: suffixes and custom file extensions
Rui Maciel
rui.maciel at gmail.com
Sat Aug 15 12:51:56 CEST 2009
Rui Maciel wrote:
> I have the habit of using the suffix .c++ on my pet C++ projects. While
> browsing a Makefile generated by qmake I've noticed that it has a rule
> labeled ".SUFFIXES", which only supports a hand full of file extensions (
> .o .c .cpp .cc .cxx .C). As it would be nice if it also supported other
> C++ file extensions (such as my own .c++) is it possible to tweak that
> field through the .pro file in order to add support for other file
> extensions? If so, how is it done?
I've just found out how it's done. It's through the QMAKE_EXT_CPP variable, which is used as a list of
filename suffixes that are identified as being C++ source code files. So a simple QMAKE_EXT_CPP += c++ does
the trick. Nice.
Rui Maciel
More information about the Qt-interest-old
mailing list