mirror of https://github.com/mgba-emu/mgba.git
CMake: Move BUILD_GL flags to FEATURE_DEFINES
This commit is contained in:
parent
b169e6b0df
commit
2e2ad70550
|
@ -457,17 +457,20 @@ if(NOT BUILD_GLES2)
|
||||||
endif()
|
endif()
|
||||||
if(BUILD_GL)
|
if(BUILD_GL)
|
||||||
list(APPEND FEATURE_SRC ${CMAKE_CURRENT_SOURCE_DIR}/src/platform/opengl/gl.c)
|
list(APPEND FEATURE_SRC ${CMAKE_CURRENT_SOURCE_DIR}/src/platform/opengl/gl.c)
|
||||||
|
list(APPEND FEATURE_DEFINES BUILD_GL)
|
||||||
list(APPEND DEPENDENCY_LIB ${OPENGL_LIBRARY})
|
list(APPEND DEPENDENCY_LIB ${OPENGL_LIBRARY})
|
||||||
include_directories(${OPENGL_INCLUDE_DIR})
|
include_directories(${OPENGL_INCLUDE_DIR})
|
||||||
endif()
|
endif()
|
||||||
if(BUILD_GLES2)
|
if(BUILD_GLES2)
|
||||||
list(APPEND FEATURE_SRC ${CMAKE_CURRENT_SOURCE_DIR}/src/platform/opengl/gles2.c)
|
list(APPEND FEATURE_SRC ${CMAKE_CURRENT_SOURCE_DIR}/src/platform/opengl/gles2.c)
|
||||||
|
list(APPEND FEATURE_DEFINES BUILD_GLES2)
|
||||||
list(APPEND DEPENDENCY_LIB ${OPENGLES2_LIBRARY})
|
list(APPEND DEPENDENCY_LIB ${OPENGLES2_LIBRARY})
|
||||||
include_directories(${OPENGLES2_INCLUDE_DIR})
|
include_directories(${OPENGLES2_INCLUDE_DIR})
|
||||||
endif()
|
endif()
|
||||||
if(BUILD_GLES3)
|
if(BUILD_GLES3)
|
||||||
find_path(OPENGLES3_INCLUDE_DIR NAMES GLES3/gl3.h)
|
find_path(OPENGLES3_INCLUDE_DIR NAMES GLES3/gl3.h)
|
||||||
find_library(OPENGLES3_LIBRARY NAMES GLESv3 GLESv2)
|
find_library(OPENGLES3_LIBRARY NAMES GLESv3 GLESv2)
|
||||||
|
list(APPEND FEATURE_DEFINES BUILD_GLES3)
|
||||||
if(NOT OPENGLES3_INCLUDE_DIR OR NOT OPENGLES3_LIBRARY)
|
if(NOT OPENGLES3_INCLUDE_DIR OR NOT OPENGLES3_LIBRARY)
|
||||||
set(BUILD_GLES3 OFF CACHE BOOL "OpenGL|ES 3 not found" FORCE)
|
set(BUILD_GLES3 OFF CACHE BOOL "OpenGL|ES 3 not found" FORCE)
|
||||||
endif()
|
endif()
|
||||||
|
@ -912,18 +915,6 @@ else()
|
||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(BUILD_GL)
|
|
||||||
add_definitions(-DBUILD_GL)
|
|
||||||
endif()
|
|
||||||
|
|
||||||
if(BUILD_GLES2)
|
|
||||||
add_definitions(-DBUILD_GLES2)
|
|
||||||
endif()
|
|
||||||
|
|
||||||
if(BUILD_GLES3)
|
|
||||||
add_definitions(-DBUILD_GLES3)
|
|
||||||
endif()
|
|
||||||
|
|
||||||
if(DISABLE_FRONTENDS)
|
if(DISABLE_FRONTENDS)
|
||||||
set(BUILD_SDL OFF)
|
set(BUILD_SDL OFF)
|
||||||
set(BUILD_QT OFF)
|
set(BUILD_QT OFF)
|
||||||
|
|
Loading…
Reference in New Issue