Updated to latest bgfx

This commit is contained in:
Joshua Brookover
2017-08-11 20:40:09 -05:00
parent 5ee179c940
commit 21d4f7f46a
6 changed files with 51 additions and 6 deletions

2
bgfx

Submodule bgfx updated: df4f4cb3b0...5a987b3af8

2
bimg

Submodule bimg updated: 8f89c161d9...3cc556778b

2
bx

Submodule bx updated: 335cec7121...aeceb79f25

View File

@@ -30,3 +30,48 @@ endif()
add_library( glslang STATIC EXCLUDE_FROM_ALL ${GLSLANG_SOURCES} )
target_include_directories( glslang PUBLIC ${BGFX_DIR}/3rdparty/glslang ${BGFX_DIR}/3rdparty/glslang/glslang/Include ${BGFX_DIR}/3rdparty/glslang/glslang/Public )
set_target_properties( glslang PROPERTIES FOLDER "bgfx/3rdparty" )
if( MSVC )
target_compile_options( glslang PRIVATE
"/wd4005"
"/wd4100"
"/wd4127"
"/wd4244"
"/wd4456"
"/wd4457"
"/wd4458"
"/wd4702"
)
else()
target_compile_options( glslang PRIVATE
"-Wno-deprecated-register"
"-Wno-ignored-qualifiers"
"-Wno-inconsistent-missing-override"
"-Wno-missing-field-initializers"
"-Wno-reorder"
"-Wno-return-type"
"-Wno-shadow"
"-Wno-sign-compare"
"-Wno-undef"
"-Wno-unknown-pragmas"
"-Wno-unused-parameter"
"-Wno-unused-variable"
)
endif()
if( APPLE )
target_compile_options( glslang PRIVATE
"-Wno-c++11-extensions"
"-Wno-unused-const-variable"
)
endif()
if( UNIX AND NOT APPLE )
target_compile_options( glslang PRIVATE
"-Wno-unused-but-set-variable"
)
endif()
target_compile_definitions( glslang PRIVATE
"ENABLE_HLSL=1"
)

View File

@@ -103,7 +103,6 @@ function( add_example ARG_NAME )
# Add target
if( ARG_COMMON )
add_library( example-${ARG_NAME} STATIC EXCLUDE_FROM_ALL ${SOURCES} )
target_compile_definitions( example-${ARG_NAME} PRIVATE "-D_CRT_SECURE_NO_WARNINGS" "-D__STDC_FORMAT_MACROS" )
target_include_directories( example-${ARG_NAME} PUBLIC ${BGFX_DIR}/examples/common )
target_link_libraries( example-${ARG_NAME} PUBLIC bgfx ib-compress ocornut-imgui )
if( UNIX AND NOT APPLE )
@@ -115,7 +114,6 @@ function( add_example ARG_NAME )
else()
add_executable( example-${ARG_NAME} WIN32 EXCLUDE_FROM_ALL ${SOURCES} )
endif()
target_compile_definitions( example-${ARG_NAME} PRIVATE "-D_CRT_SECURE_NO_WARNINGS" "-D__STDC_FORMAT_MACROS" )
target_link_libraries( example-${ARG_NAME} example-common )
configure_debugging( example-${ARG_NAME} WORKING_DIR ${BGFX_DIR}/examples/runtime )
if( MSVC )
@@ -125,6 +123,7 @@ function( add_example ARG_NAME )
add_dependencies( examples example-${ARG_NAME} )
endif()
endif()
target_compile_definitions( example-${ARG_NAME} PRIVATE "-D_CRT_SECURE_NO_WARNINGS" "-D__STDC_FORMAT_MACROS" "-DENTRY_CONFIG_IMPLEMENT_MAIN=1" )
# Configure shaders
if( NOT ARG_COMMON )

View File

@@ -39,5 +39,6 @@ Todo
* Support Android.
* Support Native Client.
* Support Windows Phone.
* More configuration.
* More configuration. [#12](https://github.com/JoshuaBrookover/bgfx.cmake/issues/12)
* Add varying.def.sc files as shader dependencies.
* Combined examples.