Qt4 QT_INSTALL_LIBS

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Qt4 QT_INSTALL_LIBS

Lars Lars
Hello,
 
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?
 
What is the rational behind querying qmake for the the location of the libs?
 
Regards, Lars

--

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
Reply | Threaded
Open this post in threaded view
|

Re: Qt4 QT_INSTALL_LIBS

Andreas Pakulat-2
Hi,

On Thu, Nov 14, 2013 at 11:45 AM, Lars Lars <[hidden email]> 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


--

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