]> SALOME platform Git repositories - modules/paravis.git/commitdiff
Salome HOME
CMake: minimal set of changes so that ParaViS configures and compiles.
authorbruneton <bruneton>
Thu, 4 Jul 2013 06:55:58 +0000 (06:55 +0000)
committerbruneton <bruneton>
Thu, 4 Jul 2013 06:55:58 +0000 (06:55 +0000)
CMakeLists.txt
adm_local/cmake_files/CMakeLists.txt
adm_local/cmake_files/FindPARAVIEW.cmake [deleted file]
adm_local/cmake_files/FindSalomeParaView.cmake [new file with mode: 0644]
idl/CMakeLists.txt
src/ENGINE/CMakeLists.txt
src/PVGUI/CMakeLists.txt
src/Plugins/MedReader/CMake/FindMED.cmake
src/Plugins/ParaMEDCorba/CMakeLists.txt

index d798866a11ac3cef71df45a3a60b88e5be425e8f..515ad3b603dadd08ae1698f817455f524ad93373 100644 (file)
@@ -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})
 
index 2e07e3e819939f4bdc000a7c7dfd711e220d1731..a7af866f939d42a04a5ee645afc05b39593e05e5 100644 (file)
@@ -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 (file)
index 6ffc0f8..0000000
+++ /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 (file)
index 0000000..c554632
--- /dev/null
@@ -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})
index ff89e8a27e317c23d1c91d09a6b75afebaafdf32..ecf37a9937062abe530d518f29af86b29471e858 100644 (file)
@@ -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)
 
index 5b44396b62dcb1abc2a27c63a7a8e03b5cc7e936..6c46b5cc15ed0cfa2218146b86b514c870488fcd 100644 (file)
@@ -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)
 
index 6b8aa573e0170fda600a5261cba6c22b586b5c32..9b314649bd631e6f78c5eea89d39177009a6c7fb 100644 (file)
 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
index 9fc6852fa804542fba8478d7d2ecf7b72210bd59..aaae14cfeb2ecd75f22f4fc53388dd8236e3ad51 100644 (file)
@@ -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})
index 0b1228e646c827c0f6aa61ede35334c83fb87f2b..45329968d2e9e6de66e21a42ac6644a93e3b1b02 100644 (file)
@@ -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}")