<div dir="ltr">Hi,<div class="gmail_extra"><br><div class="gmail_quote">On Thu, Nov 14, 2013 at 11:45 AM, Lars Lars <span dir="ltr"><<a href="mailto:laasunde@hotmail.com" target="_blank">laasunde@hotmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
<div><div dir="ltr">Using CMake 2.8.10 on Windows 7.<br> <br>We have a working project that finds QT liket this:<br>FIND_PACKAGE(Qt4 4.7.1 COMPONENTS QtCore QtGui)<br> <br>Now we would like to update Qt library, so changed it to:<br>
FIND_PACKAGE(Qt4 4.8.4 COMPONENTS QtCore QtGui)<br> <br>This however fails because FindQt4.cmake execute "qmake -query QT_INSTALL_LIBS" which returns the path where the Qt library was built. We however store Qt in another location in our development setup. How can is solved this issue without rebuilding the Qt library in the same path as the development setup? <br>
</div></div></blockquote><div><br></div><div>Your Qt won't work from that place as it is either. Qt is not relocatable, the path to the install location is hardcoded into the tools. If you build a Qt project with qmake it'll also generate compiler commands that point to the non-existing install location.</div>
<div><br></div><div>You can make the Qt installation relocatable by adding a qt.conf file and qmake will pick this up as well, see the Qt docs for more information: <a href="http://qt-project.org/doc/qt-4.8/qt-conf.html">http://qt-project.org/doc/qt-4.8/qt-conf.html</a>.</div>
<div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div><div dir="ltr">What is the rational behind querying qmake for the the location of the libs? </div>
</div></blockquote><div><br></div><div>Because qmake knows best where the libs are. There are various ways of customizing the structure and the structure can be different across platform.</div><div><br></div><div>Andreas</div>
</div><br></div></div>