To build on Ubuntu, various things are necessary:
libocct-foundation-dev contains the /usr/lib/x86_64-linux-gnu/cmake/opencascade/OpenCASCADEConfig.cmake file find_package() looks for.
- But said
cmake package will complain if any of the libocct-* module is missing. All of them are necessary
- =>
$ apt install libocct-*
- Won't build if any of
libglfw3, libglfw3-dev, libimgui-dev, libxrandr-dev, libtbb12 or libtbb-dev is missing (worth being added to the README file)
- Also the include directory of the opencascade cmake package isn't automatically added to the final compilation command-line. An
include_directories(${OpenCASCADE_INCLUDE_DIR}) is also needed.
Once done, it runs and output:
OpenGL info:
GLXDirectRendering: Yes
GLXVendor: SGI
GLXVersion: 1.4
GLXClientVendor: Mesa Project and SGI
GLXClientVersion: 1.4
GLvendor: Intel
GLdevice: Mesa Intel(R) HD Graphics 630
GLversion: 4.6 (Core Profile) Mesa 24.0.9
GLSLversion: 4.60
Max texture size: 16384
Max FBO dump size: 4096x16384
Max combined texture units: 192
Max MSAA samples: 16
Viewport: 800x600
GPU memory: 15879 MiB
ResolutionRatio:
but only a black and sluggish OCCT IMGUI X window appear with no control.
I thought (without any proof) that it may be due to libglfw3 in Wayland environment. But replacing that lib by its libglfw3-wayland counterpart keeps compilation from succeeding:
/usr/bin/ld: CMakeFiles/OcctImgui.dir/GlfwOcctWindow.cpp.o: in function `GlfwOcctWindow::GlfwOcctWindow(int, int, TCollection_AsciiString const&)':
GlfwOcctWindow.cpp:(.text+0x14a): undefined reference to `glfwGetX11Display'
/usr/bin/ld: CMakeFiles/OcctImgui.dir/GlfwOcctWindow.cpp.o: in function `GlfwOcctWindow::NativeHandle() const':
GlfwOcctWindow.cpp:(.text+0x248): undefined reference to `glfwGetX11Window'
/usr/bin/ld: CMakeFiles/OcctImgui.dir/GlfwOcctWindow.cpp.o: in function `GlfwOcctWindow::NativeGlContext() const':
GlfwOcctWindow.cpp:(.text+0x26a): undefined reference to `glfwGetGLXContext'
collect2: error: ld returned 1 exit status
(These are part of the Native access glfw API)
To build on Ubuntu, various things are necessary:
libocct-foundation-devcontains the/usr/lib/x86_64-linux-gnu/cmake/opencascade/OpenCASCADEConfig.cmakefilefind_package()looks for.cmakepackage will complain if any of thelibocct-*module is missing. All of them are necessary$ apt install libocct-*libglfw3,libglfw3-dev,libimgui-dev,libxrandr-dev,libtbb12orlibtbb-devis missing (worth being added to the README file)include_directories(${OpenCASCADE_INCLUDE_DIR})is also needed.Once done, it runs and output:
but only a black and sluggish
OCCT IMGUIX window appear with no control.I thought (without any proof) that it may be due to
libglfw3in Wayland environment. But replacing that lib by itslibglfw3-waylandcounterpart keeps compilation from succeeding:(These are part of the Native access glfw API)