mirror of
https://github.com/bkaradzic/bgfx.cmake.git
synced 2026-02-17 21:12:35 +01:00
Set OpenGL (ES) minimum version without force-disabling other renderers (#74)
This commit is contained in:
@@ -31,7 +31,8 @@ option( BGFX_AMALGAMATED "Amalgamated bgfx build for faster compilation" OF
|
||||
option( BX_AMALGAMATED "Amalgamated bx build for faster compilation" OFF )
|
||||
option( BGFX_CONFIG_DEBUG "Enables debug configuration on all builds" OFF )
|
||||
option( BGFX_USE_DEBUG_SUFFIX "Add 'd' suffix to debug output targets" ON )
|
||||
set( BGFX_OPENGL_VERSION "" CACHE STRING "Specify minimum opengl version" )
|
||||
set( BGFX_OPENGL_VERSION "" CACHE STRING "Specify minimum OpenGL version" )
|
||||
set( BGFX_OPENGLES_VERSION "" CACHE STRING "Specify minimum OpenGL ES version" )
|
||||
|
||||
if( NOT BX_DIR )
|
||||
set( BX_DIR "${CMAKE_CURRENT_SOURCE_DIR}/bx" CACHE STRING "Location of bx." )
|
||||
|
||||
@@ -49,7 +49,11 @@ if(BGFX_CONFIG_DEBUG)
|
||||
endif()
|
||||
|
||||
if( NOT ${BGFX_OPENGL_VERSION} STREQUAL "" )
|
||||
target_compile_definitions( bgfx PRIVATE BGFX_CONFIG_RENDERER_OPENGL=${BGFX_OPENGL_VERSION})
|
||||
target_compile_definitions( bgfx PRIVATE BGFX_CONFIG_RENDERER_OPENGL_MIN_VERSION=${BGFX_OPENGL_VERSION} )
|
||||
endif()
|
||||
|
||||
if( NOT ${BGFX_OPENGLES_VERSION} STREQUAL "" )
|
||||
target_compile_definitions( bgfx PRIVATE BGFX_CONFIG_RENDERER_OPENGLES_MIN_VERSION=${BGFX_OPENGLES_VERSION} )
|
||||
endif()
|
||||
|
||||
# Special Visual Studio Flags
|
||||
|
||||
Reference in New Issue
Block a user