]> SALOME platform Git repositories - tools/medcoupling.git/commitdiff
Salome HOME
Compilation SALOME by CMake(windows/linux)
authorana <ana@opencascade.com>
Wed, 19 Sep 2012 14:44:28 +0000 (14:44 +0000)
committerana <ana@opencascade.com>
Wed, 19 Sep 2012 14:44:28 +0000 (14:44 +0000)
idl/CMakeLists.txt

index 461dab215501bf35fd8878cfaea243c8a947f750..1b6ca50e4cc21fc089c309db16a361bc9a053ec5 100644 (file)
@@ -24,7 +24,7 @@ INCLUDE_DIRECTORIES(
   ${OMNIORB_INCLUDE_DIRS}
   ${KERNEL_ROOT_DIR}/include/salome
   ${CMAKE_CURRENT_BINARY_DIR}
-  )
+)
 
 SET(SalomeIDLMED_IDLSOURCES
   MED.idl
@@ -36,7 +36,7 @@ SET(SalomeIDLMED_IDLSOURCES
   MEDCalculator.idl
   MEDEventListener.idl
   MEDOPFactory.idl
-  )
+)
 
 IF(MPI_IS_OK)
   SET(SalomeIDLMED_IDLSOURCES ${SalomeIDLMED_IDLSOURCES} ParaMEDMEMComponent.idl)
@@ -44,19 +44,26 @@ ENDIF(MPI_IS_OK)
 
 SET(SalomeIDLMEDTests_IDLSOURCES
   MEDCouplingCorbaServantTest.idl
-  )
+)
 
 SET(IDL_INCLUDE_DIRS
   ${CMAKE_CURRENT_SOURCE_DIR}
   ${KERNEL_ROOT_DIR}/idl/salome
-  )
+)
 
-OMNIORB_ADD_MODULE(SalomeIDLMED "${SalomeIDLMED_IDLSOURCES}" "${IDL_INCLUDE_DIRS}")
+SET(TYPE)
+IF(WINDOWS)
+  SET(TYPE STATIC)
+ELSE(WINDOWS)
+  SET(TYPE SHARED)
+ENDIF(WINDOWS
+)
+OMNIORB_ADD_MODULE(SalomeIDLMED "${SalomeIDLMED_IDLSOURCES}" "${IDL_INCLUDE_DIRS}" ${TYPE})
 TARGET_LINK_LIBRARIES(SalomeIDLMED ${CORBA_LIBS} ${KERNEL_LDFLAGS} ${SalomeIDLKernel})
-SET_TARGET_PROPERTIES(SalomeIDLMED PROPERTIES COMPILE_FLAGS "${OMNIORB_DEFINITIONS}")
+SET_TARGET_PROPERTIES(SalomeIDLMED PROPERTIES COMPILE_FLAGS "${OMNIORB_DEFINITIONS} ${PLATFORM_DEFINITIONS}")
 
-OMNIORB_ADD_MODULE(SalomeIDLMEDTests "${SalomeIDLMEDTests_IDLSOURCES}" "${IDL_INCLUDE_DIRS}")
+OMNIORB_ADD_MODULE(SalomeIDLMEDTests "${SalomeIDLMEDTests_IDLSOURCES}" "${IDL_INCLUDE_DIRS}" ${TYPE})
 TARGET_LINK_LIBRARIES(SalomeIDLMEDTests ${CORBA_LIBS} ${KERNEL_LDFLAGS} ${SalomeIDLKernel})
-SET_TARGET_PROPERTIES(SalomeIDLMEDTests PROPERTIES COMPILE_FLAGS "${OMNIORB_DEFINITIONS}")
+SET_TARGET_PROPERTIES(SalomeIDLMEDTests PROPERTIES COMPILE_FLAGS "${OMNIORB_DEFINITIONS} ${PLATFORM_DEFINITIONS}")
 
 INSTALL(TARGETS SalomeIDLMED SalomeIDLMEDTests DESTINATION ${MED_salomelib_LIBS})