QMake for non-qt projects
In order to better understand the QMake .pro files, I'm "porting" the flac source code to build by using qmake. So far, all is good, but in the generated makefiles, there are some hard-baked references to Qt, which I'd like to (automatically) get rid of. I understand QMake is a Qt tool, but I like the simplicity and cross-platformishness of it.
In my project file, I have (among other things like target and headers and stuff):
CONFIG -= QT
QT -= core gui
...
There are still references in the generated makefile to Qt stuff:
DEFINES = -DQT_LARGEFILE_SUPPORT
INCPATH = -I"..\Qt\mkspecs\default"
QMAKE = m:\Development\x64\Qt\bin\qmake.exe
IDC = m:\Development\x64\Qt\bin\idc.exe
and then: references to yacc, zip, qt mkspecs, qmaketarget, while this should all be taken care of in the qmake (projectfile).pro step and translated to independent commands, right? If there's no Qt stuff in the project, Qt commands should be left out, or am I doing something wrong?
Thanks!
Re: QMake for non-qt projects
Quote:
Originally Posted by
rubenvb
There are still references in the generated makefile to Qt stuff:
DEFINES = -DQT_LARGEFILE_SUPPORT
This is just a define.
Quote:
INCPATH = -I"..\Qt\mkspecs\default"
This is not reference to Qt but to QMake.
Quote:
QMAKE = m:\Development\x64\Qt\bin\qmake.exe
Same here.
Quote:
IDC = m:\Development\x64\Qt\bin\idc.exe
I have never seen that.
Quote:
and then: references to yacc, zip, qt mkspecs, qmaketarget, while this should all be taken care of in the qmake (projectfile).pro step and translated to independent commands, right?
They are never used so nothing to worry here. You can probably turn that off by passing "CONFIG -= lex" or similar.
Re: QMake for non-qt projects
Thanks for the answer!
OK, the define's just a define, no biggie, but the reference to qmake troubles me. Will it be possible to run qmake on my pc and generate, say an msvc makefile, zip the whole thing, transfer to another pc (without any part of Qt installed), unzip and run nmake on that makefile to build the project?
I'll look into the CONFIG -= lex and others to see if they help.
Re: QMake for non-qt projects
Quote:
Originally Posted by
rubenvb
Will it be possible to run qmake on my pc and generate, say an msvc makefile, zip the whole thing, transfer to another pc (without any part of Qt installed), unzip and run nmake on that makefile to build the project?
I can't guarantee that. But I think that's unlikely (you might need QMake itself). That's not what QMake is for. You might try cmake instead although I think it also has some dependencies so without having cmake itself compilation will probably not work (as cmake is called back from the Makefile, AFAIK).