# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
-PROJECT(PARAVIS)
+PROJECT(PARAVIS C CXX)
IF(WINDOWS)
STRING( REPLACE "INCREMENTAL:YES" "INCREMENTAL:NO" replacementFlags ${CMAKE_SHARED_LINKER_FLAGS_DEBUG} )
ENDIF(COMMAND cmake_policy)
SET(KERNEL_ROOT_DIR $ENV{KERNEL_ROOT_DIR} CACHE PATH "KERNEL_ROOT_DIR")
+SET(GUI_ROOT_DIR $ENV{GUI_ROOT_DIR} CACHE PATH "GUI_ROOT_DIR")
SET(MODULE PARAVIS)
-INCLUDE(${KERNEL_ROOT_DIR}/salome_adm/cmake_files/SalomeMacros.cmake)
-INCLUDE(${KERNEL_ROOT_DIR}/salome_adm/cmake_files/deprecated/FindPLATFORM.cmake)
-INCLUDE(${KERNEL_ROOT_DIR}/salome_adm/cmake_files/FindSalomePython.cmake)
-INCLUDE(${KERNEL_ROOT_DIR}/salome_adm/cmake_files/deprecated/FindOMNIORB.cmake)
-INCLUDE(${KERNEL_ROOT_DIR}/salome_adm/cmake_files/deprecated/FindPTHREADS.cmake)
-INCLUDE(${KERNEL_ROOT_DIR}/salome_adm/cmake_files/deprecated/FindHDF5.cmake)
-INCLUDE(${KERNEL_ROOT_DIR}/salome_adm/cmake_files/deprecated/FindBOOST.cmake)
-INCLUDE(${KERNEL_ROOT_DIR}/salome_adm/cmake_files/deprecated/FindLIBXML2.cmake)
-INCLUDE(${KERNEL_ROOT_DIR}/salome_adm/cmake_files/deprecated/FindSWIG.cmake)
-INCLUDE(${KERNEL_ROOT_DIR}/salome_adm/cmake_files/FindCppUnit.cmake)
-INCLUDE(${KERNEL_ROOT_DIR}/salome_adm/cmake_files/deprecated/FindDOXYGEN.cmake)
-INCLUDE(${KERNEL_ROOT_DIR}/salome_adm/cmake_files/deprecated/FindKERNEL.cmake)
-
-INCLUDE(${CMAKE_SOURCE_DIR}/adm_local/cmake_files/FindPARAVIEW.cmake)
-IF(EXISTS ${PARAVIEW_VTK_DIR}/VTKConfig.cmake)
- SET(VTK_DIR ${PARAVIEW_VTK_DIR})
-ENDIF(EXISTS ${PARAVIEW_VTK_DIR}/VTKConfig.cmake)
-SET(GUI_ROOT_DIR $ENV{GUI_ROOT_DIR} CACHE PATH "GUI_ROOT_DIR")
-INCLUDE(${GUI_ROOT_DIR}/adm_local/cmake_files/deprecated/FindCAS.cmake)
-INCLUDE(${GUI_ROOT_DIR}/adm_local/cmake_files/deprecated/FindQT4.cmake)
-INCLUDE(${GUI_ROOT_DIR}/adm_local/cmake_files/deprecated/FindOPENGL.cmake)
-INCLUDE(${GUI_ROOT_DIR}/adm_local/cmake_files/deprecated/FindVTK.cmake)
-INCLUDE(${GUI_ROOT_DIR}/adm_local/cmake_files/deprecated/FindQWT.cmake)
-INCLUDE(${GUI_ROOT_DIR}/adm_local/cmake_files/deprecated/FindSIPPYQT.cmake)
-INCLUDE(${GUI_ROOT_DIR}/adm_local/cmake_files/deprecated/FindGUI.cmake)
+SET(CMAKE_MODULE_PATH
+ "${KERNEL_ROOT_DIR}/salome_adm/cmake_files"
+ "${GUI_ROOT_DIR}/adm_local/cmake_files"
+ "${CMAKE_SOURCE_DIR}/adm_local/cmake_files")
+
+INCLUDE(SalomeMacros)
+INCLUDE(SalomeSetupPlatform)
+
+FIND_PACKAGE(SalomeKERNEL REQUIRED)
+
+# From KERNEL:
+FIND_PACKAGE(SalomePython REQUIRED)
+FIND_PACKAGE(SalomeOmniORB REQUIRED)
+SET(OMNIORB_IDL_PYTHON ${OMNIORB_IDL_COMPILER})
+FIND_PACKAGE(SalomePThread REQUIRED)
+FIND_PACKAGE(SalomeHDF5 REQUIRED)
+FIND_PACKAGE(SalomeBoost REQUIRED)
+FIND_PACKAGE(SalomeLibXml2 REQUIRED)
+FIND_PACKAGE(SalomeSWIG REQUIRED)
+FIND_PACKAGE(SalomeCppUnit REQUIRED)
+FIND_PACKAGE(SalomeDoxygen REQUIRED)
+
+# Specific to ParaVis:
+FIND_PACKAGE(SalomeParaView)
+
+# GUI has to be loaded AFTER ParaView: the ParaView config doesn't mix
+# well with the VTK one (GUI loads VTK):
+FIND_PACKAGE(SalomeGUI REQUIRED)
+
+# From GUI:
+FIND_PACKAGE(SalomeCAS REQUIRED)
+FIND_PACKAGE(SalomeQt4 REQUIRED COMPONENTS QtCore QtGui QtXml QtHelp)
+message("QT_INCLUDES ${QT_INCLUDES}")
+SET(_new_inc)
+FOREACH(_inc ${QT_INCLUDES})
+ SET(_new_inc "${_new_inc} -I${_inc}")
+ENDFOREACH()
+SET(QT_INCLUDES "${_new_inc}")
+message("QT_INCLUDES ${QT_INCLUDES}")
+
+FIND_PACKAGE(SalomeOpenGL REQUIRED)
+FIND_PACKAGE(SalomeVTK REQUIRED)
+FIND_PACKAGE(SalomeQwt REQUIRED)
+FIND_PACKAGE(SalomePyQt4 REQUIRED)
+FIND_PACKAGE(SalomeSIP REQUIRED)
SET(VERSION_MAJOR 7)
SET(VERSION_MINOR 2)
SET(BUILD_PLUGINS 1)
-SET(VISU_ROOT_DIR $ENV{VISU_ROOT_DIR} CACHE PATH "VISU_ROOT_DIR")
-IF(EXISTS ${VISU_ROOT_DIR}/adm_local/cmake_files/FindVISU.cmake)
- INCLUDE(${VISU_ROOT_DIR}/adm_local/cmake_files/FindVISU.cmake)
- SET(WITH_VISU 1)
-ENDIF(EXISTS ${VISU_ROOT_DIR}/adm_local/cmake_files/FindVISU.cmake)
+#SET(VISU_ROOT_DIR $ENV{VISU_ROOT_DIR} CACHE PATH "VISU_ROOT_DIR")
+#IF(EXISTS ${VISU_ROOT_DIR}/adm_local/cmake_files/FindVISU.cmake)
+ #INCLUDE(${VISU_ROOT_DIR}/adm_local/cmake_files/FindVISU.cmake)
+ #SET(WITH_VISU 1)
+#ENDIF(EXISTS ${VISU_ROOT_DIR}/adm_local/cmake_files/FindVISU.cmake)
SET(MED_ROOT_DIR $ENV{MED_ROOT_DIR} CACHE PATH "MED_ROOT_DIR")
INCLUDE(${MED_ROOT_DIR}/adm_local/cmake_files/FindMED.cmake)
+# TODO: the below requires ParaView in the PYTHONPATH ... not so nice:
+MESSAGE(STATUS "Generating wrapped class list (??) ...")
LIST(GET PARAVIEW_INCLUDE_DIRS 0 PARAVIEW_INCLUDE_DIR0)
EXECUTE_PROCESS(COMMAND ${PYTHON_EXECUTABLE} ${CMAKE_SOURCE_DIR}/getwrapclasses.py ${PARAVIEW_INCLUDE_DIR0})
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
-INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/FindPARAVIEW.cmake DESTINATION adm_local/cmake_files)
+INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/FindSalomeParaView.cmake DESTINATION adm_local/cmake_files)
+++ /dev/null
-# Copyright (C) 2010-2013 CEA/DEN, EDF R&D
-#
-# This library is free software; you can redistribute it and/or
-# modify it under the terms of the GNU Lesser General Public
-# License as published by the Free Software Foundation; either
-# version 2.1 of the License.
-#
-# This library is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# Lesser General Public License for more details.
-#
-# You should have received a copy of the GNU Lesser General Public
-# License along with this library; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-#
-# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-#
-
-CMAKE_MINIMUM_REQUIRED(VERSION 2.8.7 FATAL_ERROR)
-FIND_PACKAGE(ParaView REQUIRED NO_MODULE)
-INCLUDE(${PARAVIEW_USE_FILE})
--- /dev/null
+# Copyright (C) 2010-2013 CEA/DEN, EDF R&D
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+#
+# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+#
+# Author: Adrien Bruneton
+#
+
+# Graphviz detection for salome
+#
+# !! Please read the generic detection procedure in SalomeMacros.cmake !!
+#
+
+SALOME_FIND_PACKAGE_AND_DETECT_CONFLICTS(ParaView PARAVIEW_USE_FILE 4)
+#MARK_AS_ADVANCED()
+
+INCLUDE(${PARAVIEW_USE_FILE})
SET(SOVERSION_INFO ${VERSION_MAJOR}.${VERSION_MINOR})
ADD_DEFINITIONS(-DHAVE_SALOME_CONFIG)
-INCLUDE_DIRECTORIES(${OMNIORB_INCLUDE_DIRS} ${KERNEL_ROOT_DIR}/include/salome ${CMAKE_BINARY_DIR}/idl)
+INCLUDE_DIRECTORIES(${OMNIORB_INCLUDE_DIR} ${KERNEL_ROOT_DIR}/include/salome ${CMAKE_BINARY_DIR}/idl)
INCLUDE(wrap.cmake)
SET(SOVERSION_INFO ${VERSION_MAJOR}.${VERSION_MINOR})
ADD_DEFINITIONS(-DHAVE_SALOME_CONFIG)
-INCLUDE_DIRECTORIES(${OMNIORB_INCLUDE_DIRS} ${KERNEL_ROOT_DIR}/include/salome ${CMAKE_BINARY_DIR}/idl)
+INCLUDE_DIRECTORIES(${OMNIORB_INCLUDE_DIR} ${KERNEL_ROOT_DIR}/include/salome ${CMAKE_BINARY_DIR}/idl)
ADD_LIBRARY(PARAVISEngine SHARED PARAVIS_Engine_i.cc)
SET(VERSION_INFO ${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_MAINTENANCE})
SET(SOVERSION_INFO ${VERSION_MAJOR}.${VERSION_MINOR})
-ADD_DEFINITIONS(-DHAVE_SALOME_CONFIG)
-INCLUDE_DIRECTORIES(${OMNIORB_INCLUDE_DIRS} ${KERNEL_ROOT_DIR}/include/salome ${CMAKE_CURRENT_SOURCE_DIR}/../ParaView ${CMAKE_BINARY_DIR}/idl ${CMAKE_BINARY_DIR} ${CMAKE_CURRENT_SOURCE_DIR})
-
-IF(WITH_VISU)
- SET(VISU_PARAVIS_LIBS
- ${SalomeIDLVISU}
- )
-
- ADD_DEFINITIONS(-DWITH_VISU)
-ENDIF(WITH_VISU)
+ADD_DEFINITIONS(-DHAVE_SALOME_CONFIG ${CAS_DEFINITIONS})
+
+INCLUDE_DIRECTORIES(${OMNIORB_INCLUDE_DIR}
+ ${KERNEL_ROOT_DIR}/include/salome
+ ${GUI_ROOT_DIR}/include/salome
+ ${CMAKE_CURRENT_SOURCE_DIR}/../ParaView
+ ${CMAKE_BINARY_DIR}/idl
+ ${CMAKE_BINARY_DIR}
+ ${CMAKE_CURRENT_SOURCE_DIR}
+ ${CAS_INCLUDE_DIRS} )
+
+INCLUDE(${QT_USE_FILE})
+
+#IF(WITH_VISU)
+# SET(VISU_PARAVIS_LIBS
+# ${SalomeIDLVISU}
+# )
+#
+# ADD_DEFINITIONS(-DWITH_VISU)
+#ENDIF(WITH_VISU)
#Executable
SET(bin_PROGRAMS
SET(MED_LIBRARIES ${MED_LIBRARIES} ${HDF5_LIBS})
SET(MED_INCLUDE_DIRS ${MED_INCLUDE_DIR} ${HDF5_INCLUDE_DIR})
ELSE(WINDOWS)
- FIND_PACKAGE(HDF5 REQUIRED)
+ FIND_PACKAGE(SalomeHDF5 REQUIRED)
SET(MED_LIBRARIES ${MED_LIBRARIES} ${HDF5_LIBRARIES})
SET(MED_INCLUDE_DIRS ${MED_INCLUDE_DIR} ${HDF5_INCLUDE_DIRS})
IF(${HDF5_IS_PARALLEL})
- FIND_PACKAGE(MPI REQUIRED)
+ FIND_PACKAGE(SalomeMPI REQUIRED)
SET(MED_LIBRARIES ${MED_LIBRARIES} ${MPI_LIBRARY} ${MPI_EXTRA_LIBRARY})
SET(MED_INCLUDE_DIRS ${MED_INCLUDE_DIRS} ${MPI_INCLUDE_PATH})
ENDIF(${HDF5_IS_PARALLEL})
ParaMEDCorbaUserInterfaceSources.xml
SERVER_MANAGER_SOURCES ${PARACORBAPLUG_SRCS} )
- INCLUDE_DIRECTORIES(${OMNIORB_INCLUDE_DIRS} ${MED_ROOT_DIR}/include/salome ${KERNEL_ROOT_DIR}/include/salome)
+ INCLUDE_DIRECTORIES(${OMNIORB_INCLUDE_DIR} ${MED_ROOT_DIR}/include/salome ${KERNEL_ROOT_DIR}/include/salome)
SET_TARGET_PROPERTIES(ParaMEDMEM2VTK PROPERTIES COMPILE_FLAGS "${OMNIORB_DEFINITIONS}")
SET_TARGET_PROPERTIES(ParaMEDCorbaPlugin PROPERTIES COMPILE_FLAGS "${OMNIORB_DEFINITIONS}")