Salome HOME
57ed9e3e34b93b6ddde6867e0bd076e59848872d
[modules/med.git] / src / MEDCalc / cmp / CMakeLists.txt
1 # Copyright (C) 2012-2015  CEA/DEN, EDF R&D
2 #
3 # This library is free software; you can redistribute it and/or
4 # modify it under the terms of the GNU Lesser General Public
5 # License as published by the Free Software Foundation; either
6 # version 2.1 of the License, or (at your option) any later version.
7 #
8 # This library is distributed in the hope that it will be useful,
9 # but WITHOUT ANY WARRANTY; without even the implied warranty of
10 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
11 # Lesser General Public License for more details.
12 #
13 # You should have received a copy of the GNU Lesser General Public
14 # License along with this library; if not, write to the Free Software
15 # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
16 #
17 # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
18 #
19
20 ADD_DEFINITIONS(${HDF5_DEFINITIONS} ${MEDFILE_DEFINITIONS} ${OMNIORB_DEFINITIONS})
21
22 INCLUDE_DIRECTORIES(
23   ${OMNIORB_INCLUDE_DIR} ${OMNIORB_INCLUDE_DIRS}
24   ${MEDFILE_INCLUDE_DIRS}
25   ${HDF5_INCLUDE_DIRS}
26   ${PTHREAD_INCLUDE_DIR}
27   ${CMAKE_CURRENT_BINARY_DIR}
28   ${PROJECT_BINARY_DIR}/idl
29   ${PROJECT_SOURCE_DIR}/src/MEDCoupling
30   ${PROJECT_SOURCE_DIR}/src/INTERP_KERNEL/Bases
31   ${PROJECT_SOURCE_DIR}/src/INTERP_KERNEL
32   ${PROJECT_SOURCE_DIR}/src/MEDLoader
33 )
34
35 SET(MEDFactoryEngine_SOURCES
36   MEDFactoryClient.cxx
37   MEDDataManager_i.cxx
38   MEDCalculator_i.cxx
39   MEDPresentationManager_i.cxx
40   MEDFactory_i.cxx
41 )
42
43 SET(COMMON_LIBS
44   medloader
45   SalomeIDLMED
46   ${KERNEL_TOOLSDS}
47   ${KERNEL_SalomeHDFPersist}
48   ${KERNEL_SalomeContainer}
49   ${KERNEL_SalomeCommunication}
50   ${KERNEL_SalomeKernelHelpers}
51   ${KERNEL_SalomeLifeCycleCORBA}
52   ${KERNEL_SALOMELocalTrace}
53   ${KERNEL_SALOMEBasics}
54   ${KERNEL_SalomeGenericObj}
55   medcoupling
56   medcouplingremapper
57   interpkernel
58   ${MEDFILE_C_LIBRARIES}
59   ${HDF5_LIBRARIES}
60   ${OMNIORB_LIBRARIES}
61   ${PLATFORM_LIBRARIES}
62 )
63
64 # This undefines the macros MIN and MAX which are specified in the windows headers
65 IF(WIN32)
66   SET(COMMON_FLAGS "${COMMON_FLAGS} -DNOMINMAX")
67 ENDIF(WIN32)
68
69 ADD_LIBRARY(MEDFactoryEngine SHARED ${MEDFactoryEngine_SOURCES})
70 SET_TARGET_PROPERTIES(MEDFactoryEngine PROPERTIES COMPILE_FLAGS "${COMMON_FLAGS}")
71 TARGET_LINK_LIBRARIES(MEDFactoryEngine SalomeIDLMED ${COMMON_LIBS})
72
73 INSTALL(TARGETS MEDFactoryEngine DESTINATION ${SALOME_INSTALL_LIBS})
74
75 FILE(GLOB MEDFactoryEngine_HEADERS_HXX "${CMAKE_CURRENT_SOURCE_DIR}/*.hxx")
76 INSTALL(FILES ${MEDFactoryEngine_HEADERS_HXX} DESTINATION ${SALOME_INSTALL_HEADERS})
77
78 IF(SALOME_ENABLE_PYTHON)
79   INSTALL(FILES test_medcalc_components.py PERMISSIONS OWNER_EXECUTE OWNER_WRITE OWNER_READ GROUP_EXECUTE GROUP_READ WORLD_EXECUTE WORLD_READ DESTINATION ${SALOME_INSTALL_BINS}/xmed)
80 ENDIF()