Re: Order of qmake variables
THe order in which you assign qmake variables does NOT alter the resulting makefiles (so it does not alter the compilation...) EXCEPT if some assignements make use of the $$ operator and reference other variables of your project files OR if you use = or ~= assignement operators. Indeed qmake interpretes your project file as a kind of script that fills a variable map and THEN generates the makefile.
Hope this helps.
P.S : include() is a function, not a variable. As far as I know it is equivalent, in term of control flow, to embedding the content of the included file at the exact location where your include() directive is. The $$, = and ~= considerations still apply.
Re: Order of qmake variables
Thanks
some of my project's header and source files are present in subdirectories of the projects root directory.Each subdirectory contains seperate .pro file .I want to add all these .pro files in the project's root directories .pro file.(i have only one main() funtion in the project)
so what is the simplest way to do this.
i do this by using the qmake variables and include() function in the following order.
INCLUDEPATH += //to find header files
DEPENDPATH += //same as include path to resolve dependancies (redundant)
include()// including the .pro files
Is there any easier way than this.
Re: Order of qmake variables
if your project files in subdirectories are not "real" project files (that is they do not generate an app, lib, ...) the you'd better use the .pri extension. And no, I don't know any better way of including files... The only alternative I can think of would be to fill the INCLUDEPATH and DEPENDPATH in the included files using the $$PWD variable.