Salome HOME
[MEDCalcl] PointSprite and VectorField presentations.
[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     MEDWidgetHelperComponent.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   MEDWidgetHelperComponent.hxx
61   MEDWidgetHelperScalarMap.hxx
62   MEDWidgetHelperContour.hxx
63   MEDWidgetHelperSlices.hxx
64   MEDWidgetHelperPointSprite.hxx
65   MEDWidgetHelperVectorField.hxx
66   )
67  
68 IF(SALOME_MED_WITH_QTTESTING)
69   LIST(APPEND MEDCALCGUI_HEADERS TestController.hxx)
70 ENDIF()
71
72 QT_WRAP_MOC(MEDCALCGUI_HEADERS_MOC ${MEDCALCGUI_HEADERS})
73
74 INCLUDE_DIRECTORIES(
75   ${OMNIORB_INCLUDE_DIR} ${OMNIORB_INCLUDE_DIRS}
76   ${Boost_INCLUDE_DIRS}
77   ${PTHREAD_INCLUDE_DIR}
78   ${GUI_INCLUDE_DIRS}
79   ${MEDCOUPLING_INCLUDE_DIRS}
80   ${CMAKE_CURRENT_BINARY_DIR}
81   ${CMAKE_CURRENT_SOURCE_DIR}/dialogs
82   ${CMAKE_CURRENT_BINARY_DIR}/dialogs
83   ${CMAKE_CURRENT_SOURCE_DIR}/..
84   ${CMAKE_CURRENT_SOURCE_DIR}/../cmp
85   ${CMAKE_CURRENT_SOURCE_DIR}/../../MEDGUI
86   ${PROJECT_BINARY_DIR}/idl
87   ${PROJECT_BINARY_DIR}
88 )
89
90 SET(MEDCALCGUITS_SOURCES
91   MED_images.ts
92   MED_msg_en.ts
93   MED_msg_fr.ts
94   MED_msg_ja.ts
95   MEDCALC_msg_en.ts
96   MEDCALC_msg_fr.ts
97   MEDCALC_msg_ja.ts
98 )
99
100 SET(link_libraries
101   ${QT_MT_LIBRARIES}
102   ${OMNIORB_LIBRARIES}
103   ${PLATFORM_LIBRARIES}
104   SalomeIDLMED
105   MEDCALCGUI_dialogs
106   MEDFactoryEngine
107   ${GUI_qtx}
108   ${GUI_suit}
109   ${GUI_SalomeObject}
110   ${KERNEL_SalomeLifeCycleCORBA}
111   ${KERNEL_SalomeKernelHelpers}
112   ${KERNEL_SalomeDS}
113   ${GUI_SalomeApp}
114   ${GUI_SalomeGuiHelpers}
115   ${GUI_SalomeTreeData}
116   ${KERNEL_OpUtil}
117   ${GUI_CAM}
118   ${GUI_LightApp}
119   ${GUI_PyConsole}
120   ${MEDCoupling_medloader}
121   ${MEDCoupling_medcoupling}
122   ${MEDCoupling_medcouplingremapper}
123 )
124
125 IF(SALOME_MED_WITH_QTTESTING)
126   LIST(APPEND link_libraries QtTesting)  # from ParaView
127 ENDIF()
128
129 ADD_LIBRARY(MEDCALCGUI SHARED ${MEDCALCGUI_SOURCES} ${MEDCALCGUI_HEADERS_MOC})
130 IF(WITH_MEDMEMGUI)
131   SET_TARGET_PROPERTIES(MEDCALCGUI PROPERTIES COMPILE_FLAGS "-D__WITH_MEDMEMGUI__")
132 ENDIF(WITH_MEDMEMGUI)
133 TARGET_LINK_LIBRARIES(MEDCALCGUI ${link_libraries})
134
135 INSTALL(TARGETS MEDCALCGUI DESTINATION ${SALOME_INSTALL_LIBS})
136 QT_INSTALL_TS_RESOURCES("${MEDCALCGUITS_SOURCES}" "${SALOME_MED_INSTALL_RES_DATA}")
137
138 FILE(GLOB COMMON_HEADERS_HXX "${CMAKE_CURRENT_SOURCE_DIR}/*.hxx")
139 INSTALL(FILES ${COMMON_HEADERS_HXX} DESTINATION ${SALOME_INSTALL_HEADERS})