diff --git a/mkspecs/features/ctest_testcase.prf b/mkspecs/features/ctest_testcase.prf index be972e0864..8eb6f3263e 100644 --- a/mkspecs/features/ctest_testcase.prf +++ b/mkspecs/features/ctest_testcase.prf @@ -57,7 +57,8 @@ isEmpty(CMAKE_VERSION) { dependentmodules -= $$CMAKE_QT_MODULES_UNDER_TEST dependentmodules = $$cmakeModuleList($$dependentmodules) - contains(QT_CONFIG, angle): CMAKE_ANGLE_DEFINE = -DQT_WITH_ANGLE=True + contains(QT_CONFIG, angle): CMAKE_GL_DEFINES = -DQT_WITH_ANGLE=True + !contains(QT_CONFIG, egl): CMAKE_GL_DEFINES += -DNO_EGL=True CMAKE_MODULE_VERSIONS = CMAKE_MODULES_UNDER_TEST = @@ -76,7 +77,7 @@ isEmpty(CMAKE_VERSION) { cmake $$_PRO_FILE_PWD_ $$CMAKE_GENERATOR \ -DCMAKE_VERBOSE_MAKEFILE=1 \ $$CMAKE_MODULE_DEFINES \ - $$CMAKE_ANGLE_DEFINE \ + $$CMAKE_GL_DEFINES \ -DCMAKE_BUILD_TYPE=$${CMAKE_BUILD_TYPE} \ -DCMAKE_PREFIX_PATH=$$CMAKE_PREFIX_PATH \ -DQt5_MODULE_TEST_DEPENDS=\"$${dependentmodules}\" \ diff --git a/src/gui/gui.pro b/src/gui/gui.pro index b44f563b3e..e2dd5efcde 100644 --- a/src/gui/gui.pro +++ b/src/gui/gui.pro @@ -56,8 +56,10 @@ contains(QT_CONFIG, angle) { CMAKE_QT_OPENGL_IMPLEMENTATION = GLESv2 } else { - CMAKE_EGL_LIBS = $$cmakeProcessLibs($$QMAKE_LIBS_EGL) - !isEmpty(QMAKE_LIBDIR_EGL): CMAKE_EGL_LIBDIR += $$cmakeTargetPath($$QMAKE_LIBDIR_EGL) + contains(QT_CONFIG, egl) { + CMAKE_EGL_LIBS = $$cmakeProcessLibs($$QMAKE_LIBS_EGL) + !isEmpty(QMAKE_LIBDIR_EGL): CMAKE_EGL_LIBDIR += $$cmakeTargetPath($$QMAKE_LIBDIR_EGL) + } contains(QT_CONFIG, opengles1) { !isEmpty(QMAKE_INCDIR_OPENGL_ES1): CMAKE_GL_INCDIRS = $$cmakeTargetPaths($$QMAKE_INCDIR_OPENGL_ES1) @@ -84,6 +86,6 @@ contains(QT_CONFIG, angle) { } } -CMAKE_EGL_INCDIRS = $$cmakePortablePaths($$QMAKE_INCDIR_EGL) +contains(QT_CONFIG, egl): CMAKE_EGL_INCDIRS = $$cmakePortablePaths($$QMAKE_INCDIR_EGL) QMAKE_DYNAMIC_LIST_FILE = $$PWD/QtGui.dynlist diff --git a/tests/auto/cmake/CMakeLists.txt b/tests/auto/cmake/CMakeLists.txt index 25f2ab6a87..0f794915ee 100644 --- a/tests/auto/cmake/CMakeLists.txt +++ b/tests/auto/cmake/CMakeLists.txt @@ -121,7 +121,7 @@ test_module_includes( ) expect_pass(test_concurrent_module) expect_pass(test_openglextensions_module) -if (QT_WITH_ANGLE OR (NOT WIN32 AND NOT APPLE)) +if (QT_WITH_ANGLE OR (NOT WIN32 AND NOT APPLE AND NOT NO_EGL)) expect_pass(test_egl_lib) endif() expect_pass(test_opengl_lib)