1 # Copyright (C) 2010-2014 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, or (at your option) any later version.
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
20 ## Parser for VTK header files
21 ## ===========================
23 ## Everything under the ParaView subdirectory is a pure copy of ParaView source
27 ${CMAKE_CURRENT_SOURCE_DIR}/ParaView
28 ${PROJECT_BINARY_DIR}/idl
29 ${PROJECT_SOURCE_DIR}/src/PVGUI
32 # Wrapper executable generating the headers, source files and IDL files
33 # corresponding to VTK wrapping:
40 SET(vtkWrapIDL_HH_CPPFLAGS -DIDL_I_HH)
41 SET(vtkWrapIDL_CC_CPPFLAGS -DIDL_I_CC)
42 SET(vtkWrapIDL_CPPFLAGS)
44 #VTN TODO: vtkParseData supports two types of structures for wrapping.
45 #We use old structures currently, but is is not influent for results of wrapping.
46 #It may be necessary to port vtkWrapIDL to new approach in future.
47 #IF(VTK_LEGACY_REMOVE)
48 # ADD_DEFINITIONS(-DVTK_PARSE_LEGACY_REMOVE)
51 ADD_DEFINITIONS(${OMNIORB_DEFINITIONS})
53 FOREACH(name ${_wrap_PROGRAMS})
54 ADD_EXECUTABLE(${name}
55 ParaView/vtkParse.tab.c
56 ParaView/vtkParsePreprocess.c
57 ParaView/vtkParseHierarchy.c
58 ParaView/vtkParseExtras.c
59 ParaView/vtkParseMain.c
60 ParaView/vtkParseData.c
61 ParaView/vtkParseString.c
63 # ParaView/vtkWrapText.c
64 ${PROJECT_SOURCE_DIR}/idl/vtkWrapIDL.c)
65 ADD_DEPENDENCIES(${name} generate_txt)
67 set_property(SOURCE ParaView/vtkParseMain.c PROPERTY COMPILE_DEFINITIONS
68 VTK_PARSE_VERSION="${VTK_MAJOR_VERSION}.${VTK_MINOR_VERSION}")
71 FOREACH(f ${PARAVIEW_INCLUDES} ${VTK_INCLUDES} ${PLATFORM_CPPFLAGS} ${PTHREAD_CFLAGS} ${${name}_CPPFLAGS})
72 SET(flags "${flags} ${f}")
73 ENDFOREACH(f ${PARAVIEW_INCLUDES} ${VTK_INCLUDES} ${PLATFORM_CPPFLAGS} ${PTHREAD_CFLAGS} ${${name}_CPPFLAGS})
75 SET_TARGET_PROPERTIES(${name} PROPERTIES COMPILE_FLAGS "${flags}")
76 TARGET_LINK_LIBRARIES(${name} ${PLATFORM_LIBADD})
78 SET(${name}_EXEFILE ${CMAKE_CURRENT_BINARY_DIR}/${name})
80 IF(CMAKE_BUILD_TOOL STREQUAL nmake)
81 SET(${name}_EXEFILE ${CMAKE_CURRENT_BINARY_DIR}/${name}.exe)
82 ELSE(CMAKE_BUILD_TOOL STREQUAL nmake)
83 SET(${name}_EXEFILE ${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_BUILD_TYPE}/${name}.exe)
84 ENDIF(CMAKE_BUILD_TOOL STREQUAL nmake)
86 INSTALL(FILES ${${name}_EXEFILE} DESTINATION bin/salome PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE)
87 ENDFOREACH(name ${_wrap_PROGRAMS})