Commit f944df18 authored by Utkarsh Ayachit's avatar Utkarsh Ayachit

Handle changes in paraview!2023.

ParaView changed where its libraries and Python packages are installed.
Update superbuild to use the new locations.
parent ed65d41e
......@@ -2,7 +2,7 @@ include(paraview-version)
set(paraview_doc_dir "share/paraview-${paraview_version}/doc")
set(paraview_data_dir "share/paraview-${paraview_version}/data")
set(paraview_plugin_path "lib/paraview-${paraview_version}")
set(paraview_plugin_path "lib")
set(CPACK_PACKAGE_NAME "ParaView-Catalyst-${PARAVIEW_CATALYST_EDITION}")
include(paraview.bundle.common)
......
......@@ -2,7 +2,7 @@ include(paraview-version)
set(paraview_doc_dir "share/paraview-${paraview_version}/doc")
set(paraview_data_dir "share/paraview-${paraview_version}/data")
set(paraview_plugin_path "lib/paraview-${paraview_version}")
set(paraview_plugin_path "lib")
include(paraview.bundle.common)
set(paraview_component ParaView)
......@@ -28,7 +28,7 @@ endif ()
if (paraviewweb_enabled)
install(
FILES "${superbuild_install_location}/lib/paraview-${paraview_version}/site-packages/paraview/web/defaultProxies.json"
FILES "${superbuild_install_location}/lib/python2.7/site-packages/paraview/web/defaultProxies.json"
DESTINATION "lib/python2.7/site-packages/paraview/web"
COMPONENT "${paraview_component}")
install(
......
set(library_paths
"${superbuild_install_location}/lib"
"${superbuild_install_location}/lib/paraview-${paraview_version}")
"${superbuild_install_location}/lib")
if (Qt5_DIR)
list(APPEND library_paths
......@@ -24,7 +23,7 @@ endif ()
foreach (executable IN LISTS paraview_executables)
superbuild_unix_install_program_fwd("${executable}"
"lib/paraview-${paraview_version}"
"lib"
SEARCH_DIRECTORIES "${library_paths}"
INCLUDE_REGEXES ${include_regexes}
EXCLUDE_REGEXES ${exclude_regexes})
......@@ -32,12 +31,12 @@ endforeach ()
foreach (paraview_plugin IN LISTS paraview_plugins)
superbuild_unix_install_plugin("lib${paraview_plugin}.so"
"lib/paraview-${paraview_version}"
"lib/paraview-${paraview_version}"
"lib"
"lib"
LOADER_PATHS "${library_paths}"
INCLUDE_REGEXES ${include_regexes}
EXCLUDE_REGEXES ${exclude_regexes}
LOCATION "lib/paraview-${paraview_version}/plugins/${paraview_plugin}/")
LOCATION "lib/plugins/${paraview_plugin}/")
endforeach ()
set(plugins_file "${CMAKE_CURRENT_BINARY_DIR}/paraview.plugins")
......@@ -45,7 +44,7 @@ paraview_add_plugin("${plugins_file}" ${paraview_plugins})
install(
FILES "${plugins_file}"
DESTINATION "lib/paraview-${paraview_version}"
DESTINATION "lib"
COMPONENT superbuild
RENAME ".plugins")
......@@ -62,10 +61,10 @@ if (mesa_libraries)
foreach (lib_filename IN LISTS lib_filenames)
superbuild_unix_install_plugin("${lib_filename}"
"lib/paraview-${paraview_version}${suffix}"
"lib${suffix}"
"lib"
LOADER_PATHS "${library_paths}"
LOCATION "lib/paraview-${paraview_version}${suffix}")
LOCATION "lib${suffix}")
endforeach ()
endforeach ()
endif ()
......@@ -73,27 +72,16 @@ endif ()
if (python_enabled)
include(python.functions)
superbuild_install_superbuild_python(
LIBSUFFIX "/paraview-${paraview_version}")
LIBSUFFIX "/python2.7")
superbuild_unix_install_python(
LIBDIR "lib/paraview-${paraview_version}"
LIBDIR "lib"
MODULES paraview
vtk
${python_modules}
INCLUDE_REGEXES ${include_regexes}
EXCLUDE_REGEXES ${exclude_regexes}
MODULE_DIRECTORIES "${superbuild_install_location}/lib/python2.7/site-packages"
"${superbuild_install_location}/lib/paraview-${paraview_version}/site-packages"
LOADER_PATHS "${library_paths}")
superbuild_unix_install_python(
MODULE_DESTINATION "/site-packages/paraview"
LIBDIR "lib/paraview-${paraview_version}"
MODULES vtk
INCLUDE_REGEXES ${include_regexes}
EXCLUDE_REGEXES ${exclude_regexes}
MODULE_DIRECTORIES "${superbuild_install_location}/lib/python2.7/site-packages"
"${superbuild_install_location}/lib/paraview-${paraview_version}/site-packages"
LOADER_PATHS "${library_paths}")
if (matplotlib_built_by_superbuild)
......@@ -102,23 +90,6 @@ if (python_enabled)
DESTINATION "lib/python2.7/site-packages/matplotlib/mpl-data"
COMPONENT superbuild)
endif ()
if (NOT python_built_by_superbuild)
install(CODE
"execute_process(
COMMAND \"${CMAKE_COMMAND}\" -E create_symlink
../python2.7/site-packages
\$ENV{DESTDIR}\${CMAKE_INSTALL_PREFIX}/lib/paraview-${paraview_version}/site-packages
ERROR_VARIABLE out
OUTPUT_VARIABLE out
RESULT_VARIABLE res)
if (res)
message(FATAL_ERROR
\"Failed to create the site-packages symlink: \${out}\")
endif ()"
COMPONENT superbuild)
endif ()
endif ()
if (mpi_built_by_superbuild)
......@@ -135,8 +106,8 @@ if (mpi_built_by_superbuild)
endforeach ()
foreach (mpi_executable IN LISTS mpi_executables_standalone mpi_executables_paraview)
superbuild_unix_install_plugin("${superbuild_install_location}/bin/${mpi_executable}"
"lib/paraview-${paraview_version}"
"lib/paraview-${paraview_version}")
"lib"
"lib")
endforeach ()
endif ()
......@@ -144,7 +115,7 @@ if (qt5_enabled)
file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/qt.conf" "")
install(
FILES "${CMAKE_CURRENT_BINARY_DIR}/qt.conf"
DESTINATION "lib/paraview-${paraview_version}"
DESTINATION "lib"
COMPONENT superbuild)
endif ()
......@@ -153,8 +124,8 @@ foreach (qt5_plugin_path IN LISTS qt5_plugin_paths)
get_filename_component(qt5_plugin_group "${qt5_plugin_group}" NAME)
superbuild_unix_install_plugin("${qt5_plugin_path}"
"lib/paraview-${paraview_version}"
"lib/paraview-${paraview_version}/plugins/${qt5_plugin_group}/"
"lib"
"lib/plugins/${qt5_plugin_group}/"
LOADER_PATHS "${library_paths}"
INCLUDE_REGEXES ${include_regexes}
EXCLUDE_REGEXES ${exclude_regexes})
......
include(paraview-version)
set(CPACK_PACKAGE_NAME "ParaViewSDK")
set(package_filename "${PARAVIEWSDK_PACKAGE_FILE_NAME}")
set(paraview_plugin_path "lib/paraview-${paraview_version}")
set(paraview_plugin_path "lib")
include(paraview.bundle.common)
set(plugins_file "${CMAKE_CURRENT_BINARY_DIR}/paraview.plugins")
......@@ -9,17 +9,17 @@ paraview_add_plugin("${plugins_file}" ${paraview_plugins})
foreach (paraview_plugin IN LISTS paraview_plugins)
superbuild_unix_install_plugin("lib${paraview_plugin}.so"
"lib/paraview-${paraview_version}"
"lib/paraview-${paraview_version}"
"lib"
"lib"
LOADER_PATHS "${library_paths}"
INCLUDE_REGEXES "${superbuild_install_location}"
EXCLUDE_REGEXES ".*"
LOCATION "lib/paraview-${paraview_version}/plugins/${paraview_plugin}/")
LOCATION "lib/plugins/${paraview_plugin}/")
endforeach ()
install(
FILES "${plugins_file}"
DESTINATION "lib/paraview-${paraview_version}"
DESTINATION "lib"
COMPONENT superbuild
RENAME ".plugins")
......@@ -43,13 +43,13 @@ set(binaries_to_install)
foreach (paraview_executable IN LISTS paraview_executables)
list(APPEND binaries_to_install
"${superbuild_install_location}/bin/${paraview_executable}"
"${superbuild_install_location}/lib/paraview-${paraview_version}/${paraview_executable}")
"${superbuild_install_location}/lib/${paraview_executable}")
endforeach ()
if (python_enabled)
# Install ParaView Python libraries
# Install ParaView Python libraries and any non-ParaView Python libraries.
install(
DIRECTORY "${superbuild_install_location}/lib/paraview-${paraview_version}/site-packages"
DIRECTORY "${superbuild_install_location}/lib/python2.7"
DESTINATION "lib/python2.7"
COMPONENT superbuild
USE_SOURCE_PERMISSIONS
......@@ -57,18 +57,6 @@ if (python_enabled)
PATTERN "*.pyo" EXCLUDE
PATTERN "*.pyc" EXCLUDE)
# Install any non-ParaView Python libraries
if (EXISTS "${superbuild_install_location}/lib/python2.7")
install(
DIRECTORY "${superbuild_install_location}/lib/python2.7"
DESTINATION lib
COMPONENT superbuild
USE_SOURCE_PERMISSIONS
PATTERN "__pycache__" EXCLUDE
PATTERN "*.pyo" EXCLUDE
PATTERN "*.pyc" EXCLUDE)
endif ()
# Install python binaries and symlinks
if (python_built_by_superbuild)
install(
......@@ -113,7 +101,7 @@ list(REMOVE_DUPLICATES libraries_referenced_by_cmake)
if (python_enabled)
# Now grab extra python SOs
file(GLOB_RECURSE paraview_python_modules
"${real_superbuild_install_location}/lib/paraview-${paraview_version}/site-packages/*${CMAKE_SHARED_MODULE_SUFFIX}")
"${real_superbuild_install_location}/lib/python2.7/site-packages/*${CMAKE_SHARED_MODULE_SUFFIX}")
file(GLOB_RECURSE python_modules
"${real_superbuild_install_location}/lib/python2.7/*${CMAKE_SHARED_MODULE_SUFFIX}")
else ()
......@@ -167,9 +155,6 @@ function (_install_superbuild_file type fname)
get_filename_component(fname_dir "${fname}" DIRECTORY)
get_filename_component(fname_inst "${fname_dir}" REALPATH)
string(REPLACE "${real_superbuild_install_location}/" "" fname_inst "${fname_inst}")
string(REPLACE
"lib/paraview-${paraview_version}/site-packages" "lib/python2.7/site-packages"
fname_inst "${fname_inst}")
install(
"${type}" "${fname}"
DESTINATION "${fname_inst}"
......@@ -187,7 +172,6 @@ endfunction ()
include(GetPrerequisites)
set(all_binaries)
set(dependency_search_paths
"${real_superbuild_install_location}/lib/paraview-${paraview_version}"
"${real_superbuild_install_location}/lib"
"${real_superbuild_install_location}/lib/python2.7"
"${real_superbuild_install_location}/lib/python2.7/site-packages"
......@@ -275,21 +259,3 @@ endforeach ()
foreach (fname IN LISTS all_binaries)
install_superbuild_binary("${fname}")
endforeach ()
# Add some leftover python symlinks
if (python_enabled AND NOT python_built_by_superbuild)
install(CODE
"execute_process(
COMMAND \"${CMAKE_COMMAND}\" -E create_symlink
../python2.7/site-packages
\$ENV{DESTDIR}\${CMAKE_INSTALL_PREFIX}/lib/paraview-${paraview_version}/site-packages
ERROR_VARIABLE out
OUTPUT_VARIABLE out
RESULT_VARIABLE res)
if (res)
message(FATAL_ERROR
\"Failed to create the site-packages symlink: \${out}\")
endif ()"
COMPONENT superbuild)
endif ()
......@@ -64,7 +64,7 @@ if (python_enabled)
${python_modules}
MODULE_DIRECTORIES "${superbuild_install_location}/bin/Lib/site-packages"
"${superbuild_install_location}/lib/site-packages"
"${superbuild_install_location}/lib/paraview-${paraview_version}/site-packages"
"${superbuild_install_location}/lib/python2.7/site-packages"
SEARCH_DIRECTORIES "lib")
if (matplotlib_enabled)
......@@ -80,7 +80,7 @@ if (python_enabled)
MODULE_DIRECTORIES
"${superbuild_install_location}/bin/Lib/site-packages"
"${superbuild_install_location}/lib/site-packages"
"${superbuild_install_location}/lib/paraview-${paraview_version}/site-packages"
"${superbuild_install_location}/lib/python2.7/site-packages"
SEARCH_DIRECTORIES "lib")
endif ()
......@@ -96,7 +96,7 @@ if (paraviewweb_enabled)
COMPONENT "superbuild")
install(
FILES "${superbuild_install_location}/lib/paraview-${paraview_version}/site-packages/paraview/web/defaultProxies.json"
FILES "${superbuild_install_location}/bin/Lib/site-packages/paraview/web/defaultProxies.json"
DESTINATION "bin/Lib/site-packages/paraview/web"
COMPONENT "superbuild")
install(
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment