1 # Copyright (C) 2010-2013 CEA/DEN, EDF R&D
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.
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.
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
17 # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
24 INCLUDE_DIRECTORIES(${OMNIORB_INCLUDE_DIR}
25 ${KERNEL_INCLUDE_DIRS}
27 ${PROJECT_BINARY_DIR}/idl
32 ${CMAKE_CURRENT_SOURCE_DIR}
35 # additional preprocessor / compiler flags
36 ADD_DEFINITIONS(${CAS_DEFINITIONS})
37 ADD_DEFINITIONS(${KERNEL_DEFINITIONS})
38 ADD_DEFINITIONS(${OMNIORB_DEFINITIONS})
40 # libraries to link to
41 SET(_PARAVIEW_APP_COMPO_LIB
42 pqApplicationComponents
50 ${KERNEL_LDFLAGS} ${KERNEL_SalomeDS} ${KERNEL_SALOMELocalTrace} ${KERNEL_SalomeIDLKernel}
51 ${KERNEL_SalomeNS} ${KERNEL_SalomeLifeCycleCORBA} ${KERNEL_SalomeContainer} ${KERNEL_TOOLSDS}
52 ${GUI_LDFLAGS} ${GUI_SalomeApp} ${GUI_LightApp} ${GUI_CAM} ${GUI_qtx} ${GUI_suit} ${GUI_Event} ${GUI_PyInterp}
53 ${GUI_SalomeObject} ${GUI_vtkTools}
55 ${_PARAVIEW_APP_COMPO_LIB}
61 # header files / to be processed by moc
67 PVGUI_ParaViewSettingsPane.h
70 # header files / no moc processing
72 PVGUI_OutputWindowAdapter.h
74 PVGUI_MatplotlibMathTextUtilities.h
81 # header files / to install
82 SET(PVGUI_HEADERS ${_moc_HEADERS} ${_other_HEADERS})
86 # resource files / to be processed by lrelease
88 resources/PARAVIS_images.ts
89 resources/PARAVIS_msg_en.ts
90 resources/PARAVIS_msg_fr.ts
93 # resource files / static
95 # sampleservers.pvsc ???
99 # --- ParaView documentation is built as a resource ---
100 # Check ParaView documentation file existence
101 # if it exists add it to the resources (compile into binary form)
102 # otherwise print warning message
103 SET(PV_DOC_FILE ${VTK_INSTALL_PREFIX}/share/doc/paraview-${PARAVIEW_VERSION_MAJOR}.${PARAVIEW_VERSION_MINOR}/paraview.qch)
104 IF (EXISTS ${PV_DOC_FILE})
105 SET(RC_SOURCE ${CMAKE_CURRENT_SOURCE_DIR}/PVGUI.qrc.in)
106 SET(RC_GENERATED ${CMAKE_CURRENT_BINARY_DIR}/PVGUI.qrc)
107 MESSAGE(STATUS "Creation of ${RC_GENERATED}")
108 CONFIGURE_FILE(${RC_SOURCE} ${RC_GENERATED})
109 SET(_rcc_RESOURCES ${RC_GENERATED})
110 ADD_DEFINITIONS(-DHAS_PV_DOC)
112 MESSAGE(WARNING "Help file for ParaView has not been found! ParaView documentation will not be available.")
118 # sources / rcc wrappings
119 QT4_ADD_RESOURCES(_rcc_SOURCES ${_rcc_RESOURCES})
121 # sources / moc wrappings
122 QT4_WRAP_CPP(_moc_SOURCES ${_moc_HEADERS})
124 # sources / EDF specific stuff
125 INCLUDE(vtkWrapClientServer)
126 VTK_WRAP_ClientServer(vtkEDFCutterCS vtkEDFCutter_SRCS ${GUI_ROOT_DIR}/include/salome/vtkEDFCutter.h)
131 PVGUI_Module_actions.cxx
132 PVGUI_Module_widgets.cxx
133 PVGUI_ViewManager.cxx
136 PVGUI_OutputWindowAdapter.cxx
138 PVGUI_ParaViewSettingsPane.cxx
139 PVGUI_MatplotlibMathTextUtilities.cxx
144 IF(NOT SALOME_PARAVIS_MINIMAL_CORBA)
145 SET(_VTK_wrap_SOURCES
146 PARAVIS_CreateClass.cxx
147 $<TARGET_OBJECTS:VTK_IDL_Impl>
151 # sources / to compile
162 IF(NOT SALOME_PARAVIS_MINIMAL_CORBA)
164 OUTPUT PARAVIS_CreateClass.cxx
165 COMMAND ${PYTHON_EXECUTABLE} ${PROJECT_SOURCE_DIR}/src/VTKWrapping/create_class.py ${CMAKE_BINARY_DIR}
166 DEPENDS ${CMAKE_BINARY_DIR}/wrapfiles.txt
167 ${PROJECT_BINARY_DIR}/idl/PARAVIS_Gen.hh
168 ${PROJECT_BINARY_DIR}/idl/PARAVIS_Gen_Types.hh
173 # All wrapping tools have to be build before generating the above module - NEEDED?
174 ###ADD_DEPENDENCIES(SalomeIDLPARAVIS vtkWrapIDL_HH vtkWrapIDL_CC vtkWrapIDL)
176 # Intermediate target used in PVGUI directory (we can not cross reference
177 # a generated source file across directories, hence this trick):
179 ${PROJECT_BINARY_DIR}/idl
180 ${PROJECT_BINARY_DIR}/src/VTKWrapping
184 ADD_LIBRARY(PARAVIS ${PVGUI_SOURCES})
185 IF(NOT SALOME_PARAVIS_MINIMAL_CORBA)
186 # Make sure the generation of the VTK wrapping get executed first:
187 ADD_DEPENDENCIES(PARAVIS PARAVIS_CreateClass.cxx)
190 TARGET_LINK_LIBRARIES(PARAVIS ${_link_LIBRARIES})
191 INSTALL(TARGETS PARAVIS EXPORT ${PROJECT_NAME}TargetGroup DESTINATION ${SALOME_INSTALL_LIBS})
194 # --- header and resources installation ---
195 INSTALL(FILES ${PVGUI_HEADERS} DESTINATION ${SALOME_INSTALL_HEADERS})
196 QT4_INSTALL_TS_RESOURCES("${_ts_RESOURCES}" "${SALOME_PARAVIS_INSTALL_RES_DATA}")
197 INSTALL(FILES ${_other_RESOURCES} DESTINATION ${SALOME_PARAVIS_INSTALL_RES_DATA})