-# VTK detection for Salome
+# VTK detection for Salome (see http://www.vtk.org/Wiki/VTK/Build_System_Migration)
set(PARAVIEW_ROOT_DIR $ENV{PARAVIEW_ROOT_DIR} CACHE PATH "Path to ParaView directory")
set(PARAVIEW_VERSION $ENV{PARAVIEW_VERSION} CACHE STRING "Version of Paraview")
if(EXISTS ${PARAVIEW_ROOT_DIR})
- set(VTK_DIR ${PARAVIEW_ROOT_DIR}/lib/paraview-${PARAVIEW_VERSION} CACHE PATH "Path to directory including VTKConfig.cmake")
+ set(VTK_DIR ${PARAVIEW_ROOT_DIR}/lib/cmake/paraview-${PARAVIEW_VERSION} CACHE PATH "Path to directory including VTKConfig.cmake")
endif(EXISTS ${PARAVIEW_ROOT_DIR})
-find_package(VTK REQUIRED)
+set(VTK_COMPONENTS vtkRenderingOpenGL vtkRenderingLOD vtkRenderingAnnotation vtkFiltersParallel vtkIOExport)
+find_package(VTK 6.0 REQUIRED COMPONENTS ${VTK_COMPONENTS} NO_MODULE)
if (VTK_FOUND)
- include(${VTK_USE_FILE})
message(STATUS "VTK version is ${VTK_MAJOR_VERSION}.${VTK_MINOR_VERSION}")
- message(STATUS "Kit VTK availables : ${VTK_KITS}")
- message(STATUS "VTK Library dir is : ${VTK_LIBRARY_DIRS}")
- set(CMAKE_LIBRARY_PATH ${VTK_LIBRARY_DIRS})
- set(VTK_LIBSWENEED vtkCommon vtkGraphics vtkImaging vtkFiltering vtkIO vtkRendering vtkHybrid vtkParallel vtkWidgets vtkInfovis vtkVolumeRendering)
- unset(VTK_LIBRARIES)
- foreach(VTK_LIB_NEEDED ${VTK_LIBSWENEED})
- unset(VTK_LIB CACHE)
- find_library(VTK_LIB ${VTK_LIB_NEEDED})
- set(VTK_LIBRARIES ${VTK_LIBRARIES} ${VTK_LIB})
- endforeach(VTK_LIB_NEEDED)
- find_library(VTK_PYLIBS vtkWrappingPython${PYTHON_VERSION_MAJOR}${PYTHON_VERSION_MINOR}-pv${PARAVIEW_VERSION})
- #find_library(vtkCommonPythonD vtkCommonPythonD)
- #find_library(vtkGraphicsPythonD vtkGraphicsPythonD)
- #find_library(vtkImagingPythonD vtkImagingPythonD)
- #find_library(vtkPythonCore vtkPythonCore)
+ message(STATUS "VTK libraries are: ${VTK_LIBRARIES}")
endif(VTK_FOUND)
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
+INCLUDE(${VTK_USE_FILE})
+
INCLUDE_DIRECTORIES(
${CAS_INCLUDE_DIRS}
${QT_INCLUDES}
${PYTHON_INCLUDE_DIRS}
${Boost_INCLUDE_DIRS}
- ${VTK_INCLUDE_DIRS}
${PTHREAD_INCLUDE_DIRS}
${KERNEL_ROOT_DIR}/include/salome
${CMAKE_CURRENT_SOURCE_DIR}/../LightApp
# ${vtkPythonCore}
)
-ADD_DEFINITIONS("-DHAVE_CONFIG_H ${CAS_DEFINITIONS} ${QT_DEFINITIONS} ${BOOST_DEFINITIONS} ${VTK_DEFINITIONS} ${PYTHON_DEFINITIONS}")
+ADD_DEFINITIONS("-DHAVE_CONFIG_H ${CAS_DEFINITIONS} ${QT_DEFINITIONS} ${BOOST_DEFINITIONS} ${PYTHON_DEFINITIONS}")
ADD_LIBRARY(SalomePy SalomePy.cxx)
TARGET_LINK_LIBRARIES(SalomePy ${COMMON_LIBS})
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
+INCLUDE(${VTK_USE_FILE})
+
INCLUDE_DIRECTORIES(
${CAS_INCLUDE_DIRS}
${QT_INCLUDES}
${SIP_INCLUDE_DIRS}
${Boost_INCLUDE_DIRS}
${PYTHON_INCLUDE_DIRS}
- ${VTK_INCLUDE_DIRS}
${OMNIORB_INCLUDE_DIR}
${KERNEL_ROOT_DIR}/include/salome
${CMAKE_CURRENT_SOURCE_DIR}
SET(GUI_HEADERS SALOME_PYQT_Module.h)
QT4_WRAP_CPP(GUI_HEADERS_MOC ${GUI_HEADERS})
-ADD_DEFINITIONS("-DCALL_OLD_METHODS -DHAVE_CONFIG_H ${QT_DEFINITIONS} ${PYTHON_DEFINITIONS} ${CAS_DEFINITIONS} ${BOOST_DEFINITIONS} ${VTK_DEFINITIONS} ${OMNIORB_DEFINITIONS}")
+ADD_DEFINITIONS("-DCALL_OLD_METHODS -DHAVE_CONFIG_H ${QT_DEFINITIONS} ${PYTHON_DEFINITIONS} ${CAS_DEFINITIONS} ${BOOST_DEFINITIONS} ${OMNIORB_DEFINITIONS}")
ADD_LIBRARY(SalomePyQtGUI SALOME_PYQT_Module.cxx ${GUI_HEADERS_MOC})
TARGET_LINK_LIBRARIES(SalomePyQtGUI ${COMMON_LIBS})
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
+INCLUDE(${VTK_USE_FILE})
+
INCLUDE_DIRECTORIES(
${CAS_INCLUDE_DIRS}
${QT_INCLUDES}
${SIP_INCLUDE_DIR}
${Boost_INCLUDE_DIRS}
${PYTHON_INCLUDE_DIRS}
- ${VTK_INCLUDE_DIRS}
${PTHREAD_INCLUDE_DIRS}
${KERNEL_ROOT_DIR}/include/salome
${CMAKE_CURRENT_BINARY_DIR}
SALOME_PYQT_PyInterp.cxx
)
-ADD_DEFINITIONS( "-DHAVE_CONFIG_H -DCALL_OLD_METHODS ${QT_DEFINITIONS} ${CAS_DEFINITIONS} ${BOOST_DEFINITIONS} ${VTK_DEFINITIONS} ${PYTHON_DEFINITIONS}")
+ADD_DEFINITIONS( "-DHAVE_CONFIG_H -DCALL_OLD_METHODS ${QT_DEFINITIONS} ${CAS_DEFINITIONS} ${BOOST_DEFINITIONS} ${PYTHON_DEFINITIONS}")
ADD_LIBRARY(SalomePyQtGUILight ${SalomePyQtGUI_SOURCES} ${GUI_HEADERS_MOC} ${SIP_SRC})
TARGET_LINK_LIBRARIES(SalomePyQtGUILight ${COMMON_LIBS})
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
+INCLUDE(${VTK_USE_FILE})
+
INCLUDE_DIRECTORIES(
${CAS_INCLUDE_DIRS}
${QT_INCLUDES}
${Boost_INCLUDE_DIRS}
${PYTHON_INCLUDE_DIRS}
${PTHREAD_INCLUDE_DIRS}
- ${VTK_INCLUDE_DIRS}
${KERNEL_ROOT_DIR}/include/salome
${CMAKE_CURRENT_BINARY_DIR}
${CMAKE_CURRENT_SOURCE_DIR}
SET(SalomePyQt_SOURCES SalomePyQt.cxx)
# -DHAVE_CONFIG_H
-ADD_DEFINITIONS("${QWT_DEFINITIONS} ${QT_DEFINITIONS} ${CAS_DEFINITIONS} ${BOOST_DEFINITIONS} ${VTK_DEFINITIONS} ${PYTHON_DEFINITIONS}")
+ADD_DEFINITIONS("${QWT_DEFINITIONS} ${QT_DEFINITIONS} ${CAS_DEFINITIONS} ${BOOST_DEFINITIONS} ${PYTHON_DEFINITIONS}")
ADD_LIBRARY(SalomePyQt ${SalomePyQt_SOURCES} ${GUI_HEADERS_MOC} ${SIP_SRC})
TARGET_LINK_LIBRARIES(SalomePyQt ${COMMON_LIBS})
FIND_PACKAGE(SWIG REQUIRED)
INCLUDE(${SWIG_USE_FILE})
INCLUDE(${KERNEL_ROOT_DIR}/salome_adm/cmake_files/SalomeMacros.cmake)
+INCLUDE(${VTK_USE_FILE})
SET_SOURCE_FILES_PROPERTIES(libSALOME_Swig.i PROPERTIES CPLUSPLUS ON)
SET_SOURCE_FILES_PROPERTIES(libSALOME_Swig.i PROPERTIES SWIG_DEFINITIONS "-shadow")
${CAS_INCLUDE_DIRS}
${QT_INCLUDES}
${QWT_INCLUDE_DIR}
- ${VTK_INCLUDE_DIRS}
${Boost_INCLUDE_DIRS}
${PTHREAD_INCLUDE_DIRS}
${CMAKE_CURRENT_SOURCE_DIR}
${CMAKE_CURRENT_SOURCE_DIR}/../Plot2d
)
-ADD_DEFINITIONS(${PYTHON_DEFINITIONS} ${CAS_DEFINITIONS} ${QT_DEFINITIONS} ${QWT_DEFINITIONS} ${VTK_DEFINITIONS} ${BOOST_DEFINITIONS})
+ADD_DEFINITIONS(${PYTHON_DEFINITIONS} ${CAS_DEFINITIONS} ${QT_DEFINITIONS} ${QWT_DEFINITIONS} ${BOOST_DEFINITIONS})
SWIG_ADD_MODULE(libSALOME_Swig python libSALOME_Swig.i SALOMEGUI_Swig.cxx)
SWIG_LINK_LIBRARIES(libSALOME_Swig LightApp ${PYTHON_LIBRARIES})
#
INCLUDE(${CMAKE_SOURCE_DIR}/adm_local/cmake_files/UseQT4EXT.cmake)
+INCLUDE(${VTK_USE_FILE})
INCLUDE_DIRECTORIES(
${CAS_INCLUDE_DIRS}
${QT_INCLUDES}
- ${VTK_INCLUDE_DIRS}
${PTHREAD_INCLUDE_DIRS}
${Boost_INCLUDE_DIRS}
${KERNEL_ROOT_DIR}/include/salome
${CMAKE_CURRENT_SOURCE_DIR}/../OpenGLUtils
)
-ADD_DEFINITIONS(${QT_DEFINITIONS} ${CAS_DEFINITIONS} ${VTK_DEFINITIONS} ${BOOST_DEFINITIONS})
+ADD_DEFINITIONS(${QT_DEFINITIONS} ${CAS_DEFINITIONS} ${BOOST_DEFINITIONS})
SET(COMMON_LIBS
qtx
INCLUDE(${CMAKE_SOURCE_DIR}/adm_local/cmake_files/UseQT4EXT.cmake)
INCLUDE(${KERNEL_ROOT_DIR}/salome_adm/cmake_files/SalomeMacros.cmake)
+INCLUDE(${VTK_USE_FILE})
INCLUDE_DIRECTORIES(
${CAS_INCLUDE_DIRS}
${QT_INCLUDES}
- ${VTK_INCLUDE_DIRS}
${QWT_INCLUDE_DIR}
${Boost_INCLUDE_DIRS}
${PYTHON_INCLUDE_DIRS}
resources/SalomeApp_msg_fr.ts
)
-ADD_DEFINITIONS(${QT_DEFINITIONS} ${LIBXML2_DEFINITIONS} ${OMNIORB_DEFINITIONS} ${VTK_DEFINITIONS} ${QWT_DEFINITIONS} ${CAS_DEFINITIONS} ${BOOST_DEFINITIONS} ${PYTHON_DEFINITIONS})
+ADD_DEFINITIONS(${QT_DEFINITIONS} ${LIBXML2_DEFINITIONS} ${OMNIORB_DEFINITIONS} ${QWT_DEFINITIONS} ${CAS_DEFINITIONS} ${BOOST_DEFINITIONS} ${PYTHON_DEFINITIONS})
ADD_LIBRARY(SalomeApp ${SalomeApp_SOURCES} ${GUI_HEADERS_MOC})
TARGET_LINK_LIBRARIES(SalomeApp ${COMMON_LIBS})
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
INCLUDE(${CMAKE_SOURCE_DIR}/adm_local/cmake_files/UseQT4EXT.cmake)
+INCLUDE(${VTK_USE_FILE})
INCLUDE_DIRECTORIES(
${CAS_INCLUDE_DIRS}
${QT_INCLUDES}
- ${VTK_INCLUDE_DIRS}
${PTHREAD_INCLUDE_DIRS}
${KERNEL_ROOT_DIR}/include/salome
${CMAKE_CURRENT_SOURCE_DIR}/../Qtx
${CMAKE_CURRENT_SOURCE_DIR}/../SUIT
)
-ADD_DEFINITIONS(${VTK_DEFINITIONS} ${CAS_DEFINITIONS} ${QT_DEFINITIONS})
+ADD_DEFINITIONS(${CAS_DEFINITIONS} ${QT_DEFINITIONS})
SET(COMMON_LIBS ${QT_LIBRARIES} ${OPENGL_LIBRARIES} ${VTK_LIBRARIES} ${CAS_KERNEL} qtx suit ${SALOMELocalTrace})
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
-INCLUDE_DIRECTORIES(
- ${VTK_INCLUDE_DIRS}
-)
-
-ADD_DEFINITIONS(${VTK_DEFINITIONS})
+INCLUDE(${VTK_USE_FILE})
ADD_LIBRARY(vtkTools vtkEDFCutter.cxx)
TARGET_LINK_LIBRARIES(vtkTools ${VTK_LIBRARIES})