Salome HOME
Win32 compilation.
authorrnv <rnv@opencascade.com>
Fri, 25 Oct 2013 10:49:32 +0000 (10:49 +0000)
committerrnv <rnv@opencascade.com>
Fri, 25 Oct 2013 10:49:32 +0000 (10:49 +0000)
CMakeLists.txt
src/CALCULATOR/CALCULATOR.hxx
src/CALCULATOR/CMakeLists.txt

index b0d338aded0a0944a7ba5cc86621b541ab8d9e02..a28681094e5bd83158ab30efd90f76ec2366a810 100755 (executable)
@@ -49,13 +49,6 @@ IF(SALOME_LIGHT_ONLY)
   MESSAGE(FATAL_ERROR "CALCULATOR module can't be built in Light mode (without CORBA)")
 ENDIF()
 
-##
-## From KERNEL:
-##
-FIND_PACKAGE(SalomePython REQUIRED)
-FIND_PACKAGE(SalomeOmniORB REQUIRED)
-FIND_PACKAGE(SalomeOmniORBPy REQUIRED)
-
 # Platform setup
 # ==============
 INCLUDE(SalomeSetupPlatform)   # From KERNEL
@@ -64,6 +57,13 @@ SET(BUILD_SHARED_LIBS TRUE)
 # Local macros:
 LIST(APPEND CMAKE_MODULE_PATH "${PROJECT_SOURCE_DIR}/adm_local/cmake_files")
 
+##
+## From KERNEL:
+##
+FIND_PACKAGE(SalomePython REQUIRED)
+FIND_PACKAGE(SalomeOmniORB REQUIRED)
+FIND_PACKAGE(SalomeOmniORBPy REQUIRED)
+
 # User options
 # (some options have already been defined in KERNEL) 
 # ============
index 4daafc9184372fb10737ad93ea11e1085492fc65..dfafd7eaa1728ef2ff106e6fd83c249d861c944b 100644 (file)
 #ifndef _CALCULATOR_HXX_
 #define _CALCULATOR_HXX_
 
+#ifdef WIN32
+#  if defined CALCULATOREngine_EXPORTS
+#    define CALCULATORENGINE_EXPORT __declspec( dllexport )
+#  else
+#    define CALCULATORENGINE_EXPORT __declspec( dllimport )
+#  endif
+#else
+#  define CALCULATORENGINE_EXPORT
+#endif
+
 #include <SALOMEconfig.h>
 #include CORBA_SERVER_HEADER(CALCULATOR_Gen)
 #include CORBA_CLIENT_HEADER(MEDCouplingCorbaServant)
 #include "SALOME_Component_i.hxx"
 
-class CALCULATOR:
+class CALCULATORENGINE_EXPORT CALCULATOR:
   public POA_CALCULATOR_ORB::CALCULATOR_Gen,
   public Engines_Component_i 
 {
index 083834184b2a8b0df8fa5c6fa5df84ac1650ee80..5a999e42767e18c0788033cfa34461fc0ad07701 100755 (executable)
@@ -30,8 +30,13 @@ INCLUDE_DIRECTORIES(
 # additional preprocessor / compiler flags
 ADD_DEFINITIONS(
   ${QT_DEFINITIONS}
+  ${OMNIORB_DEFINITIONS}
 )
 
+IF(WIN32)
+ ADD_DEFINITIONS(-DNOMINMAX)
+ENDIF(WIN32)
+
 # libraries to link to
 SET(_link_LIBRARIES
   ${KERNEL_SalomeContainer}