diff --git a/source/Irrlicht/CMakeLists.txt b/source/Irrlicht/CMakeLists.txt index 278622ba..3aa3f5f3 100644 --- a/source/Irrlicht/CMakeLists.txt +++ b/source/Irrlicht/CMakeLists.txt @@ -353,13 +353,6 @@ add_library(IRROBJ OBJECT set(IRRDRVROBJ CNullDriver.cpp - COpenGLCacheHandler.cpp - COpenGLDriver.cpp - COpenGLShaderMaterialRenderer.cpp - COpenGLSLMaterialRenderer.cpp - COpenGLExtensionHandler.cpp - COGLESDriver.cpp - COGLESExtensionHandler.cpp CGLXManager.cpp CWGLManager.cpp CEGLManager.cpp @@ -367,6 +360,25 @@ set(IRRDRVROBJ mt_opengl_loader.cpp ) +if(ENABLE_OPENGL) + set(IRRDRVROBJ + ${IRRDRVROBJ} + COpenGLCacheHandler.cpp + COpenGLDriver.cpp + COpenGLShaderMaterialRenderer.cpp + COpenGLSLMaterialRenderer.cpp + COpenGLExtensionHandler.cpp + ) +endif() + +if(ENABLE_GLES1) + set(IRRDRVROBJ + ${IRRDRVROBJ} + COGLESDriver.cpp + COGLESExtensionHandler.cpp + ) +endif() + set(IRRIMAGEOBJ CColorConverter.cpp CImage.cpp @@ -404,7 +416,7 @@ if(USE_SDLGLES2) target_sources(IRRVIDEOOBJ PRIVATE OpenGLES2/Driver.cpp ) -else() +elseif(ENABLE_GLES2) target_sources(IRRVIDEOOBJ PRIVATE COGLES2Driver.cpp COGLES2ExtensionHandler.cpp