Building Qt against specific OpenGL library



  • EDIT 2 : Editing qtbase/mkspecs/common/linux.conf and entering:
    QMAKE_INCDIR_OPENGL = /usr/local/include
    QMAKE_LIBDIR_OPENGL = /usr/local/lib
    didn't seem to work - Qt still links against /usr/lib/x86_64-linux-gnu/mesa/libGL.so.1, not /usr/local/lib/libGL.so as I would like. So I'm still open to suggestions.

    EDIT: Ah, I think I get it - I need to edit the mkspec. Will mark this as solved once I can confirm that it worked.

    I'm using Qt 5.5 on Linux Mint. I want to use a more recent version of Mesa than the one installed with the system, since I want support for version 3.30 of GLSL. Therefore I've compiled my own Mesa and installed it in /usr/local/.

    Questions:

    1. I assume that I have to link my application against a version of Qt that is compiled against the new Mesa lib - I can't just link my application to the new OpenGL lib. Is this correct?

    2. If so, how can I tell Qt to compile itself against a specific OpenGL lib? I've already successfully compiled Qt 5.5 from git, but it's linked against the "system" opengl lib.

    Thanks in advance!


Log in to reply
 

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