-# Copyright (C) 2012-2013 CEA/DEN, EDF R&D
+# Copyright (C) 2012-2014 CEA/DEN, EDF R&D, 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.
+# 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
#
# Author : Anthony Geay (CEA/DEN)
-INCLUDE(${KERNEL_ROOT_DIR}/salome_adm/cmake_files/deprecated/UseOMNIORB.cmake)
+INCLUDE(UseOmniORB)
INCLUDE_DIRECTORIES(
- ${OMNIORB_INCLUDE_DIRS}
- ${KERNEL_ROOT_DIR}/include/salome
+ ${OMNIORB_INCLUDE_DIR} ${OMNIORB_INCLUDE_DIRS}
${CMAKE_CURRENT_BINARY_DIR}
)
SET(SalomeIDLMED_IDLSOURCES
- MED.idl
- MED_Gen.idl
- Compo1Py.idl
MEDCouplingCorbaServant.idl
ParaMEDCouplingCorbaServant.idl
MEDDataManager.idl
MEDOPFactory.idl
)
-IF(MPI_IS_OK)
+IF(SALOME_USE_MPI)
SET(SalomeIDLMED_IDLSOURCES ${SalomeIDLMED_IDLSOURCES} ParaMEDMEMComponent.idl)
-ENDIF(MPI_IS_OK)
+ENDIF(SALOME_USE_MPI)
SET(SalomeIDLMEDTests_IDLSOURCES
MEDCouplingCorbaServantTest.idl
)
-SET(IDL_INCLUDE_DIRS
+SET(_idl_include_dirs
${CMAKE_CURRENT_SOURCE_DIR}
${KERNEL_ROOT_DIR}/idl/salome
)
-SET(TYPE)
-IF(WINDOWS)
- SET(TYPE STATIC)
-ELSE(WINDOWS)
- SET(TYPE SHARED)
-ENDIF(WINDOWS
+SET(_idl_link_flags
+ ${KERNEL_SalomeIDLKernel}
)
-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} ${PLATFORM_DEFINITIONS}")
-OMNIORB_ADD_MODULE(SalomeIDLMEDTests "${SalomeIDLMEDTests_IDLSOURCES}" "${IDL_INCLUDE_DIRS}" ${TYPE})
-TARGET_LINK_LIBRARIES(SalomeIDLMEDTests SalomeIDLMED)
-SET_TARGET_PROPERTIES(SalomeIDLMEDTests PROPERTIES COMPILE_FLAGS "${OMNIORB_DEFINITIONS} ${PLATFORM_DEFINITIONS}")
+OMNIORB_ADD_MODULE(SalomeIDLMED "${SalomeIDLMED_IDLSOURCES}" "${_idl_include_dirs}" "${_idl_link_flags}")
+OMNIORB_ADD_MODULE(SalomeIDLMEDTests "${SalomeIDLMEDTests_IDLSOURCES}" "${_idl_include_dirs}" "SalomeIDLMED")
-INSTALL(TARGETS SalomeIDLMED SalomeIDLMEDTests DESTINATION ${MED_salomelib_LIBS})
+INSTALL(TARGETS SalomeIDLMED EXPORT ${PROJECT_NAME}TargetGroup DESTINATION ${SALOME_INSTALL_LIBS})
+INSTALL(TARGETS SalomeIDLMEDTests DESTINATION ${SALOME_INSTALL_LIBS})