From a01e8e043fe213a55b0bea9623f45fad80d067bc Mon Sep 17 00:00:00 2001 From: Sandy Carter Date: Sat, 30 Oct 2021 09:38:39 -0400 Subject: [PATCH] bgfx: Add debug config required in bx headers since bx is private --- cmake/bgfx.cmake | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/cmake/bgfx.cmake b/cmake/bgfx.cmake index c5e7440..adc05e4 100755 --- a/cmake/bgfx.cmake +++ b/cmake/bgfx.cmake @@ -65,6 +65,14 @@ if( MSVC ) target_compile_definitions( bgfx PRIVATE "_CRT_SECURE_NO_WARNINGS" ) 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() + + # Includes target_include_directories( bgfx PRIVATE