From 54aaa9103d24dd3d30b48502c4126227533f6cd6 Mon Sep 17 00:00:00 2001 From: Sandy Carter Date: Fri, 2 Dec 2022 23:14:33 -0500 Subject: [PATCH] Add BGFX_CONFIG_DEBUG_ANNOTATION option Disable for WindowsStore (UWP) --- CMakeLists.txt | 27 ++++++++++++++------------- cmake/bgfx.cmake | 3 ++- 2 files changed, 16 insertions(+), 14 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 05b3eff..1b0a893 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -25,19 +25,20 @@ if (MSVC AND (MSVC_VERSION GREATER_EQUAL 1914)) add_compile_options("/Zc:__cplusplus") endif() -option( BGFX_BUILD_TOOLS "Build bgfx tools." ON ) -option( BGFX_BUILD_TOOLS_SHADER "Build bgfx shader tools." ON ) -option( BGFX_BUILD_TOOLS_GEOMETRY "Build bgfx geometry tools." ON ) -option( BGFX_BUILD_TOOLS_TEXTURE "Build bgfx texture tools." ON ) -option( BGFX_BUILD_EXAMPLES "Build bgfx examples." ON ) -option( BGFX_INSTALL "Create installation target." ON ) -option( BGFX_INSTALL_EXAMPLES "Install examples and their runtimes." OFF ) -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_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 ) +option( BX_AMALGAMATED "Amalgamated bx build for faster compilation" OFF ) +option( BX_CONFIG_DEBUG "Log debug messages (default: on in debug)" OFF ) +option( BGFX_AMALGAMATED "Amalgamated bgfx build for faster compilation" OFF ) +option( BGFX_BUILD_TOOLS "Build bgfx tools." ON ) +option( BGFX_BUILD_TOOLS_SHADER "Build bgfx shader tools." ON ) +option( BGFX_BUILD_TOOLS_GEOMETRY "Build bgfx geometry tools." ON ) +option( BGFX_BUILD_TOOLS_TEXTURE "Build bgfx texture tools." ON ) +option( BGFX_BUILD_EXAMPLES "Build bgfx examples." ON ) +option( BGFX_INSTALL "Create installation target." ON ) +option( BGFX_INSTALL_EXAMPLES "Install examples and their runtimes." OFF ) +option( BGFX_CUSTOM_TARGETS "Include convenience custom targets." ON ) +option( BGFX_CONFIG_MULTITHREADED "Build bgfx with multithreaded configuration" ON ) +option( BGFX_CONFIG_RENDERER_WEBGPU "Enable the webgpu renderer" OFF ) +option( BGFX_CONFIG_DEBUG_ANNOTATION "Enable gfx debug annotations (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 31634ee..3358c9d 100755 --- a/cmake/bgfx.cmake +++ b/cmake/bgfx.cmake @@ -103,7 +103,8 @@ endif() # Add debug config required in bx headers since bx is private target_compile_definitions(bgfx PUBLIC - "BX_CONFIG_DEBUG=$,1,$>" + "BX_CONFIG_DEBUG=$,$>" + "BGFX_CONFIG_DEBUG_ANNOTATION=$>,$,$>>" "BGFX_CONFIG_MULTITHREADED=$" )