diff --git a/src/Mod/MeshPart/App/CMakeLists.txt b/src/Mod/MeshPart/App/CMakeLists.txt index 94b35fc574..df2959e990 100644 --- a/src/Mod/MeshPart/App/CMakeLists.txt +++ b/src/Mod/MeshPart/App/CMakeLists.txt @@ -4,8 +4,9 @@ else(MSVC) add_definitions(-DHAVE_LIMITS_H -DHAVE_CONFIG_H) endif(MSVC) - -add_definitions(-DHAVE_SMESH) +if (FREECAD_BUILD_SMESH) + add_definitions(-DHAVE_SMESH -DHAVE_MEFISTO) +endif(FREECAD_BUILD_SMESH) if(FREECAD_BUILD_FEM_NETGEN) add_definitions(-DHAVE_NETGEN) diff --git a/src/Mod/MeshPart/App/Mesher.cpp b/src/Mod/MeshPart/App/Mesher.cpp index 5a7c47f196..c78d3d8ecb 100644 --- a/src/Mod/MeshPart/App/Mesher.cpp +++ b/src/Mod/MeshPart/App/Mesher.cpp @@ -152,7 +152,7 @@ Mesh::MeshObject* Mesher::createMesh() const hypoth.push_back(alg2d); } break; #endif -#if !defined (_MSC_VER) +#if defined (HAVE_MEFISTO) case Mefisto: { if (maxLength > 0) { StdMeshers_MaxLength* hyp1d = new StdMeshers_MaxLength(hyp++, 0, meshgen); diff --git a/src/Mod/MeshPart/Gui/CMakeLists.txt b/src/Mod/MeshPart/Gui/CMakeLists.txt index e2f4e874c6..08766866d1 100644 --- a/src/Mod/MeshPart/Gui/CMakeLists.txt +++ b/src/Mod/MeshPart/Gui/CMakeLists.txt @@ -4,6 +4,10 @@ else(MSVC) add_definitions(-DHAVE_LIMITS_H -DHAVE_CONFIG_H) endif(MSVC) +if (FREECAD_BUILD_SMESH) + add_definitions(-DHAVE_SMESH -DHAVE_MEFISTO) +endif(FREECAD_BUILD_SMESH) + if(FREECAD_BUILD_FEM_NETGEN) add_definitions(-DHAVE_NETGEN) endif(FREECAD_BUILD_FEM_NETGEN) diff --git a/src/Mod/MeshPart/Gui/Tessellation.cpp b/src/Mod/MeshPart/Gui/Tessellation.cpp index 5282c1db25..97a452b8b5 100644 --- a/src/Mod/MeshPart/Gui/Tessellation.cpp +++ b/src/Mod/MeshPart/Gui/Tessellation.cpp @@ -65,7 +65,7 @@ Tessellation::Tessellation(QWidget* parent) ui->comboFineness->setCurrentIndex(2); on_comboFineness_currentIndexChanged(2); -#if defined (_MSC_VER) +#if !defined (HAVE_MEFISTO) ui->radioButtonMefisto->setDisabled(true); #else ui->radioButtonMefisto->setChecked(true);