Change BGFX_CONFIG_DEBUG to generator expression

This commit is contained in:
Ravbug
2021-12-19 11:44:52 -08:00
parent a01e8e043f
commit 0f1a5a91e6
2 changed files with 2 additions and 11 deletions

View File

@@ -66,12 +66,7 @@ if( MSVC )
endif()
# Add debug config required in bx headers since bx is private
if (${CMAKE_BUILD_TYPE} STREQUAL "Debug")
target_compile_definitions( bgfx PUBLIC "BX_CONFIG_DEBUG=1" )
else()
target_compile_definitions( bgfx PUBLIC "BX_CONFIG_DEBUG=0" )
endif()
target_compile_definitions(bgfx PUBLIC $<$<CONFIG:DEBUG>:BX_CONFIG_DEBUG=1> $<$<CONFIG:RELEASE>:BX_CONFIG_DEBUG=0>)
# Includes
target_include_directories( bgfx

View File

@@ -67,11 +67,7 @@ target_compile_definitions( bx PUBLIC "__STDC_LIMIT_MACROS" )
target_compile_definitions( bx PUBLIC "__STDC_FORMAT_MACROS" )
target_compile_definitions( bx PUBLIC "__STDC_CONSTANT_MACROS" )
if (${CMAKE_BUILD_TYPE} STREQUAL "Debug")
target_compile_definitions( bx PUBLIC "BX_CONFIG_DEBUG=1" )
else()
target_compile_definitions( bx PUBLIC "BX_CONFIG_DEBUG=0" )
endif()
target_compile_definitions(bx PUBLIC $<$<CONFIG:DEBUG>:BX_CONFIG_DEBUG=1> $<$<CONFIG:RELEASE>:BX_CONFIG_DEBUG=0>)
# Additional dependencies on Unix
if( UNIX AND NOT APPLE AND NOT ANDROID )