How to create vcproj with qmake so that its filters reflect the directory structure?

I am using qmake (Qt 4.5.1) to create vcproj files. I would like to create custom filters for vcproj output so that not every * .h file ends in the "Header Files", * .cpp filter in "Source Files", etc.

For example, a project containing files

foo\foo.h
foo\foo.cpp
bar\bar.h
bar\bar.cpp

must have a vcproj file with

foo
   foo.h
   foo.cpp
bar
   bar.h
   bar.cpp

instead

Header Files
   bar.h
   bar.cpp
Source Files
   bar.cpp
   foo.cpp

Thanks!

+3
source share
1 answer

If you run qmake with , you will get the following project structure: CONFIG -= flat

Header Files
    foo
        foo.h
    bar
        bar.h
Source Files
    foo
        foo.cpp
    bar
        bar.cpp

, Mac Xcode. , , VS ( , XML-).

Windows Visual Studio, Visual Studio Integration Plugin, UIC MOC, Qt.

+3

Source: https://habr.com/ru/post/1708493/


All Articles