From 94cdce8ce35d4de51c16d37dde21175b7215f475 Mon Sep 17 00:00:00 2001 From: Andy Duplain Date: Mon, 3 Jun 2019 08:40:28 +0100 Subject: [PATCH] Update to latest bgdx and bx. Update submodules. Drop ib-compress and forsyth-too 3rdparty libraries. Add meshoptimizer to geometryc. --- bgfx | 2 +- bx | 2 +- cmake/3rdparty/ib-compress.cmake | 19 ------------------- ...{forsyth-too.cmake => meshoptimizer.cmake} | 10 +++++----- cmake/examples.cmake | 4 ++-- cmake/tools/geometryc.cmake | 5 ++--- 6 files changed, 11 insertions(+), 31 deletions(-) delete mode 100644 cmake/3rdparty/ib-compress.cmake rename cmake/3rdparty/{forsyth-too.cmake => meshoptimizer.cmake} (58%) diff --git a/bgfx b/bgfx index b5d8c89..4748766 160000 --- a/bgfx +++ b/bgfx @@ -1 +1 @@ -Subproject commit b5d8c89c290289e339925a7aab0ef161dc71a0e3 +Subproject commit 4748766009e1bd6f3d302aa86539afb4f0f4ed13 diff --git a/bx b/bx index 7a68aba..62daee4 160000 --- a/bx +++ b/bx @@ -1 +1 @@ -Subproject commit 7a68aba842a0651541be23b32a85dabdafd6bbf3 +Subproject commit 62daee4ffa666dcd82f086fa5fd63644574ca9dd diff --git a/cmake/3rdparty/ib-compress.cmake b/cmake/3rdparty/ib-compress.cmake deleted file mode 100644 index 8d0a23f..0000000 --- a/cmake/3rdparty/ib-compress.cmake +++ /dev/null @@ -1,19 +0,0 @@ -# bgfx.cmake - bgfx building in cmake -# Written in 2017 by Joshua Brookover - -# 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 . - -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" ) diff --git a/cmake/3rdparty/forsyth-too.cmake b/cmake/3rdparty/meshoptimizer.cmake similarity index 58% rename from cmake/3rdparty/forsyth-too.cmake rename to cmake/3rdparty/meshoptimizer.cmake index 29c1c1a..b041175 100644 --- a/cmake/3rdparty/forsyth-too.cmake +++ b/cmake/3rdparty/meshoptimizer.cmake @@ -8,12 +8,12 @@ # You should have received a copy of the CC0 Public Domain Dedication along with # this software. If not, see . -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" ) diff --git a/cmake/examples.cmake b/cmake/examples.cmake index 571db18..8afaa28 100755 --- a/cmake/examples.cmake +++ b/cmake/examples.cmake @@ -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 ) diff --git a/cmake/tools/geometryc.cmake b/cmake/tools/geometryc.cmake index 6e61e4c..d871ac5 100644 --- a/cmake/tools/geometryc.cmake +++ b/cmake/tools/geometryc.cmake @@ -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()