2

I want to detect if the Qt version is using OpenGL or Angle on Windows, for puposes of having nmake install working correctly. This is what I have now, snippet from a .pro file:

GLTMP = $$[QT_HOST_PREFIX]
contains(GLTMP, ".*_opengl") {
    message(Detected OpenGL)
} else {
    message(Did not detect OpenGL so assuming Angle)
    # add Angle DLL files to INSTALLS
}

Now this only works if QT_HOST_PREFIX actually contains _opengl for OpenGL version, but not for Angle version (for example C:\Qt\5.2.1\msvc2010_opengl vs. C:\Qt\5.2.1\msvc2010_opengl), but obviously this is not very robust.

Is there a way, which does not depend on path strings?

Desired result is to have Qmake produce correct makefile, so nmake install does the right thing.

hyde
  • 60,639
  • 21
  • 115
  • 176

1 Answers1

3

contains(QT_CONFIG, angle) should give you the proper result.

I know it's been a while since the question was asked but I stumbled over this page when looking for exactly that thing and thought that I might help others that have the same problem :)

demonplus
  • 5,613
  • 12
  • 49
  • 68
Olli
  • 46
  • 3