[CMake] qt module

Pau Garcia i Quiles pgquiles at elpauer.org
Sat Aug 4 09:05:54 EDT 2007


Quoting Marie-Christine Vallet <mmvallet at ucdavis.edu>:

>
> why do I have to  include and link qt_dir and qt_libs when I set this
> variable ?
>
> SET ( QT_USE_OPENGL TRUE )
>
>
> INCLUDE_DIRECTORIES (
>                       ${CMAKE_CURRENT_BINARY_DIR}
>                      ${QT_INCLUDE_DIR}
>                      ${QT_QTOPENGL_INCLUDE_DIR}
>
>                    )
>
> TARGET_LINK_LIBRARIES ( mdi
>                        ${QT_LIBRARIES}
>                        ${QT_QTOPENGL_LIBRARIES}
>                        ${QGLVIEWER_LIBRARY}
>                      )

The same reason you need to #include <QApplication> in your  
application: you can't use QGL without QApplication.

-- 
Pau Garcia i Quiles
http://www.elpauer.org
(Due to my workload, I may need 10 days to answer)


More information about the CMake mailing list