CMake: Link with correct OpenGL library (fixes #1872)
Vicki Pfau vi@endrift.com
Tue, 24 Nov 2020 01:25:38 -0800
2 files changed,
4 insertions(+),
0 deletions(-)
M
CHANGES
→
CHANGES
@@ -53,6 +53,7 @@ Other fixes:
- 3DS: Fix thread cleanup - All: Improve export headers (fixes mgba.io/i/1738) - CMake: Fix build with downstream minizip that exports incompatible symbols + - CMake: Link with correct OpenGL library (fixes mgba.io/i/1872) - Core: Ensure ELF regions can be written before trying - Core: Fix threading improperly setting paused state while interrupted - Debugger: Don't skip undefined instructions when debugger attached
M
CMakeLists.txt
→
CMakeLists.txt
@@ -6,6 +6,7 @@ cmake_policy(SET CMP0025 NEW)
endif() if(POLICY CMP0072) cmake_policy(SET CMP0072 NEW) + set(OpenGL_GL_PREFERENCE LEGACY) endif() project(mGBA) set(BINARY_NAME mgba CACHE INTERNAL "Name of output binaries")@@ -436,6 +437,8 @@ if(BUILD_GL)
find_package(OpenGL QUIET) if(NOT OPENGL_FOUND) set(BUILD_GL OFF CACHE BOOL "OpenGL not found" FORCE) + elseif(TARGET OpenGL::GL) + set(OPENGL_LIBRARY OpenGL::GL) endif() endif() if(NOT BUILD_GL)