On 04.05.2011 20:00, Stephan Witt wrote:
Am 04.05.2011 um 19:33 schrieb Kornel:

Am Mittwoch, 4. Mai 2011 schrieb Stephan Witt:
Am 04.05.2011 um 18:57 schrieb Abdelrazak Younes:
...
So we have to work on it... and I am confident that it is possible to
achieve that. I hope I can find the time to explore this soon.

That would be interesting, indeed. Another problem with CMake is the
impossibility to point it to a "non-system" Qt-installation.
I don't get it. Why is it impossible? Before calling
        find_package(Qt4 REQUIRED)
we could as well set the variable "CMAKE_FIND_ROOT_PATH". This should allow to 
find the desired libs.

I tried it with cmake ... -DQT_LIBRARY_DIR=/path/to/qt4.7.2-frameworks/lib

The output is:
...
-- Looking for Q_WS_X11
-- Looking for Q_WS_X11 - not found.
-- Looking for Q_WS_MAC
-- Looking for Q_WS_MAC - found
-- Looking for Q_WS_WIN
-- Looking for Q_WS_WIN - not found.
-- Found Qt-Version 4.6.2
...

What else should I try?

CMake uses qmake (qmake -query) to identify a Qt installation, so you could 
always
change your PATH variable so the qmake of your desired Qt installation is used.

Additionally it should work if you pass QT_QMAKE_EXECUTABLE to cmake.


BTW, if I path an invalid directory I get:

CMake Error at modules/FindQt4.cmake:363 (message):
   Could NOT find QtGlobal header
Call Stack (most recent call first):
   CMakeLists.txt:282 (find_package)

Stephan

Reply via email to