Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[imgui] sdl3 bindings #42850

Draft
wants to merge 5 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions ports/imgui/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,18 @@ if(IMGUI_BUILD_SDL2_RENDERER_BINDING)
target_sources(${PROJECT_NAME} PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/backends/imgui_impl_sdlrenderer2.cpp)
endif()

if(IMGUI_BUILD_SDL3_BINDING)
find_package(SDL3 CONFIG REQUIRED)
target_link_libraries(${PROJECT_NAME} PUBLIC SDL3::SDL3)
target_sources(${PROJECT_NAME} PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/backends/imgui_impl_sdl3.cpp)
endif()

if(IMGUI_BUILD_SDL3_RENDERER_BINDING)
find_package(SDL3 CONFIG REQUIRED)
target_link_libraries(${PROJECT_NAME} PUBLIC SDL3::SDL3)
target_sources(${PROJECT_NAME} PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/backends/imgui_impl_sdlrenderer3.cpp)
endif()

if(IMGUI_BUILD_VULKAN_BINDING)
find_package(Vulkan REQUIRED)
target_link_libraries(${PROJECT_NAME} PUBLIC Vulkan::Vulkan)
Expand Down Expand Up @@ -237,6 +249,14 @@ if(NOT IMGUI_SKIP_HEADERS)
install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/backends/imgui_impl_sdlrenderer2.h DESTINATION include)
endif()

if(IMGUI_BUILD_SDL3_BINDING)
install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/backends/imgui_impl_sdl3.h DESTINATION include)
endif()

if(IMGUI_BUILD_SDL3_RENDERER_BINDING)
install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/backends/imgui_impl_sdlrenderer3.h DESTINATION include)
endif()

if(IMGUI_BUILD_VULKAN_BINDING)
install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/backends/imgui_impl_vulkan.h DESTINATION include)
endif()
Expand Down
4 changes: 4 additions & 0 deletions ports/imgui/imgui-config.cmake.in
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,10 @@ if (@IMGUI_BUILD_SDL2_BINDING@ OR @IMGUI_BUILD_SDL2_RENDERER_BINDING@)
find_dependency(SDL2 CONFIG)
endif()

if (@IMGUI_BUILD_SDL3_BINDING@ OR @IMGUI_BUILD_SDL3_RENDERER_BINDING@)
find_dependency(SDL3 CONFIG)
endif()

if (@IMGUI_BUILD_VULKAN_BINDING@)
find_dependency(Vulkan)
endif()
Expand Down
2 changes: 2 additions & 0 deletions ports/imgui/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@ vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS
osx-binding IMGUI_BUILD_OSX_BINDING
sdl2-binding IMGUI_BUILD_SDL2_BINDING
sdl2-renderer-binding IMGUI_BUILD_SDL2_RENDERER_BINDING
sdl3-binding IMGUI_BUILD_SDL3_BINDING
sdl3-renderer-binding IMGUI_BUILD_SDL3_RENDERER_BINDING
vulkan-binding IMGUI_BUILD_VULKAN_BINDING
win32-binding IMGUI_BUILD_WIN32_BINDING
freetype IMGUI_FREETYPE
Expand Down
13 changes: 13 additions & 0 deletions ports/imgui/vcpkg.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"name": "imgui",
"version": "1.91.6",
"port-version": 1,
"description": "Bloat-free Immediate Mode Graphical User interface for C++ with minimal dependencies.",
"homepage": "https://github.com/ocornut/imgui",
"license": "MIT",
Expand Down Expand Up @@ -107,6 +108,18 @@
"sdl2"
]
},
"sdl3-binding": {
"description": "Make available SDL3 binding",
"dependencies": [
"sdl3"
]
},
"sdl3-renderer-binding": {
"description": "Make available SDL3 Renderer binding",
"dependencies": [
"sdl3"
]
},
"test-engine": {
"description": "Build test engine",
"supports": "!uwp",
Expand Down
2 changes: 1 addition & 1 deletion versions/baseline.json
Original file line number Diff line number Diff line change
Expand Up @@ -3698,7 +3698,7 @@
},
"imgui": {
"baseline": "1.91.6",
"port-version": 0
"port-version": 1
},
"imgui-node-editor": {
"baseline": "0.9.3",
Expand Down
5 changes: 5 additions & 0 deletions versions/i-/imgui.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "4faed498e3282a3110baad8de95ab394534f355b",
"version": "1.91.6",
"port-version": 1
},
{
"git-tree": "61d143dfebf9b720272a52d1d78a3082590f948a",
"version": "1.91.6",
Expand Down