title: How to set install directory depending on compiler?
body: <p>My very simple <code>X.pro</code> file looks like this:</p>
  
  <pre><code>TEMPLATE = lib
  
  CONFIG += c++14 warn_on
  
  HEADERS += x.hpp
  
  target_headers.path  = $$[QT_SYSROOT]/usr/include/
  target_headers.files = x.hpp
  INSTALLS += target_headers
  
  target_libs.path  = $$[QT_SYSROOT]/usr/lib/
  target_libs.files = libX.so \
                      libX.so.1 \
                      libX.so.1.0 \
                      libX.so.1.0.0
  target_libs.CONFIG += no_check_exist
  INSTALLS += target_libs
  </code></pre>
  
  <p>The header file <code>x.hpp</code> can be left empty.</p>
  
  <p>So, when I do</p>
  
  <pre><code>qmake
  make 
  make install
  </code></pre>
  
  <p>the header gets installed in <code>/usr/include/</code>, library in <code>/usr/lib/</code>.</p>
  
  <p>This works fine when I use 32-bit compiler, since the libraries are supposed to be installed in <code>/usr/lib/</code>, but it is not fine when I use the 64-bit compiler, because the library should go to <code>/usr/lib64/</code>.</p>
  
  <p>So, how do change the pro file, to configure where my library goes? Is there a way to detect whether a build is using 32bit or 64bit compiler?</p>
  
  <hr>
  
  <p>Also, this is going to create 4 copies of the library, and not copy the links. How to fix that?</p>