Salome HOME
Porting SIERPINSKY module to WIN32 platform.
authorrnv <rnv@opencascade.com>
Fri, 1 Nov 2013 13:40:40 +0000 (13:40 +0000)
committerrnv <rnv@opencascade.com>
Fri, 1 Nov 2013 13:40:40 +0000 (13:40 +0000)
src/Sierpinsky/CMakeLists.txt
src/Sierpinsky/SIERPINSKY_Gen_i.cxx
src/Sierpinsky/SIERPINSKY_Gen_i.hxx
src/SierpinskyGUI/CMakeLists.txt
src/SierpinskyGUI/SierpinskyGUI.cxx
src/SierpinskyGUI/SierpinskyGUI.h
src/SierpinskyGUI/SierpinskyGUI.hxx [new file with mode: 0755]
src/SierpinskyGUI/SierpinskyGUI_RunDlg.h

index 40f1788a6fa8a757c4a8504750a892cb1de2657a..92cf03ee7d7012c9f6fce7a1bf94e613e8dc51f4 100644 (file)
@@ -33,6 +33,7 @@ INCLUDE_DIRECTORIES(
 ADD_DEFINITIONS(
   ${BOOST_DEFINITIONS}
   ${HDF5_DEFINITIONS}
+  ${OMNIORB_DEFINITIONS}
 )
 
 # libraries to link to
@@ -48,9 +49,12 @@ SET(_link_LIBRARIES
   ${SMESH_MEDWrapper}
   ${CORBA_LIBS}
   SalomeIDLSIERPINSKY
-  gd
 )
 
+IF(SALOME_SIERPINSKY_USE_LIBGD)
+  LIST(APPEND _link_LIBRARIES gd)
+ENDIF(SALOME_SIERPINSKY_USE_LIBGD)
+
 # --- headers ---
 
 # header files / no moc processing
index 825076309f805b37aedd412d5412c19f8636dd79..bfe40a5931401dbf4075040a15622291e60cff9b 100644 (file)
@@ -34,7 +34,8 @@
  * Engine factory
  */
 extern "C"
-{
+{ 
+  SIERPINSKYENGINE_EXPORT
   PortableServer::ObjectId * SIERPINSKYEngine_factory( CORBA::ORB_ptr            orb,
                                                        PortableServer::POA_ptr   poa, 
                                                        PortableServer::ObjectId* contId,
index 8d77fe0df0693f8e70e83043672b700774a27496..895bfe2410b93f65cd82ca8e58712178661e23bb 100644 (file)
 
 #include <list>
 
+#ifdef WIN32
+ #if defined SIERPINSKYENGINE_EXPORTS || defined SIERPINSKYEngine_EXPORTS
+  #define SIERPINSKYENGINE_EXPORT __declspec( dllexport )
+ #else
+  #define SIERPINSKYENGINE_EXPORT __declspec( dllimport )
+ #endif
+#else
+ #define SIERPINSKYENGINE_EXPORT
+#endif
+
 struct MyPoint
 {
   double myX;
@@ -41,7 +51,7 @@ struct MyPoint
   MyPoint( const double x = 0., const double y = 0. ) : myX( x ), myY( y ) {}
 };
 
-class SIERPINSKY_Gen_i: public virtual POA_SIERPINSKY_ORB::SIERPINSKY,
+class SIERPINSKYENGINE_EXPORT SIERPINSKY_Gen_i: public virtual POA_SIERPINSKY_ORB::SIERPINSKY,
                         public virtual Engines_Component_i
 {
 public:
index 60cc0d287a848a51204ccc31441abd564c0384ec..cc4a4d77db13561d23ced92416f21e7310af5f14 100644 (file)
@@ -57,15 +57,21 @@ SET(_link_LIBRARIES
 # --- headers ---
 
 # header files / to be processed by moc
-SET(SIERPINSKY_HEADERS
+SET(_moc_HEADERS
   SierpinskyGUI_RunDlg.h
   SierpinskyGUI.h
 )
 
+SET(_other_HEADERS
+  SierpinskyGUI.hxx
+)
+
+SET (SIERPINSKY_HEADERS ${_moc_HEADERS} ${_other_HEADERS})
+
 # --- sources ---
 
 # sources / moc wrappings
-QT4_WRAP_CPP(_moc_SOURCES ${SIERPINSKY_HEADERS})
+QT4_WRAP_CPP(_moc_SOURCES ${_moc_HEADERS})
 
 # sources / static
 SET(_other_SOURCES
index 8b1f47a6954816e46a86f75b9110d3a06a87f387..81088abb78b4e1c3db695d0dec3de81fbad229d4 100644 (file)
@@ -155,11 +155,12 @@ void SierpinskyGUI::OnRun()
 }
 
 extern "C" {
+  SIERPINSKY_EXPORT
   CAM_Module* createModule()
   {
     return new SierpinskyGUI();
   }
-  
+  SIERPINSKY_EXPORT
   char* getModuleVersion()
   {
     return (char*)SIERPINSKY_VERSION_STR;
index 7407747a56acc4ea04ca55e675523121ebca4d78..ece1c4f5d90625996ca86104634e12499e0d7a71 100644 (file)
@@ -26,6 +26,8 @@
 #ifndef __SIERPINSKYGUI_H
 #define __SIERPINSKYGUI_H
 
+#include "SierpinskyGUI.hxx"
+
 #include <SalomeApp_Module.h>
 
 #include <SALOMEconfig.h>
@@ -34,9 +36,9 @@
 class SUIT_Desktop;
 class SalomeApp_Application;
 
-class SierpinskyGUI : public SalomeApp_Module
+class SIERPINSKY_EXPORT SierpinskyGUI : public SalomeApp_Module
 {
-  Q_OBJECT;
+  Q_OBJECT
 
 public:
   // Constructor
diff --git a/src/SierpinskyGUI/SierpinskyGUI.hxx b/src/SierpinskyGUI/SierpinskyGUI.hxx
new file mode 100755 (executable)
index 0000000..e93e57d
--- /dev/null
@@ -0,0 +1,37 @@
+// Copyright (C) 2005-2013  OPEN CASCADE
+//
+// 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.
+//
+// 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 __SIERPINSKYGUI_HXX
+#define __SIERPINSKYGUI_HXX
+
+
+#ifdef WIN32
+ #if defined SIERPINSKY_EXPORTS || defined Sierpinsky_EXPORTS
+  #define SIERPINSKY_EXPORT __declspec( dllexport )
+ #else
+  #define SIERPINSKY_EXPORT __declspec( dllimport )
+ #endif
+#else
+ #define SIERPINSKY_EXPORT
+#endif
+
+
+
+#endif // __SIERPINSKYGUI_HXX
index b3725061612bc66a2e023e043d286a2ac253bd24..cd86148135dcc4de63ee54601a7fde3c38adf51c 100644 (file)
@@ -26,6 +26,8 @@
 #ifndef __SIERPINSKYGUI_RUNDLG_H
 #define __SIERPINSKYGUI_RUNDLG_H
 
+#include "SierpinskyGUI.hxx"
+
 #include <QDialog>
 
 class QLineEdit;
@@ -38,7 +40,7 @@ class MyThread;
 class QProgressBar;
 class SierpinskyGUI;
 
-class SierpinskyGUI_RunDlg : public QDialog
+class SIERPINSKY_EXPORT SierpinskyGUI_RunDlg : public QDialog
 {
   Q_OBJECT