2023-01-20 09:55:56 +08:00
|
|
|
set(VERSION_MAJOR_MINOR 5.11)
|
2023-01-27 11:19:30 +08:00
|
|
|
|
|
|
|
set(plat_feat "")
|
|
|
|
if(VCPKG_TARGET_IS_LINUX)
|
|
|
|
set(plat_feat "tools" VTK_USE_X) # required to build the client
|
|
|
|
endif()
|
|
|
|
if(VCPKG_TARGET_IS_LINUX)
|
|
|
|
set(plat_feat "tools" VTK_USE_COCOA) # required to build the client
|
|
|
|
endif()
|
|
|
|
|
2023-01-20 09:55:56 +08:00
|
|
|
vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS FEATURES
|
2020-07-09 06:34:35 +08:00
|
|
|
"cuda" PARAVIEW_USE_CUDA #untested; probably only affects internal VTK build so it does nothing here
|
2020-06-24 01:20:18 +08:00
|
|
|
"all_modules" PARAVIEW_BUILD_ALL_MODULES #untested
|
|
|
|
"mpi" PARAVIEW_USE_MPI #untested
|
|
|
|
"vtkm" PARAVIEW_USE_VTKM
|
|
|
|
"python" PARAVIEW_USE_PYTHON
|
2020-06-30 14:31:08 +08:00
|
|
|
"tools" PARAVIEW_BUILD_TOOLS
|
2023-01-27 11:19:30 +08:00
|
|
|
${plat_feat}
|
2020-06-24 01:20:18 +08:00
|
|
|
)
|
|
|
|
|
|
|
|
vcpkg_from_github(
|
|
|
|
OUT_SOURCE_PATH SOURCE_PATH
|
|
|
|
REPO Kitware/ParaView
|
2023-01-20 09:55:56 +08:00
|
|
|
REF 91aaf338c62f77fccd7d197dea05e7a68035ab25 # v5.11.0
|
|
|
|
SHA512 ddd72b127462a37dba220808925ab1991b3072ddd3f39ba7f26d260bd5abbaa6bd38a0c0181141f461df60dd718ec85df8c0faffff8e53a6cd1737b784565f4b
|
2020-06-24 01:20:18 +08:00
|
|
|
HEAD_REF master
|
|
|
|
PATCHES
|
2021-08-31 01:03:01 +08:00
|
|
|
external_vtk.patch
|
2020-06-24 01:20:18 +08:00
|
|
|
python_include.patch
|
|
|
|
python_wrapper.patch
|
2020-06-30 14:31:08 +08:00
|
|
|
add-tools-option.patch
|
2023-01-27 11:19:30 +08:00
|
|
|
qt6-all.patch
|
2020-06-24 01:20:18 +08:00
|
|
|
)
|
|
|
|
|
|
|
|
if(VCPKG_LIBRARY_LINKAGE STREQUAL "static")
|
|
|
|
list(APPEND VisItPatches removedoublesymbols.patch)
|
|
|
|
endif()
|
|
|
|
|
2020-07-09 06:34:35 +08:00
|
|
|
#The following two dependencies should probably be their own port
|
|
|
|
#but require additional patching in paraview to make it work.
|
2020-06-24 01:20:18 +08:00
|
|
|
|
|
|
|
#Get VisItBridge Plugin
|
|
|
|
vcpkg_from_gitlab(
|
|
|
|
OUT_SOURCE_PATH VISITIT_SOURCE_PATH
|
|
|
|
GITLAB_URL https://gitlab.kitware.com/
|
|
|
|
REPO paraview/visitbridge
|
2023-01-20 09:55:56 +08:00
|
|
|
REF df098f4148a96d62c388861c1d476039e02224ae
|
|
|
|
SHA512 002c2c934ef7e64c89b1567f406db1ebb90532817062e7016c248ba8ae85a88f1a35bc3963a9577ec08ba742a0e7fb91022c29aaaa0bddf0a1d585074341733e
|
2020-07-09 06:34:35 +08:00
|
|
|
PATCHES
|
2020-06-24 01:20:18 +08:00
|
|
|
${VisItPatches}
|
|
|
|
)
|
2023-01-20 09:55:56 +08:00
|
|
|
#VTK_MODULE_USE_EXTERNAL_ParaView_protobuf
|
|
|
|
#NVPipe?
|
2020-06-24 01:20:18 +08:00
|
|
|
#Get QtTesting Plugin
|
|
|
|
vcpkg_from_gitlab(
|
|
|
|
OUT_SOURCE_PATH QTTESTING_SOURCE_PATH
|
|
|
|
GITLAB_URL https://gitlab.kitware.com/
|
|
|
|
REPO paraview/qttesting
|
2023-01-20 09:55:56 +08:00
|
|
|
REF 08d96e9277bc4c26804fd77ce1b4fa5c791605ae # https://gitlab.kitware.com/paraview/qttesting/-/merge_requests/53 for Qt6
|
|
|
|
SHA512 cb4acdfe1206bd8bae4f70185c8ca1ce555cf983a1d1e97293dac544ab13b039638bfe0d1e448f9589db92b6ed23b9b940157e72d9ec9e3994ea9858ab1722ec
|
2023-01-27 11:19:30 +08:00
|
|
|
PATCHES 53.diff
|
2020-06-24 01:20:18 +08:00
|
|
|
)
|
|
|
|
|
2021-08-31 01:03:01 +08:00
|
|
|
vcpkg_from_gitlab(
|
2023-01-20 09:55:56 +08:00
|
|
|
OUT_SOURCE_PATH ICET_SOURCE_PATH
|
2021-08-31 01:03:01 +08:00
|
|
|
GITLAB_URL https://gitlab.kitware.com/
|
2023-01-20 09:55:56 +08:00
|
|
|
REPO paraview/IceT
|
|
|
|
REF 32816fe5592de3be664da6f8466a546f221d8532
|
|
|
|
SHA512 33d5e8f2ecdc20d305d04c23fc3a3121d3c5305ddff7f5b71cee1a2c2183c4b36c9d0bd91e9dba5f2369e237782d7dbcf635d2e1814ccde88570647c890edc9d
|
2021-08-31 01:03:01 +08:00
|
|
|
)
|
|
|
|
|
2022-05-24 23:41:00 +08:00
|
|
|
file(COPY "${VISITIT_SOURCE_PATH}/" DESTINATION "${SOURCE_PATH}/Utilities/VisItBridge")
|
|
|
|
file(COPY "${QTTESTING_SOURCE_PATH}/" DESTINATION "${SOURCE_PATH}/ThirdParty/QtTesting/vtkqttesting")
|
2023-01-20 09:55:56 +08:00
|
|
|
file(COPY "${ICET_SOURCE_PATH}/" DESTINATION "${SOURCE_PATH}/ThirdParty/IceT/vtkicet")
|
2020-06-24 01:20:18 +08:00
|
|
|
|
|
|
|
if("python" IN_LIST FEATURES)
|
2023-01-20 09:55:56 +08:00
|
|
|
set(python_ver "")
|
|
|
|
if(NOT VCPKG_TARGET_IS_WINDOWS)
|
2023-08-08 04:19:53 +08:00
|
|
|
file(GLOB _py3_include_path "${CURRENT_HOST_INSTALLED_DIR}/include/python3*")
|
|
|
|
string(REGEX MATCH "python3\\.([0-9]+)" _python_version_tmp ${_py3_include_path})
|
|
|
|
set(PYTHON_VERSION_MINOR "${CMAKE_MATCH_1}")
|
|
|
|
set(python_ver "3.${PYTHON_VERSION_MINOR}")
|
2023-01-20 09:55:56 +08:00
|
|
|
endif()
|
2020-06-24 01:20:18 +08:00
|
|
|
list(APPEND ADDITIONAL_OPTIONS
|
|
|
|
-DPython3_FIND_REGISTRY=NEVER
|
2023-01-20 09:55:56 +08:00
|
|
|
"-DPython3_EXECUTABLE:PATH=${CURRENT_HOST_INSTALLED_DIR}/tools/python3/python${python_ver}${VCPKG_EXECUTABLE_SUFFIX}"
|
2020-06-24 01:20:18 +08:00
|
|
|
)
|
|
|
|
#VTK_PYTHON_SITE_PACKAGES_SUFFIX should be set to the install dir of the site-packages
|
|
|
|
endif()
|
|
|
|
|
2022-05-24 23:41:00 +08:00
|
|
|
vcpkg_cmake_configure(
|
|
|
|
SOURCE_PATH "${SOURCE_PATH}"
|
2020-06-24 01:20:18 +08:00
|
|
|
OPTIONS ${FEATURE_OPTIONS}
|
2023-01-20 09:55:56 +08:00
|
|
|
-DPARAVIEW_PLUGIN_DISABLE_XML_DOCUMENTATION:BOOL=ON
|
2020-06-24 01:20:18 +08:00
|
|
|
-DPARAVIEW_BUILD_WITH_EXTERNAL:BOOL=ON
|
|
|
|
-DPARAVIEW_USE_EXTERNAL_VTK:BOOL=ON
|
|
|
|
-DPARAVIEW_ENABLE_VISITBRIDGE:BOOL=ON
|
|
|
|
-DVTK_MODULE_ENABLE_ParaView_qttesting=YES
|
|
|
|
-DPARAVIEW_ENABLE_EMBEDDED_DOCUMENTATION:BOOL=OFF
|
|
|
|
-DPARAVIEW_USE_QTHELP:BOOL=OFF
|
2023-01-20 09:55:56 +08:00
|
|
|
# A little bit of help in finding the boost headers
|
2020-06-24 01:20:18 +08:00
|
|
|
"-DBoost_INCLUDE_DIR:PATH=${CURRENT_INSTALLED_DIR}/include"
|
2020-08-02 04:48:24 +08:00
|
|
|
|
2020-06-24 01:20:18 +08:00
|
|
|
# Workarounds for CMake issues
|
|
|
|
-DHAVE_SYS_TYPES_H=0 ## For some strange reason the test first succeeds and then fails the second time around
|
2020-07-09 06:34:35 +08:00
|
|
|
-DWORDS_BIGENDIAN=0 ## Tests fails in VisItCommon.cmake for some unknown reason this is just a workaround since most systems are little endian.
|
2020-06-24 01:20:18 +08:00
|
|
|
${ADDITIONAL_OPTIONS}
|
2020-08-02 04:48:24 +08:00
|
|
|
|
2020-06-24 01:20:18 +08:00
|
|
|
#-DPARAVIEW_ENABLE_FFMPEG:BOOL=OFF
|
2024-03-14 06:41:56 +08:00
|
|
|
-DCMAKE_DISABLE_FIND_PACKAGE_Graphviz=ON
|
2020-06-24 01:20:18 +08:00
|
|
|
)
|
|
|
|
if(CMAKE_HOST_UNIX)
|
|
|
|
# ParaView runs Qt tools so LD_LIBRARY_PATH must be set correctly for them to find *.so files
|
|
|
|
set(BACKUP_LD_LIBRARY_PATH $ENV{LD_LIBRARY_PATH})
|
|
|
|
set(ENV{LD_LIBRARY_PATH} "${BACKUP_LD_LIBRARY_PATH}:${CURRENT_INSTALLED_DIR}/lib")
|
|
|
|
endif()
|
|
|
|
|
2022-05-24 23:41:00 +08:00
|
|
|
vcpkg_cmake_install(ADD_BIN_TO_PATH) # Bin to path required since paraview will use some self build tools
|
2020-06-24 01:20:18 +08:00
|
|
|
|
|
|
|
if(CMAKE_HOST_UNIX)
|
|
|
|
set(ENV{LD_LIBRARY_PATH} "${BACKUP_LD_LIBRARY_PATH}")
|
|
|
|
endif()
|
|
|
|
|
2023-01-20 09:55:56 +08:00
|
|
|
vcpkg_cmake_config_fixup(CONFIG_PATH lib/cmake/paraview-${VERSION_MAJOR_MINOR})
|
2020-06-24 01:20:18 +08:00
|
|
|
|
2022-05-24 23:41:00 +08:00
|
|
|
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
|
|
|
|
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share")
|
2020-06-24 01:20:18 +08:00
|
|
|
|
2022-04-01 01:55:31 +08:00
|
|
|
# see https://gitlab.kitware.com/paraview/paraview/-/issues/21328
|
2023-01-20 09:55:56 +08:00
|
|
|
file(REMOVE "${CURRENT_PACKAGES_DIR}/include/paraview-${VERSION_MAJOR_MINOR}/vtkCPConfig.h")
|
2022-04-01 01:55:31 +08:00
|
|
|
|
2023-01-20 09:55:56 +08:00
|
|
|
set(TOOLVER pv${VERSION_MAJOR_MINOR})
|
2020-06-24 01:20:18 +08:00
|
|
|
set(TOOLS paraview
|
|
|
|
pvbatch
|
|
|
|
pvdataserver
|
|
|
|
pvpython
|
|
|
|
pvrenderserver
|
|
|
|
pvserver
|
|
|
|
smTestDriver
|
|
|
|
vtkProcessXML
|
|
|
|
vtkWrapClientServer)
|
2020-08-02 04:48:24 +08:00
|
|
|
|
2020-06-24 01:20:18 +08:00
|
|
|
foreach(tool ${TOOLS})
|
|
|
|
# Remove debug tools
|
|
|
|
set(filename ${CURRENT_PACKAGES_DIR}/debug/bin/${tool}${VCPKG_TARGET_EXECUTABLE_SUFFIX})
|
|
|
|
if(EXISTS ${filename})
|
2022-05-24 23:41:00 +08:00
|
|
|
file(REMOVE "${filename}")
|
2020-06-24 01:20:18 +08:00
|
|
|
endif()
|
|
|
|
set(filename ${CURRENT_PACKAGES_DIR}/debug/bin/${tool}-${TOOLVER}${VCPKG_TARGET_EXECUTABLE_SUFFIX})
|
|
|
|
if(EXISTS ${filename})
|
2022-05-24 23:41:00 +08:00
|
|
|
file(REMOVE "${filename}")
|
2020-06-24 01:20:18 +08:00
|
|
|
endif()
|
|
|
|
set(filename ${CURRENT_PACKAGES_DIR}/debug/bin/${tool}-${TOOLVER}d${VCPKG_TARGET_EXECUTABLE_SUFFIX})
|
|
|
|
if(EXISTS ${filename})
|
2022-05-24 23:41:00 +08:00
|
|
|
file(REMOVE "${filename}")
|
2020-06-24 01:20:18 +08:00
|
|
|
endif()
|
2020-07-09 06:34:35 +08:00
|
|
|
|
2020-06-24 01:20:18 +08:00
|
|
|
# Move release tools
|
|
|
|
set(filename ${CURRENT_PACKAGES_DIR}/bin/${tool}${VCPKG_TARGET_EXECUTABLE_SUFFIX})
|
|
|
|
if(EXISTS ${filename})
|
2022-05-24 23:41:00 +08:00
|
|
|
file(INSTALL "${filename}" DESTINATION "${CURRENT_PACKAGES_DIR}/tools/${PORT}")
|
|
|
|
file(REMOVE "${filename}")
|
2020-06-24 01:20:18 +08:00
|
|
|
endif()
|
|
|
|
set(filename ${CURRENT_PACKAGES_DIR}/bin/${tool}-${TOOLVER}${VCPKG_TARGET_EXECUTABLE_SUFFIX})
|
|
|
|
if(EXISTS ${filename})
|
2022-05-24 23:41:00 +08:00
|
|
|
file(INSTALL "${filename}" DESTINATION "${CURRENT_PACKAGES_DIR}/tools/${PORT}")
|
|
|
|
file(REMOVE "${filename}")
|
2020-06-24 01:20:18 +08:00
|
|
|
endif()
|
|
|
|
endforeach()
|
|
|
|
vcpkg_copy_tool_dependencies(${CURRENT_PACKAGES_DIR}/tools/${PORT})
|
|
|
|
|
|
|
|
# # Handle copyright
|
2022-05-24 23:41:00 +08:00
|
|
|
file(INSTALL "${SOURCE_PATH}/Copyright.txt" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME Copyright.txt) # Which one is the correct one?
|
|
|
|
file(INSTALL "${SOURCE_PATH}/License_v1.2.txt" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)
|
2020-06-24 01:20:18 +08:00
|
|
|
|
|
|
|
if(VCPKG_LIBRARY_LINKAGE STREQUAL "static")
|
|
|
|
macro(move_bin_to_lib name)
|
|
|
|
if(EXISTS ${CURRENT_PACKAGES_DIR}/bin/${name})
|
|
|
|
file(RENAME "${CURRENT_PACKAGES_DIR}/bin/${name}" "${CURRENT_PACKAGES_DIR}/lib/${name}")
|
|
|
|
endif()
|
|
|
|
if(EXISTS ${CURRENT_PACKAGES_DIR}/debug/bin/${name})
|
|
|
|
file(RENAME "${CURRENT_PACKAGES_DIR}/debug/bin/${name}" "${CURRENT_PACKAGES_DIR}/debug/lib/${name}")
|
|
|
|
endif()
|
|
|
|
endmacro()
|
2020-07-09 06:34:35 +08:00
|
|
|
|
2023-01-20 09:55:56 +08:00
|
|
|
set(to_move Lib paraview-${VERSION_MAJOR_MINOR} paraview-config)
|
2020-06-24 01:20:18 +08:00
|
|
|
foreach(name ${to_move})
|
|
|
|
move_bin_to_lib(${name})
|
|
|
|
endforeach()
|
|
|
|
|
|
|
|
file(GLOB_RECURSE cmake_files ${CURRENT_PACKAGES_DIR}/share/${PORT}/*.cmake)
|
|
|
|
foreach(cmake_file ${cmake_files})
|
|
|
|
file(READ "${cmake_file}" _contents)
|
|
|
|
STRING(REPLACE "bin/" "lib/" _contents "${_contents}")
|
|
|
|
file(WRITE "${cmake_file}" "${_contents}")
|
|
|
|
endforeach()
|
|
|
|
|
2022-05-24 23:41:00 +08:00
|
|
|
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/bin" "${CURRENT_PACKAGES_DIR}/debug/bin")
|
|
|
|
endif()
|
|
|
|
|
2023-09-07 04:00:25 +08:00
|
|
|
file(GLOB cmake_files "${CURRENT_PACKAGES_DIR}/share/${PORT}/*.cmake")
|
|
|
|
foreach(file IN LISTS cmake_files)
|
|
|
|
vcpkg_replace_string("${file}" "pv5.11d.exe" "pv5.11.exe")
|
|
|
|
endforeach()
|
|
|
|
|
2022-05-24 23:41:00 +08:00
|
|
|
# The plugins also work without these files
|
|
|
|
file(REMOVE "${CURRENT_PACKAGES_DIR}/Applications/paraview.app/Contents/Resources/paraview.conf")
|
|
|
|
file(REMOVE "${CURRENT_PACKAGES_DIR}/debug/Applications/paraview.app/Contents/Resources/paraview.conf")
|