-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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: make backends available as optional components, convert -docking versions into an option #25325
base: master
Are you sure you want to change the base?
Conversation
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
3a803d1
to
3746762
Compare
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
b105a72
to
57dc335
Compare
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
4e686f8
to
c44ea09
Compare
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
867b73a
to
2b349e6
Compare
This comment has been minimized.
This comment has been minimized.
Hooks produced the following warnings for commit 2b349e6imgui/1.86@#6c07b2eebf35b7365ace7efe78b7e7de
imgui/1.85@#d6f43ac34007b753a47994a8d1303440
|
The recipe is ready for review. |
The source() method is meant for configuration-independent source downloads, so I moved it into build() instead, as recommended by the Conan docs. I kept support for the old -docking versions, but their use should be discontinued after this change.
e0562fd
to
feaa8a5
Compare
import os | ||
import re | ||
from pathlib import Path |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not related to the recipe, but the linter incorrectly flags this line as
conan-import-disallowed: Private modules are disallowed, import tools from 'from conan.tools.xxxx import yyyyy'
This comment has been minimized.
This comment has been minimized.
15f2e29
to
6526ad4
Compare
…ure/imgui-refacto # Conflicts: # recipes/imgui/all/conandata.yml # recipes/imgui/config.yml
6526ad4
to
28ac6ce
Compare
This comment has been minimized.
This comment has been minimized.
28ac6ce
to
b6498c1
Compare
This comment has been minimized.
This comment has been minimized.
7312680
to
1dfb051
Compare
Conan v1 pipeline ❌Warning Conan Center will stop receiving updates for Conan 1.x packages soon - please see announcement. Failure in build 48 (
Note: To save resources, CI tries to finish as soon as an error is found. For this reason you might find that not all the references have been launched or not all the configurations for a given reference. Also, take into account that we cannot guarantee the order of execution as it depends on CI workload and workers availability. Conan v2 pipeline ❌
The v2 pipeline failed. Please, review the errors and note this is required for pull requests to be merged. In case this recipe is still not ported to Conan 2.x, please, ping Failure in build 48 (
Note: To save resources, CI tries to finish as soon as an error is found. For this reason you might find that not all the references have been launched or not all the configurations for a given reference. Also, take into account that we cannot guarantee the order of execution as it depends on CI workload and workers availability. |
1dfb051
to
e92dd47
Compare
e92dd47
to
c13dbf6
Compare
Summary
Changes to recipe: imgui/[*]
Motivation
There are two major issues with the current approach of building only the core
imgui.cpp
and no backends or other optional components:<package_folder>/res/...
source files into the build system in order to use the optional components. This is manageable but very inconvenient compared to the alternative of linking against a suitable component target.IMGUI_API
export macro for shared builds and visibility handling. The users need to take care that the core library symbols provided by the imgui recipe and the optional components built by the consuming projects have the correctIMGUI_API
corresponding the static/shared build of either project. This is tricky to manage and easy to mess up.In addition to that, the current recipe does not provide a way to modify
imconfig.h
. These values cannot be changed after the core library has already been built.Another minor benefit is that the Conan and system dependencies for the optional components are handled by
package_info()
in the imgui recipe and don't need to be duplicated in the consuming projects.Details
The PR aims to be backwards-compatible.
imgui::imgui
CMake target still links against the core library only. All backends can be disabled altogether by settingbuild_backends=False
for the old behavior.These changes are not without their downsides:
imgui::imgui
as acpp_info.requires
either explicitly or implicitly no longer link against just the core lib but against all the optional components as well.Given these downsides, I was initially hesitant to open this PR and shelved it for a while, but after hitting a wall in the Ogre PR (#21073) when trying to unvendor ImGui there, this PR started to look a lot more reasonable. That is, Ogre expects the optional Freetype component to be available and building it as part of the Ogre recipe hits the shared build issues listed above.
Test build with nearly all options enabled (only DirectX 11 and DirectX 12 disabled): #25325 (comment)