Allow to specify which tools to compile

Signed-off-by: Samuel Hellawell <sshellawell@gmail.com>
This commit is contained in:
Samuel Hellawell
2022-09-23 04:36:01 +01:00
parent 06b995080d
commit 5c54e5f299
2 changed files with 16 additions and 5 deletions

View File

@@ -26,6 +26,9 @@ if (MSVC AND (MSVC_VERSION GREATER_EQUAL 1914))
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 )

View File

@@ -13,8 +13,16 @@ if( BGFX_CUSTOM_TARGETS )
set_target_properties( tools PROPERTIES FOLDER "bgfx/tools" )
endif()
include( ${CMAKE_CURRENT_LIST_DIR}/tools/geometryc.cmake )
include( ${CMAKE_CURRENT_LIST_DIR}/tools/geometryv.cmake )
include( ${CMAKE_CURRENT_LIST_DIR}/tools/shaderc.cmake )
include( ${CMAKE_CURRENT_LIST_DIR}/tools/texturec.cmake )
include( ${CMAKE_CURRENT_LIST_DIR}/tools/texturev.cmake )
if( BGFX_BUILD_TOOLS_SHADER )
include( ${CMAKE_CURRENT_LIST_DIR}/tools/shaderc.cmake )
endif()
if( BGFX_BUILD_TOOLS_GEOMETRY )
include( ${CMAKE_CURRENT_LIST_DIR}/tools/geometryc.cmake )
include( ${CMAKE_CURRENT_LIST_DIR}/tools/geometryv.cmake )
endif()
if( BGFX_BUILD_TOOLS_TEXTURE )
include( ${CMAKE_CURRENT_LIST_DIR}/tools/texturec.cmake )
include( ${CMAKE_CURRENT_LIST_DIR}/tools/texturev.cmake )
endif()