mirror of
https://github.com/bkaradzic/bgfx.cmake.git
synced 2026-02-17 21:12:35 +01:00
bgfx: Add bgfx limits config options
This commit is contained in:
committed by
Sandy
parent
cf77d7c6d7
commit
52feec47f5
@@ -68,6 +68,33 @@ if( NOT ${BGFX_OPENGLES_VERSION} STREQUAL "" )
|
||||
target_compile_definitions( bgfx PRIVATE BGFX_CONFIG_RENDERER_OPENGLES_MIN_VERSION=${BGFX_OPENGLES_VERSION} )
|
||||
endif()
|
||||
|
||||
if( NOT ${BGFX_CONFIG_DEFAULT_MAX_ENCODERS} STREQUAL "" )
|
||||
target_compile_definitions( bgfx
|
||||
PUBLIC
|
||||
"BGFX_CONFIG_DEFAULT_MAX_ENCODERS=$<IF:$<BOOL:${BGFX_CONFIG_MULTITHREADED}>,${BGFX_CONFIG_DEFAULT_MAX_ENCODERS},1>" )
|
||||
endif()
|
||||
|
||||
set(BGFX_CONFIG_OPTIONS "")
|
||||
list(APPEND BGFX_CONFIG_OPTIONS
|
||||
"BGFX_CONFIG_MAX_DRAW_CALLS"
|
||||
"BGFX_CONFIG_MAX_VIEWS"
|
||||
"BGFX_CONFIG_MAX_FRAME_BUFFERS"
|
||||
"BGFX_CONFIG_MAX_VERTEX_LAYOUTS"
|
||||
"BGFX_CONFIG_MAX_VERTEX_BUFFERS"
|
||||
"BGFX_CONFIG_MAX_DYNAMIC_VERTEX_BUFFERS"
|
||||
"BGFX_CONFIG_MAX_INDEX_BUFFERS"
|
||||
"BGFX_CONFIG_MAX_DYNAMIC_INDEX_BUFFERS"
|
||||
"BGFX_CONFIG_MAX_TEXTURES"
|
||||
"BGFX_CONFIG_MAX_TEXTURE_SAMPLERS"
|
||||
"BGFX_CONFIG_MAX_SHADERS"
|
||||
"BGFX_CONFIG_SORT_KEY_NUM_BITS_PROGRAM"
|
||||
)
|
||||
foreach(BGFX_CONFIG_OPTION IN LISTS BGFX_CONFIG_OPTIONS)
|
||||
if( NOT ${${BGFX_CONFIG_OPTION}} STREQUAL "" )
|
||||
target_compile_definitions( bgfx PUBLIC "${BGFX_CONFIG_OPTION}=${${BGFX_CONFIG_OPTION}}" )
|
||||
endif()
|
||||
endforeach()
|
||||
|
||||
# Special Visual Studio Flags
|
||||
if( MSVC )
|
||||
target_compile_definitions( bgfx PRIVATE "_CRT_SECURE_NO_WARNINGS" )
|
||||
|
||||
Reference in New Issue
Block a user