mirror of
https://github.com/bkaradzic/bgfx.cmake.git
synced 2026-02-17 21:12:35 +01:00
Compare commits
19 Commits
v1.115.811
...
v1.115.821
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
6ecce2449d | ||
|
|
c717984be0 | ||
|
|
955d692550 | ||
|
|
12b75cc0ad | ||
|
|
65dde3874d | ||
|
|
f6a9fb1687 | ||
|
|
f1eed47138 | ||
|
|
9ac6e08121 | ||
|
|
6c75503da4 | ||
|
|
3dcf049202 | ||
|
|
3ec2a51aef | ||
|
|
26a0f1e54d | ||
|
|
896ab5478c | ||
|
|
23a1dc204a | ||
|
|
5fa58aad11 | ||
|
|
8dafd0d9e4 | ||
|
|
3bac602264 | ||
|
|
1b2b921bde | ||
|
|
95af1cc54d |
@@ -21,6 +21,10 @@ if( APPLE AND NOT XCODE )
|
||||
set( CMAKE_CXX_FLAGS "-ObjC++" )
|
||||
endif()
|
||||
|
||||
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_EXAMPLES "Build bgfx examples." ON )
|
||||
option( BGFX_INSTALL "Create installation target." ON )
|
||||
@@ -30,6 +34,7 @@ option( BGFX_AMALGAMATED "Amalgamated bgfx build for faster compi
|
||||
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 )
|
||||
|
||||
set( BGFX_OPENGL_VERSION "" CACHE STRING "Specify minimum opengl version" )
|
||||
set( BGFX_OPENGLES_VERSION "" CACHE STRING "Specify minimum OpenGL ES version" )
|
||||
|
||||
2
bgfx
2
bgfx
Submodule bgfx updated: 5ae2271667...8461f3406e
2
bx
2
bx
Submodule bx updated: 88327070b9...13ae21207d
@@ -56,6 +56,10 @@ if(BGFX_CONFIG_RENDERER_WEBGPU)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(EMSCRIPTEN)
|
||||
target_link_options(bgfx PUBLIC "-sMAX_WEBGL_VERSION=2")
|
||||
endif()
|
||||
|
||||
if( NOT ${BGFX_OPENGL_VERSION} STREQUAL "" )
|
||||
target_compile_definitions( bgfx PRIVATE BGFX_CONFIG_RENDERER_OPENGL_MIN_VERSION=${BGFX_OPENGL_VERSION} )
|
||||
endif()
|
||||
@@ -72,7 +76,7 @@ endif()
|
||||
# Add debug config required in bx headers since bx is private
|
||||
target_compile_definitions(bgfx
|
||||
PUBLIC
|
||||
"BX_CONFIG_DEBUG=$<CONFIG:Debug>"
|
||||
"BX_CONFIG_DEBUG=$<IF:$<CONFIG:Debug>,1,$<BOOL:${BX_CONFIG_DEBUG}>>"
|
||||
"BGFX_CONFIG_MULTITHREADED=$<BOOL:${BGFX_CONFIG_MULTITHREADED}>"
|
||||
)
|
||||
|
||||
|
||||
@@ -30,6 +30,10 @@ endif()
|
||||
# Create the bx target
|
||||
add_library( bx STATIC ${BX_SOURCES} )
|
||||
|
||||
target_compile_features( bx PUBLIC cxx_std_14 )
|
||||
# (note: see bx\scripts\toolchain.lua for equivalent compiler flag)
|
||||
target_compile_options( bx PUBLIC $<$<CXX_COMPILER_ID:MSVC>:/Zc:__cplusplus> )
|
||||
|
||||
# Link against psapi on Windows
|
||||
if( WIN32 )
|
||||
target_link_libraries( bx PUBLIC psapi )
|
||||
@@ -67,7 +71,7 @@ target_compile_definitions( bx PUBLIC "__STDC_LIMIT_MACROS" )
|
||||
target_compile_definitions( bx PUBLIC "__STDC_FORMAT_MACROS" )
|
||||
target_compile_definitions( bx PUBLIC "__STDC_CONSTANT_MACROS" )
|
||||
|
||||
target_compile_definitions(bx PUBLIC "BX_CONFIG_DEBUG=$<CONFIG:Debug>")
|
||||
target_compile_definitions(bx PUBLIC "BX_CONFIG_DEBUG=$<IF:$<CONFIG:Debug>,1,$<BOOL:${BX_CONFIG_DEBUG}>>")
|
||||
|
||||
# Additional dependencies on Unix
|
||||
if (ANDROID)
|
||||
|
||||
@@ -179,10 +179,12 @@ function( add_example ARG_NAME )
|
||||
endif()
|
||||
|
||||
if (NOT ARG_COMMON AND EMSCRIPTEN)
|
||||
target_link_libraries(example-${ARG_NAME}
|
||||
"-s PRECISE_F32=1"
|
||||
"-s TOTAL_MEMORY=268435456"
|
||||
"--memory-init-file 1")
|
||||
set_target_properties(example-${ARG_NAME}
|
||||
PROPERTIES
|
||||
LINK_FLAGS
|
||||
"-s PRECISE_F32=1 -s TOTAL_MEMORY=268435456 -s ENVIRONMENT=web --memory-init-file 1 --emrun"
|
||||
SUFFIX ".html"
|
||||
)
|
||||
endif()
|
||||
|
||||
# Directory name
|
||||
|
||||
Reference in New Issue
Block a user