Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. QTCreator Subdirs project does not shadow build properly
QtWS25 Last Chance

QTCreator Subdirs project does not shadow build properly

Scheduled Pinned Locked Moved General and Desktop
qmakesubdirshadow buildbuild
6 Posts 2 Posters 2.8k 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.
  • J Offline
    J Offline
    jjekeli
    wrote on 6 Mar 2015, 15:05 last edited by
    #1

    In QTCreator 3.0.1 (using qmake/qt 5.2.1) on Windows, 32-bit w/ MinGW.

    I have trouble getting subdirs projects to all build within the same shadow build directory.

    I have a subdirs project with the following structure:

    • Directory
    • ExternalProject
      • ExternalProject.pro
    • MySubDirsProject
      • MySubDirsProject.pro
      • MyProject
        • MyProject.pro

    Where MySubDirsProject.pro reads:

    TEMPLATE = subdirs
    
    SUBDIRS += \
        MyProject\
        ../ExternalProject
    

    I have the project set to shadow-build within Directory/build-mysubdirsproject-Debug, and MyProject builds correctly within it... however, ExternalProject creates its Makefile and does all of its build within its source directory (Directory/ExternalProject). It seems to be related to the fact that MySubDirsProject.pro reads "../ExternalProject", so it ends up not just reading the .pro within "../ExternalProject", but also ends up building within ""../ExternalProject", which, relative to the shadow-build directory, just so happens to be the source directory. How do i get the external project to build within the same shadow-build directory? Qt reference pretty explicitly says not to modify the OUT_PWD variable.

    1 Reply Last reply
    0
    • S Offline
      S Offline
      SGaist
      Lifetime Qt Champion
      wrote on 6 Mar 2015, 15:43 last edited by
      #2

      Hi,

      AFAIK, you would need to put that project inside yours. Not unlike a git submodule

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      J 1 Reply Last reply 6 Mar 2015, 15:50
      0
      • S SGaist
        6 Mar 2015, 15:43

        Hi,

        AFAIK, you would need to put that project inside yours. Not unlike a git submodule

        J Offline
        J Offline
        jjekeli
        wrote on 6 Mar 2015, 15:50 last edited by
        #3

        @SGaist So it's actually impossible to attempt to do what I'm doing? That seems odd, as it seems like it should be very common practice to have some set of "common" libraries that many projects rely upon. We're using SVN for content management, so it would be very bizarre to have to checkout those common libraries, copy them into my directory, and then if any modifications are made, copy them back out to the checkout directory and commit...

        1 Reply Last reply
        0
        • S Offline
          S Offline
          SGaist
          Lifetime Qt Champion
          wrote on 6 Mar 2015, 23:26 last edited by
          #4

          Then rather use svn externals

          Doing so you ensure that when checking out one of your project that uses that common set of libraries you get your project in a known working state.

          The other way would be to handle that set the same way you would any dev library on your system i.e. build, install and then use these libraries. However you loose the benefit of the checkout at a known working state.

          Interested in AI ? www.idiap.ch
          Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

          J 1 Reply Last reply 9 Mar 2015, 15:18
          1
          • S SGaist
            6 Mar 2015, 23:26

            Then rather use svn externals

            Doing so you ensure that when checking out one of your project that uses that common set of libraries you get your project in a known working state.

            The other way would be to handle that set the same way you would any dev library on your system i.e. build, install and then use these libraries. However you loose the benefit of the checkout at a known working state.

            J Offline
            J Offline
            jjekeli
            wrote on 9 Mar 2015, 15:18 last edited by
            #5

            @SGaist Ah the svn externals seems like exactly what we need. Thank you, i was unaware of this functionality in svn.

            1 Reply Last reply
            0
            • S Offline
              S Offline
              SGaist
              Lifetime Qt Champion
              wrote on 9 Mar 2015, 21:22 last edited by
              #6

              You're welcome !

              Svn allows some interesting things like the use of properties that can simplify some handling for e.g. your files header.

              Interested in AI ? www.idiap.ch
              Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

              1 Reply Last reply
              0

              1/6

              6 Mar 2015, 15:05

              • Login

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