diff --git a/CMakeLists.txt b/CMakeLists.txt index e284242..7ab5534 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -21,14 +21,15 @@ if( APPLE AND NOT XCODE ) set( CMAKE_CXX_FLAGS "-ObjC++" ) 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_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_RENDERER_WEBGPU "Enables the webgpu renderer" OFF ) +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_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 ) 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 9010391..5c0ccdc 100755 --- a/cmake/bgfx.cmake +++ b/cmake/bgfx.cmake @@ -70,7 +70,11 @@ if( MSVC ) endif() # Add debug config required in bx headers since bx is private -target_compile_definitions(bgfx PUBLIC "BX_CONFIG_DEBUG=$") +target_compile_definitions(bgfx + PUBLIC + "BX_CONFIG_DEBUG=$" + "BGFX_CONFIG_MULTITHREADED=$" +) # Includes target_include_directories( bgfx