title: How to install first project after build in qmake subfolder template?
body: <p>I have a qtcreator project with subfolder template. The folders looks like this:</p>
  
  <pre><code>mainProject/
     mainProject.pro
     staticLib/
        (bunch of .cpp and .h files)
        staticLib.pro
     testApp/
        main.cpp
        testApp.pro
  </code></pre>
  
  <p>And the mainProject.pro file:</p>
  
  <pre><code>TEMPLATE = subdirs
  CONFIG += ordered
  
  SUBDIRS = staticLib \
            testApp
  
  testApp.depends = staticLib
  </code></pre>
  
  <p>I would like to install the static library so I added the install option in the staticLib.pro file:</p>
  
  <pre><code>headersDataFiles.path = $$LIBPATH/include
  headersDataFiles.files = $$PWD/*.h
  INSTALLS += headersDataFiles
  
  libraryFiles.path = $$LIBPATH/lib
  Debug:libraryFiles.files = $$OUT_PWD/debug/*.a
  Release:libraryFiles.files = $$OUT_PWD/release/*.a
  INSTALLS += libraryFiles
  </code></pre>
  
  <p>The problem is when I build the project in Qtcreator, it builds the static lib and then the application without running make install first, so the build for the app fails. And Qtcreator only lets me add build steps after qmake_all (which build both projects without installing the lib first).</p>
  
  <p>So the question is, is there any way I could build staticLib project, install it and then build testApp?</p>
  
  <p>EDIT: The testApp project can always be linked to the library from the output directory of the first project. But I would like to move the .a and headers files to other folder to keep the project organized. The testApp building failure it's not the problem. Sorry for the misunderstood.</p>