Autocompletition with cmake project and qt creator: OPENGL



  • hi,
    i have set up a project that uses opengl with qt creator 2.8, and the .pro files.
    everything works good (auto completition, compiling, linking, everything)
    i'm using qt 4.8, and old opengl command (glBegin, glVertex, glMultMatrix etc) without shader.

    now i want to port the .pro file to cmake (i'm using cmake 2.8.11)
    everything works ok but not the autocompletition.

    in the cmakelists this is how i import the opengl:

    @find_package(OpenGL REQUIRED)
    include_directories(${OPENGL_INCLUDE_DIR})
    find_package(GLUT)
    if(NOT OPENGL_FOUND)
    message(FATAL_ERROR "!!! OpenGL not FOUND")
    elseif(OPENGL_FOUND)
    message(STATUS "OpenGL found")
    set(LIB ${LIB} ${OPENGL_LIBRARIES})
    endif(NOT OPENGL_FOUND)

    qt

    find_package(Qt4 COMPONENTS QtCore QtGui QtOpenGL QtNetwork REQUIRED)
    set(QT_MIN_VERSION "4.8.0")
    set(QT_USE_QTOPENGL TRUE)
    include(${QT_USE_FILE})@

    what am i missing?


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.