]> SALOME platform Git repositories - modules/paravis.git/commitdiff
Salome HOME
win32 compatibility
authorana <ana@opencascade.com>
Mon, 5 May 2014 15:07:20 +0000 (19:07 +0400)
committerana <ana@opencascade.com>
Mon, 5 May 2014 15:07:20 +0000 (19:07 +0400)
src/Plugins/EllipseBuilder/vtkEllipseBuilderFilter.cxx
src/Plugins/MEDReader/IO/CMakeLists.txt
src/Plugins/MEDReader/IO/MEDFileFieldRepresentationTree.hxx
src/Plugins/MEDReader/IO/MEDLoaderForPV.h [new file with mode: 0644]
src/Plugins/MEDReader/IO/MEDTimeReq.hxx
src/Plugins/MEDReader/IO/MEDUtilities.hxx
src/Plugins/MEDReader/IO/vtkELNOMeshFilter.cxx
src/Plugins/MEDReader/IO/vtkMEDReader.h
src/Plugins/ParaMEDCorba/CMakeLists.txt

index 30e1d9771c96e006587e969d4eb57ba05a69a3f7..1f3e2d00652bffb903a50acbc5407db5f1777869 100644 (file)
@@ -189,7 +189,7 @@ int vtkEllipseBuilderFilter::RequestData(vtkInformation* vtkNotUsed(request),
           
          int aNumberOfRealComponents = aRealArray->GetNumberOfComponents();
          int aNumberOfImagComponents = anImagArray->GetNumberOfComponents();              
-         if (aNumberOfRealComponents >= 3 and aNumberOfImagComponents >= 3)
+         if (aNumberOfRealComponents >= 3 && aNumberOfImagComponents >= 3)
             {
              anOutputMDSet->CopyStructure(anInputMDSet);
              vtkUnstructuredGrid* aCloneDS = aSourceDS->NewInstance();
index fb39e984a6f94309934a914e5fddafba4e90ee63..091b533542b15ac9b88633df02c7abe59eba797b 100644 (file)
@@ -34,10 +34,10 @@ FOREACH(class ${MEDReader_CLASSES})
 ENDFOREACH(class)
 
 ADD_LIBRARY(MEDLoaderForPV SHARED MEDFileFieldRepresentationTree.cxx MEDTimeReq.cxx MEDUtilities.cxx vtkGenerateVectors.cxx)
-TARGET_LINK_LIBRARIES(MEDLoaderForPV ${MED_medloader} ${MEDFILE_C_LIBRARIES})
+TARGET_LINK_LIBRARIES(MEDLoaderForPV vtkCommonCore vtkCommonDataModel ${MED_medloader} ${MEDFILE_C_LIBRARIES})
 
 VTK_MODULE_LIBRARY(vtkMEDReader ${MEDReader_SRCS})
-TARGET_LINK_LIBRARIES(vtkMEDReader MEDLoaderForPV ${MEDFILE_C_LIBRARIES}) 
+TARGET_LINK_LIBRARIES(vtkMEDReader vtkPVVTKExtensionsRendering vtkRenderingFreeType vtkRenderingOpenGL vtkRenderingFreeTypeOpenGL vtkInteractionStyle vtkFiltersCore vtkFiltersGeneral MEDLoaderForPV ${MEDFILE_C_LIBRARIES}) 
 
 INSTALL(
   TARGETS vtkMEDReader MEDLoaderForPV
index 4df798d682477b96532e3f8017f4be004cdd2476..d70bfce62746f0362b0237e359ae402ced2e236e 100644 (file)
@@ -23,6 +23,7 @@
 
 #include "MEDFileMesh.hxx"
 #include "MEDFileField.hxx"
+#include "MEDLoaderForPV.h"
 
 #include "vtkType.h"
 
@@ -59,7 +60,7 @@ private:
   mutable std::vector< std::vector< std::pair< vtkQuadratureSchemeDefinition *, unsigned char > > > _defs;
 };
 
-class MEDFileFieldRepresentationLeavesArrays : public ParaMEDMEM::MEDCouplingAutoRefCountObjectPtr<ParaMEDMEM::MEDFileAnyTypeFieldMultiTS>
+class MEDLOADERFORPV_EXPORT MEDFileFieldRepresentationLeavesArrays : public ParaMEDMEM::MEDCouplingAutoRefCountObjectPtr<ParaMEDMEM::MEDFileAnyTypeFieldMultiTS>
 {
 public:
   MEDFileFieldRepresentationLeavesArrays();
@@ -90,7 +91,7 @@ private:
   ELGACmp _elga_cmp;
 };
 
-class MEDFileFieldRepresentationLeaves
+class MEDLOADERFORPV_EXPORT MEDFileFieldRepresentationLeaves
 {
 public:
   MEDFileFieldRepresentationLeaves();
@@ -125,7 +126,7 @@ private:
   mutable vtkDataSet *_cached_ds;
 };
 
-class MEDFileFieldRepresentationTree
+class MEDLOADERFORPV_EXPORT MEDFileFieldRepresentationTree
 {
 public:
   MEDFileFieldRepresentationTree();
@@ -168,7 +169,7 @@ private:
   ParaMEDMEM::MEDCouplingAutoRefCountObjectPtr<ParaMEDMEM::MEDFileFields> _fields;
 };
 
-class TimeKeeper
+class MEDLOADERFORPV_EXPORT TimeKeeper
 {
 public:
   TimeKeeper(int policy);
diff --git a/src/Plugins/MEDReader/IO/MEDLoaderForPV.h b/src/Plugins/MEDReader/IO/MEDLoaderForPV.h
new file mode 100644 (file)
index 0000000..616079b
--- /dev/null
@@ -0,0 +1,33 @@
+// Copyright (C) 2010-2014  CEA/DEN, EDF R&D
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+//
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+//
+
+#ifndef __MEDLOADERFORPV_HXX__
+#define __MEDLOADERFORPV_HXX__
+
+#ifdef WIN32
+# if defined MEDLoaderForPV_EXPORTS || defined MEDLOADERFORPV_EXPORTS
+#  define MEDLOADERFORPV_EXPORT __declspec( dllexport )
+# else
+#  define MEDLOADERFORPV_EXPORT __declspec( dllimport )
+# endif
+#else
+ #define MEDLOADERFORPV_EXPORT
+#endif
+
+#endif
index e1c061d4e13595127185e916ff490364b8973889..40b9d6d2f00e627113b60cf06f7452bbc385b2bc 100644 (file)
@@ -24,7 +24,9 @@
 #include <string>
 #include <vector>
 
-class MEDTimeReq
+#include "MEDLoaderForPV.h"
+
+class MEDLOADERFORPV_EXPORT MEDTimeReq
 {
 public:
   virtual int size() const = 0;
@@ -36,7 +38,7 @@ public:
   virtual ~MEDTimeReq();
 };
 
-class MEDStdTimeReq : public MEDTimeReq
+class MEDLOADERFORPV_EXPORT MEDStdTimeReq : public MEDTimeReq
 {
 public:
   MEDStdTimeReq(int timeReq);
@@ -52,7 +54,7 @@ private:
   int _time_req;
 };
 
-class MEDModeTimeReq : public MEDTimeReq
+class MEDLOADERFORPV_EXPORT MEDModeTimeReq : public MEDTimeReq
 {
 public:
   MEDModeTimeReq(const std::vector<bool>& v, const std::vector<double>& ts);
index 52ac5196c5eaa9d983d2891d7ff42bd386d38b8c..c6f28034dfd0867ece6c5a664f42f5d207e98b20 100644 (file)
 #ifndef __MEDUTILITIES_HXX__
 #define __MEDUTILITIES_HXX__
 
+#include "MEDLoaderForPV.h"
+
 class vtkInformationIntegerKey;
 
-class MEDUtilities
+class MEDLOADERFORPV_EXPORT MEDUtilities
 {
 public:
   static vtkInformationIntegerKey *ELGA();
index 1eb4c7ab056d6b2ec824295e1fe814848c16a678..9d6894ffa381756fa20f003cc89e31108370ad0c 100644 (file)
@@ -108,7 +108,7 @@ int vtkELNOMeshFilter::RequestData(vtkInformation *request,
   for(int index = 0; index < fielddata->GetNumberOfArrays(); index++)
     {
       vtkDataArray *data(fielddata->GetArray(index));
-      vtkQuadratureSchemeDefinition **dict(0);
+      vtkQuadratureSchemeDefinition **dict;
       vtkInformationQuadratureSchemeDefinitionVectorKey *key(vtkQuadratureSchemeDefinition::DICTIONARY());
       if(key->Has(data->GetInformation()))
         {
index a89728017380cdfc13ea68cccc590fc0d59ab2cb..f8ba0598df86dc7f2e6c151979e37839f6c041bc 100644 (file)
@@ -21,6 +21,8 @@
 #ifndef __vtkMEDReader_h_
 #define __vtkMEDReader_h_
 
+#include <string>
+
 #include "vtkMultiBlockDataSetAlgorithm.h"
 
 class vtkMutableDirectedGraph;
index 200b2b32a51fbf641679e9a49ce939a99eb5ab9b..b58baba56a71ad8a3665de8a4d7eb8c63c446943 100644 (file)
@@ -51,8 +51,7 @@ PROJECT( ParaMEDCorba )
       SERVER_MANAGER_SOURCES ${PARACORBAPLUG_SRCS} )
     
     INCLUDE_DIRECTORIES(${OMNIORB_INCLUDE_DIR} ${MED_ROOT_DIR}/include/salome ${KERNEL_ROOT_DIR}/include/salome)
-    SET_TARGET_PROPERTIES(ParaMEDMEM2VTK PROPERTIES COMPILE_FLAGS "${OMNIORB_DEFINITIONS}")
-    SET_TARGET_PROPERTIES(ParaMEDCorbaPlugin PROPERTIES COMPILE_FLAGS "${OMNIORB_DEFINITIONS}")
+    ADD_DEFINITIONS(${OMNIORB_DEFINITIONS})
 
     TARGET_LINK_LIBRARIES(ParaMEDMEM2VTK
       #vtkCommon
@@ -69,6 +68,17 @@ PROJECT( ParaMEDCorba )
       ParaMEDMEM2VTK
       )
     
+    #Build library with a static runtime and ignore MSVCRT.lib on WINDOWS
+    IF(WIN32)
+      IF(CMAKE_BUILD_TYPE STREQUAL Debug)
+        SET_TARGET_PROPERTIES(ParaMEDMEM2VTK PROPERTIES LINK_FLAGS "/NODEFAULTLIB:MSVCRTD")
+        SET_TARGET_PROPERTIES(ParaMEDMEM2VTK PROPERTIES COMPILE_FLAGS "/MTd")
+      ELSE()
+        SET_TARGET_PROPERTIES(ParaMEDMEM2VTK PROPERTIES LINK_FLAGS "/NODEFAULTLIB:MSVCRT")
+        SET_TARGET_PROPERTIES(ParaMEDMEM2VTK PROPERTIES COMPILE_FLAGS "/MT")
+      ENDIF()
+    ENDIF(WIN32)
+
     INSTALL(TARGETS ParaMEDCorbaPlugin DESTINATION lib/paraview)
 
     INSTALL(TARGETS ParaMEDMEM2VTK DESTINATION lib/salome)