Skip to content
Closed
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
17 changes: 17 additions & 0 deletions ports/imgui/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,11 @@ if(IMGUI_BUILD_METAL_BINDING)
set_source_files_properties(${CMAKE_CURRENT_SOURCE_DIR}/backends/imgui_impl_metal.mm PROPERTIES COMPILE_FLAGS -fobjc-weak)
endif()

if(IMGUI_BUILD_METAL4_BINDING)
target_sources(${PROJECT_NAME} PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/backends/imgui_impl_metal4.mm)
set_source_files_properties(${CMAKE_CURRENT_SOURCE_DIR}/backends/imgui_impl_metal4.mm PROPERTIES COMPILE_FLAGS -fobjc-weak)
endif()

if(IMGUI_BUILD_OPENGL2_BINDING)
target_sources(${PROJECT_NAME} PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/backends/imgui_impl_opengl2.cpp)
endif()
Expand Down Expand Up @@ -152,6 +157,14 @@ if(IMGUI_USE_WCHAR32)
target_compile_definitions(${PROJECT_NAME} PUBLIC IMGUI_USE_WCHAR32)
endif()

if(NOT IMGUI_EMBED_DEFAULT_FONT_BITMAP)
target_compile_definitions(${PROJECT_NAME} PRIVATE IMGUI_DISABLE_DEFAULT_FONT_BITMAP)
endif()

if(NOT IMGUI_EMBED_DEFAULT_FONT_VECTOR)
target_compile_definitions(${PROJECT_NAME} PRIVATE IMGUI_DISABLE_DEFAULT_FONT_VECTOR)
endif()

if(IMGUI_TEST_ENGINE)
find_package(Stb REQUIRED)
target_include_directories(${PROJECT_NAME} PRIVATE ${Stb_INCLUDE_DIR})
Expand Down Expand Up @@ -237,6 +250,10 @@ if(NOT IMGUI_SKIP_HEADERS)
install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/backends/imgui_impl_metal.h DESTINATION include)
endif()

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

if(IMGUI_BUILD_OPENGL2_BINDING)
install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/backends/imgui_impl_opengl2.h DESTINATION include)
endif()
Expand Down
9 changes: 6 additions & 3 deletions ports/imgui/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,15 @@ if ("docking-experimental" IN_LIST FEATURES)
OUT_SOURCE_PATH SOURCE_PATH
REPO ocornut/imgui
REF "v${VERSION}-docking"
SHA512 927ecf72f00a228e0899d5b8008575b44748c49b083b9425b5f2a6b4490a9900eae111afad23f2bf0a1c9c62cf1fea80c903eb3076d7e7ea901a5625f09df78e
SHA512 1a5ede24f8358c93a6a012a8961776eccca32dfefe0ea3b88cbbb562a76e6ef6418ab353ed0ec7d59069e5e51918cf2b38b041243cb6edaee0ffd040ccee21c6
HEAD_REF docking
)
else()
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO ocornut/imgui
REF "v${VERSION}"
SHA512 60eb4f8478ae998ae68efa33b2e3c9f331f5e373a1272472f93befd9fd6cab4ed73935bb540e728b5abb154469fbc6c0fd69f7aaf54cd3187eefede6cb145a10
SHA512 980acd2d5b8047978e1b858d35cf35bd206ca5c96b6223f0e534db5efe5ec4f7475a51f7ff0455a5904a1f852307f5c548e61cc56925f455cc31e1b9849bb6a6
HEAD_REF master
)
endif()
Expand All @@ -32,6 +32,7 @@ vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS
glfw-binding IMGUI_BUILD_GLFW_BINDING
glut-binding IMGUI_BUILD_GLUT_BINDING
metal-binding IMGUI_BUILD_METAL_BINDING
metal4-binding IMGUI_BUILD_METAL4_BINDING
opengl2-binding IMGUI_BUILD_OPENGL2_BINDING
opengl3-binding IMGUI_BUILD_OPENGL3_BINDING
osx-binding IMGUI_BUILD_OSX_BINDING
Expand All @@ -45,6 +46,8 @@ vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS
freetype-svg IMGUI_FREETYPE_SVG
wchar32 IMGUI_USE_WCHAR32
test-engine IMGUI_TEST_ENGINE
default-font-bitmap IMGUI_EMBED_DEFAULT_FONT_BITMAP
default-font-vector IMGUI_EMBED_DEFAULT_FONT_VECTOR
)

if ("libigl-imgui" IN_LIST FEATURES)
Expand All @@ -65,7 +68,7 @@ if ("test-engine" IN_LIST FEATURES)
OUT_SOURCE_PATH TEST_ENGINE_SOURCE_PATH
REPO ocornut/imgui_test_engine
REF "v${VERSION}"
SHA512 3a31bd3e1f86679ee60fc765971e96f76e05e530b3c7920aea284818604fd8a3cdf1fc7189e7e825a52a75446217ed6f1b2d7470d317799d381fb9019f14333b
SHA512 d622d4d8c9c5fac15d9745f1ce896bea6c04e2f4ed55a9715cd7e119e305b0443c52bc8edbabece6f1a6d301bdce9e78efeaf53fa75858073a48d4872eb5a870
HEAD_REF master
)

Expand Down
17 changes: 15 additions & 2 deletions ports/imgui/vcpkg.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
{
"name": "imgui",
"version": "1.92.8",
"port-version": 1,
"version": "1.92.9",
"description": "Bloat-free Immediate Mode Graphical User interface for C++ with minimal dependencies.",
"homepage": "https://github.com/ocornut/imgui",
"license": "MIT",
Expand All @@ -15,6 +14,10 @@
"host": true
}
],
"default-features": [
"default-font-bitmap",
"default-font-vector"
Comment on lines +18 to +19

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ocornut/imgui#9407

Enabling the features does not add API. Most of the end users expect the library uses its own embedded font by default. Some end users will manually disable these features and expect the behavior difference (application must add font, or it won't startup).

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The PR there suggests that it effectively fails the requirement because:

AddFontDefaultXXX() functions will assert.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think we should have these features. They comply with the letter but not the spirit of the rule. Users that want to disable the default embedded fonts should write an overlay port.

],
"features": {
"allegro5-binding": {
"description": "Make available Allegro5 binding",
Expand All @@ -26,6 +29,12 @@
"description": "Make available Android native app support",
"supports": "android"
},
"default-font-bitmap": {
"description": "Embed ProggyClean font"
},
"default-font-vector": {
"description": "Embed ProggyForever font"
},
"docking-experimental": {
"description": "Build with docking support"
},
Expand Down Expand Up @@ -90,6 +99,10 @@
"description": "Make available Metal binding",
"supports": "osx"
},
"metal4-binding": {
"description": "Make available Metal 4 binding",
"supports": "osx & arm64"
},
"opengl2-binding": {
"description": "Make available OpenGL (legacy) binding",
"supports": "!(uwp | android)"
Expand Down
4 changes: 2 additions & 2 deletions versions/baseline.json
Original file line number Diff line number Diff line change
Expand Up @@ -4001,8 +4001,8 @@
"port-version": 0
},
"imgui": {
"baseline": "1.92.8",
"port-version": 1
"baseline": "1.92.9",
"port-version": 0
},
"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": "901e2036e578ecb0d5c22d85ad1aba5f5fbddb02",
"version": "1.92.9",
"port-version": 0
},
{
"git-tree": "911006dffb8054b8817a1d6c2f1e0a9335400e90",
"version": "1.92.8",
Expand Down
Loading