[prev in list] [next in list] [prev in thread] [next in thread] 

List:       cmake
Subject:    Re: [CMake] Qt4 QT_INSTALL_LIBS
From:       Andreas Pakulat <apaku () gmx ! de>
Date:       2013-11-14 12:25:06
Message-ID: CAExHGmSQ68cSBKtoEwfmeUmBpH53ju7Q9veAqfAR6tXJsQ78tA () mail ! gmail ! com
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


Hi,

On Thu, Nov 14, 2013 at 11:45 AM, Lars Lars <laasunde@hotmail.com> wrote:

> Using CMake 2.8.10 on Windows 7.
>
> We have a working project that finds QT liket this:
> FIND_PACKAGE(Qt4 4.7.1 COMPONENTS QtCore QtGui)
>
> Now we would like to update Qt library, so changed it to:
> FIND_PACKAGE(Qt4 4.8.4 COMPONENTS QtCore QtGui)
>
> 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?
>

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.

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:
http://qt-project.org/doc/qt-4.8/qt-conf.html.

What is the rational behind querying qmake for the the location of the
> libs?
>

Because qmake knows best where the libs are. There are various ways of
customizing the structure and the structure can be different across
platform.

Andreas

[Attachment #5 (text/html)]

<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">&lt;<a \
href="mailto:laasunde@hotmail.com" \
target="_blank">laasunde@hotmail.com</a>&gt;</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 &quot;qmake -query QT_INSTALL_LIBS&quot; 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&#39;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&#39;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>



--

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: \
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more information \
on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at \
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake



[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic