Cleaning for opengl rendering prep.

This commit is contained in:
James Grogan 2022-11-14 11:19:51 +00:00
parent 402f381d10
commit 7c6a92f4ec
58 changed files with 570 additions and 533 deletions

View file

@ -7,23 +7,21 @@ list(APPEND graphics_LIB_INCLUDES
DrawingContext.cpp
DrawingManager.cpp
DrawingSurface.cpp
Rasterizer.cpp
RasterPainter.cpp
${platform_LIB_INCLUDES}
)
list(APPEND graphics_HEADERS
${platform_HEADERS}
Rasterizer.h
INativeDrawingSurface.h
INativeDrawingContext.h
RasterPainter.h
)
set(OpenGL_GL_PREFERENCE "GLVND")
find_package(OpenGL QUIET)
if (OpenGL_FOUND)
list(APPEND platform_LIBS OpenGL::GL)
list(APPEND graphics_LIB_INCLUDES opengl/OpenGlInterface.cpp)
list(APPEND graphics_HEADERS opengl/OpenGlInterface.h)
list(APPEND graphics_LIB_INCLUDES opengl/OpenGlPainter.cpp)
list(APPEND graphics_HEADERS opengl/OpenGlPainter.h)
else()
message(STATUS "OpenGL headers not found - skipping OpenGL support")
endif()
@ -35,11 +33,7 @@ add_library(graphics SHARED
target_include_directories(graphics PUBLIC
${platform_INCLUDE_DIRS}
"${CMAKE_CURRENT_SOURCE_DIR}"
"${CMAKE_CURRENT_SOURCE_DIR}/cairo"
"${CMAKE_CURRENT_SOURCE_DIR}/opengl"
"${PROJECT_SOURCE_DIR}/src/geometry/"
"${PROJECT_SOURCE_DIR}/src/image/"
"${PROJECT_SOURCE_DIR}/src/visual_elements/"
)
target_link_libraries(graphics PUBLIC visual_elements image ${platform_LIBS})