title: QMake: how to choose version of library to link to
body: <p>There is simple computer vision application that uses OpenCV. I am compiling it on host system than deploy to NVidia Jetson TK1 (no problems here, I use Qt Creator with configured kit). I use <code>sshfs</code> to mount Jetson's filesystem root to host <code>/mnt/sysroot_tegra_tk1</code>.</p>
  
  <p>The problem: I've just compiled OpenCV version 3.2 on Jetson (installed into board <code>/usr/local/lib</code>). There are still system OpenCV version 2.4 in <code>/usr/local</code>. I don't know how to configure qmake on host system to cross compile and link new version instead of a Jetson's system default.</p>
  
  <p>My .pro file:</p>
  
  <pre><code>QT += core
  QT -= gui
  
  CONFIG += c++11
  
  TARGET = markerExtractionChromakey
  CONFIG += console
  CONFIG -= app_bundle
  
  unix: INCLUDEPATH += /usr/local/include
  unix: QMAKE_LIBDIR = /usr/local/lib
  
  unix: LIBS +=  -lopencv_imgproc\
                 -lopencv_core.so\
                 -lopencv_video\
                 -lopencv_highgui\
                 -lopencv_gpu
  
  TEMPLATE = app
  
  HEADERS += cameraworker.h
  
  SOURCES += main.cpp \
             cameraworker.cpp
  
  target.path = /home/ubuntu/alan/markerExtractionChromakey
  target.files += markerExtractionChromakey
  INSTALLS += target
  </code></pre>
  
  <p>Project linkage output:</p>
  
  <pre><code>/usr/bin/arm-linux-gnueabihf-g++ -Wl,-rpath-link,/mnt/sysroot_tegra_tk1/usr/lib
  -Wl,-rpath-link,/mnt/sysroot_tegra_tk1/usr/lib/arm-linux-gnueabihf
  -Wl,-rpath-link,/mnt/sysroot_tegra_tk1/lib/arm-linux-gnueabihf -mfloat-abi=hard
   --sysroot=/mnt/sysroot_tegra_tk1 -Wl,-rpath,/usr/local/qt5/lib
  -o markerExtractionChromakey main.o cameraworker.o   -L/usr/local/lib
  -lopencv_imgproc -lopencv_core -lopencv_video -lopencv_highgui 
  -lopencv_gpu -L/opt/qt5_for_tegra/qt-everywhere-opensource-src-5.5.1/qtbase/lib 
  -lQt5Core -L/mnt/sysroot_tegra_tk1/usr/lib 
  -L/mnt/sysroot_tegra_tk1/lib/arm-linux-gnueabihf 
  -L/mnt/sysroot_tegra_tk1/usr/lib/arm-linux-gnueabihf -lpthread 
  </code></pre>