Salome HOME
Porting LIGHT module to WIN32 platform.
authorrnv <rnv@opencascade.com>
Fri, 1 Nov 2013 09:55:11 +0000 (09:55 +0000)
committerrnv <rnv@opencascade.com>
Fri, 1 Nov 2013 09:55:11 +0000 (09:55 +0000)
src/LIGHTGUI/CMakeLists.txt
src/LIGHTGUI/LIGHTGUI.cxx
src/LIGHTGUI/LIGHTGUI.h
src/LIGHTGUI/LIGHTGUI_DataModel.h
src/LIGHTGUI/LIGHTGUI_DataObject.h
src/LIGHTGUI/LIGHTGUI_Exports.hxx [new file with mode: 0755]
src/LIGHTGUI/LIGHTGUI_Selection.h

index 92dcee9de486fde72b9edf59b954e67cbe070912..3ebc05ded7af1ff11c5b4b594436236641f71888 100644 (file)
@@ -56,6 +56,7 @@ SET(_other_HEADERS
   LIGHTGUI_Selection.h
   LIGHTGUI_DataObject.h
   LIGHTGUI_TextPrs.hxx
+  LIGHTGUI_Exports.hxx 
 )
 
 # header files / to install
index c1e2d4a95be302c91970f7faab0dcb0c5c843d81..b6d5c75a52768a9e5e65869b7f13082b00b86319 100644 (file)
@@ -595,18 +595,12 @@ void LIGHTGUI::onClear()
   \return new created instance of the module
 */
 
-#ifdef WNT
-#define LIGHTGUI_EXPORT __declspec(dllexport)
-#else   // WNT
-#define LIGHTGUI_EXPORT
-#endif  // WNT
-
 extern "C" {
-  LIGHTGUI_EXPORT CAM_Module* createModule() {
+  LIGHT_EXPORT CAM_Module* createModule() {
     return new LIGHTGUI();
   }
   
-  LIGHTGUI_EXPORT char* getModuleVersion() {
+  LIGHT_EXPORT char* getModuleVersion() {
     return (char*)LIGHT_VERSION_STR;
   }
 }
index 69d852ea14f295c230581fb63ae28fb001eae9ac..eaf57d003d2202611b46a387c93b3feec5b943cf 100644 (file)
 #ifndef LIGHTGUI_H
 #define LIGHTGUI_H
 
+#include "LIGHTGUI_Exports.hxx"
 #include <LightApp_Module.h>
 
 class QMenu;
 class LightApp_Selection;
 class LightApp_SelectionMgr;
 
-class LIGHTGUI: public LightApp_Module
+class LIGHT_EXPORT LIGHTGUI: public LightApp_Module
 {
   Q_OBJECT
    
index ea464f54f636d2cf3a46d6ad0cd4efbf19196431..729a32effcc0160218b51a74a3c22e3214f4f57f 100644 (file)
@@ -24,6 +24,8 @@
 #ifndef LIGHTGUI_DATAMODEL_H
 #define LIGHTGUI_DATAMODEL_H
 
+#include "LIGHTGUI_Exports.hxx"
+
 #include <LightApp_DataModel.h>
 
 class CAM_Module;
@@ -31,7 +33,7 @@ class LightApp_Study;
 class LightApp_DataObject;
 class LIGHTGUI_DataObject;
 
-class LIGHTGUI_DataModel : public LightApp_DataModel
+class LIGHT_EXPORT LIGHTGUI_DataModel : public LightApp_DataModel
 {
   Q_OBJECT
 
index 27c2aeb4d2e512167d75f288987a6580f90eedfa..0cdceb6ccb775616ab8c7166659302c3e9a682f7 100644 (file)
 #ifndef LIGHTGUI_DATAOBJECT_H
 #define LIGHTGUI_DATAOBJECT_H
 
+#include "LIGHTGUI_Exports.hxx"
+
 #include <LightApp_DataObject.h>
 #include <QString>
 
-class LIGHTGUI_DataObject : public virtual LightApp_DataObject
+class LIGHT_EXPORT LIGHTGUI_DataObject : public virtual LightApp_DataObject
 {
 public:
   LIGHTGUI_DataObject( const int, const QString&, SUIT_DataObject* = 0 );
diff --git a/src/LIGHTGUI/LIGHTGUI_Exports.hxx b/src/LIGHTGUI/LIGHTGUI_Exports.hxx
new file mode 100755 (executable)
index 0000000..66a66bd
--- /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
+//
+
+// LIGHT : sample (no-corba-engine) SALOME module
+// File   : LIGHTGUI_Exports.h
+// Author : Roman NIKOLAEV
+
+#ifndef _LIGHTGUI_EXPORTS_HXX_
+#define _LIGHTGUI_EXPORTS_HXX_
+#ifdef WIN32
+ #if defined LIGHT_EXPORTS ||  defined Light_EXPORTS
+  #define LIGHT_EXPORT __declspec( dllexport )
+ #else
+  #define LIGHT_EXPORT __declspec( dllimport ) 
+ #endif
+#else
+  #define LIGHT_EXPORT
+#endif
+
+#endif //_LIGHTGUI_EXPORTS_HXX_
+
index cf987a4250e23f79d1ddf0aa37271576e6857c3b..00c2f472fab5a83f726c5bfb707fcb15abc2672d 100644 (file)
 #ifndef LIGHTGUI_SELECTION_H
 #define LIGHTGUI_SELECTION_H
 
+#include "LIGHTGUI_Exports.hxx"
+
 #include <LightApp_Selection.h>
 #include <QVariant>
 
 class LightApp_SelectionMgr;
 
-class LIGHTGUI_Selection : public LightApp_Selection
+class LIGHT_EXPORT LIGHTGUI_Selection : public LightApp_Selection
 {
 public:
   LIGHTGUI_Selection();