diff --git a/bgfx b/bgfx index 97fe8e4..5dffe30 160000 --- a/bgfx +++ b/bgfx @@ -1 +1 @@ -Subproject commit 97fe8e48a162b3a2197497d829a41c0739ffd593 +Subproject commit 5dffe3060a85ed97339820d32d78af00ee21be0f diff --git a/bx b/bx index 58e8d05..222456c 160000 --- a/bx +++ b/bx @@ -1 +1 @@ -Subproject commit 58e8d0505e6ce63b1e393322a7b54cba2f889931 +Subproject commit 222456cdecdf9b3f6e8f7daeb3a63ab49f8b2729 diff --git a/cmake/3rdparty/dear-imgui.cmake b/cmake/3rdparty/dear-imgui.cmake new file mode 100644 index 0000000..99844b5 --- /dev/null +++ b/cmake/3rdparty/dear-imgui.cmake @@ -0,0 +1,21 @@ +# 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 dear-imgui ) + return() +endif() + +file( GLOB dear_IMGUI_SOURCES ${BGFX_DIR}/3rdparty/dear-imgui/*.cpp ${BGFX_DIR}/3rdparty/dear-imgui/*.h ${BGFX_DIR}/3rdparty/dear-imgui/*.inl ) + +add_library( dear-imgui STATIC EXCLUDE_FROM_ALL ${dear_IMGUI_SOURCES} ) +target_compile_definitions( dear-imgui PRIVATE "-D_CRT_SECURE_NO_WARNINGS" "-D__STDC_FORMAT_MACROS" ) +target_include_directories( dear-imgui PUBLIC ${BGFX_DIR}/3rdparty ) +target_link_libraries( dear-imgui PUBLIC bx ) +set_target_properties( dear-imgui PROPERTIES FOLDER "bgfx/3rdparty" ) diff --git a/cmake/3rdparty/ocornut-imgui.cmake b/cmake/3rdparty/ocornut-imgui.cmake deleted file mode 100644 index 0635574..0000000 --- a/cmake/3rdparty/ocornut-imgui.cmake +++ /dev/null @@ -1,21 +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 ocornut-imgui ) - return() -endif() - -file( GLOB OCORNUT_IMGUI_SOURCES ${BGFX_DIR}/3rdparty/ocornut-imgui/*.cpp ${BGFX_DIR}/3rdparty/ocornut-imgui/*.h ${BGFX_DIR}/3rdparty/ocornut-imgui/*.inl ) - -add_library( ocornut-imgui STATIC EXCLUDE_FROM_ALL ${OCORNUT_IMGUI_SOURCES} ) -target_compile_definitions( ocornut-imgui PRIVATE "-D_CRT_SECURE_NO_WARNINGS" "-D__STDC_FORMAT_MACROS" ) -target_include_directories( ocornut-imgui PUBLIC ${BGFX_DIR}/3rdparty ) -target_link_libraries( ocornut-imgui PUBLIC bx ) -set_target_properties( ocornut-imgui PROPERTIES FOLDER "bgfx/3rdparty" ) diff --git a/cmake/examples.cmake b/cmake/examples.cmake index b51aede..a2f1b21 100755 --- a/cmake/examples.cmake +++ b/cmake/examples.cmake @@ -13,7 +13,7 @@ include( CMakeParseArguments ) include( cmake/util/ConfigureDebugging.cmake ) include( cmake/3rdparty/ib-compress.cmake ) -include( cmake/3rdparty/ocornut-imgui.cmake ) +include( cmake/3rdparty/dear-imgui.cmake ) function( add_bgfx_shader FILE FOLDER ) get_filename_component( FILENAME "${FILE}" NAME_WE ) @@ -104,7 +104,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 ocornut-imgui ) + target_link_libraries( example-${ARG_NAME} PUBLIC bgfx ib-compress dear-imgui ) if( UNIX AND NOT APPLE ) target_link_libraries( example-${ARG_NAME} PUBLIC X11 ) endif()