mosra / magnum-integration

Integration libraries for the Magnum C++11 graphics engine
https://magnum.graphics/
Other
97 stars 44 forks source link

Magnum::ImGuiIntegration missing from debian package #73

Closed brennengreen closed 3 years ago

brennengreen commented 4 years ago

Hi all, I'm trying to work through the Dear ImGui example and currently attempting to get the ImGui Integration set up with a bit of resistance.

I have installed Magnum Integrations through the debian workflow in the documentations. I have also followed the requirements listed on the ImGuiIntegration page to properly set CMake up to find ImGui.

The error I am receiving however is the following

CMake Error at /.../cmake/linux/share/cmake-3.16/Modules/FindPackageHandleStandardArgs.cmake:146 (message):
  Could NOT find MagnumIntegration (missing: ImGui)

I also noticed in my Magnum build only GlmIntegration and BulletIntegration are present, which means that the debian based installation did not install the necessary files for ImGuiIntegration. I do not know if this is purposeful but I believe if it is then it may be worth adding a note about that on the documentation page here

brennengreen commented 4 years ago

To answer my own question in regards to the error mentioned: By building the Magnum::ImGuiIntegration manually instead of through the debian package with the following commands

$ git clone https://github.com/mosra/magnum-integration.git && cd magnum-integration
$ cmake .. \
> -DCMAKE_INSTALL_PREFIX=/usr \
> -DWITH_IMGUI=ON \
> -DIMGUI_DIR=/path/to/imgui
$ make
$ make install

Still no clue if the lack of ImGuiIntegration from the debian package was intentional but this did fix my issues entirely.

mosra commented 4 years ago

Hi,

yes, you guessed right, ImGui was missing intentionally because there isn't any PPA, distribution or packages of ImGui and depending on something that's not a package is a no-go. This was a big pain point for many users and so for the recently-tagged 2020.06 I made a bunch of changes to enable ImGui for Homebrew and ArchLinux packages at least, and ... skipped Debian packages because I silently hoped nobody would need those that soon. Well, I was wrong :D

Any chance you have some experience with debian package maintenance? The workflow in this case would be that the package recipe would download ImGui sources and put them into src/MagnumExternal/ImGui, at which point the buildsystem takes over, building it & installing the needed headers appropriately. It's been a while since I did anything like this, so I'd need to search how that's done.

brennengreen commented 4 years ago

Can't say I have experience with package maintenance but it seems like we're both in the same boat in that we'd need to do some googling to get it functioning. I'll take some time and try to look around and see if I couldn't find an appropriate solution along with what you've mentioned-worst case scenario I may have to report back in a week or so empty handed but I'll give it a shot!

mosra commented 4 years ago

That's amazing, thanks a lot!

Usually the debian packages have some source archive that then gets unpacked and built, in this case the package is kinda abusing the debian packaging system in that it already has all sources ready and doesn't need to fetch anything extra.

Worst case, if everything else fails, the packaging script could always check for presence of src/MagnumExternal/ImGui and if it's not there, it prints a curl oneliner that the user is supposed to run before doing dpkg-buildpacakge.

mosra commented 3 years ago

To make it at least a bit easier for users, since 518c9234e18555e028c83c5c008350850d438ba7 the documentation mentions the extra steps needed to enable ImGui in the Debian package. I think that'll do for now.