Skip to content

Commit bb67817

Browse files
committed
[SofaGui] FIX qt.conf.h include depends on SofaGuiQt availability
1 parent 66782ea commit bb67817

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

bindings/SofaGui/src/SofaPython3/SofaGui/Module_SofaGui.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,10 @@
2626
#include <sofa/helper/Utils.h>
2727
#include <sofa/helper/system/FileSystem.h>
2828
using sofa::helper::system::FileSystem;
29+
30+
#if SOFAGUI_HAVE_SOFAGUIQT
2931
#include <sofa/gui/qt/qt.conf.h>
32+
#endif // SOFAGUI_HAVE_SOFAGUIQT
3033

3134
#include "Binding_BaseGui.h"
3235
#include "Binding_GUIManager.h"
@@ -60,6 +63,7 @@ PYBIND11_MODULE(Gui, m) {
6063
:members:
6164
)doc";
6265

66+
#if SOFAGUI_HAVE_SOFAGUIQT
6367
std::string sofaPrefixAbsolute = sofa::helper::Utils::getSofaPathPrefix();
6468
std::string inputFilepath = FileSystem::cleanPath(sofaPrefixAbsolute + "/bin/qt.conf");
6569
bool success = sofa::gui::qt::loadQtConfWithCustomPrefix(inputFilepath, sofaPrefixAbsolute);
@@ -77,6 +81,7 @@ PYBIND11_MODULE(Gui, m) {
7781
}
7882
std::cout << std::endl;
7983
}
84+
#endif // SOFAGUI_HAVE_SOFAGUIQT
8085

8186
// This is needed to make sure the GuiMain library (libSofaGuiMain.so) is correctly
8287
// linked since the GUIs are statically created during the load of the library.

0 commit comments

Comments
 (0)