visual studio project files - adding extra files
Hi
I'm wondering if anyone knows how to add extra non source files to a vcproj when running qmake -t vcapp (or vclib).
Resources, header and cpp files get added using HEADERS, SOURCES and RESOURCES, but that also means they will be compiled.
I'm wondering if it's an option in the .pro files to include files that are needed in a project, but not compiled?
For instance I would like the .pro and some .txt files to show up in the vcproj.
Cheers,
Leif
Re: visual studio project files - adding extra files
Well, according to qmake source code in msvc_vcproj.cpp only the following predefined folders could appear in vsproject:
"Header Files"
"Generated Files"
"Lex / Yacc Files"
"Translation Files"
"Form Files"
"Resource Files"
So the easiest way is to add in .pro file a string like
GENERATED_FILES+= ./MyTextFile.txt
In that case "MyTextFile.txt" will appear in "Generated Files". It will not be compiled, but will always be visible from VS Solution Explorer
Re: visual studio project files - adding extra files
Thanks!
Works like a charm... I added the CONFIG -= flat and put it in a dir, so that the files get in a "logical" folder...
Features that would be nice to have in the .pro files:
MYFILES = file1 file2
MYFILES.foldername = myfolder
ADDPROJECTFILES (MYFILES)
Q_PRE_BUILD
Q_POST_BUILD
pre/post link already exists, but sometimes you need features before building, before prelink and after the build... I know it's possible to make .prf, but that's more hassle than:
Q_PRE_BUILD = myscript...
Re: visual studio project files - adding extra files
Quote:
Originally Posted by
luf
Features that would be nice to have
Feel free to send your suggestions to the task-tracker.