diff --git a/CMakeLists.txt b/CMakeLists.txt index 98a0a5a..e9716fb 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -34,6 +34,7 @@ option( BGFX_AMALGAMATED "Amalgamated bgfx build for faster compi option( BX_AMALGAMATED "Amalgamated bx build for faster compilation" OFF ) option( BGFX_CONFIG_MULTITHREADED "Build bgfx with multithreaded configuration" ON ) option( BGFX_CONFIG_RENDERER_WEBGPU "Enables the webgpu renderer" OFF ) +option( BX_CONFIG_DEBUG "Log debug messages (default: on in debug)" OFF ) set( BGFX_OPENGL_VERSION "" CACHE STRING "Specify minimum opengl version" ) set( BGFX_OPENGLES_VERSION "" CACHE STRING "Specify minimum OpenGL ES version" ) diff --git a/cmake/bgfx.cmake b/cmake/bgfx.cmake index 5c0ccdc..ef77df7 100755 --- a/cmake/bgfx.cmake +++ b/cmake/bgfx.cmake @@ -72,7 +72,7 @@ endif() # Add debug config required in bx headers since bx is private target_compile_definitions(bgfx PUBLIC - "BX_CONFIG_DEBUG=$" + "BX_CONFIG_DEBUG=$,1,$>" "BGFX_CONFIG_MULTITHREADED=$" ) diff --git a/cmake/bx.cmake b/cmake/bx.cmake index a784cde..3c30a34 100644 --- a/cmake/bx.cmake +++ b/cmake/bx.cmake @@ -71,7 +71,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" ) -target_compile_definitions(bx PUBLIC "BX_CONFIG_DEBUG=$") +target_compile_definitions(bx PUBLIC "BX_CONFIG_DEBUG=$,1,$>") # Additional dependencies on Unix if (ANDROID)