Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Qt Creator and other tools
  4. Using Subdirs
QtWS25 Last Chance

Using Subdirs

Scheduled Pinned Locked Moved Qt Creator and other tools
4 Posts 4 Posters 6.0k Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • A Offline
    A Offline
    ajm24
    wrote on last edited by
    #1

    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!

    1 Reply Last reply
    0
    • U Offline
      U Offline
      ucomesdag
      wrote on last edited by
      #2

      Hope someone has an idea, looking for something similar.

      Write “Qt”, not “QT” (QuickTime).

      1 Reply Last reply
      0
      • D Offline
        D Offline
        dword
        wrote on last edited by
        #3

        What I understand (correct me if I'm wrong) is that you want to specify a common build directory for each sub-target. Have you tried to specify a DESTDIR (like ../../build) in each sub-target .PRO file?

        1 Reply Last reply
        0
        • Z Offline
          Z Offline
          zakarrrr
          wrote on last edited by
          #4

          Did you try using Shadow-Build?

          If a person is doing things behind you, he s clearly an ...
          Because he is an ..., he will tell any stories, which will make you think he is ok! -.-

          1 Reply Last reply
          0

          • Login

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • Users
          • Groups
          • Search
          • Get Qt Extensions
          • Unsolved