aboutsummaryrefslogtreecommitdiff
path: root/ports/vtk
diff options
context:
space:
mode:
authorJiri Appl <jiria@microsoft.com>2018-10-25 11:47:58 -0700
committerRobert Schumacher <roschuma@microsoft.com>2018-10-25 11:47:58 -0700
commit3d2b540173ff5ce8debf8c9802aca4cfadd3efe1 (patch)
tree0ff88a116d3533e89b016a78e025ff0bd0d2ca96 /ports/vtk
parent97e9d96715c6d1ad3501b47c02f76f92c1221a99 (diff)
downloadvcpkg-3d2b540173ff5ce8debf8c9802aca4cfadd3efe1.tar.gz
vcpkg-3d2b540173ff5ce8debf8c9802aca4cfadd3efe1.zip
Enable Windows ARM32 build of OpenSSL LTS (#4525)
* Enable Windows ARM32 build of OpenSSL * [openssl-windows] Bump control version * [vtk] Fix hardcoded install paths * [osgearth] Backport VS2017u8 fix
Diffstat (limited to 'ports/vtk')
-rw-r--r--ports/vtk/CONTROL2
-rw-r--r--ports/vtk/portfile.cmake42
2 files changed, 24 insertions, 20 deletions
diff --git a/ports/vtk/CONTROL b/ports/vtk/CONTROL
index 8b9ae8f6b..e75795e74 100644
--- a/ports/vtk/CONTROL
+++ b/ports/vtk/CONTROL
@@ -1,5 +1,5 @@
Source: vtk
-Version: 8.1.0-1
+Version: 8.1.0-2
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 be344f8bf..c547929ce 100644
--- a/ports/vtk/portfile.cmake
+++ b/ports/vtk/portfile.cmake
@@ -2,15 +2,6 @@ include(vcpkg_common_functions)
set(VTK_SHORT_VERSION "8.1")
set(VTK_LONG_VERSION "${VTK_SHORT_VERSION}.0")
-
-vcpkg_from_github(
- OUT_SOURCE_PATH SOURCE_PATH
- REPO "Kitware/VTK"
- REF "v${VTK_LONG_VERSION}"
- SHA512 09e110cba4ad9a6684e9b2af0cbb5b9053e3596ccb62aab96cd9e71aa4a96c809d96e13153ff44c28ad83015a61ba5195f7d34056707b62654c1bc057f9b9edf
- HEAD_REF "master"
-)
-
# =============================================================================
# Options:
@@ -46,13 +37,18 @@ endif()
set(VTK_WITH_ALL_MODULES OFF) # IMPORTANT: if ON make sure `qt5`, `mpi`, `python3`, `ffmpeg`, `gdal`, `fontconfig`,
# `libmysql` and `atlmfc` are listed as dependency in the CONTROL file
+
# =============================================================================
-# Apply patches to the source code
-vcpkg_apply_patches(
- SOURCE_PATH ${SOURCE_PATH}
+# Clone & patch
+vcpkg_from_github(
+ OUT_SOURCE_PATH SOURCE_PATH
+ REPO "Kitware/VTK"
+ REF "v${VTK_LONG_VERSION}"
+ SHA512 09e110cba4ad9a6684e9b2af0cbb5b9053e3596ccb62aab96cd9e71aa4a96c809d96e13153ff44c28ad83015a61ba5195f7d34056707b62654c1bc057f9b9edf
+ HEAD_REF "master"
PATCHES
# Disable ssize_t because this can conflict with ssize_t that is defined on windows.
- ${CMAKE_CURRENT_LIST_DIR}/dont-define-ssize_t.patch
+ dont-define-ssize_t.patch
# We force CMake to use it's own version of the FindHDF5 module since newer versions
# shipped with CMake behave differently. E.g. the one shipped with CMake 3.9 always
@@ -61,16 +57,16 @@ vcpkg_apply_patches(
# Maybe in the future we can disable the patch and use the new version shipped with CMake
# together with the hdf5-config.cmake that is written by HDF5 itself, but currently VTK
# disables taking the config into account explicitly.
- ${CMAKE_CURRENT_LIST_DIR}/use-fixed-find-hdf5.patch
+ use-fixed-find-hdf5.patch
# We disable a workaround in the VTK CMake scripts that can lead to the fact that a dependency
# will link to both, the debug and the release library.
- ${CMAKE_CURRENT_LIST_DIR}/disable-workaround-findhdf5.patch
+ disable-workaround-findhdf5.patch
- ${CMAKE_CURRENT_LIST_DIR}/fix-find-libproj4.patch
- ${CMAKE_CURRENT_LIST_DIR}/fix-find-libharu.patch
- ${CMAKE_CURRENT_LIST_DIR}/fix-find-mysql.patch
- ${CMAKE_CURRENT_LIST_DIR}/fix-find-odbc.patch
+ fix-find-libproj4.patch
+ fix-find-libharu.patch
+ fix-find-mysql.patch
+ fix-find-odbc.patch
)
# Remove the FindGLEW.cmake and FindPythonLibs.cmake that are distributed with VTK,
@@ -293,6 +289,14 @@ file(READ "${CURRENT_PACKAGES_DIR}/share/vtk/VTKTargets.cmake" VTK_TARGETS_CONTE
string(REGEX REPLACE "${CURRENT_INSTALLED_DIR}/lib/[^\\.]*\\.lib" "" VTK_TARGETS_CONTENT "${VTK_TARGETS_CONTENT}")
file(WRITE "${CURRENT_PACKAGES_DIR}/share/vtk/VTKTargets.cmake" "${VTK_TARGETS_CONTENT}")
+# Remove any remaining stray absolute references to the installed directory.
+file(GLOB_RECURSE CMAKE_FILES ${CURRENT_PACKAGES_DIR}/share/vtk/*.cmake)
+foreach(FILE IN LISTS CMAKE_FILES)
+ file(READ "${FILE}" _contents)
+ string(REPLACE "${CURRENT_INSTALLED_DIR}" "\${VTK_INSTALL_PREFIX}" _contents "${_contents}")
+ file(WRITE "${FILE}" "${_contents}")
+endforeach()
+
# =============================================================================
# Move executable to tools directory and clean-up other directories
file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/tools/vtk)