From ec90e950f1300107da0f3bd758dd0040bd88e78c Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 26 Oct 2021 16:15:21 +0000 Subject: [PATCH 1/2] Bump bx from `11c3c5e` to `51c3264` Bumps [bx](https://github.com/bkaradzic/bx) from `11c3c5e` to `51c3264`. - [Release notes](https://github.com/bkaradzic/bx/releases) - [Commits](https://github.com/bkaradzic/bx/compare/11c3c5e615e8715ef5d99fbcba5864d5d1036bf7...51c326484623c719bf0d0de8ff7ca0511a01feb4) --- updated-dependencies: - dependency-name: bx dependency-type: direct:production ... Signed-off-by: dependabot[bot] --- bx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bx b/bx index 11c3c5e..51c3264 160000 --- a/bx +++ b/bx @@ -1 +1 @@ -Subproject commit 11c3c5e615e8715ef5d99fbcba5864d5d1036bf7 +Subproject commit 51c326484623c719bf0d0de8ff7ca0511a01feb4 From d3260f172c3aefe7fed877c8112eff8ef79f7751 Mon Sep 17 00:00:00 2001 From: e-erdal Date: Thu, 28 Oct 2021 11:06:14 +0300 Subject: [PATCH 2/2] Add definition for `BX_CONFIG_DEBUG` --- .gitignore | 1 + CMakeLists.txt | 1 - cmake/bgfx.cmake | 6 ------ cmake/bx.cmake | 7 ++++--- 4 files changed, 5 insertions(+), 10 deletions(-) diff --git a/.gitignore b/.gitignore index 970a8ef..bc20c8b 100644 --- a/.gitignore +++ b/.gitignore @@ -13,3 +13,4 @@ install_manifest.txt generated/* !generated/*.in cmake_install.cmake +.cache/ \ No newline at end of file diff --git a/CMakeLists.txt b/CMakeLists.txt index 84019ac..6f2b462 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -28,7 +28,6 @@ option( BGFX_INSTALL_EXAMPLES "Install examples and their runtimes." OF option( BGFX_CUSTOM_TARGETS "Include convenience custom targets." ON ) option( BGFX_AMALGAMATED "Amalgamated bgfx build for faster compilation" OFF ) option( BX_AMALGAMATED "Amalgamated bx build for faster compilation" OFF ) -option( BGFX_CONFIG_DEBUG "Enables debug configuration on all builds" OFF ) option( BGFX_CONFIG_RENDERER_WEBGPU "Enables the webgpu renderer" OFF ) set( BGFX_OPENGL_VERSION "" CACHE STRING "Specify minimum opengl version" ) diff --git a/cmake/bgfx.cmake b/cmake/bgfx.cmake index a0567fe..c5e7440 100755 --- a/cmake/bgfx.cmake +++ b/cmake/bgfx.cmake @@ -52,12 +52,6 @@ if(BGFX_CONFIG_RENDERER_WEBGPU) endif() endif() -# Enable BGFX_CONFIG_DEBUG in Debug configuration -target_compile_definitions( bgfx PRIVATE "$<$:BGFX_CONFIG_DEBUG=1>" ) -if(BGFX_CONFIG_DEBUG) - target_compile_definitions( bgfx PRIVATE BGFX_CONFIG_DEBUG=1) -endif() - if( NOT ${BGFX_OPENGL_VERSION} STREQUAL "" ) target_compile_definitions( bgfx PRIVATE BGFX_CONFIG_RENDERER_OPENGL_MIN_VERSION=${BGFX_OPENGL_VERSION} ) endif() diff --git a/cmake/bx.cmake b/cmake/bx.cmake index ca9b5f8..2b34301 100644 --- a/cmake/bx.cmake +++ b/cmake/bx.cmake @@ -67,9 +67,10 @@ 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 PRIVATE "$<$:BX_CONFIG_DEBUG=1>" ) -if(BGFX_CONFIG_DEBUG) - target_compile_definitions( bx PRIVATE BX_CONFIG_DEBUG=1) +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() # Additional dependencies on Unix