diff --git a/CMakeLists.txt b/CMakeLists.txt index d7ad96c..52a7315 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -34,8 +34,12 @@ option( BGFX_AMALGAMATED "Amalgamated bgfx build for faster compilation" OF 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" ) -set( BGFX_OPENGLES_VERSION "" CACHE STRING "Specify minimum OpenGL ES version" ) + +set( BGFX_OPENGL_VERSION "" CACHE STRING "Specify minimum opengl version" ) +set( BGFX_OPENGLES_VERSION "" CACHE STRING "Specify minimum OpenGL ES version" ) +set( BGFX_LIBRARY_TYPE "STATIC" CACHE STRING "Linking type for library" ) + +set_property( CACHE BGFX_LIBRARY_TYPE PROPERTY STRINGS STATIC SHARED ) 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 0af42eb..3fa2c27 100755 --- a/cmake/bgfx.cmake +++ b/cmake/bgfx.cmake @@ -40,7 +40,7 @@ else() endif() # Create the bgfx target -add_library( bgfx ${BGFX_SOURCES} ) +add_library( bgfx ${BGFX_LIBRARY_TYPE} ${BGFX_SOURCES} ) if(BGFX_CONFIG_RENDERER_WEBGPU) include(cmake/3rdparty/webgpu.cmake)