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

[ADD] support for downloading ImGui with git #105

Closed
wants to merge 2 commits into from

Conversation

NoeMurr
Copy link
Contributor

@NoeMurr NoeMurr commented Sep 8, 2019

This commit add the support for automatically downloading ImGui in a temp directory.
The git_clone cmake function has been taken from this repo.

I've also changed the FindImGui.cmake file because of a little bug:

if you look for imgui.h after having installed imgui-sfml on your machine, you will find the imgui.h file in the /usr/local directory no matter what the value of IMGUI_DIR is set to.
But that is not the directory where the sources of ImGui are.

If you look for the imgui.cpp file you will find the correct directory.

@eliasdaler
Copy link
Contributor

eliasdaler commented Sep 9, 2019

Hello.
Thanks for the patch, however I think the better approach would be one of the things:

  1. Use ImGui as subrepo of ImGui-SFML
  2. Use ExternalData

ExternalData already implements cloning git repos, so I see no reason to repeat this, considering it's probably done a lot safer and better in CMake.

if you look for imgui.h after having installed imgui-sfml on your machine, you will find the imgui.h file in the /usr/local directory no matter what the value of IMGUI_DIR is set to.
But that is not the directory where the sources of ImGui are.
Strange, I've tested it, and it should be installed in the place where imgui-sfml is put into. Try setting CMAKE_INSTALL_PREFIX to some directory and see where imgui headers get installed.

Also, the value of IMGUI_DIR is used for finding ImGui, it doesn't affect where ImGui headers get installed to. Both ImGui and ImGui-SFML headers are installed to CMAKE_INSTALL_INCLUDEDIR. Also see this discussion.

I'll double-check where imgui.h gets installed, though.

So, can't accept it for now, sorry. I'll be glad to accept the patch which either includes ImGui as a subrepo (see #81) or downloads it via ExternalData (which should be configurable and OFF by default).

@eliasdaler eliasdaler closed this Sep 9, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants