Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions bindings/SofaGui/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,17 @@ sofa_find_package(Sofa.GUI.Qt QUIET)
if(Sofa.GUI.Qt_FOUND)
list(APPEND SUPPORTED_GUIS Sofa.GUI.Qt)
endif()


sofa_find_package(SofaGLFW QUIET)
if(SofaGLFW_FOUND)
list(APPEND SUPPORTED_GUIS SofaGLFW)
endif()
sofa_find_package(SofaImGui QUIET)
if(SofaImGui_FOUND)
list(APPEND SUPPORTED_GUIS SofaImGui)
endif()

sofa_find_package(Sofa.GUI.HeadlessRecorder QUIET)
if(Sofa.GUI.HeadlessRecorder_FOUND)
list(APPEND SUPPORTED_GUIS Sofa.GUI.HeadlessRecorder)
Expand Down
16 changes: 16 additions & 0 deletions bindings/SofaGui/src/SofaPython3/SofaGui/Module_SofaGui.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,16 @@ using sofa::helper::system::FileSystem;
#define HAS_GUI_QT
#endif

#if __has_include(<SofaGLFW/init.h>)
#include <SofaGLFW/init.h>
#define HAS_GUI_SOFAGLFW
#endif

#if __has_include(<SofaImGui/init.h>)
#include <SofaImGui/init.h>
#define HAS_GUI_SOFAIMGUI
#endif

#if __has_include(<sofa/gui/headlessrecorder/init.h>)
#include <sofa/gui/headlessrecorder/init.h>
#define HAS_GUI_HEADLESSRECORDER
Expand Down Expand Up @@ -106,6 +116,12 @@ PYBIND11_MODULE(Gui, m) {
#ifdef HAS_GUI_HEADLESSRECORDER
sofa::gui::headlessrecorder::init();
#endif
#ifdef HAS_GUI_SOFAGLFW
sofaglfw::init();
#endif
#ifdef HAS_GUI_SOFAIMGUI
sofaimgui::init();
#endif

sofa::core::init();

Expand Down