From: bruneton Date: Thu, 4 Jul 2013 06:55:58 +0000 (+0000) Subject: CMake: minimal set of changes so that ParaViS configures and compiles. X-Git-Tag: V7_3_0a1~46 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=8f65343e97bb7fc2f241bef7a31e7fdb603cce43;p=modules%2Fparavis.git CMake: minimal set of changes so that ParaViS configures and compiles. --- diff --git a/CMakeLists.txt b/CMakeLists.txt index d798866a..515ad3b6 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -17,7 +17,7 @@ # 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} ) @@ -30,33 +30,54 @@ IF(COMMAND cmake_policy) 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) @@ -67,15 +88,17 @@ SET(VERSION_DEV 0) 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}) diff --git a/adm_local/cmake_files/CMakeLists.txt b/adm_local/cmake_files/CMakeLists.txt index 2e07e3e8..a7af866f 100644 --- a/adm_local/cmake_files/CMakeLists.txt +++ b/adm_local/cmake_files/CMakeLists.txt @@ -17,4 +17,4 @@ # 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) diff --git a/adm_local/cmake_files/FindPARAVIEW.cmake b/adm_local/cmake_files/FindPARAVIEW.cmake deleted file mode 100644 index 6ffc0f8a..00000000 --- a/adm_local/cmake_files/FindPARAVIEW.cmake +++ /dev/null @@ -1,22 +0,0 @@ -# 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}) diff --git a/adm_local/cmake_files/FindSalomeParaView.cmake b/adm_local/cmake_files/FindSalomeParaView.cmake new file mode 100644 index 00000000..c554632e --- /dev/null +++ b/adm_local/cmake_files/FindSalomeParaView.cmake @@ -0,0 +1,30 @@ +# 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}) diff --git a/idl/CMakeLists.txt b/idl/CMakeLists.txt index ff89e8a2..ecf37a99 100644 --- a/idl/CMakeLists.txt +++ b/idl/CMakeLists.txt @@ -21,7 +21,7 @@ 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_BINARY_DIR}/idl) +INCLUDE_DIRECTORIES(${OMNIORB_INCLUDE_DIR} ${KERNEL_ROOT_DIR}/include/salome ${CMAKE_BINARY_DIR}/idl) INCLUDE(wrap.cmake) diff --git a/src/ENGINE/CMakeLists.txt b/src/ENGINE/CMakeLists.txt index 5b44396b..6c46b5cc 100644 --- a/src/ENGINE/CMakeLists.txt +++ b/src/ENGINE/CMakeLists.txt @@ -21,7 +21,7 @@ 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_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) diff --git a/src/PVGUI/CMakeLists.txt b/src/PVGUI/CMakeLists.txt index 6b8aa573..9b314649 100644 --- a/src/PVGUI/CMakeLists.txt +++ b/src/PVGUI/CMakeLists.txt @@ -20,16 +20,26 @@ 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 diff --git a/src/Plugins/MedReader/CMake/FindMED.cmake b/src/Plugins/MedReader/CMake/FindMED.cmake index 9fc6852f..aaae14cf 100644 --- a/src/Plugins/MedReader/CMake/FindMED.cmake +++ b/src/Plugins/MedReader/CMake/FindMED.cmake @@ -82,11 +82,11 @@ IF(${MED_FOUND}) 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}) diff --git a/src/Plugins/ParaMEDCorba/CMakeLists.txt b/src/Plugins/ParaMEDCorba/CMakeLists.txt index 0b1228e6..45329968 100644 --- a/src/Plugins/ParaMEDCorba/CMakeLists.txt +++ b/src/Plugins/ParaMEDCorba/CMakeLists.txt @@ -50,7 +50,7 @@ PROJECT( ParaMEDCorba ) 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}")