mirror of
https://github.com/microsoft/vcpkg.git
synced 2025-01-19 02:13:03 +08:00
[paraview] no absolute paths (#24852)
* [paraview] no absolute paths * format portfile.cmake and remove version-semver * format vcpkg.json * x-add-version * update portfile.cmake * x-add-version * add license * update version Co-authored-by: Lily Wang <v-lilywang@microsoft.com>
This commit is contained in:
parent
2922c6f464
commit
334255ce9a
@ -1,5 +1,5 @@
|
|||||||
file(READ "${CMAKE_CURRENT_LIST_DIR}/vcpkg.json" _vcpkg_json)
|
file(READ "${CMAKE_CURRENT_LIST_DIR}/vcpkg.json" _vcpkg_json)
|
||||||
string(JSON _ver_string GET "${_vcpkg_json}" "version-semver")
|
string(JSON _ver_string GET "${_vcpkg_json}" "version")
|
||||||
string(REGEX MATCH "^[0-9]+\.[0-9]+" VERSION "${_ver_string}")
|
string(REGEX MATCH "^[0-9]+\.[0-9]+" VERSION "${_ver_string}")
|
||||||
|
|
||||||
vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS
|
vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS
|
||||||
@ -62,9 +62,9 @@ vcpkg_from_gitlab(
|
|||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
file(COPY ${VISITIT_SOURCE_PATH}/ DESTINATION ${SOURCE_PATH}/Utilities/VisItBridge)
|
file(COPY "${VISITIT_SOURCE_PATH}/" DESTINATION "${SOURCE_PATH}/Utilities/VisItBridge")
|
||||||
file(COPY ${QTTESTING_SOURCE_PATH}/ DESTINATION ${SOURCE_PATH}/ThirdParty/QtTesting/vtkqttesting)
|
file(COPY "${QTTESTING_SOURCE_PATH}/" DESTINATION "${SOURCE_PATH}/ThirdParty/QtTesting/vtkqttesting")
|
||||||
file(COPY ${CATALYST_SOURCE_PATH}/ DESTINATION ${SOURCE_PATH}/ThirdParty/catalyst/vtkcatalyst/catalyst)
|
file(COPY "${CATALYST_SOURCE_PATH}/" DESTINATION "${SOURCE_PATH}/ThirdParty/catalyst/vtkcatalyst/catalyst")
|
||||||
|
|
||||||
if("python" IN_LIST FEATURES)
|
if("python" IN_LIST FEATURES)
|
||||||
vcpkg_find_acquire_program(PYTHON3)
|
vcpkg_find_acquire_program(PYTHON3)
|
||||||
@ -75,9 +75,8 @@ if("python" IN_LIST FEATURES)
|
|||||||
#VTK_PYTHON_SITE_PACKAGES_SUFFIX should be set to the install dir of the site-packages
|
#VTK_PYTHON_SITE_PACKAGES_SUFFIX should be set to the install dir of the site-packages
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
vcpkg_configure_cmake(
|
vcpkg_cmake_configure(
|
||||||
SOURCE_PATH ${SOURCE_PATH}
|
SOURCE_PATH "${SOURCE_PATH}"
|
||||||
PREFER_NINJA # Disable this option if project cannot be built with Ninja
|
|
||||||
OPTIONS ${FEATURE_OPTIONS}
|
OPTIONS ${FEATURE_OPTIONS}
|
||||||
-DPARAVIEW_BUILD_WITH_EXTERNAL:BOOL=ON
|
-DPARAVIEW_BUILD_WITH_EXTERNAL:BOOL=ON
|
||||||
-DPARAVIEW_USE_EXTERNAL_VTK:BOOL=ON
|
-DPARAVIEW_USE_EXTERNAL_VTK:BOOL=ON
|
||||||
@ -102,16 +101,16 @@ if(CMAKE_HOST_UNIX)
|
|||||||
set(ENV{LD_LIBRARY_PATH} "${BACKUP_LD_LIBRARY_PATH}:${CURRENT_INSTALLED_DIR}/lib")
|
set(ENV{LD_LIBRARY_PATH} "${BACKUP_LD_LIBRARY_PATH}:${CURRENT_INSTALLED_DIR}/lib")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
vcpkg_install_cmake(ADD_BIN_TO_PATH) # Bin to path required since paraview will use some self build tools
|
vcpkg_cmake_install(ADD_BIN_TO_PATH) # Bin to path required since paraview will use some self build tools
|
||||||
|
|
||||||
if(CMAKE_HOST_UNIX)
|
if(CMAKE_HOST_UNIX)
|
||||||
set(ENV{LD_LIBRARY_PATH} "${BACKUP_LD_LIBRARY_PATH}")
|
set(ENV{LD_LIBRARY_PATH} "${BACKUP_LD_LIBRARY_PATH}")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/paraview-${VERSION})
|
vcpkg_cmake_config_fixup(CONFIG_PATH lib/cmake/paraview-${VERSION})
|
||||||
|
|
||||||
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
|
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
|
||||||
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share)
|
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share")
|
||||||
|
|
||||||
# see https://gitlab.kitware.com/paraview/paraview/-/issues/21328
|
# see https://gitlab.kitware.com/paraview/paraview/-/issues/21328
|
||||||
file(REMOVE "${CURRENT_PACKAGES_DIR}/include/paraview-${VERSION}/vtkCPConfig.h")
|
file(REMOVE "${CURRENT_PACKAGES_DIR}/include/paraview-${VERSION}/vtkCPConfig.h")
|
||||||
@ -131,34 +130,34 @@ foreach(tool ${TOOLS})
|
|||||||
# Remove debug tools
|
# Remove debug tools
|
||||||
set(filename ${CURRENT_PACKAGES_DIR}/debug/bin/${tool}${VCPKG_TARGET_EXECUTABLE_SUFFIX})
|
set(filename ${CURRENT_PACKAGES_DIR}/debug/bin/${tool}${VCPKG_TARGET_EXECUTABLE_SUFFIX})
|
||||||
if(EXISTS ${filename})
|
if(EXISTS ${filename})
|
||||||
file(REMOVE ${filename})
|
file(REMOVE "${filename}")
|
||||||
endif()
|
endif()
|
||||||
set(filename ${CURRENT_PACKAGES_DIR}/debug/bin/${tool}-${TOOLVER}${VCPKG_TARGET_EXECUTABLE_SUFFIX})
|
set(filename ${CURRENT_PACKAGES_DIR}/debug/bin/${tool}-${TOOLVER}${VCPKG_TARGET_EXECUTABLE_SUFFIX})
|
||||||
if(EXISTS ${filename})
|
if(EXISTS ${filename})
|
||||||
file(REMOVE ${filename})
|
file(REMOVE "${filename}")
|
||||||
endif()
|
endif()
|
||||||
set(filename ${CURRENT_PACKAGES_DIR}/debug/bin/${tool}-${TOOLVER}d${VCPKG_TARGET_EXECUTABLE_SUFFIX})
|
set(filename ${CURRENT_PACKAGES_DIR}/debug/bin/${tool}-${TOOLVER}d${VCPKG_TARGET_EXECUTABLE_SUFFIX})
|
||||||
if(EXISTS ${filename})
|
if(EXISTS ${filename})
|
||||||
file(REMOVE ${filename})
|
file(REMOVE "${filename}")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
# Move release tools
|
# Move release tools
|
||||||
set(filename ${CURRENT_PACKAGES_DIR}/bin/${tool}${VCPKG_TARGET_EXECUTABLE_SUFFIX})
|
set(filename ${CURRENT_PACKAGES_DIR}/bin/${tool}${VCPKG_TARGET_EXECUTABLE_SUFFIX})
|
||||||
if(EXISTS ${filename})
|
if(EXISTS ${filename})
|
||||||
file(INSTALL ${filename} DESTINATION ${CURRENT_PACKAGES_DIR}/tools/${PORT})
|
file(INSTALL "${filename}" DESTINATION "${CURRENT_PACKAGES_DIR}/tools/${PORT}")
|
||||||
file(REMOVE ${filename})
|
file(REMOVE "${filename}")
|
||||||
endif()
|
endif()
|
||||||
set(filename ${CURRENT_PACKAGES_DIR}/bin/${tool}-${TOOLVER}${VCPKG_TARGET_EXECUTABLE_SUFFIX})
|
set(filename ${CURRENT_PACKAGES_DIR}/bin/${tool}-${TOOLVER}${VCPKG_TARGET_EXECUTABLE_SUFFIX})
|
||||||
if(EXISTS ${filename})
|
if(EXISTS ${filename})
|
||||||
file(INSTALL ${filename} DESTINATION ${CURRENT_PACKAGES_DIR}/tools/${PORT})
|
file(INSTALL "${filename}" DESTINATION "${CURRENT_PACKAGES_DIR}/tools/${PORT}")
|
||||||
file(REMOVE ${filename})
|
file(REMOVE "${filename}")
|
||||||
endif()
|
endif()
|
||||||
endforeach()
|
endforeach()
|
||||||
vcpkg_copy_tool_dependencies(${CURRENT_PACKAGES_DIR}/tools/${PORT})
|
vcpkg_copy_tool_dependencies(${CURRENT_PACKAGES_DIR}/tools/${PORT})
|
||||||
|
|
||||||
# # Handle copyright
|
# # Handle copyright
|
||||||
file(INSTALL ${SOURCE_PATH}/Copyright.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/paraview RENAME Copyright.txt) # Which one is the correct one?
|
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/paraview RENAME copyright)
|
file(INSTALL "${SOURCE_PATH}/License_v1.2.txt" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)
|
||||||
|
|
||||||
if(VCPKG_LIBRARY_LINKAGE STREQUAL "static")
|
if(VCPKG_LIBRARY_LINKAGE STREQUAL "static")
|
||||||
macro(move_bin_to_lib name)
|
macro(move_bin_to_lib name)
|
||||||
@ -182,5 +181,9 @@ if(VCPKG_LIBRARY_LINKAGE STREQUAL "static")
|
|||||||
file(WRITE "${cmake_file}" "${_contents}")
|
file(WRITE "${cmake_file}" "${_contents}")
|
||||||
endforeach()
|
endforeach()
|
||||||
|
|
||||||
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/debug/bin)
|
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/bin" "${CURRENT_PACKAGES_DIR}/debug/bin")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
# 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")
|
||||||
|
@ -1,15 +1,24 @@
|
|||||||
{
|
{
|
||||||
"name": "paraview",
|
"name": "paraview",
|
||||||
"version-semver": "5.9.1",
|
"version": "5.9.1",
|
||||||
"port-version": 1,
|
"port-version": 2,
|
||||||
"description": "VTK-based Data Analysis and Visualization Application",
|
"description": "VTK-based Data Analysis and Visualization Application",
|
||||||
"homepage": "https://www.paraview.org/",
|
"homepage": "https://www.paraview.org/",
|
||||||
|
"license": "BSD-3-Clause",
|
||||||
"dependencies": [
|
"dependencies": [
|
||||||
"boost-algorithm",
|
"boost-algorithm",
|
||||||
"boost-core",
|
"boost-core",
|
||||||
"boost-format",
|
"boost-format",
|
||||||
"cgns",
|
"cgns",
|
||||||
"protobuf",
|
"protobuf",
|
||||||
|
{
|
||||||
|
"name": "vcpkg-cmake",
|
||||||
|
"host": true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "vcpkg-cmake-config",
|
||||||
|
"host": true
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"name": "vtk",
|
"name": "vtk",
|
||||||
"default-features": false,
|
"default-features": false,
|
||||||
|
@ -5322,7 +5322,7 @@
|
|||||||
},
|
},
|
||||||
"paraview": {
|
"paraview": {
|
||||||
"baseline": "5.9.1",
|
"baseline": "5.9.1",
|
||||||
"port-version": 1
|
"port-version": 2
|
||||||
},
|
},
|
||||||
"parmetis": {
|
"parmetis": {
|
||||||
"baseline": "4.0.3",
|
"baseline": "4.0.3",
|
||||||
|
@ -1,5 +1,10 @@
|
|||||||
{
|
{
|
||||||
"versions": [
|
"versions": [
|
||||||
|
{
|
||||||
|
"git-tree": "8f5d22c6754f293f54a360472f78e760f06aae80",
|
||||||
|
"version": "5.9.1",
|
||||||
|
"port-version": 2
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"git-tree": "7011d869273b8aa610ef7b302587c614137c73e5",
|
"git-tree": "7011d869273b8aa610ef7b302587c614137c73e5",
|
||||||
"version-semver": "5.9.1",
|
"version-semver": "5.9.1",
|
||||||
|
Loading…
Reference in New Issue
Block a user