mosra / magnum-integration

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

Cmake fails with flag: DMAGNUM_WITH_IMGUI=ON #106

Closed Fattorino closed 2 months ago

Fattorino commented 2 months ago

I've built Corrade, Magnum and Magnum-plugins without any issues. Then I proceded to build Magnum-integrations and it worked, I then remembered I also needed ImGui so I followed the guide, tried to build again, but cmake trowed errors. I then tried to delete the folder and all the generated files, started with a fresh clone, cloned ImGui, set the rule. But I still get the same error.

CMake error

``` CMake Error at /usr/share/cmake-3.22/Modules/FindPackageHandleStandardArgs.cmake:230 (message): Could NOT find ImGui (missing: ImGui_INCLUDE_DIR Sources) Call Stack (most recent call first): /usr/share/cmake-3.22/Modules/FindPackageHandleStandardArgs.cmake:594 (_FPHSA_FAILURE_MESSAGE) modules/FindImGui.cmake:230 (find_package_handle_standard_args) src/Magnum/ImGuiIntegration/CMakeLists.txt:45 (find_package) ``` ``` dh_auto_configure: error: cd obj-x86_64-linux-gnu && cmake -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_BUILD_TYPE=None -DCMAKE_INSTALL_SYSCONFDIR=/etc -DCMAKE_INSTALL_LOCALSTATEDIR=/var -DCMAKE_EXPORT_NO_PACKAGE_REGISTRY=ON -DCMAKE_FIND_USE_PACKAGE_REGISTRY=OFF -DCMAKE_FIND_PACKAGE_NO_PACKAGE_REGISTRY=ON "-GUnix Makefiles" -DCMAKE_VERBOSE_MAKEFILE=ON -DCMAKE_INSTALL_LIBDIR=lib/x86_64-linux-gnu -DCMAKE_BUILD_TYPE=Release -DMAGNUM_WITH_BULLET=ON -DMAGNUM_WITH_DART=OFF -DMAGNUM_WITH_GLM=ON -DMAGNUM_WITH_IMGUI=ON .. returned exit code 1 make[1]: *** [debian/rules:16: override_dh_auto_configure] Error 2 make[1]: Leaving directory '/home/gabriele/magnum-integration' make: *** [debian/rules:13: build] Error 2 dpkg-buildpackage: error: debian/rules build subprocess returned exit status 2 ```

FullOutput.txt

mosra commented 2 months ago

Hi, thanks for all the details!

So, that means, according to the guide, you cloned / copied the ImGui sources to src/MagnumExternal/ImGui inside the repo (so that /home/gabriele/magnum-integration/src/MagnumExternal/ImGui/imgui.h etc exists), and it still failed this way? I just tried locally, deleted all my system-wide ImGui installations, and it correctly found the embedded sources:

build-imgui-embedded]$ cmake .. -DMAGNUM_WITH_IMGUI=ON
...
-- Found ImGui: /home/mosra/Code/magnum-integration/src/MagnumExternal/ImGui  found components: Sources 
-- Configuring done (0.2s)
-- Generating done (0.0s)
-- Build files have been written to: /home/mosra/Code/magnum-integration/build-imgui-embedded

Although this was with plain CMake, not through dpkg-buildpackage, but it doesn't seem to pass anything suspicious that should break this.

Fattorino commented 2 months ago

I'm an absolute idiot. I created a dir called ImGui then cloned. So the final path was /home/gabriele/magnum-integration/src/MagnumExternal/ImGui/imgui. Now everything worked, my bad.