-
-
Notifications
You must be signed in to change notification settings - Fork 10.3k
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
CMakeLists #1573
base: master
Are you sure you want to change the base?
CMakeLists #1573
Conversation
Sorry this is undesirable and especially not in the root folder. dear imgui especially doesn't need or suggest a specific build system and the mere presence of a cmakefile is bad news for many sorts of users. Later down the road we will refactor the examples/ folder to take advantage or either premake/genie or cmake. But there is literally no benefit in libifying core imgui and it goes against incentivizing the user to edit imconfig.h. |
Not proposing this PR should be added, I'm just adding some clarifications. :-)
Even with no build system setup I'd still never edit a file inside another library, EVER (I'd submit PR's, which are obviously not as useful for configurations). ^.^; Normally I'd configure by either setting some For note, there is one very good nicety about adding a cmake file, it makes using imgui from within a cmake distribution manager (like hunter.sh) simple enough so end-users of imgui would only have to add something like: # or `dear-imgui` or whatever you wanted the name to be
hunter_add_package(imgui <whatever build or library or whatever options here>) Then it just gets used like normal, nothing different from including any other library: find_package(imgui CONFIG REQUIRED) # Automatically include the right files to the current project
target_link_libraries(my-project imgui) # Link in the cpp object files (A side-note, the process of adding hunter.sh itself to a cmake project, I.E. the end user, just involves grabbing the hunter-gate cmake file and putting it in their projects' cmake directory, and putting this at the top of their cmake file: include("cmake/HunterGate.cmake")
HunterGate(
URL "https://github.com/ruslo/hunter/archive/v0.19.234.tar.gz"
SHA1 "3deec1041bd01c91e78269522b901fbab3a765e5"
) And that's it.) There are a few other cmake-based dependency managers (but I think hunter is the only one built entirely in cmake and thus requires absolutely nothing for someone to compile with or use, it 'just works'). For note, things like hunter can use projects without a cmake build system, it just involves having to build a cmake scaffold for it anyway, so this is not something that necessarily needs to be put in to this repo in any case (but not doing so means it can get out of sync pretty easily, but as it works based on specific commits that just means that users would get out-of-date versions instead of modern ones). Also, for note, cmake is not so much a build system as it is a build system builder (it builds a build system for, well, about any known build system out, from |
FYI a started a Premake setup for the examples over in the |
Perhaps this is not the best place to discuss it, but I would be interested if someone can craft a cmake setup that would mimic this premake file from this branch: https://github.com/ocornut/imgui/blob/premake/examples/premake5.lua This is a setup to create the examples app. I don't mind including both cmake and premake files if they are relatively simple. |
0c1e5bd
to
bb6a60b
Compare
8b83e0a
to
d735066
Compare
b3b85d8
to
0755767
Compare
c817acb
to
8d39063
Compare
Adding a simple CMakeLists to allow easy inclusion via externalproject_add