Using Subdirs
Hi, I have a project structured in the following way
- Root /
- Server /
- Library /
- build /
- debug/
- release/
- code /
- .cpp, .h, .pro files
- resources /
- resource files
- Process /
- build /
- debug/
- release/
- code /
- .cpp, .h, .pro files
- resources /
- resource files
- Client /
- API /
- build /
- debug/
- release/
- code /
- .cpp, .h, .pro files
- resources /
- resource files
- Client /
- build /
- debug/
- release/
- code /
- .cpp, .h, .pro files
- resources /
- resource files
I am wondering if it possible to keep this structure and use a subdirs template at the same time. From what I have seen I can’t find a way to change the target of where the subdirs build too. For example I have the following in my .pro file(which is in my root directory):
- TEMPLATE = subdirs
- SUBDIRS = \
- Server/Library/code/Library.pro \
- Server/Process/code/Process.pro \
- Client/API/code/API.pro \
- Client/API/code/Client.pro \
- Library.subdir = Server/Library/code/Library.pro
- Process.subdir = Server/Process/code/Process.pro
- Process.depends = Library
- API.subdir = Client/API/code/API.pro
- API.depends = Library
- Client.subdir = Client/API/code/Client.pro
- Client.depends = Library API
When I run something like this, the debug and release folder are created in the same directory as the .pro file of each project(the code folder), is there a way I can tell it to build everything in the build folder? If not is there an easy way to make a something that will compile each of my projects in the correct order?
Thanks!
2 replies
You must log in to post a reply. Not a member yet? Register here!

