1 # Copyright (C) 2010-2012 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
23 STRING( REPLACE "INCREMENTAL:YES" "INCREMENTAL:NO" replacementFlags ${CMAKE_SHARED_LINKER_FLAGS_DEBUG} )
24 SET( CMAKE_SHARED_LINKER_FLAGS_DEBUG "${replacementFlags}" )
27 CMAKE_MINIMUM_REQUIRED(VERSION 2.4.7 FATAL_ERROR)
28 IF(COMMAND cmake_policy)
29 cmake_policy(SET CMP0003 NEW)
30 ENDIF(COMMAND cmake_policy)
32 SET(KERNEL_ROOT_DIR $ENV{KERNEL_ROOT_DIR} CACHE PATH "KERNEL_ROOT_DIR")
34 INCLUDE(${KERNEL_ROOT_DIR}/salome_adm/cmake_files/FindPLATFORM.cmake)
35 INCLUDE(${KERNEL_ROOT_DIR}/salome_adm/cmake_files/FindPYTHON.cmake)
36 INCLUDE(${KERNEL_ROOT_DIR}/salome_adm/cmake_files/FindOMNIORB.cmake)
37 INCLUDE(${KERNEL_ROOT_DIR}/salome_adm/cmake_files/FindPTHREADS.cmake)
38 INCLUDE(${KERNEL_ROOT_DIR}/salome_adm/cmake_files/FindHDF5.cmake)
39 INCLUDE(${KERNEL_ROOT_DIR}/salome_adm/cmake_files/FindBOOST.cmake)
40 INCLUDE(${KERNEL_ROOT_DIR}/salome_adm/cmake_files/FindLIBXML2.cmake)
41 INCLUDE(${KERNEL_ROOT_DIR}/salome_adm/cmake_files/FindSWIG.cmake)
42 INCLUDE(${KERNEL_ROOT_DIR}/salome_adm/cmake_files/FindCPPUNIT.cmake)
43 INCLUDE(${KERNEL_ROOT_DIR}/salome_adm/cmake_files/FindDOXYGEN.cmake)
44 INCLUDE(${KERNEL_ROOT_DIR}/salome_adm/cmake_files/FindKERNEL.cmake)
46 INCLUDE(${CMAKE_SOURCE_DIR}/adm_local/cmake_files/FindPARAVIEW.cmake)
47 IF(EXISTS ${PARAVIEW_VTK_DIR}/VTKConfig.cmake)
48 SET(VTK_DIR ${PARAVIEW_VTK_DIR})
49 ENDIF(EXISTS ${PARAVIEW_VTK_DIR}/VTKConfig.cmake)
51 SET(GUI_ROOT_DIR $ENV{GUI_ROOT_DIR} CACHE PATH "GUI_ROOT_DIR")
52 INCLUDE(${GUI_ROOT_DIR}/adm_local/cmake_files/FindCAS.cmake)
53 INCLUDE(${GUI_ROOT_DIR}/adm_local/cmake_files/FindQT4.cmake)
54 INCLUDE(${GUI_ROOT_DIR}/adm_local/cmake_files/FindOPENGL.cmake)
55 INCLUDE(${GUI_ROOT_DIR}/adm_local/cmake_files/FindVTK.cmake)
56 INCLUDE(${GUI_ROOT_DIR}/adm_local/cmake_files/FindQWT.cmake)
57 INCLUDE(${GUI_ROOT_DIR}/adm_local/cmake_files/FindSIPPYQT.cmake)
58 INCLUDE(${GUI_ROOT_DIR}/adm_local/cmake_files/FindGUI.cmake)
62 SET(VERSION_MAINTENANCE 0)
63 SET(VERSION "${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_MAINTENANCE}")
64 SET(XVERSION 0x0${VERSION_MAJOR}0${VERSION_MINOR}0${VERSION_MAINTENANCE})
69 SET(VISU_ROOT_DIR $ENV{VISU_ROOT_DIR} CACHE PATH "VISU_ROOT_DIR")
70 IF(EXISTS ${VISU_ROOT_DIR}/adm_local/cmake_files/FindVISU.cmake)
71 INCLUDE(${VISU_ROOT_DIR}/adm_local/cmake_files/FindVISU.cmake)
73 ENDIF(EXISTS ${VISU_ROOT_DIR}/adm_local/cmake_files/FindVISU.cmake)
75 SET(MED_ROOT_DIR $ENV{MED_ROOT_DIR} CACHE PATH "MED_ROOT_DIR")
76 INCLUDE(${MED_ROOT_DIR}/adm_local/cmake_files/FindMED.cmake)
78 EXECUTE_PROCESS(COMMAND pvpython ${CMAKE_SOURCE_DIR}/getwrapclasses.py ${PARAVIEW_INCLUDE_DIRS})
93 INCLUDE(wrapfiles.cmake)
95 SET(input ${CMAKE_CURRENT_SOURCE_DIR}/PARAVIS_version.h.in)
96 SET(output ${CMAKE_CURRENT_BINARY_DIR}/PARAVIS_version.h)
98 MESSAGE(STATUS "Creation of ${output}")
99 CONFIGURE_FILE(${input} ${output})
101 ADD_DEFINITIONS(-DVTK_EXCLUDE_STRSTREAM_HEADERS)
103 FOREACH(dir ${SUBDIRS})
104 ADD_SUBDIRECTORY(${dir})
105 ENDFOREACH(dir ${SUBDIRS})
107 # Reset CMAKE_CONFIGURATION_TYPES to the good value defined by CMAKE_BUILD_TYPE
110 MARK_AS_ADVANCED(CLEAR CMAKE_CONFIGURATION_TYPES)
111 SET(CMAKE_CONFIGURATION_TYPES ${CMAKE_BUILD_TYPE} CACHE STRING "compilation types" FORCE)
113 ENDIF(CMAKE_BUILD_TYPE)
115 INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/PARAVIS_version.h DESTINATION include/salome)
118 SET(PARAVIS_TEST_OUTPUT_DIR /tmp/pic CACHE PATH "Directory for saving test pictures.")
119 OPTION(BUILD_TESTING "Build ParaVis Testing" ON)
121 SET(PARAVIS_TEST_DIR ${ParaVis_BINARY_DIR}/Test/Temporary)
122 MAKE_DIRECTORY(${PARAVIS_TEST_DIR})
125 ADD_SUBDIRECTORY(test)