]> SALOME platform Git repositories - modules/visu.git/commitdiff
Salome HOME
Fix problems with compilation
authorvsr <vsr@opencascade.com>
Fri, 5 Apr 2013 14:20:10 +0000 (14:20 +0000)
committervsr <vsr@opencascade.com>
Fri, 5 Apr 2013 14:20:10 +0000 (14:20 +0000)
src/VISUGUI/VisuGUI.cxx
src/VISUGUI/VisuGUI_Tools.cxx
src/VISUGUI/VisuGUI_Tools.h
src/VISU_I/Makefile.am
src/VISU_I/VISU_Gen_i.cc

index 3733fe362070c8b42e37b5d7ea41c5abc14a0c7c..b81bc47b24733565b87ae9818c755f51dd097dd9 100644 (file)
 #include "VISU_TableDlg.h"
 #include "VisuGUI_FileInfoDlg.h"
 
+#ifdef WITH_MEDGEN
 #include "SALOMEconfig.h"
 #include CORBA_SERVER_HEADER(MED_Gen)
+#endif // WITH_MEDGEN
 
 #include "utilities.h"
 
index 7070d7157f2b33bb91c946068ccea62ebf124139..43991c9bcb8e6acfb098e1a0112ee8dcad7dc013 100644 (file)
@@ -239,6 +239,7 @@ namespace VISU
     return aGen;
   }
 
+#ifdef WITH_MEDGEN
   //------------------------------------------------------------
   SALOME_MED::MED_Gen_var
   GetMEDEngine()
@@ -253,7 +254,7 @@ namespace VISU
       throw std::runtime_error(QObject::tr("ERR_CANT_FIND_MED_COMPONENT").toLatin1().data());
     return aGen;
   }
-
+#endif // WITH_MEDGEN
 
   //----------------------------------------------------------------------------
   // Selection
index 23306c1a97d7e50d03d8228b8aafecaa4c87544c..028c4c74742809465ae52824ea25a84f4b34c894 100644 (file)
 
 #include "SALOMEDSClient_Study.hxx"
 
+#ifdef WITH_MEDGEN
 #include "SALOMEconfig.h"
 #include CORBA_SERVER_HEADER(MED_Gen)
+#endif // WITH_MEDGEN
 
 class QWidget;
 class QDialog;
@@ -91,7 +93,9 @@ namespace VISU
 
   //----------------------------------------------------------------------------
   VISU_Gen_i*                          GetVisuGen(const CAM_Module* theModule);
+#ifdef WITH_MEDGEN
   SALOME_MED::MED_Gen_var              GetMEDEngine();
+#endif // WITH_MEDGEN
 
   // Selection
   LightApp_SelectionMgr*               GetSelectionMgr(const SalomeApp_Module* theModule);
index 1dfae84c8189ebd84800b79751d6b71f6dc9a3e4..951cbd4c996db99f9b1900f0e002937885fb8d44 100644 (file)
@@ -215,5 +215,4 @@ VISU_I_LDADD=\
        -lMEDWrapper \
        -lMEDWrapperBase \
        -lMEDWrapper_V2_2 \
-       -lmedmem \
        @CORBA_LIBS@
index 6bee3e8cc2c28ae86ad9b51e0fb20f6826aa8a0b..6f17be13bd9d5e0a8b819750cefaf1db5c24d265 100644 (file)
@@ -71,7 +71,9 @@
 #include <omnithread.h>
 #include CORBA_SERVER_HEADER(SALOME_Session)
 #include CORBA_SERVER_HEADER(SALOME_ModuleCatalog)
+#ifdef WITH_MEDGEN
 #include CORBA_SERVER_HEADER(MED_Gen)
+#endif // WITH_MEDGEN
 
 // QT Includes
 #include <QDir>
@@ -780,25 +782,27 @@ namespace VISU
 
       ProcessVoidEvent(new TEvent(aStudyName));
 
+#ifdef WITH_MEDGEN
       // Load MED component if necessary
-      if(!myStudyDocument->FindComponent("MED")->_is_nil())
-        {
-          SALOME_LifeCycleCORBA aLCC(SalomeApp_Application::namingService());
-          Engines::EngineComponent_var aComponent = aLCC.FindOrLoad_Component("FactoryServer","MED");
-          SALOME_MED::MED_Gen_var aMedEngine = SALOME_MED::MED_Gen::_narrow(aComponent);
-
-          if(!CORBA::is_nil(aMedEngine))
-            {
-              SALOMEDS::StudyBuilder_var aStudyBuilder = myStudyDocument->NewBuilder();
-              try {
-                aStudyBuilder->LoadWith( myStudyDocument->FindComponent( "MED" ), aMedEngine );
-              }
-              catch( const SALOME::SALOME_Exception& ) {
-                // Oops, something went wrong while loading
-                // See also SalomeApp_Study::openDataModel()
-              }
-            }
-        }
+      if (!myStudyDocument->FindComponent("MED")->_is_nil())
+      {
+       SALOME_LifeCycleCORBA aLCC(SalomeApp_Application::namingService());
+       Engines::EngineComponent_var aComponent = aLCC.FindOrLoad_Component("FactoryServer","MED");
+       SALOME_MED::MED_Gen_var aMedEngine = SALOME_MED::MED_Gen::_narrow(aComponent);
+       
+       if(!CORBA::is_nil(aMedEngine))
+       {
+         SALOMEDS::StudyBuilder_var aStudyBuilder = myStudyDocument->NewBuilder();
+         try {
+           aStudyBuilder->LoadWith( myStudyDocument->FindComponent( "MED" ), aMedEngine );
+         }
+         catch( const SALOME::SALOME_Exception& ) {
+           // Oops, something went wrong while loading
+           // See also SalomeApp_Study::openDataModel()
+         }
+       }
+      }
+#endif // WITH_MEDGEN
     } else {
       INFOS("CORBA::is_nil(theStudy)");
     }