title: How reference Qt Creator current build directory from Qt project file?
body: <p>Does Qt Creator set a qmake variable containing the build directory that can be referenced from the Qt project file?</p>
  
  <p>The Qt Creator Default build directory:</p>
  
  <pre>
  ../build-%{CurrentProject:Name}-%{CurrentKit:FileSystemName}-%{CurrentBuild:Name}
  </pre>
  
  <p>My goal is to copy the dll's import lib from the build output using QMAKE_POST_LINK to make it easier for my client project to link with.  QMAKE_POST_LINK works if I hard code the path of the import lib.  </p>
  
  <p>For example:</p>
  
  <pre>
  QMAKE_POST_LINK = copy C:\projects\ICP\sw\icpts\sandbox\configurable-system-test-io\build-lib-configurable-system-test-io-Desktop_Qt_5_1_0_MSVC2012_32bit_eb09a8-Debug\debug\*.lib  ..\my-lib
  </pre>
  
  <p><strong>Solution:</strong>
  Solution provided by fbucek to use $$OUT_DIR solved my problem.  Thank You!</p>
  
  <ul>
  <li>Under Windows, you must use $$shell_path($$OUT_PWD) in the QMAKE_POST_LINK to convert Unix '/' path characters to Windows '\' path characters.</li>
  <li>To add multiple commands to QMAKE_POST_LINK, enclose in $$quote() with appended $$escape_expand(\n).</li>
  </ul>
  
  <p>Example of Multiple QMAKE_POST_LINK commands:</p>
  
  <pre>
  QMAKE_POST_LINK += $$quote(copy /Y $$shell_path($$OUT_PWD)\debug\*.dll  ..\lib$$escape_expand(\\n))
  QMAKE_POST_LINK += $$quote(copy /Y $$shell_path($$OUT_PWD)\debug\*.lib  ..\lib$$escape_expand(\\n))
  QMAKE_POST_LINK += $$quote(copy /Y $$shell_path($$OUT_PWD)\debug\*.pdb  ..\lib$$escape_expand(\\n))
  </pre>
  
  <p>Thanks again for $$OUT_PWD !</p>
  
  <p>-Ed</p>
  
  <ul>
  <li>Qt Creator 2.7.2</li>
  <li>Qt 5.1</li>
  <li>Microsoft VS 2012</li>
  <li>Windows 7</li>
  </ul>