mirror of
https://github.com/bkaradzic/bgfx.cmake.git
synced 2026-02-17 21:12:35 +01:00
Update to latest bgdx and bx.
Update submodules. Drop ib-compress and forsyth-too 3rdparty libraries. Add meshoptimizer to geometryc.
This commit is contained in:
committed by
Joshua Brookover
parent
fd39192e0e
commit
94cdce8ce3
2
bgfx
2
bgfx
Submodule bgfx updated: b5d8c89c29...4748766009
2
bx
2
bx
Submodule bx updated: 7a68aba842...62daee4ffa
19
cmake/3rdparty/ib-compress.cmake
vendored
19
cmake/3rdparty/ib-compress.cmake
vendored
@@ -1,19 +0,0 @@
|
||||
# bgfx.cmake - bgfx building in cmake
|
||||
# Written in 2017 by Joshua Brookover <joshua.al.brookover@gmail.com>
|
||||
|
||||
# To the extent possible under law, the author(s) have dedicated all copyright
|
||||
# and related and neighboring rights to this software to the public domain
|
||||
# worldwide. This software is distributed without any warranty.
|
||||
|
||||
# You should have received a copy of the CC0 Public Domain Dedication along with
|
||||
# this software. If not, see <http://creativecommons.org/publicdomain/zero/1.0/>.
|
||||
|
||||
if( TARGET ib-compress )
|
||||
return()
|
||||
endif()
|
||||
|
||||
file( GLOB IB_COMPRESS_SOURCES ${BGFX_DIR}/3rdparty/ib-compress/*.cpp ${BGFX_DIR}/3rdparty/ib-compress/*.h )
|
||||
|
||||
add_library( ib-compress STATIC ${IB_COMPRESS_SOURCES} )
|
||||
target_include_directories( ib-compress PUBLIC ${BGFX_DIR}/3rdparty )
|
||||
set_target_properties( ib-compress PROPERTIES FOLDER "bgfx/3rdparty" )
|
||||
@@ -8,12 +8,12 @@
|
||||
# You should have received a copy of the CC0 Public Domain Dedication along with
|
||||
# this software. If not, see <http://creativecommons.org/publicdomain/zero/1.0/>.
|
||||
|
||||
if( TARGET forsyth-too )
|
||||
if( TARGET meshoptimizer )
|
||||
return()
|
||||
endif()
|
||||
|
||||
file( GLOB FORSYTH-TOO_SOURCES ${BGFX_DIR}/3rdparty/forsyth-too/*.cpp ${BGFX_DIR}/3rdparty/forsyth-too/*.h )
|
||||
file( GLOB MESHOPTIMIZER_SOURCES ${BGFX_DIR}/3rdparty/meshoptimizer/src/*.cpp ${BGFX_DIR}/3rdparty/meshoptimizer/src/*.cpp )
|
||||
|
||||
add_library( forsyth-too STATIC ${FORSYTH-TOO_SOURCES} )
|
||||
target_include_directories( forsyth-too PUBLIC ${BGFX_DIR}/3rdparty )
|
||||
set_target_properties( forsyth-too PROPERTIES FOLDER "bgfx/3rdparty" )
|
||||
add_library( meshoptimizer STATIC ${MESHOPTIMIZER_SOURCES} )
|
||||
target_include_directories( meshoptimizer PUBLIC ${BGFX_DIR}/3rdparty )
|
||||
set_target_properties( meshoptimizer PROPERTIES FOLDER "bgfx/3rdparty" )
|
||||
@@ -12,8 +12,8 @@ include( CMakeParseArguments )
|
||||
|
||||
include( cmake/util/ConfigureDebugging.cmake )
|
||||
|
||||
include( cmake/3rdparty/ib-compress.cmake )
|
||||
include( cmake/3rdparty/dear-imgui.cmake )
|
||||
include( cmake/3rdparty/meshoptimizer.cmake )
|
||||
|
||||
function( add_bgfx_shader FILE FOLDER )
|
||||
get_filename_component( FILENAME "${FILE}" NAME_WE )
|
||||
@@ -134,7 +134,7 @@ function( add_example ARG_NAME )
|
||||
if( ARG_COMMON )
|
||||
add_library( example-${ARG_NAME} STATIC EXCLUDE_FROM_ALL ${SOURCES} )
|
||||
target_include_directories( example-${ARG_NAME} PUBLIC ${BGFX_DIR}/examples/common )
|
||||
target_link_libraries( example-${ARG_NAME} PUBLIC bgfx ib-compress dear-imgui )
|
||||
target_link_libraries( example-${ARG_NAME} PUBLIC bgfx dear-imgui meshoptimizer )
|
||||
if( BGFX_WITH_GLFW )
|
||||
find_package( glfw3 REQUIRED )
|
||||
target_link_libraries( example-${ARG_NAME} PUBLIC glfw )
|
||||
|
||||
@@ -10,13 +10,12 @@
|
||||
|
||||
include( CMakeParseArguments )
|
||||
|
||||
include( cmake/3rdparty/forsyth-too.cmake )
|
||||
include( cmake/3rdparty/ib-compress.cmake )
|
||||
include( cmake/3rdparty/meshoptimizer.cmake )
|
||||
|
||||
add_executable( geometryc ${BGFX_DIR}/tools/geometryc/geometryc.cpp )
|
||||
target_compile_definitions( geometryc PRIVATE "-D_CRT_SECURE_NO_WARNINGS" )
|
||||
set_target_properties( geometryc PROPERTIES FOLDER "bgfx/tools" )
|
||||
target_link_libraries( geometryc bx bgfx-bounds bgfx-vertexdecl forsyth-too ib-compress )
|
||||
target_link_libraries( geometryc bx bgfx-bounds bgfx-vertexdecl meshoptimizer )
|
||||
if( BGFX_CUSTOM_TARGETS )
|
||||
add_dependencies( tools geometryc )
|
||||
endif()
|
||||
|
||||
Reference in New Issue
Block a user