Commit bafbbbac authored by Ben Boeckel's avatar Ben Boeckel

paraview: port

parent e71b805f
Pipeline #23604 passed with stage
# This needs to set a the following variables which are using in various
# bundling codes to determine ParaView version.
# pv_version_major
# pv_version_minor
# pv_version_patch
# pv_version_suffix
# pv_version
# pv_version_long
set (hardcoded_paraview_version "5.1.2")
function(_set_version_vars versiontext)
string(REGEX MATCH "([0-9]+)\\.([0-9]+)\\.([0-9]+)[-]*(.*)" version_matches "${versiontext}")
if(CMAKE_MATCH_0)
set(full ${CMAKE_MATCH_0})
set(major ${CMAKE_MATCH_1})
set(minor ${CMAKE_MATCH_2})
set(patch ${CMAKE_MATCH_3})
set(patch_extra ${CMAKE_MATCH_4})
set(pv_version "${major}.${minor}" PARENT_SCOPE)
set(pv_version_major ${major} PARENT_SCOPE)
set(pv_version_minor ${minor} PARENT_SCOPE)
set(pv_version_patch ${patch} PARENT_SCOPE)
set(pv_version_suffix ${patch_extra} PARENT_SCOPE)
set(pv_version_long ${full} PARENT_SCOPE)
endif()
endfunction()
if(ParaView_FROM_SOURCE_DIR)
# We can use GitDescribe in this case, so let's use it.
# First, set the vars using the hard coded version if everything fails.
_set_version_vars(${hardcoded_paraview_version})
include("${PARAVIEW_SOURCE_DIR}/Utilities/Git/Git.cmake" OPTIONAL)
include("${PARAVIEW_SOURCE_DIR}/CMake/ParaViewDetermineVersion.cmake" OPTIONAL
RESULT_VARIABLE status)
if (status)
message(STATUS "Using git-describe to determine ParaView version")
# the ParaView module was correctly imported.
determine_version("${PARAVIEW_SOURCE_DIR}" "${GIT_EXECUTABLE}" "__TMP")
if (__TMP_VERSION_FULL)
_set_version_vars(${__TMP_VERSION_FULL})
endif()
endif()
# make the ParaView_VERSION variable internal to avoid confusion.
set (PARAVIEW_VERSION "${hardcoded_paraview_version}" CACHE INTERNAL "")
else()
# The user has to specify the version to use.
set(PARAVIEW_VERSION "${hardcoded_paraview_version}" CACHE STRING
"Specify the version number for the package being generated e.g. ${hardcoded_paraview_version}")
mark_as_advanced(PARAVIEW_VERSION)
_set_version_vars(${PARAVIEW_VERSION})
endif()
message(STATUS "Using ParaView Version: ${pv_version_long} (${pv_version_major}|${pv_version_minor}|${pv_version_patch}|${pv_version_suffix})")
......@@ -5,6 +5,12 @@ project(ParaViewSuperBuild)
list(INSERT CMAKE_MODULE_PATH 0
"${CMAKE_CURRENT_LIST_DIR}/cmake")
macro (superbuild_setup_variables)
include(SuperbuildVersionMacros)
superbuild_set_version_variables(paraview "5.1.2" "paraview-version.cmake")
set(paraview_version "${paraview_version_major}.${paraview_version_minor}")
endmacro ()
option(TRUST_SVN_CERTIFICATES_AUTOMATICALLY
"Trust SVN certificates automatically" ON)
mark_as_advanced(TRUST_SVN_CERTIFICATES_AUTOMATICALLY)
......
# set extra cpack variables before calling paraview.bundle.common
set (CPACK_GENERATOR DragNDrop)
# include some common stub.
include(paraview.bundle.common)
include(CPack)
install(CODE
"
set(PV_PYTHON_LIB_INSTALL_PREFIX
\"\${CMAKE_INSTALL_PREFIX}/paraview.app/Contents/Python\")
"
COMPONENT superbuild)
# now fixup each of the applications.
# we only to paraview explicitly.
install(CODE "
file(INSTALL DESTINATION \"\${CMAKE_INSTALL_PREFIX}\" USE_SOURCE_PERMISSIONS TYPE DIRECTORY FILES
\"${install_location}/Applications/paraview.app\")
file(WRITE \"\${CMAKE_INSTALL_PREFIX}/paraview.app/Contents/Resources/qt.conf\"
\"\")
execute_process(
COMMAND ${CMAKE_CURRENT_LIST_DIR}/fixup_bundle.py
\"\${CMAKE_INSTALL_PREFIX}/paraview.app\"
\"${install_location}/lib\"
\"${install_location}/plugins\")
"
COMPONENT superbuild)
install(CODE "
# install six.py
file(GLOB six-files \"\${CMAKE_INSTALL_PREFIX}/paraview.app/Contents/Python/site-packages/six.py*\")
file(INSTALL DESTINATION \"\${PV_PYTHON_LIB_INSTALL_PREFIX}\"
USE_SOURCE_PERMISSIONS FILES
\${six-files})
"
COMPONENT superbuild)
if (numpy_ENABLED AND NOT USE_SYSTEM_numpy)
# install numpy module into the application bundle.
install(CODE "
# install numpy
file(GLOB numpy-root \"${install_location}/lib/python*/site-packages/numpy\")
file(INSTALL DESTINATION \"\${PV_PYTHON_LIB_INSTALL_PREFIX}\"
USE_SOURCE_PERMISSIONS TYPE DIRECTORY FILES
\"\${numpy-root}\")
"
COMPONENT superbuild)
endif()
#-----------------------------------------------------------------------------
if (mpi_ENABLED AND NOT USE_SYSTEM_mpi)
# install MPI executables (the dylib are already installed by a previous rule).
install(CODE "
file(INSTALL
DESTINATION \"\${CMAKE_INSTALL_PREFIX}/paraview.app/Contents/MacOS\"
USE_SOURCE_PERMISSIONS
FILES \"${install_location}/bin/hydra_pmi_proxy\")
file(INSTALL
DESTINATION \"\${CMAKE_INSTALL_PREFIX}/paraview.app/Contents/MacOS\"
USE_SOURCE_PERMISSIONS
FILES \"${install_location}/bin/mpiexec.hydra\")
file(RENAME
\"\${CMAKE_INSTALL_PREFIX}/paraview.app/Contents/MacOS/mpiexec.hydra\"
\"\${CMAKE_INSTALL_PREFIX}/paraview.app/Contents/MacOS/mpiexec\")
# Fixup MPI bundled libraries
execute_process(
COMMAND
${CMAKE_INSTALL_NAME_TOOL} -change
\"${install_location}/lib/libmpl.1.dylib\"
@executable_path/../Libraries/libmpl.1.dylib
\"\${CMAKE_INSTALL_PREFIX}/paraview.app/Contents/MacOS/mpiexec\"
)
execute_process(
COMMAND
${CMAKE_INSTALL_NAME_TOOL} -change
\"${install_location}/lib/libmpl.1.dylib\"
@executable_path/../Libraries/libmpl.1.dylib
\"\${CMAKE_INSTALL_PREFIX}/paraview.app/Contents/MacOS/hydra_pmi_proxy\"
)
"
COMPONENT superbuild)
endif()
#-----------------------------------------------------------------------------
if (matplotlib_ENABLED AND NOT USE_SYSTEM_matplotlib)
# install matplotlib module into the application bundle.
install(CODE "
# install matplotlib
file(GLOB matplotlib-root \"${install_location}/lib/python*/site-packages/matplotlib\")
file(INSTALL
DESTINATION \"\${PV_PYTHON_LIB_INSTALL_PREFIX}\"
USE_SOURCE_PERMISSIONS
TYPE DIRECTORY
FILES \"\${matplotlib-root}\")
# install libpng (needed for matplotlib)
file(GLOB png-libs \"${install_location}/lib/libpng*dylib\")
foreach(png-lib \${png-libs})
file(INSTALL
DESTINATION
\"\${CMAKE_INSTALL_PREFIX}/paraview.app/Contents/Libraries\"
USE_SOURCE_PERMISSIONS
TYPE SHARED_LIBRARY
FILES \"\${png-lib}\")
endforeach()
# install libfreetype (needed for matplotlib)
file(GLOB freetype-libs \"${install_location}/lib/libfreetype*dylib\")
foreach(freetype-lib \${freetype-libs})
file(INSTALL
DESTINATION
\"\${CMAKE_INSTALL_PREFIX}/paraview.app/Contents/Libraries\"
USE_SOURCE_PERMISSIONS
TYPE SHARED_LIBRARY
FILES \"\${freetype-lib}\")
endforeach()
# fixup matplotlib to find the bundled libraries.
execute_process(
COMMAND
${CMAKE_INSTALL_NAME_TOOL} -change
libpng14.14.dylib
@executable_path/../Libraries/libpng14.14.dylib
\"\${PV_PYTHON_LIB_INSTALL_PREFIX}/matplotlib/_png.so\"
)
execute_process(
COMMAND
${CMAKE_INSTALL_NAME_TOOL} -change
\"${install_location}/lib/libfreetype.6.dylib\"
@executable_path/../Libraries/libfreetype.6.dylib
\"\${PV_PYTHON_LIB_INSTALL_PREFIX}/matplotlib/ft2font.so\"
)
"
COMPONENT superbuild)
endif()
if (CUSTOMIZE_DMG)
install(CODE "
# put the dmg customizations into the package
execute_process(
COMMAND ${CMAKE_COMMAND} -E tar xzv ${CMAKE_CURRENT_LIST_DIR}/dmg_customizer.tar.gz
WORKING_DIRECTORY \"\${CMAKE_INSTALL_PREFIX}\")
"
COMPONENT superbuild)
endif()
if (paraviewgettingstartedguide_ENABLED)
install(FILES ${paraviewgettingstartedguide_pdf}
DESTINATION "paraview.app/Contents/doc"
COMPONENT superbuild)
endif()
if (paraviewusersguide_ENABLED)
install(FILES ${paraviewusersguide_pdf}
DESTINATION "paraview.app/Contents/doc"
COMPONENT superbuild)
endif()
if (paraviewtutorial_ENABLED)
install(FILES ${paraviewtutorial_pdf}
DESTINATION "paraview.app/Contents/doc"
COMPONENT superbuild)
endif()
if (paraviewtutorialdata_ENABLED)
install(DIRECTORY "${install_location}/data"
DESTINATION "paraview.app/Contents"
COMPONENT superbuild)
endif()
add_test(NAME GenerateParaViewPackage
COMMAND ${CMAKE_CPACK_COMMAND} -G DragNDrop -V
WORKING_DIRECTORY ${SuperBuild_BINARY_DIR})
set_tests_properties(GenerateParaViewPackage PROPERTIES
# needed so that tests are run on typical paraview
# dashboards
LABELS "PARAVIEW"
TIMEOUT 2400) # increase timeout to 40 mins.
# Consolidates platform independent stub for paraview.bundle.cmake files.
# Enable CPack packaging.
set(CPACK_PACKAGE_DESCRIPTION_SUMMARY
"ParaView is a scientific visualization tool.")
set(CPACK_PACKAGE_NAME "ParaView")
set(CPACK_PACKAGE_VENDOR "Kitware, Inc.")
set(CPACK_PACKAGE_VERSION_MAJOR ${pv_version_major})
set(CPACK_PACKAGE_VERSION_MINOR ${pv_version_minor})
if (pv_version_suffix)
set(CPACK_PACKAGE_VERSION_PATCH ${pv_version_patch}-${pv_version_suffix})
else()
set(CPACK_PACKAGE_VERSION_PATCH ${pv_version_patch})
endif()
set(CPACK_PACKAGE_FILE_NAME
"${CPACK_PACKAGE_NAME}-${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR}.${CPACK_PACKAGE_VERSION_PATCH}-${PACKAGE_SUFFIX}")
# set the license file.
set(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_CURRENT_LIST_DIR}/paraview.license.txt")
if (CMAKE_CL_64)
# Change default installation root path for Windows x64
set(CPACK_NSIS_INSTALL_ROOT "$PROGRAMFILES64")
endif()
# Don't import CPack yet, let the platform specific code get another chance at
# changing the variables.
# include(CPack)
set(PV_EXTRA_CMAKE_ARGS ""
CACHE STRING "Extra arguments to be passed to ParaView when configuring.")
mark_as_advanced(PV_EXTRA_CMAKE_ARGS)
set (extra_cmake_args)
if (manta_ENABLED)
list (APPEND extra_cmake_args
-DMANTA_BUILD:PATH=${SuperBuild_BINARY_DIR}/manta/src/manta-build)
endif()
if(PV_NIGHTLY_SUFFIX)
list (APPEND extra_cmake_args
-DPV_NIGHTLY_SUFFIX:STRING=${PV_NIGHTLY_SUFFIX})
endif()
set (PARAVIEW_INSTALL_DEVELOPMENT_FILES FALSE)
if (paraviewsdk_ENABLED)
set (PARAVIEW_INSTALL_DEVELOPMENT_FILES TRUE)
endif()
set(osmesa_ARGS)
if(osmesa_ENABLED)
set(osmesa_ARGS -DVTK_OPENGL_HAS_OSMESA:BOOL=ON -DVTK_USE_X:BOOL=OFF)
endif()
set(use_qt OFF)
if (qt4_ENABLED OR qt5_ENABLED)
set(use_qt ON)
endif ()
set(PARAVIEW_RENDERING_BACKEND "OpenGL2" CACHE STRING "Rendering backend to use for ParaView")
set_property(CACHE PARAVIEW_RENDERING_BACKEND
PROPERTY
STRINGS "OpenGL;OpenGL2")
get_property(plugins GLOBAL PROPERTY pv_plugins)
list (REMOVE_DUPLICATES plugins)
set(plugin_dirs)
foreach (plugin IN LISTS plugins)
if (${plugin}_ENABLED AND TARGET ${plugin})
get_property(plugin_dir TARGET "${plugin}" PROPERTY _EP_SOURCE_DIR)
set(plugin_dirs "${plugin_dir}$<SEMICOLON>${plugin_dirs}")
endif ()
endforeach ()
if (NOT CMAKE_CONFIGURATION_TYPES AND NOT WIN32)
set(PARAVIEW_BUILD_TYPE "" CACHE STRING "Paraview's build mode")
mark_as_advanced(PARAVIEW_BUILD_TYPE)
if (NOT PARAVIEW_BUILD_TYPE)
set(PARAVIEW_BUILD_TYPE "${CMAKE_BUILD_TYPE}")
endif ()
set(CMAKE_BUILD_TYPE_save "${CMAKE_BUILD_TYPE}")
set(CMAKE_BUILD_TYPE "${PARAVIEW_BUILD_TYPE}")
endif ()
set(VTK_SMP_IMPLEMENTATION_TYPE "Sequential")
if (tbb_ENABLED)
set(VTK_SMP_IMPLEMENTATION_TYPE "TBB")
endif ()
# Add ability to freeze Python modules.
cmake_dependent_option(PARAVIEW_FREEZE_PYTHON
"Freeze Python packages/modules into the application." OFF
"python_ENABLED;NOT WIN32;paraview_ENABLED" OFF)
mark_as_advanced(PARAVIEW_FREEZE_PYTHON)
add_external_project(paraview
DEPENDS_OPTIONAL
adios boost cosmotools ffmpeg hdf5 libxml3 manta matplotlib mpi numpy png
python qt4 qt5 visitbridge zlib silo cgns xdmf3 ospray
mesa osmesa netcdf vrpn tbb egl
paraviewusersguide paraviewgettingstartedguide paraviewtutorial paraviewtutorialdata
${PV_EXTERNAL_PROJECTS} ${plugins}
CMAKE_ARGS
-DBUILD_SHARED_LIBS:BOOL=${BUILD_SHARED_LIBS}
-DBUILD_TESTING:BOOL=OFF
-DPARAVIEW_BUILD_PLUGIN_EyeDomeLighting:BOOL=ON
-DPARAVIEW_BUILD_PLUGIN_MantaView:BOOL=${manta_ENABLED}
-DPARAVIEW_BUILD_QT_GUI:BOOL=${use_qt}
-DPARAVIEW_ENABLE_FFMPEG:BOOL=${ffmpeg_ENABLED}
-DPARAVIEW_ENABLE_PYTHON:BOOL=${python_ENABLED}
-DPARAVIEW_ENABLE_COSMOTOOLS:BOOL=${cosmotools_ENABLED}
-DPARAVIEW_USE_MPI:BOOL=${mpi_ENABLED}
-DPARAVIEW_USE_OSPRAY:BOOL=${ospray_ENABLED}
-DPARAVIEW_USE_VISITBRIDGE:BOOL=${visitbridge_ENABLED}
-DPARAVIEW_ENABLE_XDMF3:BOOL=${xdmf3_ENABLED}
-DVISIT_BUILD_READER_CGNS:BOOL=OFF # force to off
-DPARAVIEW_ENABLE_CGNS:BOOL=${cgns_ENABLED}
-DVISIT_BUILD_READER_Silo:BOOL=${silo_ENABLED}
-DPARAVIEW_INSTALL_DEVELOPMENT_FILES:BOOL=${PARAVIEW_INSTALL_DEVELOPMENT_FILES}
-DPARAVIEW_ENABLE_MATPLOTLIB:BOOL=${matplotlib_ENABLED}
-DPARAVIEW_FREEZE_PYTHON:BOOL=${PARAVIEW_FREEZE_PYTHON}
-DVTK_USE_SYSTEM_NETCDF:BOOL=${netcdf_ENABLED}
-DVTK_USE_SYSTEM_FREETYPE:BOOL=${freetype_ENABLED}
-DVTK_USE_SYSTEM_HDF5:BOOL=${hdf5_ENABLED}
-DVTK_USE_SYSTEM_LIBXML2:BOOL=${libxml2_ENABLED}
-DVTK_USE_SYSTEM_PNG:BOOL=${png_ENABLED}
-DVTK_USE_SYSTEM_ZLIB:BOOL=${zlib_ENABLED}
-DModule_vtkIOADIOS:BOOL=${adios_ENABLED}
-DVTK_RENDERING_BACKEND:STRING=${PARAVIEW_RENDERING_BACKEND}
-DVTK_SMP_IMPLEMENTATION_TYPE:STRING=${VTK_SMP_IMPLEMENTATION_TYPE}
-DVTK_LEGACY_SILENT:BOOL=ON
-DPARAVIEW_FREEZE_PYTHON:BOOL=${PARAVIEW_FREEZE_PYTHON}
${osmesa_ARGS}
${egl_ARGS}
# vrpn
-DPARAVIEW_BUILD_PLUGIN_VRPlugin:BOOL=${vrpn_ENABLED}
-DPARAVIEW_USE_VRPN:BOOL=${vrpn_ENABLED}
# Web documentation
-DPARAVIEW_BUILD_WEB_DOCUMENTATION:BOOL=${PARAVIEW_BUILD_WEB_DOCUMENTATION}
# specify the apple app install prefix. No harm in specifying it for all
# platforms.
-DMACOSX_APP_INSTALL_PREFIX:PATH=<INSTALL_DIR>/Applications
# add additional plugin directories
-DPARAVIEW_EXTERNAL_PLUGIN_DIRS:STRING=${plugin_dirs}
${extra_cmake_args}
${PV_EXTRA_CMAKE_ARGS}
)
if (DEFINED CMAKE_BUILD_TYPE_save)
set(CMAKE_BUILD_TYPE "${CMAKE_BUILD_TYPE_save}")
endif ()
# this file determines binary dependencies for ParaView and install thems.
# dependencies_root == directory where dependecies are installed.
# target_root == root directory where files are to be installed.
include(GetPrerequisites)
get_filename_component(exepath "${executable}" PATH)
get_filename_component(exename "${executable}" NAME)
message("Determining dependencies for '${exename}'")
get_prerequisites(
${executable}
prerequisites
1
1
${exepath}
${dependencies_root}/lib
)
message("Installing dependencies for '${exename}'")
get_filename_component(resolved_deproot "${dependencies_root}" REALPATH)
# resolve symlinks.
set (resolved_prerequisites)
foreach(link ${prerequisites})
if (NOT link MATCHES ".*fontconfig.*")
get_filename_component(resolved_link "${link}" REALPATH)
if(NOT resolved_link MATCHES "^${resolved_deproot}/")
continue()
endif()
if (IS_SYMLINK ${link})
# now link may not directly point to resolved_link.
# so we install the resolved link as the link.
get_filename_component(resolved_name "${link}" NAME)
file(INSTALL
DESTINATION "${target_root}"
TYPE PROGRAM
RENAME "${resolved_name}"
FILES "${resolved_link}")
else ()
list(APPEND resolved_prerequisites ${resolved_link})
endif()
endif()
endforeach()
file(INSTALL ${resolved_prerequisites}
DESTINATION ${target_root}
USE_SOURCE_PERMISSIONS)
# script to "bundle" paraview.
include(paraview.bundle.common)
include(CPack)
# install all ParaView's shared libraries.
install(DIRECTORY "${install_location}/lib/paraview-${pv_version}"
DESTINATION "lib"
USE_SOURCE_PERMISSIONS
COMPONENT superbuild)
if (paraviewgettingstartedguide_ENABLED)
install(FILES ${paraviewgettingstartedguide_pdf}
DESTINATION "share/paraview-${pv_version}/doc"
COMPONENT superbuild)
endif()
if (paraviewusersguide_ENABLED)
install(FILES ${paraviewusersguide_pdf}
DESTINATION "share/paraview-${pv_version}/doc"
COMPONENT superbuild)
endif()
if (paraviewtutorial_ENABLED)
install(FILES ${paraviewtutorial_pdf}
DESTINATION "share/paraview-${pv_version}/doc"
COMPONENT superbuild)
endif()
if (paraviewtutorialdata_ENABLED)
install(DIRECTORY "${install_location}/data"
DESTINATION "share/paraview-${pv_version}"
USE_SOURCE_PERMISSIONS
COMPONENT superbuild)
endif()
# install python
if (python_ENABLED AND NOT USE_SYSTEM_python)
install(DIRECTORY "${install_location}/lib/python2.7"
DESTINATION "lib/paraview-${pv_version}/lib"
USE_SOURCE_PERMISSIONS
COMPONENT superbuild)
# install pyconfig.h
install (DIRECTORY "${install_location}/include/python2.7"
DESTINATION "lib/paraview-${pv_version}/include"
USE_SOURCE_PERMISSIONS
COMPONENT superbuild
PATTERN "pyconfig.h")
endif()
# install library dependencies for various executables.
# the dependencies are searched only under the <install_location> and hence
# system libraries are not packaged.
set (reference_executable pvserver)
if (python_ENABLED)
set (reference_executable pvbatch)
endif()
if (qt4_ENABLED OR qt5_ENABLED)
set (reference_executable paraview)
endif()
install(CODE
"execute_process(COMMAND
${CMAKE_COMMAND}
-Dexecutable:PATH=${install_location}/lib/paraview-${pv_version}/${reference_executable}
-Ddependencies_root:PATH=${install_location}
-Dtarget_root:PATH=\${CMAKE_INSTALL_PREFIX}/lib/paraview-${pv_version}
-Dpv_version:STRING=${pv_version}
-P ${CMAKE_CURRENT_LIST_DIR}/install_dependencies.cmake)"
COMPONENT superbuild)
# simply other miscellaneous dependencies.
if ((qt4_ENABLED AND NOT USE_SYSTEM_qt4) OR (qt5_ENABLED AND NOT USE_SYSTEM_qt))
install(DIRECTORY
# install all qt plugins (including sqllite).
# FIXME: we can reconfigure Qt to be built with inbuilt sqllite support to
# avoid the need for plugins.
"${install_location}/plugins/"
DESTINATION "lib/paraview-${pv_version}"
COMPONENT superbuild
PATTERN "*.a" EXCLUDE
PATTERN "paraview-${pv_version}" EXCLUDE
PATTERN "fontconfig" EXCLUDE
PATTERN "*.jar" EXCLUDE
PATTERN "*.debug.*" EXCLUDE
PATTERN "libboost*" EXCLUDE)
endif()
# install executables
set (executables pvserver pvdataserver pvrenderserver)
if (python_ENABLED)
set (executables ${executables} pvbatch pvpython)
# we are not building pvblot for now. Disable it.
# set (executables ${executables} pvblot)
endif()
if (qt4_ENABLED OR qt5_ENABLED)
set (executables ${executables} paraview)
endif()
foreach(executable ${executables})
install(PROGRAMS "${install_location}/bin/${executable}"
DESTINATION "bin"
COMPONENT superbuild)
endforeach()
if (mpi_ENABLED AND NOT USE_SYSTEM_mpi)
install(PROGRAMS "${install_location}/bin/mpiexec.hydra"
DESTINATION "lib/paraview-${pv_version}"
COMPONENT superbuild
RENAME "mpiexec")
foreach (hydra_exe hydra_nameserver hydra_persist hydra_pmi_proxy)
install(PROGRAMS "${install_location}/bin/${hydra_exe}"
DESTINATION "lib/paraview-${pv_version}"
COMPONENT superbuild)
endforeach()
endif()
if (qt4_ENABLED OR qt5_ENABLED)
install(DIRECTORY "${install_location}/share/appdata"
DESTINATION "share"
USE_SOURCE_PERMISSIONS
COMPONENT superbuild)
install(DIRECTORY "${install_location}/share/applications"
DESTINATION "share"
USE_SOURCE_PERMISSIONS
COMPONENT superbuild)
install(DIRECTORY "${install_location}/share/icons"
DESTINATION "share"
USE_SOURCE_PERMISSIONS
COMPONENT superbuild)
endif ()
if (ospray_ENABLED)
install(DIRECTORY "${install_location}/lib/"
DESTINATION "lib/paraview-${pv_version}"
FILES_MATCHING PATTERN "libospray*")
endif()
# For linux, we optionally support bundling pre-built mesa binaries.
option(BUNDLE_PREBUILT_MESA_BINARIES
"Enable to package prebuilt mesa binaries" OFF)
mark_as_advanced(BUNDLE_PREBUILT_MESA_BINARIES)
function(download_if_not_present url dest)
if(NOT EXISTS "${dest}")
file(DOWNLOAD "${url}" "${dest}" SHOW_PROGRESS)
endif()
endfunction()
if (BUNDLE_PREBUILT_MESA_BINARIES)
file(MAKE_DIRECTORY "${SuperBuild_BINARY_DIR}/mesa-downloads")
download_if_not_present(
"http://www.paraview.org/files/dependencies/mesa-llvm.tar.gz"
"${SuperBuild_BINARY_DIR}/mesa-downloads/mesa-llvm.tar.gz")
download_if_not_present(
"http://www.paraview.org/files/dependencies/mesa-swr-avx.tar.gz"
"${SuperBuild_BINARY_DIR}/mesa-downloads/mesa-swr-avx.tar.gz")
download_if_not_present(
"http://www.paraview.org/files/dependencies/mesa-swr-avx2.tar.gz"
"${SuperBuild_BINARY_DIR}/mesa-downloads/mesa-swr-avx2.tar.gz")
execute_process(
COMMAND ${CMAKE_COMMAND} -E tar xzf mesa-llvm.tar.gz
COMMAND ${CMAKE_COMMAND} -E tar xzf mesa-swr-avx.tar.gz
COMMAND ${CMAKE_COMMAND} -E tar xzf mesa-swr-avx2.tar.gz
WORKING_DIRECTORY ${SuperBuild_BINARY_DIR}/mesa-downloads)
install(DIRECTORY ${SuperBuild_BINARY_DIR}/mesa-downloads/
DESTINATION "lib/paraview-${pv_version}"
PATTERN "*.tar.gz" EXCLUDE)
endif()
add_test(NAME GenerateParaViewPackage
COMMAND ${CMAKE_CPACK_COMMAND} -G TGZ -V
WORKING_DIRECTORY ${SuperBuild_BINARY_DIR})
set_tests_properties(GenerateParaViewPackage PROPERTIES
# needed so that tests are run on typical paraview
# dashboards
LABELS "PARAVIEW"
TIMEOUT 3600) # increase timeout to 60 mins.
# script to "bundle" paraview.
#------------------------------------------------------------------------------
# include common stuff.
include(paraview.bundle.common)
# set NSIS install specific stuff.
# URL to website providing assistance in installing your application.
set (CPACK_NSIS_HELP_LINK "http://paraview.org/Wiki/ParaView")
set (CPACK_NSIS_MENU_LINKS
"bin/paraview.exe" "ParaView ${pv_version_long}"
"bin/pvserver.exe" "pvserver ${pv_version_long} (Server)"
"bin/pvdataserver.exe" "pvdataserver ${pv_version_long} (Data-Server)"
"bin/pvrenderserver.exe" "pvrenderserver ${pv_version_long} (Render-Server)")
if (python_ENABLED)
set (CPACK_NSIS_MENU_LINKS ${CPACK_NSIS_MENU_LINKS}
"bin/pvpython.exe" "pvpython ${pv_version_long} (Python Shell)")
endif()
if (paraviewgettingstartedguide_ENABLED)
list(APPEND CPACK_NSIS_MENU_LINKS
"doc/GettingStarted.pdf" "ParaView Getting Started Guide ${pv_version_long}")
install(FILES ${paraviewgettingstartedguide_pdf} DESTINATION "doc" COMPONENT ParaView)
endif()
if (paraviewusersguide_ENABLED)
list(APPEND CPACK_NSIS_MENU_LINKS
"doc/Guide.pdf" "ParaView Guide (CE) ${pv_version_long}")
install(FILES ${paraviewusersguide_pdf} DESTINATION "doc" COMPONENT ParaView)
endif()
if (paraviewtutorial_ENABLED)
list(APPEND CPACK_NSIS_MENU_LINKS
"doc/Tutorial.pdf" "ParaView Tutorial ${pv_version_long}")
install(FILES ${paraviewtutorial_pdf} DESTINATION "doc" COMPONENT ParaView)
endif()
if (paraviewtutorialdata_ENABLED)
install(DIRECTORY "${install_location}/data/"
DESTINATION "data"
COMPONENT "ParaView")
endif()
#FIXME: need a pretty icon.
#set (CPACK_NSIS_MUI_ICON "${CMAKE_CURRENT_LIST_DIR}/paraview.ico")
#set (CPACK_NSIS_MUI_FINISHPAGE_RUN "bin/paraview.exe")
#------------------------------------------------------------------------------
# install paraview executables to bin.
foreach(executable
paraview pvdataserver pvrenderserver pvserver)
install(PROGRAMS "${install_location}/bin/${executable}.exe"
DESTINATION "bin"
COMPONENT ParaView)
endforeach()
if (python_ENABLED)
foreach(executable
pvbatch pvpython)
install(PROGRAMS "${install_location}/bin/${executable}.exe"
DESTINATION "bin"
COMPONENT ParaView)
endforeach()
endif()
# install all dlls to bin. This will install all VTK/ParaView dlls plus any
# other tool dlls that were placed in bin.
install(DIRECTORY "${install_location}/bin/"
DESTINATION "bin"
USE_SOURCE_PERMISSIONS
COMPONENT ParaView
FILES_MATCHING PATTERN "*.dll")
# install the .plugins file
install(FILES "${install_location}/bin/.plugins"
DESTINATION "bin"
COMPONENT ParaView)
# install python since (since python dlls are not in the install location)
if (python_ENABLED AND NOT USE_SYSTEM_python)
# install the Python's modules.
install(DIRECTORY "${install_location}/bin/Lib"
DESTINATION "bin"
USE_SOURCE_PERMISSIONS
COMPONENT ParaView)
# install python dlls.
install(DIRECTORY "${install_location}/bin/"
DESTINATION "bin"
USE_SOURCE_PERMISSIONS