From de256f1c2ece3675983576beec63243f8a8fcce7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9my=20Tassoux?= Date: Wed, 13 Oct 2021 23:47:17 +0200 Subject: [PATCH] [imgui] Update to 1.85 (#20679) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * [imgui] Update to 1.85 * [imgui] Update version files * [imgui] Replace deprecated vcpkg functions * [imgui] Update version files Co-authored-by: Rémy Tassoux --- ports/imgui/CMakeLists.txt | 10 ++++++++++ ports/imgui/imgui-config.cmake.in | 2 +- ports/imgui/portfile.cmake | 16 ++++++++-------- ports/imgui/vcpkg.json | 19 +++++++++++++++++-- versions/baseline.json | 4 ++-- versions/i-/imgui.json | 5 +++++ 6 files changed, 43 insertions(+), 13 deletions(-) diff --git a/ports/imgui/CMakeLists.txt b/ports/imgui/CMakeLists.txt index 61f9cb8ee5..b8c8dacf94 100644 --- a/ports/imgui/CMakeLists.txt +++ b/ports/imgui/CMakeLists.txt @@ -85,6 +85,12 @@ if(IMGUI_BUILD_SDL2_BINDING) target_sources(${PROJECT_NAME} PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/backends/imgui_impl_sdl.cpp) endif() +if(IMGUI_BUILD_SDL2_RENDERER_BINDING) + find_package(SDL2 CONFIG REQUIRED) + target_link_libraries(${PROJECT_NAME} PUBLIC SDL2::SDL2) + target_sources(${PROJECT_NAME} PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/backends/imgui_impl_sdlrenderer.cpp) +endif() + if(IMGUI_BUILD_VULKAN_BINDING) find_package(Vulkan REQUIRED) target_link_libraries(${PROJECT_NAME} PUBLIC Vulkan::Vulkan) @@ -197,6 +203,10 @@ if(NOT IMGUI_SKIP_HEADERS) install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/backends/imgui_impl_sdl.h DESTINATION include) endif() + if(IMGUI_BUILD_SDL2_RENDERER_BINDING) + install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/backends/imgui_impl_sdlrenderer.h DESTINATION include) + endif() + if(IMGUI_BUILD_VULKAN_BINDING) install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/backends/imgui_impl_vulkan.h DESTINATION include) endif() diff --git a/ports/imgui/imgui-config.cmake.in b/ports/imgui/imgui-config.cmake.in index d2bdfbdaa2..1ea694a10b 100644 --- a/ports/imgui/imgui-config.cmake.in +++ b/ports/imgui/imgui-config.cmake.in @@ -12,7 +12,7 @@ if (@IMGUI_BUILD_GLUT_BINDING@) find_dependency(GLUT) endif() -if (@IMGUI_BUILD_SDL2_BINDING@) +if (@IMGUI_BUILD_SDL2_BINDING@ OR @IMGUI_BUILD_SDL2_RENDERER_BINDING@) find_dependency(SDL2 CONFIG) endif() diff --git a/ports/imgui/portfile.cmake b/ports/imgui/portfile.cmake index 45add6cc0f..12fcbb7863 100644 --- a/ports/imgui/portfile.cmake +++ b/ports/imgui/portfile.cmake @@ -4,16 +4,16 @@ if ("docking-experimental" IN_LIST FEATURES) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO ocornut/imgui - REF dedb381c510cc0b87164e16b9e7ef6bf50ffccec - SHA512 0b331cbf81fed15cdceb84ccf1962b5db19af1b6dc75a19460810919b7f61088a9ba46acf3e6fcadfda6297204b03f1be0ab08fa427f89e504d70be8da1f2281 + REF 1b215ecb018ba0fd170618366ddc4be9bd45f283 + SHA512 afd79082c4439b47d5943df5f7ddbdf80dcf23cd120b8da99b67b2979728e604436dd656ef8e8ae0af2a9050f8ea56b2f8c109243326fb842d684027616843e7 HEAD_REF docking ) else() vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO ocornut/imgui - REF v1.84.2 - SHA512 ea62d03ffc4c8d3dbc6be0076fb93158d464f4f02e88028c2bc64768f72e3117297854816bb7a776bd750c003013fe1d2871a1b505d04dd0922dfb2f214dd0a3 + REF v1.85 + SHA512 830ff36681a661d77754fb7818bb13cc63da58a293d343a8d6847a586f00c6e0bfc3ffe51cdf882849e5083d4ddca52cdbdc1b3abc9b794a96f89ae7628f1fc2 HEAD_REF master ) endif() @@ -40,6 +40,7 @@ vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS opengl3-binding IMGUI_BUILD_OPENGL3_BINDING osx-binding IMGUI_BUILD_OSX_BINDING sdl2-binding IMGUI_BUILD_SDL2_BINDING + sdl2-renderer-binding IMGUI_BUILD_SDL2_RENDERER_BINDING vulkan-binding IMGUI_BUILD_VULKAN_BINDING win32-binding IMGUI_BUILD_WIN32_BINDING freetype IMGUI_FREETYPE @@ -59,9 +60,8 @@ if ("libigl-imgui" IN_LIST FEATURES) file(INSTALL ${IMGUI_FONTS_DROID_SANS_H} DESTINATION ${CURRENT_PACKAGES_DIR}/include) endif() -vcpkg_configure_cmake( +vcpkg_cmake_configure( SOURCE_PATH ${SOURCE_PATH} - PREFER_NINJA OPTIONS ${FEATURE_OPTIONS} OPTIONS_DEBUG @@ -70,7 +70,7 @@ vcpkg_configure_cmake( IMGUI_COPY_MARMALADE_BINDING ) -vcpkg_install_cmake() +vcpkg_cmake_install() if ("freetype" IN_LIST FEATURES) vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/include/imconfig.h" "//#define IMGUI_ENABLE_FREETYPE" "#define IMGUI_ENABLE_FREETYPE") @@ -80,6 +80,6 @@ if ("wchar32" IN_LIST FEATURES) endif() vcpkg_copy_pdbs() -vcpkg_fixup_cmake_targets() +vcpkg_cmake_config_fixup() file(INSTALL ${SOURCE_PATH}/LICENSE.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/ports/imgui/vcpkg.json b/ports/imgui/vcpkg.json index c41b330b94..c926875959 100644 --- a/ports/imgui/vcpkg.json +++ b/ports/imgui/vcpkg.json @@ -1,9 +1,18 @@ { "name": "imgui", - "version": "1.84.2", - "port-version": 1, + "version": "1.85", "description": "Bloat-free Immediate Mode Graphical User interface for C++ with minimal dependencies.", "homepage": "https://github.com/ocornut/imgui", + "dependencies": [ + { + "name": "vcpkg-cmake", + "host": true + }, + { + "name": "vcpkg-cmake-config", + "host": true + } + ], "features": { "allegro5-binding": { "description": "Make available Allegro5 binding", @@ -68,6 +77,12 @@ "sdl2" ] }, + "sdl2-renderer-binding": { + "description": "Make available SDL2 Renderer binding", + "dependencies": [ + "sdl2" + ] + }, "vulkan-binding": { "description": "Make available Vulkan binding", "dependencies": [ diff --git a/versions/baseline.json b/versions/baseline.json index 9316987a6b..e8caa34e89 100644 --- a/versions/baseline.json +++ b/versions/baseline.json @@ -2789,8 +2789,8 @@ "port-version": 1 }, "imgui": { - "baseline": "1.84.2", - "port-version": 1 + "baseline": "1.85", + "port-version": 0 }, "imgui-sfml": { "baseline": "2.1", diff --git a/versions/i-/imgui.json b/versions/i-/imgui.json index 7ca2d71226..9f0a13f236 100644 --- a/versions/i-/imgui.json +++ b/versions/i-/imgui.json @@ -1,5 +1,10 @@ { "versions": [ + { + "git-tree": "9ae62261d966705924645bc3a057fe748c24d290", + "version": "1.85", + "port-version": 0 + }, { "git-tree": "0d0f402c97029e9c2021ca776e2bebc645cc5ecc", "version": "1.84.2",