Support minimal dependency linux build.
This commit is contained in:
parent
92a35a5bc9
commit
7ce29ce8ae
14 changed files with 421 additions and 176 deletions
|
@ -3,32 +3,29 @@ set(platform_INCLUDE_DIRS "")
|
|||
set(platform_HEADERS "")
|
||||
set(platform_LIBS "")
|
||||
|
||||
if (UNIX)
|
||||
list(APPEND platform_LIBSs
|
||||
GL
|
||||
)
|
||||
else()
|
||||
list(APPEND platform_LIBS
|
||||
OpenGL32.lib
|
||||
)
|
||||
endif()
|
||||
|
||||
list(APPEND graphics_LIB_INCLUDES
|
||||
DrawingContext.cpp
|
||||
DrawingManager.cpp
|
||||
DrawingSurface.cpp
|
||||
Rasterizer.cpp
|
||||
opengl/OpenGlInterface.cpp
|
||||
${platform_LIB_INCLUDES}
|
||||
${platform_LIB_INCLUDES}
|
||||
)
|
||||
|
||||
list(APPEND graphics_HEADERS
|
||||
opengl/OpenGlInterface.h
|
||||
${platform_HEADERS}
|
||||
Rasterizer.h
|
||||
INativeDrawingSurface.h
|
||||
INativeDrawingContext.h)
|
||||
INativeDrawingContext.h
|
||||
)
|
||||
|
||||
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)
|
||||
else()
|
||||
message(STATUS "OpenGL headers not found - skipping OpenGL support")
|
||||
endif()
|
||||
|
||||
add_library(graphics SHARED
|
||||
${graphics_LIB_INCLUDES}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue