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

python3 bindings fail to build if imgui disabled #1392

Closed
simonschmeisser opened this issue Dec 26, 2019 · 1 comment · Fixed by #1445
Closed

python3 bindings fail to build if imgui disabled #1392

simonschmeisser opened this issue Dec 26, 2019 · 1 comment · Fixed by #1445
Milestone

Comments

@simonschmeisser
Copy link
Contributor

System Information

  • Ogre Version: 1.12.4
  • Operating System / Platform: Ubuntu 18.04
  • RenderSystem: ❔

Detailled description

I'm trying to update the ogre package released for Debian (and Ubuntu) to the current 1.12.4 and to enable some language bindings as well. As imgui is not included in the release tarball I'm currently disabling it (I read about #1332 ) by setting -DOGRE_BUILD_COMPONENT_OVERLAY_IMGUI:BOOL=FALSE

However it then fails to find the imgui include later on if I enable python bindings generation:

log

[ 97%] Building CXX object Components/Python/CMakeFiles/_Overlay.dir/OgreOverlayPYTHON_wrap.cxx.o
cd /home/simon/proggn/ogre/salsa_ogre/ogre/obj-x86_64-linux-gnu/Components/Python && /usr/bin/c++  -D_Overlay_EXPORTS -I/usr/include/python3.6m -I/home/simon/proggn/ogre/salsa_ogre/ogre/obj-x86_64-linux-gnu/include -I/home/simon/proggn/ogre/salsa_ogre/ogre/OgreMain/include -I/home/simon/proggn/ogre/salsa_ogre/ogre/Components/Overlay/include  -Wall -Winit-self -Wcast-qual -Wwrite-strings -Wextra -Wundef -Wmissing-declarations -Wno-unused-parameter -Wshadow -Wno-missing-field-initializers -Wno-long-long -g -O2 -fdebug-prefix-map=/home/simon/proggn/ogre/salsa_ogre/ogre=. -fstack-protector-strong -Wformat -Werror=format-security -pipe -Wall -Wdate-time -D_FORTIFY_SOURCE=2 -Wdate-time -D_FORTIFY_SOURCE=2 -msse -fPIC -fvisibility=hidden -fvisibility-inlines-hidden   -Wno-cast-qual -Wno-shadow -Wno-maybe-uninitialized -Wno-unused-label -Wno-unused-but-set-variable -Wno-missing-declarations -std=c++11 -o CMakeFiles/_Overlay.dir/OgreOverlayPYTHON_wrap.cxx.o -c /home/simon/proggn/ogre/salsa_ogre/ogre/obj-x86_64-linux-gnu/Components/Python/OgreOverlayPYTHON_wrap.cxx
/home/simon/proggn/ogre/salsa_ogre/ogre/obj-x86_64-linux-gnu/Components/Python/OgreOverlayPYTHON_wrap.cxx:4673:10: fatal error: imgui.h: Datei oder Verzeichnis nicht gefunden
 #include "imgui.h"
          ^~~~~~~~~
compilation terminated.

fix

seems to be a missing conditional in OgreOverlay.i if I change lines 23& 24 to

#ifdef HAVE_IMGUI
#include "imgui.h"
#include "OgreImGuiOverlay.h"
#endif

it compiles successfully

@paroj
Copy link
Member

paroj commented Dec 26, 2019

thanks for the fix, will include it in the next release.

However, can you use the github tag instead of the tarball to get the imgui submodule?

Several ogre based projects use imgui and it would be a pity if that feature would be missing from the debian base package.

Alternatively, you could patch ogre downstream to include the imgui sources, that are referencd here:
https://github.com/OGRECave/ogre/tree/master/Components/Overlay/src

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 a pull request may close this issue.

2 participants