SDL: Fix SDL build when OpenGL is missing
Jeffrey Pfau jeffrey@endrift.com
Fri, 12 Jun 2015 00:52:06 -0700
2 files changed,
4 insertions(+),
1 deletions(-)
M
CHANGES
→
CHANGES
@@ -41,6 +41,7 @@ - GBA: Check for savestates made from differently sized ROMs
- 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
M
src/platform/sdl/CMakeLists.txt
→
src/platform/sdl/CMakeLists.txt
@@ -66,10 +66,12 @@ list(APPEND MAIN_SRC ${CMAKE_SOURCE_DIR}/src/platform/sdl/pandora-sdl.c)
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()