Salome HOME
0ff4b8f455e80f4fc46480cf507814e002a42fc9
[modules/med.git] / src / MEDCalc / gui / CMakeLists.txt
1 # Copyright (C) 2012-2016  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 IF(SALOME_MED_WITH_QTTESTING)
21   ADD_DEFINITIONS(-DMED_HAS_QTTESTING)
22 ENDIF()
23
24 ADD_DEFINITIONS(${MEDFILE_DEFINITIONS} ${XDR_DEFINITIONS} ${OMNIORB_DEFINITIONS})
25 SET(QT_LIBS "${QT_LIBRARIES}")
26 INCLUDE(UseQtExt)
27
28 ADD_SUBDIRECTORY(dialogs)
29
30 SET(MEDCALCGUI_SOURCES 
31     DatasourceController.cxx
32     factory.cxx
33     MEDEventListener_i.cxx
34     MEDModule.cxx
35     PresentationController.cxx
36     ProcessingController.cxx
37     WorkspaceController.cxx
38     XmedConsoleDriver.cxx
39     XmedDataModel.cxx
40     MEDWidgetHelper.cxx
41     MEDWidgetHelperMeshView.cxx
42     MEDWidgetHelperScalarMap.cxx
43     MEDWidgetHelperContour.cxx
44     MEDWidgetHelperSlices.cxx
45 )
46
47 IF(SALOME_MED_WITH_QTTESTING)
48   LIST(APPEND MEDCALCGUI_SOURCES TestController.cxx)
49 ENDIF()
50
51 SET(MEDCALCGUI_HEADERS
52   MEDModule.hxx
53   MEDEventListener_i.hxx
54   WorkspaceController.hxx
55   DatasourceController.hxx
56   PresentationController.hxx
57   ProcessingController.hxx
58   MEDWidgetHelper.hxx
59   MEDWidgetHelperMeshView.hxx
60   MEDWidgetHelperScalarMap.hxx
61   MEDWidgetHelperContour.hxx
62   MEDWidgetHelperSlices.hxx
63   )
64  
65 IF(SALOME_MED_WITH_QTTESTING)
66   LIST(APPEND MEDCALCGUI_HEADERS TestController.hxx)
67 ENDIF()
68
69 QT_WRAP_MOC(MEDCALCGUI_HEADERS_MOC ${MEDCALCGUI_HEADERS})
70
71 INCLUDE_DIRECTORIES(
72   ${OMNIORB_INCLUDE_DIR} ${OMNIORB_INCLUDE_DIRS}
73   ${Boost_INCLUDE_DIRS}
74   ${PTHREAD_INCLUDE_DIR}
75   ${GUI_INCLUDE_DIRS}
76   ${MEDCOUPLING_INCLUDE_DIRS}
77   ${CMAKE_CURRENT_BINARY_DIR}
78   ${CMAKE_CURRENT_SOURCE_DIR}/dialogs
79   ${CMAKE_CURRENT_BINARY_DIR}/dialogs
80   ${CMAKE_CURRENT_SOURCE_DIR}/..
81   ${CMAKE_CURRENT_SOURCE_DIR}/../cmp
82   ${CMAKE_CURRENT_SOURCE_DIR}/../../MEDGUI
83   ${PROJECT_BINARY_DIR}/idl
84   ${PROJECT_BINARY_DIR}
85 )
86
87 SET(MEDCALCGUITS_SOURCES
88   MED_images.ts
89   MED_msg_en.ts
90   MED_msg_fr.ts
91   MED_msg_ja.ts
92   MEDCALC_msg_en.ts
93   MEDCALC_msg_fr.ts
94   MEDCALC_msg_ja.ts
95 )
96
97 SET(link_libraries
98   ${QT_MT_LIBRARIES}
99   ${OMNIORB_LIBRARIES}
100   ${PLATFORM_LIBRARIES}
101   SalomeIDLMED
102   MEDCALCGUI_dialogs
103   MEDFactoryEngine
104   ${GUI_qtx}
105   ${GUI_suit}
106   ${GUI_SalomeObject}
107   ${KERNEL_SalomeLifeCycleCORBA}
108   ${KERNEL_SalomeKernelHelpers}
109   ${KERNEL_SalomeDS}
110   ${GUI_SalomeApp}
111   ${GUI_SalomeGuiHelpers}
112   ${GUI_SalomeTreeData}
113   ${KERNEL_OpUtil}
114   ${GUI_CAM}
115   ${GUI_LightApp}
116   ${GUI_PyConsole}
117   ${MEDCoupling_medloader}
118   ${MEDCoupling_medcoupling}
119   ${MEDCoupling_medcouplingremapper}
120 )
121
122 IF(SALOME_MED_WITH_QTTESTING)
123   LIST(APPEND link_libraries QtTesting)  # from ParaView
124 ENDIF()
125
126 ADD_LIBRARY(MEDCALCGUI SHARED ${MEDCALCGUI_SOURCES} ${MEDCALCGUI_HEADERS_MOC})
127 IF(WITH_MEDMEMGUI)
128   SET_TARGET_PROPERTIES(MEDCALCGUI PROPERTIES COMPILE_FLAGS "-D__WITH_MEDMEMGUI__")
129 ENDIF(WITH_MEDMEMGUI)
130 TARGET_LINK_LIBRARIES(MEDCALCGUI ${link_libraries})
131
132 INSTALL(TARGETS MEDCALCGUI DESTINATION ${SALOME_INSTALL_LIBS})
133 QT_INSTALL_TS_RESOURCES("${MEDCALCGUITS_SOURCES}" "${SALOME_MED_INSTALL_RES_DATA}")
134
135 FILE(GLOB COMMON_HEADERS_HXX "${CMAKE_CURRENT_SOURCE_DIR}/*.hxx")
136 INSTALL(FILES ${COMMON_HEADERS_HXX} DESTINATION ${SALOME_INSTALL_HEADERS})