mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-12-27 10:21:07 +08:00
Update VTK to version 8.0.
This commit is contained in:
parent
17cb5b9c34
commit
eb5b7e149f
@ -1,4 +1,4 @@
|
||||
Source: vtk
|
||||
Version: 7.1.1-1
|
||||
Version: 8.0.0
|
||||
Description: Software system for 3D computer graphics, image processing, and visualization
|
||||
Build-Depends: zlib, libpng, tiff, libxml2, jsoncpp, glew, freetype, expat, hdf5, qt5, msmpi
|
||||
|
@ -1,23 +0,0 @@
|
||||
diff --git a/CMake/vtkModuleMacros.cmake b/CMake/vtkModuleMacros.cmake
|
||||
index fdd83ed8fc..4986582a5b 100644
|
||||
--- a/CMake/vtkModuleMacros.cmake
|
||||
+++ b/CMake/vtkModuleMacros.cmake
|
||||
@@ -885,18 +885,6 @@ macro(vtk_module_third_party _pkg)
|
||||
set(vtk${_lower}_DEFINITIONS ${${_upper}_DEFINITIONS})
|
||||
endif()
|
||||
|
||||
- #a workaround for bad FindHDF5 behavior in which deb or opt can
|
||||
- #end up empty. cmake >= 2.8.12.2 makes this uneccessary
|
||||
- string(REGEX MATCH "debug;.*optimized;.*"
|
||||
- _remove_deb_opt "${vtk${_lower}_LIBRARIES}")
|
||||
- if (_remove_deb_opt)
|
||||
- set(_tmp ${vtk${_lower}_LIBRARIES})
|
||||
- list(REMOVE_ITEM _tmp "debug")
|
||||
- list(REMOVE_ITEM _tmp "optimized")
|
||||
- list(REMOVE_DUPLICATES _tmp)
|
||||
- set(vtk${_lower}_LIBRARIES ${_tmp})
|
||||
- endif()
|
||||
-
|
||||
set(vtk${_lower}_INCLUDE_DIRS "")
|
||||
else()
|
||||
if(_nolibs)
|
@ -1,13 +0,0 @@
|
||||
diff --git a/ThirdParty/netcdf/vtknetcdf/ncconfig.h.in b/ThirdParty/netcdf/vtknetcdf/ncconfig.h.in
|
||||
index 0a19c41..0d92371 100644
|
||||
--- a/ThirdParty/netcdf/vtknetcdf/ncconfig.h.in
|
||||
+++ b/ThirdParty/netcdf/vtknetcdf/ncconfig.h.in
|
||||
@@ -110,7 +110,7 @@
|
||||
#cmakedefine HAVE_LIBHDF5_HL
|
||||
|
||||
/* Define to `int' if system doesn't define. */
|
||||
-#cmakedefine ssize_t @ssize_t@
|
||||
+/* #cmakedefine ssize_t @ssize_t@ */
|
||||
|
||||
/* Define to `int' if system doesn't define. */
|
||||
#cmakedefine ptrdiff_t @ptrdiff_t@
|
@ -1,20 +0,0 @@
|
||||
diff --git a/CMake/FindHDF5.cmake b/CMake/FindHDF5.cmake
|
||||
index 6d558e39b1..9511e9a1ad 100644
|
||||
--- a/CMake/FindHDF5.cmake
|
||||
+++ b/CMake/FindHDF5.cmake
|
||||
@@ -3,11 +3,11 @@
|
||||
# (BUG #0014363).
|
||||
|
||||
# include the default FindHDF5.cmake.
|
||||
-if(CMAKE_VERSION VERSION_LESS 3.6.1)
|
||||
+#if(CMAKE_VERSION VERSION_LESS 3.6.1)
|
||||
include(${CMAKE_CURRENT_LIST_DIR}/NewCMake/FindHDF5.cmake)
|
||||
-else()
|
||||
- include(${CMAKE_ROOT}/Modules/FindHDF5.cmake)
|
||||
-endif()
|
||||
+#else()
|
||||
+# include(${CMAKE_ROOT}/Modules/FindHDF5.cmake)
|
||||
+#endif()
|
||||
|
||||
if(HDF5_FOUND AND (HDF5_IS_PARALLEL OR HDF5_ENABLE_PARALLEL))
|
||||
include(vtkMPI)
|
@ -1,10 +0,0 @@
|
||||
--- a/ThirdParty/netcdf/vtknetcdf/CMakeLists.txt Mon Nov 14 17:59:47 2016
|
||||
+++ b/ThirdParty/netcdf/vtknetcdf/CMakeLists.txt Thu Jan 05 21:15:28 2017
|
||||
@@ -330,6 +330,7 @@
|
||||
${netcdf_dispatch_SOURCES}
|
||||
${netcdf_liblib_SOURCES})
|
||||
target_link_libraries(vtkNetCDF ${vtkhdf5_LIBRARIES})
|
||||
+target_compile_definitions(vtkNetCDF PRIVATE ${vtkhdf5_DEFINITIONS})
|
||||
|
||||
if (UNIX)
|
||||
# link against the math library.
|
@ -1,29 +1,15 @@
|
||||
include(vcpkg_common_functions)
|
||||
set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/VTK-7.1.1)
|
||||
vcpkg_download_distfile(ARCHIVE
|
||||
URLS "http://www.vtk.org/files/release/7.1/VTK-7.1.1.tar.gz"
|
||||
FILENAME "VTK-7.1.1.tar.gz"
|
||||
SHA512 34a068801fe45f98325e5334d2569fc9b15ed38620386f1b5b860c9735e5fb8510953b50a3340d3ef9795e22fecf798c25bf750215b2ff1ff1eb7a1ecd87b623
|
||||
)
|
||||
vcpkg_extract_source_archive(${ARCHIVE})
|
||||
|
||||
vcpkg_apply_patches(
|
||||
SOURCE_PATH ${SOURCE_PATH}
|
||||
PATCHES
|
||||
${CMAKE_CURRENT_LIST_DIR}/transfer-3rd-party-module-definitions.patch
|
||||
${CMAKE_CURRENT_LIST_DIR}/transfer-hdf5-definitions.patch
|
||||
${CMAKE_CURRENT_LIST_DIR}/netcdf-use-hdf5-definitions.patch
|
||||
${CMAKE_CURRENT_LIST_DIR}/dont-define-ssize_t.patch
|
||||
${CMAKE_CURRENT_LIST_DIR}/fix-findhdf5-shared.patch
|
||||
${CMAKE_CURRENT_LIST_DIR}/disable-workaround-findhdf5.patch
|
||||
vcpkg_from_github(
|
||||
OUT_SOURCE_PATH SOURCE_PATH
|
||||
REPO "Kitware/VTK"
|
||||
REF "v8.0.0"
|
||||
SHA512 1a328f24df0b1c40c623ae80c9d49f8b27570144b10af02aeed41b90b50b8d4e0dd83d1341961f6818cde36e2cd793c578ebc95a46950cebfc518f486f249791
|
||||
HEAD_REF "master"
|
||||
)
|
||||
|
||||
if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic)
|
||||
# HACK: The FindHDF5.cmake script does not seem to detect the HDF5_DEFINITIONS correctly
|
||||
# if HDF5 has been built without the tools (which is the case in the HDF5 port),
|
||||
# so we set the BUILT_AS_DYNAMIC_LIB=1 flag here explicitly because we know HDF5
|
||||
# has been build as dynamic library in the current case.
|
||||
list(APPEND ADDITIONAL_OPTIONS "-DHDF5_DEFINITIONS=-DH5_BUILT_AS_DYNAMIC_LIB=1")
|
||||
list(APPEND ADDITIONAL_OPTIONS "-DVTK_EXTERNAL_HDF5_IS_SHARED=ON")
|
||||
endif()
|
||||
|
||||
vcpkg_configure_cmake(
|
||||
@ -68,6 +54,8 @@ vcpkg_configure_cmake(
|
||||
vcpkg_install_cmake()
|
||||
vcpkg_copy_pdbs()
|
||||
|
||||
# Remove tools from the bin directory.
|
||||
# We make sure no references to the deleted files are left in the CMake config files.
|
||||
file(READ ${CURRENT_PACKAGES_DIR}/share/vtk/VTKTargets-release.cmake VTK_TARGETS_RELEASE_MODULE)
|
||||
string(REPLACE "list\(APPEND _IMPORT_CHECK_FILES_FOR_vtkEncodeString" "#list(APPEND _IMPORT_CHECK_FILES_FOR_vtkEncodeString" VTK_TARGETS_RELEASE_MODULE "${VTK_TARGETS_RELEASE_MODULE}")
|
||||
string(REPLACE "list\(APPEND _IMPORT_CHECK_FILES_FOR_vtkHashSource" "#list(APPEND _IMPORT_CHECK_FILES_FOR_vtkHashSource" VTK_TARGETS_RELEASE_MODULE "${VTK_TARGETS_RELEASE_MODULE}")
|
||||
@ -82,10 +70,16 @@ file(WRITE ${CURRENT_PACKAGES_DIR}/share/vtk/VTKTargets-debug.cmake "${VTK_TARGE
|
||||
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share)
|
||||
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
|
||||
|
||||
file(REMOVE ${CURRENT_PACKAGES_DIR}/bin/vtkEncodeString-7.1.exe)
|
||||
file(REMOVE ${CURRENT_PACKAGES_DIR}/bin/vtkHashSource-7.1.exe)
|
||||
file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/bin/vtkEncodeString-7.1.exe)
|
||||
file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/bin/vtkHashSource-7.1.exe)
|
||||
if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic)
|
||||
file(REMOVE ${CURRENT_PACKAGES_DIR}/bin/vtkEncodeString-8.0.exe)
|
||||
file(REMOVE ${CURRENT_PACKAGES_DIR}/bin/vtkHashSource-8.0.exe)
|
||||
file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/bin/vtkEncodeString-8.0.exe)
|
||||
file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/bin/vtkHashSource-8.0.exe)
|
||||
else()
|
||||
# On static builds there should be no bin directory at all
|
||||
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin)
|
||||
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/bin)
|
||||
endif()
|
||||
|
||||
# Handle copyright
|
||||
file(COPY ${SOURCE_PATH}/Copyright.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/vtk)
|
||||
|
@ -1,26 +0,0 @@
|
||||
--- a/CMake/vtkModuleMacros.cmake Mon Nov 14 17:59:47 2016
|
||||
+++ b/CMake/vtkModuleMacros.cmake Thu Jan 05 21:36:06 2017
|
||||
@@ -665,6 +665,9 @@
|
||||
if(${dep}_LIBRARY_DIRS)
|
||||
link_directories(${${dep}_LIBRARY_DIRS})
|
||||
endif()
|
||||
+ if(${dep}_DEFINITIONS)
|
||||
+ target_compile_definitions(${vtk-module} PRIVATE ${${dep}_DEFINITIONS})
|
||||
+ endif()
|
||||
vtk_module_link_libraries(${vtk-module} LINK_PRIVATE ${${dep}_LIBRARIES})
|
||||
if(_help_vs7 AND ${dep}_LIBRARIES)
|
||||
add_dependencies(${vtk-module} ${${dep}_LIBRARIES})
|
||||
@@ -870,6 +873,13 @@
|
||||
set(vtk${_lower}_LIBRARIES "${${_pkg}_LIBRARIES}")
|
||||
else()
|
||||
set(vtk${_lower}_LIBRARIES "${${_upper}_LIBRARIES}")
|
||||
+ endif()
|
||||
+ if(${_pkg}_DEFINITIONS)
|
||||
+ set(vtk${_lower}_DEFINITIONS ${${_pkg}_DEFINITIONS})
|
||||
+ elseif(${_upper}_DEFINITIONS)
|
||||
+ set(vtk${_lower}_DEFINITIONS ${${_upper}_DEFINITIONS})
|
||||
+ else()
|
||||
+ set(vtk${_lower}_DEFINITIONS ${${_upper}_DEFINITIONS})
|
||||
endif()
|
||||
|
||||
#a workaround for bad FindHDF5 behavior in which deb or opt can
|
@ -1,10 +0,0 @@
|
||||
--- a/ThirdParty/hdf5/module.cmake Mon Nov 14 17:59:47 2016
|
||||
+++ b/ThirdParty/hdf5/module.cmake Thu Jan 05 21:23:20 2017
|
||||
@@ -5,6 +5,7 @@
|
||||
endif()
|
||||
if(VTK_USE_SYSTEM_HDF5)
|
||||
set(vtkhdf5_LIBRARIES ${HDF5_LIBRARIES} ${HDF5_HL_LIBRARIES})
|
||||
+ set(vtkhdf5_DEFINITIONS ${HDF5_DEFINITIONS})
|
||||
endif()
|
||||
vtk_module(vtkhdf5
|
||||
EXCLUDE_FROM_WRAPPING
|
Loading…
x
Reference in New Issue
Block a user