<commit_before>set (CEGUI_TARGET_NAME ${CEGUI_OPENGL_RENDERER_LIBNAME})

cegui_gather_files()

if (NOT APPLE OR NOT CEGUI_BUILD_RENDERER_OPENGL)
    list (REMOVE_ITEM CORE_SOURCE_FILES ApplePBTextureTarget.cpp)
    list (REMOVE_ITEM CORE_HEADER_FILES ${CMAKE_SOURCE_DIR}/cegui/include/CEGUI/RendererModules/OpenGL/ApplePBTextureTarget.h)
endif()

if (NOT WIN32 OR NOT CEGUI_BUILD_RENDERER_OPENGL)
    list (REMOVE_ITEM CORE_SOURCE_FILES WGLPBTextureTarget.cpp)
    list (REMOVE_ITEM CORE_HEADER_FILES ${CMAKE_SOURCE_DIR}/cegui/include/CEGUI/RendererModules/OpenGL/WGLPBTextureTarget.h)
endif()

if (NOT UNIX OR APPLE OR NOT CEGUI_BUILD_RENDERER_OPENGL)
    list (REMOVE_ITEM CORE_SOURCE_FILES GLXPBTextureTarget.cpp)
    list (REMOVE_ITEM CORE_HEADER_FILES ${CMAKE_SOURCE_DIR}/cegui/include/CEGUI/RendererModules/OpenGL/GLXPBTextureTarget.h)
endif()

if (NOT CEGUI_BUILD_RENDERER_OPENGL)
    list (REMOVE_ITEM CORE_SOURCE_FILES GLRenderer.cpp
                                        GLGeometryBuffer.cpp
                                        GLFBOTextureTarget.cpp
                                        GLShaderWrapper.cpp)
    list (REMOVE_ITEM CORE_HEADER_FILES ${CMAKE_SOURCE_DIR}/cegui/include/CEGUI/RendererModules/OpenGL/GLRenderer.h
                                        ${CMAKE_SOURCE_DIR}/cegui/include/CEGUI/RendererModules/OpenGL/GLGeometryBuffer.h
                                        ${CMAKE_SOURCE_DIR}/cegui/include/CEGUI/RendererModules/OpenGL/GLFBOTextureTarget.h
                                        ${CMAKE_SOURCE_DIR}/cegui/include/CEGUI/RendererModules/OpenGL/GLShaderWrapper.h)
endif()

if (NOT CEGUI_BUILD_RENDERER_OPENGL3 AND NOT CEGUI_BUILD_RENDERER_OPENGLES2)
    list (REMOVE_ITEM CORE_SOURCE_FILES Shader.cpp
                                        ShaderManager.cpp
                                        StateChangeWrapper.cpp
                                        GLBaseShaderWrapper.cpp)
    list (REMOVE_ITEM CORE_HEADER_FILES ${CMAKE_SOURCE_DIR}/cegui/include/CEGUI/RendererModules/OpenGL/Shader.h
                                        ${CMAKE_SOURCE_DIR}/cegui/include/CEGUI/RendererModules/OpenGL/ShaderManager.h
                                        ${CMAKE_SOURCE_DIR}/cegui/include/CEGUI/RendererModules/OpenGL/StateChangeWrapper.h
                                        ${CMAKE_SOURCE_DIR}/cegui/include/CEGUI/RendererModules/OpenGL/StandardShaderFrag.h
                                        ${CMAKE_SOURCE_DIR}/cegui/include/CEGUI/RendererModules/OpenGL/StandardShaderVert.h
                                        ${CMAKE_SOURCE_DIR}/cegui/include/CEGUI/RendererModules/OpenGL/GLBaseShaderWrapper.h)
endif()


if (NOT CEGUI_BUILD_RENDERER_OPENGL3)
    list (REMOVE_ITEM CORE_SOURCE_FILES GL3Renderer.cpp
                                        GL3Texture.cpp
                                        GL3GeometryBuffer.cpp
                                        GL3FBOTextureTarget.cpp
                                        GL3Shader.cpp
                                        GL3StateChangeWrapper.cpp)
    list (REMOVE_ITEM CORE_HEADER_FILES ${CMAKE_SOURCE_DIR}/cegui/include/CEGUI/RendererModules/OpenGL/GL3Renderer.h
                                        ${CMAKE_SOURCE_DIR}/cegui/include/CEGUI/RendererModules/OpenGL/GL3Texture.h
                                        ${CMAKE_SOURCE_DIR}/cegui/include/CEGUI/RendererModules/OpenGL/GL3GeometryBuffer.h
                                        ${CMAKE_SOURCE_DIR}/cegui/include/CEGUI/RendererModules/OpenGL/GL3Shader.h
                                        ${CMAKE_SOURCE_DIR}/cegui/include/CEGUI/RendererModules/OpenGL/GL3StateShaderWrapper.h
                                        ${CMAKE_SOURCE_DIR}/cegui/include/CEGUI/RendererModules/OpenGL/GL3FBOTextureTarget.h)
endif()

#GL and GL3 both use GLTexture via inheritance
if (NOT CEGUI_BUILD_RENDERER_OPENGL3 AND NOT CEGUI_BUILD_RENDERER_OPENGL)
    list (REMOVE_ITEM CORE_SOURCE_FILES GLTexture.cpp)
    list (REMOVE_ITEM CORE_HEADER_FILES ${CMAKE_SOURCE_DIR}/cegui/include/CEGUI/RendererModules/OpenGL/GLTexture.h)
endif()

if (NOT CEGUI_BUILD_RENDERER_OPENGLES2)
    list (REMOVE_ITEM CORE_SOURCE_FILES GLES2Renderer.cpp
                                        GLES2Texture.cpp
                                        GLES2GeometryBuffer.cpp
                                        GLES2FBOTextureTarget.cpp)
    list (REMOVE_ITEM CORE_HEADER_FILES ${CMAKE_SOURCE_DIR}/cegui/include/CEGUI/RendererModules/OpenGL/GLES2Renderer.h
        ${CMAKE_SOURCE_DIR}/cegui/include/CEGUI/RendererModules/OpenGL/GLES2Texture.h
        ${CMAKE_SOURCE_DIR}/cegui/include/CEGUI/RendererModules/OpenGL/GLES2GeometryBuffer.h
        ${CMAKE_SOURCE_DIR}/cegui/include/CEGUI/RendererModules/OpenGL/GLES2FBOTextureTarget.h
        ${CMAKE_SOURCE_DIR}/cegui/include/CEGUI/RendererModules/OpenGL/GLES2StateShaderWrapper.h)

endif()

cegui_add_library(${CEGUI_TARGET_NAME} CORE_SOURCE_FILES CORE_HEADER_FILES)
cegui_add_dependency(${CEGUI_TARGET_NAME} GLM)
if (CEGUI_BUILD_RENDERER_OPENGLES2)
    if (CEGUI_BUILD_RENDERER_OPENGLES2_WITH_GLES3_SUPPORT)
        add_definitions ( -DCEGUI_GLES3_SUPPORT )
        cegui_add_dependency(${CEGUI_TARGET_NAME} OPENGLES3)
    else()
        cegui_add_dependency(${CEGUI_TARGET_NAME} OPENGLES2)
    endif()
endif()
if (CEGUI_BUILD_RENDERER_OPENGL OR CEGUI_BUILD_RENDERER_OPENGL3)
    cegui_add_dependency(${CEGUI_TARGET_NAME} OPENGL)
    cegui_add_dependency(${CEGUI_TARGET_NAME} GLEW)
endif()

cegui_target_link_libraries(${CEGUI_TARGET_NAME} ${CEGUI_BASE_LIBNAME})

<commit_msg>Exclude GLES2StateChangeWrapper.cpp from non-GLES builds<commit_after>set (CEGUI_TARGET_NAME ${CEGUI_OPENGL_RENDERER_LIBNAME})

cegui_gather_files()

if (NOT APPLE OR NOT CEGUI_BUILD_RENDERER_OPENGL)
    list (REMOVE_ITEM CORE_SOURCE_FILES ApplePBTextureTarget.cpp)
    list (REMOVE_ITEM CORE_HEADER_FILES ${CMAKE_SOURCE_DIR}/cegui/include/CEGUI/RendererModules/OpenGL/ApplePBTextureTarget.h)
endif()

if (NOT WIN32 OR NOT CEGUI_BUILD_RENDERER_OPENGL)
    list (REMOVE_ITEM CORE_SOURCE_FILES WGLPBTextureTarget.cpp)
    list (REMOVE_ITEM CORE_HEADER_FILES ${CMAKE_SOURCE_DIR}/cegui/include/CEGUI/RendererModules/OpenGL/WGLPBTextureTarget.h)
endif()

if (NOT UNIX OR APPLE OR NOT CEGUI_BUILD_RENDERER_OPENGL)
    list (REMOVE_ITEM CORE_SOURCE_FILES GLXPBTextureTarget.cpp)
    list (REMOVE_ITEM CORE_HEADER_FILES ${CMAKE_SOURCE_DIR}/cegui/include/CEGUI/RendererModules/OpenGL/GLXPBTextureTarget.h)
endif()

if (NOT CEGUI_BUILD_RENDERER_OPENGL)
    list (REMOVE_ITEM CORE_SOURCE_FILES GLRenderer.cpp
                                        GLGeometryBuffer.cpp
                                        GLFBOTextureTarget.cpp
                                        GLShaderWrapper.cpp)
    list (REMOVE_ITEM CORE_HEADER_FILES ${CMAKE_SOURCE_DIR}/cegui/include/CEGUI/RendererModules/OpenGL/GLRenderer.h
                                        ${CMAKE_SOURCE_DIR}/cegui/include/CEGUI/RendererModules/OpenGL/GLGeometryBuffer.h
                                        ${CMAKE_SOURCE_DIR}/cegui/include/CEGUI/RendererModules/OpenGL/GLFBOTextureTarget.h
                                        ${CMAKE_SOURCE_DIR}/cegui/include/CEGUI/RendererModules/OpenGL/GLShaderWrapper.h)
endif()

if (NOT CEGUI_BUILD_RENDERER_OPENGL3 AND NOT CEGUI_BUILD_RENDERER_OPENGLES2)
    list (REMOVE_ITEM CORE_SOURCE_FILES Shader.cpp
                                        ShaderManager.cpp
                                        StateChangeWrapper.cpp
                                        GLBaseShaderWrapper.cpp)
    list (REMOVE_ITEM CORE_HEADER_FILES ${CMAKE_SOURCE_DIR}/cegui/include/CEGUI/RendererModules/OpenGL/Shader.h
                                        ${CMAKE_SOURCE_DIR}/cegui/include/CEGUI/RendererModules/OpenGL/ShaderManager.h
                                        ${CMAKE_SOURCE_DIR}/cegui/include/CEGUI/RendererModules/OpenGL/StateChangeWrapper.h
                                        ${CMAKE_SOURCE_DIR}/cegui/include/CEGUI/RendererModules/OpenGL/StandardShaderFrag.h
                                        ${CMAKE_SOURCE_DIR}/cegui/include/CEGUI/RendererModules/OpenGL/StandardShaderVert.h
                                        ${CMAKE_SOURCE_DIR}/cegui/include/CEGUI/RendererModules/OpenGL/GLBaseShaderWrapper.h)
endif()


if (NOT CEGUI_BUILD_RENDERER_OPENGL3)
    list (REMOVE_ITEM CORE_SOURCE_FILES GL3Renderer.cpp
                                        GL3Texture.cpp
                                        GL3GeometryBuffer.cpp
                                        GL3FBOTextureTarget.cpp
                                        GL3Shader.cpp
                                        GL3StateChangeWrapper.cpp)
    list (REMOVE_ITEM CORE_HEADER_FILES ${CMAKE_SOURCE_DIR}/cegui/include/CEGUI/RendererModules/OpenGL/GL3Renderer.h
                                        ${CMAKE_SOURCE_DIR}/cegui/include/CEGUI/RendererModules/OpenGL/GL3Texture.h
                                        ${CMAKE_SOURCE_DIR}/cegui/include/CEGUI/RendererModules/OpenGL/GL3GeometryBuffer.h
                                        ${CMAKE_SOURCE_DIR}/cegui/include/CEGUI/RendererModules/OpenGL/GL3Shader.h
                                        ${CMAKE_SOURCE_DIR}/cegui/include/CEGUI/RendererModules/OpenGL/GL3StateShaderWrapper.h
                                        ${CMAKE_SOURCE_DIR}/cegui/include/CEGUI/RendererModules/OpenGL/GL3FBOTextureTarget.h)
endif()

#GL and GL3 both use GLTexture via inheritance
if (NOT CEGUI_BUILD_RENDERER_OPENGL3 AND NOT CEGUI_BUILD_RENDERER_OPENGL)
    list (REMOVE_ITEM CORE_SOURCE_FILES GLTexture.cpp)
    list (REMOVE_ITEM CORE_HEADER_FILES ${CMAKE_SOURCE_DIR}/cegui/include/CEGUI/RendererModules/OpenGL/GLTexture.h)
endif()

if (NOT CEGUI_BUILD_RENDERER_OPENGLES2)
    list (REMOVE_ITEM CORE_SOURCE_FILES GLES2Renderer.cpp
                                        GLES2Texture.cpp
                                        GLES2GeometryBuffer.cpp
                                        GLES2FBOTextureTarget.cpp
                                        GLES2StateChangeWrapper.cpp)
    list (REMOVE_ITEM CORE_HEADER_FILES ${CMAKE_SOURCE_DIR}/cegui/include/CEGUI/RendererModules/OpenGL/GLES2Renderer.h
        ${CMAKE_SOURCE_DIR}/cegui/include/CEGUI/RendererModules/OpenGL/GLES2Texture.h
        ${CMAKE_SOURCE_DIR}/cegui/include/CEGUI/RendererModules/OpenGL/GLES2GeometryBuffer.h
        ${CMAKE_SOURCE_DIR}/cegui/include/CEGUI/RendererModules/OpenGL/GLES2FBOTextureTarget.h
        ${CMAKE_SOURCE_DIR}/cegui/include/CEGUI/RendererModules/OpenGL/GLES2StateShaderWrapper.h)

endif()

cegui_add_library(${CEGUI_TARGET_NAME} CORE_SOURCE_FILES CORE_HEADER_FILES)
cegui_add_dependency(${CEGUI_TARGET_NAME} GLM)
if (CEGUI_BUILD_RENDERER_OPENGLES2)
    if (CEGUI_BUILD_RENDERER_OPENGLES2_WITH_GLES3_SUPPORT)
        add_definitions ( -DCEGUI_GLES3_SUPPORT )
        cegui_add_dependency(${CEGUI_TARGET_NAME} OPENGLES3)
    else()
        cegui_add_dependency(${CEGUI_TARGET_NAME} OPENGLES2)
    endif()
endif()
if (CEGUI_BUILD_RENDERER_OPENGL OR CEGUI_BUILD_RENDERER_OPENGL3)
    cegui_add_dependency(${CEGUI_TARGET_NAME} OPENGL)
    cegui_add_dependency(${CEGUI_TARGET_NAME} GLEW)
endif()

cegui_target_link_libraries(${CEGUI_TARGET_NAME} ${CEGUI_BASE_LIBNAME})


{'fraction_non_alphanumeric': 0.07163781624500666, 'fraction_numerical': 0.006569019085663559, 'mean_word_length': 2.427441435959842, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 55, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7651769', 'n_tokens_mistral': 3435, 'n_tokens_neox': 3375, 'n_words': 375}