Sunday, July 6th 2008, 7:26pm UTC+1

You are not logged in.

  • Login
  • Register

1

Friday, September 7th 2007, 8:58pm

qmake subdirs

Hi all,

I need to generate a vcproj for visual studio using qmake.

Ex:

src
-->subdir1
subdir1.h
subdir1.cpp
-->subdir2
subdir2.h
subdir2.cpp

When I use qmake -project, a vcproj is created, but all headers are in the "HEADER" filter and all cpp's in the "SOURCE FILE" filter.

i.e mytest.vcproj:

Solution 'MyTest'
-MyTest
----HEADER FILES
subdir1.h
subdir2.h
----SOURCES FILES
subdir1.cpp
subdir2.cpp


How to tell qmake to make corresponding filters ?

i.e mytest.vcproj:

Solution 'MyTest'
-MyTest
----HEADER FILES
----SUBDIR1
subdir1.h
----SUBDIR2
subdir2.h
----SOURCES FILES
----SUBDIR1
subdir1.cpp
----SUBDIR1
subdir2.cpp


Thanks
  • Go to the top of the page

2

Monday, September 10th 2007, 8:56am

Under Linux (but I think it works under Windows too) you can modify the project file and set the directories used to generate files

For example:

UI_HEADERS_DIR = ../headers/generated
UI_SOURCES_DIR = ../sources/generated
MOC_DIR = ../moc
OBJECTS_DIR = ../objects

Bye
  • Go to the top of the page

3

Thursday, May 15th 2008, 11:04pm

I have the same question. We're not asking about where the generated files go on disk, but rather how assign particular header/source files to particular "filters" within the Visual Studio IDE.

For those of you who have Visual Studio, in the solution explorer, right-click on your project, then select Add>New Filter. This allows you to organize the files in the IDE, regardless of how they are arranged on disk.

Can filters be specified on the pro file so that qmake generates them in the resultant vcproj file?
  • Go to the top of the page

Rate this thread