From 9e660ee65e2b1ad4d4feea6e19c90ce1e4c1db73 Mon Sep 17 00:00:00 2001 From: Francis Hart Date: Thu, 16 Aug 2018 19:25:34 +0300 Subject: [PATCH] Add build option to turn off 'd' suffix for debug build targets --- CMakeLists.txt | 5 +++-- cmake/bgfx.cmake | 4 +++- cmake/bimg.cmake | 4 +++- cmake/bx.cmake | 4 +++- 4 files changed, 12 insertions(+), 5 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 8b75a6f..31f6d8f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -22,12 +22,13 @@ endif() option( BGFX_BUILD_TOOLS "Build bgfx 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_INSTALL_EXAMPLES "Install examples and their runtimes." OFF ) option( BGFX_CUSTOM_TARGETS "Include convenience custom targets." ON ) option( BGFX_USE_OVR "Build with OVR support." OFF ) 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_DEBUG "Enables debug configuration on all builds" OFF ) +option( BGFX_USE_DEBUG_SUFFIX "Add 'd' suffix to debug output targets" ON ) if( NOT BX_DIR ) set( BX_DIR "${CMAKE_CURRENT_SOURCE_DIR}/bx" CACHE STRING "Location of bx." ) diff --git a/cmake/bgfx.cmake b/cmake/bgfx.cmake index 913141e..1f764ff 100755 --- a/cmake/bgfx.cmake +++ b/cmake/bgfx.cmake @@ -97,4 +97,6 @@ endif() set_target_properties( bgfx PROPERTIES FOLDER "bgfx" ) # Export debug build as "bgfxd" -set_target_properties( bgfx PROPERTIES OUTPUT_NAME_DEBUG "bgfxd" ) +if( BGFX_USE_DEBUG_SUFFIX ) + set_target_properties( bgfx PROPERTIES OUTPUT_NAME_DEBUG "bgfxd" ) +endif() diff --git a/cmake/bimg.cmake b/cmake/bimg.cmake index 40220cd..3530f01 100644 --- a/cmake/bimg.cmake +++ b/cmake/bimg.cmake @@ -39,4 +39,6 @@ target_link_libraries( bimg bx edtaa3 etc1 etc2 iqa squish nvtt pvrtc ) set_target_properties( bimg PROPERTIES FOLDER "bgfx" ) # Export debug build as "bimgd" -set_target_properties( bimg PROPERTIES OUTPUT_NAME_DEBUG "bimgd" ) +if( BGFX_USE_DEBUG_SUFFIX ) + set_target_properties( bimg PROPERTIES OUTPUT_NAME_DEBUG "bimgd" ) +endif() diff --git a/cmake/bx.cmake b/cmake/bx.cmake index c28d867..c95508b 100644 --- a/cmake/bx.cmake +++ b/cmake/bx.cmake @@ -75,4 +75,6 @@ endif() set_target_properties( bx PROPERTIES FOLDER "bgfx" ) # Export debug build as "bxd" -set_target_properties( bx PROPERTIES OUTPUT_NAME_DEBUG "bxd" ) +if( BGFX_USE_DEBUG_SUFFIX ) + set_target_properties( bx PROPERTIES OUTPUT_NAME_DEBUG "bxd" ) +endif()