SDL: Fix SDL build when OpenGL is missing

This commit is contained in:
Jeffrey Pfau 2015-06-12 00:52:06 -07:00
parent b1c2d1973e
commit f2e298f78d
2 changed files with 4 additions and 1 deletions

View File

@ -41,6 +41,7 @@ Bugfixes:
- GBA Video: Fix out-of-bounds tiles in mosaic
- GBA Memory: Fix potential DMA issue when loading a savestate
- GBA Audio: Fix audio pitch changing when adjusting buffer size
- SDL: Fix SDL build when OpenGL is missing
Misc:
- Qt: Handle saving input settings better
- Debugger: Free watchpoints in addition to breakpoints

View File

@ -66,10 +66,12 @@ if(BUILD_PANDORA)
else()
list(APPEND MAIN_SRC ${CMAKE_SOURCE_DIR}/src/platform/sdl/sw-sdl.c)
if(BUILD_GL)
find_package(OpenGL)
endif()
if(OPENGL_FOUND)
list(APPEND MAIN_SRC ${CMAKE_SOURCE_DIR}/src/platform/sdl/gl-sdl.c)
list(APPEND PLATFORM_SRC ${CMAKE_SOURCE_DIR}/src/platform/opengl/gl.c)
add_definitions(-DBUILD_GL)
find_package(OpenGL REQUIRED)
include_directories(${OPENGL_INCLUDE_DIR})
endif()
endif()