aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhil Christensen <philc@microsoft.com>2018-12-17 16:16:37 -0800
committerGitHub <noreply@github.com>2018-12-17 16:16:37 -0800
commit4c6cd02b42ae5b9d49043081c1ed6298f1ffe08a (patch)
treefd784f377b204765ddbac0d2a9bfe67527a14edb
parent9cbdb33caf9975e5bd8b76da80df04d7cbfaa9e1 (diff)
parenta6b12004c7b29353a68a142eaa7493ca997e05e7 (diff)
downloadvcpkg-4c6cd02b42ae5b9d49043081c1ed6298f1ffe08a.tar.gz
vcpkg-4c6cd02b42ae5b9d49043081c1ed6298f1ffe08a.zip
Merge pull request #3425 from fbudin69500/ITK_use_HDF5_test
[vtk][itk] Update ITK, and VTK portfiles.
-rw-r--r--ports/itk/CONTROL6
-rw-r--r--ports/itk/portfile.cmake18
-rw-r--r--ports/vtk/CONTROL2
-rw-r--r--ports/vtk/portfile.cmake20
4 files changed, 32 insertions, 14 deletions
diff --git a/ports/itk/CONTROL b/ports/itk/CONTROL
index f4b29af94..a2cc426e8 100644
--- a/ports/itk/CONTROL
+++ b/ports/itk/CONTROL
@@ -1,4 +1,8 @@
Source: itk
Version: 4.13.0
Description: Insight Segmentation and Registration Toolkit (ITK) is used for image processing and analysis.
-Build-Depends: double-conversion, libjpeg-turbo, zlib, libpng, tiff, expat
+Build-Depends: double-conversion, libjpeg-turbo, zlib, libpng, tiff, expat, hdf5[cpp]
+
+Feature: vtk
+Description: Build ITKVtkGlue module.
+Build-Depends: vtk
diff --git a/ports/itk/portfile.cmake b/ports/itk/portfile.cmake
index 1fea599d8..b42d8be75 100644
--- a/ports/itk/portfile.cmake
+++ b/ports/itk/portfile.cmake
@@ -8,9 +8,19 @@ vcpkg_from_github(
HEAD_REF master
)
+if ("vtk" IN_LIST FEATURES)
+ set(ITKVtkGlue ON )
+else()
+ set(ITKVtkGlue OFF )
+endif()
+
# directory path length needs to be shorter than 50 characters
-file(RENAME ${SOURCE_PATH} ${CURRENT_BUILDTREES_DIR}/ITK)
-set(SOURCE_PATH "${CURRENT_BUILDTREES_DIR}/ITK")
+set(ITK_BUILD_DIR ${CURRENT_BUILDTREES_DIR}/ITK)
+if(EXISTS ${ITK_BUILD_DIR})
+ file(REMOVE_RECURSE ${ITK_BUILD_DIR})
+endif()
+file(RENAME ${SOURCE_PATH} ${ITK_BUILD_DIR})
+set(SOURCE_PATH "${ITK_BUILD_DIR}")
vcpkg_configure_cmake(
SOURCE_PATH ${SOURCE_PATH}
@@ -41,9 +51,9 @@ vcpkg_configure_cmake(
#-DITK_PYTHON_VERSION=3
# HDF5 must NOT be installed, otherwise it causes: ...\installed\x64-windows-static\include\H5Tpkg.h(25): fatal error C1189: #error: "Do not include this file outside the H5T package!"
- -DITK_USE_SYSTEM_HDF5=OFF # if ON, causes: ...\buildtrees\itk\x64-windows-static-rel\Modules\ThirdParty\HDF5\src\itk_H5Cpp.h(25): fatal error C1083: Cannot open include file: 'H5Cpp.h': No such file or directory
+ -DITK_USE_SYSTEM_HDF5=ON # if ON, causes: ...\buildtrees\itk\x64-windows-static-rel\Modules\ThirdParty\HDF5\src\itk_H5Cpp.h(25): fatal error C1083: Cannot open include file: 'H5Cpp.h': No such file or directory
- # -DModule_ITKVtkGlue=ON # this option requires VTK to be a dependency in CONTROL file. VTK depends on HDF5!
+ -DModule_ITKVtkGlue=${ITKVtkGlue} # this option requires VTK to be a dependency in CONTROL file. VTK depends on HDF5!
-DModule_IOSTL=ON # example how to turn on a non-default module
-DModule_MorphologicalContourInterpolation=ON # example how to turn on a remote module
-DModule_RLEImage=ON # example how to turn on a remote module
diff --git a/ports/vtk/CONTROL b/ports/vtk/CONTROL
index d06f16331..0eb485dcd 100644
--- a/ports/vtk/CONTROL
+++ b/ports/vtk/CONTROL
@@ -1,5 +1,5 @@
Source: vtk
-Version: 8.1.0-3
+Version: 8.1.0-6
Description: Software system for 3D computer graphics, image processing, and visualization
Build-Depends: zlib, libpng, tiff, libxml2, jsoncpp, glew, freetype, expat, hdf5, libjpeg-turbo, proj4, lz4, libtheora
diff --git a/ports/vtk/portfile.cmake b/ports/vtk/portfile.cmake
index edb245eb0..7a5536163 100644
--- a/ports/vtk/portfile.cmake
+++ b/ports/vtk/portfile.cmake
@@ -1,3 +1,7 @@
+if(VCPKG_CMAKE_SYSTEM_NAME AND NOT VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore")
+ message(WARNING "You will need to install Xorg dependencies to build vtk:\napt-get install libxt-dev\n")
+endif()
+
include(vcpkg_common_functions)
set(VTK_SHORT_VERSION "8.1")
@@ -162,6 +166,7 @@ vcpkg_configure_cmake(
-DVTK_INSTALL_DATA_DIR=share/vtk/data
-DVTK_INSTALL_DOC_DIR=share/vtk/doc
-DVTK_INSTALL_PACKAGE_DIR=share/vtk
+ -DVTK_INSTALL_RUNTIME_DIR=tools
-DVTK_FORBID_DOWNLOADS=ON
${ADDITIONAL_OPTIONS}
)
@@ -299,15 +304,14 @@ foreach(FILE IN LISTS CMAKE_FILES)
endforeach()
# =============================================================================
-# Move executable to tools directory and clean-up other directories
-file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/tools/vtk)
+# Clean-up other directories
-function(_vtk_move_tool TOOL_NAME)
- if(EXISTS ${CURRENT_PACKAGES_DIR}/bin/${TOOL_NAME}.exe)
- file(RENAME ${CURRENT_PACKAGES_DIR}/bin/${TOOL_NAME}.exe ${CURRENT_PACKAGES_DIR}/tools/vtk/${TOOL_NAME}.exe)
- endif()
- file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/bin/${TOOL_NAME}.exe)
+function(_vtk_remove_tool TOOL_NAME)
+ set(filename ${CURRENT_PACKAGES_DIR}/debug/bin/${TOOL_NAME}.exe)
+ if(EXISTS ${filename})
+ file(REMOVE ${filename})
+ endif()
endfunction()
set(VTK_TOOLS
@@ -331,7 +335,7 @@ string(REPLACE "vtk::hdf5::hdf5" "" _contents "${_contents}")
file(WRITE "${CURRENT_PACKAGES_DIR}/share/vtk/Modules/vtkhdf5.cmake" "${_contents}")
foreach(TOOL_NAME IN LISTS VTK_TOOLS)
- _vtk_move_tool("${TOOL_NAME}")
+ _vtk_remove_tool("${TOOL_NAME}")
endforeach()
# =============================================================================