Merge pull request #103 from Ravbug/bx_debug_fix

BX_CONFIG_DEBUG via generator expression
This commit is contained in:
loanselot
2022-02-03 13:05:49 +03:00
committed by GitHub
2 changed files with 2 additions and 11 deletions

View File

@@ -70,12 +70,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 "BX_CONFIG_DEBUG=$<CONFIG:Debug>")
# 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 "BX_CONFIG_DEBUG=$<CONFIG:Debug>")
# Additional dependencies on Unix
if( UNIX AND NOT APPLE AND NOT ANDROID )