Am 04.05.2011 um 20:18 schrieb Peter Kümmel: > 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.
Ok, that did it. PATH="/path/to/qt4.7.2-frameworks/bin:$PATH" cmake ... Now I have: -- 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.7.2 This one is solved, thanks. I should have read FindQt4.cmake more carefully. Stephan