From 6d18d0f04d3c0560dd1aac4cee9fc0ccb9537184 Mon Sep 17 00:00:00 2001
From: Christophe Geuzaine <cgeuzaine@ulg.ac.be>
Date: Thu, 26 Jul 2007 17:57:27 +0000
Subject: [PATCH] fix compilation w/out FourierModel

---
 Fltk/GUI.cpp            |  4 +++-
 Fltk/GUI_Projection.cpp | 11 +++++++++++
 Fltk/GUI_Projection.h   | 11 +++++++----
 Fltk/Makefile           |  5 ++---
 4 files changed, 23 insertions(+), 8 deletions(-)

diff --git a/Fltk/GUI.cpp b/Fltk/GUI.cpp
index d2c79d56bd..46df991f8e 100644
--- a/Fltk/GUI.cpp
+++ b/Fltk/GUI.cpp
@@ -1,4 +1,4 @@
-// $Id: GUI.cpp,v 1.626 2007-07-26 13:10:47 geuzaine Exp $
+// $Id: GUI.cpp,v 1.627 2007-07-26 17:57:27 geuzaine Exp $
 //
 // Copyright (C) 1997-2007 C. Geuzaine, J.-F. Remacle
 //
@@ -290,7 +290,9 @@ Context_Item menu_mesh[] = {
 #if defined(HAVE_NETGEN)
   {"Optimize quality", (Fl_Callback *)mesh_optimize_cb} , 
 #endif
+#if defined(HAVE_FOURIER_MODEL)
   {"Reparameterize",   (Fl_Callback *)mesh_parameterize_cb} , 
+#endif
   {"Save",         (Fl_Callback *)mesh_save_cb} ,
   {0} 
 };  
diff --git a/Fltk/GUI_Projection.cpp b/Fltk/GUI_Projection.cpp
index d6766ef6eb..b3e25ecaeb 100644
--- a/Fltk/GUI_Projection.cpp
+++ b/Fltk/GUI_Projection.cpp
@@ -7,6 +7,8 @@
 extern GModel *GMODEL;
 extern Context_T CTX;
 
+#if defined(HAVE_FOURIER_MODEL)
+
 void uvPlot::draw()
 {
   // draw background
@@ -344,3 +346,12 @@ void mesh_parameterize_cb(Fl_Widget* w, void* data)
   if(!editor) editor = new projectionEditor(faces);
   editor->show();
 }
+
+#else
+
+void mesh_parameterize_cb(Fl_Widget* w, void* data)
+{
+  Msg(GERROR, "You must compile FourierModel to reparameterize meshes");
+}
+
+#endif
diff --git a/Fltk/GUI_Projection.h b/Fltk/GUI_Projection.h
index d00f66debe..6e9f608a54 100644
--- a/Fltk/GUI_Projection.h
+++ b/Fltk/GUI_Projection.h
@@ -4,15 +4,16 @@
 #include "Gmsh.h"
 #include "GmshUI.h"
 #include "GModel.h"
-#include "FProjectionFace.h"
-
-#include <vector>
-
 #include "GUI.h"
 #include "Shortcut_Window.h"
 #include <FL/Fl_Toggle_Button.H>
 #include <FL/Fl_Round_Button.H>
 
+#if defined(HAVE_FOURIER_MODEL)
+
+#include <vector>
+#include "FProjectionFace.h"
+
 #define MAX_PROJECTION_PARAMETERS 20
 
 void select_cb(Fl_Widget *w, void *data);
@@ -55,3 +56,5 @@ class projectionEditor {
 };
 
 #endif
+
+#endif
diff --git a/Fltk/Makefile b/Fltk/Makefile
index ac27143606..380cfdfb99 100644
--- a/Fltk/Makefile
+++ b/Fltk/Makefile
@@ -1,4 +1,4 @@
-# $Id: Makefile,v 1.137 2007-07-26 16:45:06 geuzaine Exp $
+# $Id: Makefile,v 1.138 2007-07-26 17:57:27 geuzaine Exp $
 #
 # Copyright (C) 1997-2007 C. Geuzaine, J.-F. Remacle
 #
@@ -138,8 +138,7 @@ GUI_Projection.o: GUI_Projection.cpp ../Graphics/Draw.h ../DataStr/List.h \
   ../DataStr/Malloc.h ../DataStr/Tree.h ../DataStr/avl.h \
   ../DataStr/Tools.h ../DataStr/List.h ../DataStr/Tree.h \
   ../Common/GmshUI.h ../Geo/GModel.h ../Geo/GVertex.h ../Geo/GEdge.h \
-  ../Geo/GFace.h ../Geo/GRegion.h ../Geo/SBoundingBox3d.h \
-  ../Geo/FProjectionFace.h ../Geo/GModel.h ../Geo/Range.h GUI.h \
+  ../Geo/GFace.h ../Geo/GRegion.h ../Geo/SBoundingBox3d.h GUI.h \
   Opengl_Window.h Colorbar_Window.h Popup_Button.h \
   SpherePosition_Widget.h Shortcut_Window.h
 Callbacks.o: Callbacks.cpp ../Common/Gmsh.h ../Common/Message.h \
-- 
GitLab