aboutsummaryrefslogtreecommitdiff
path: root/ports/itk
diff options
context:
space:
mode:
authorBilly O'Neal <bion@microsoft.com>2020-10-19 19:53:20 -0700
committerGitHub <noreply@github.com>2020-10-19 19:53:20 -0700
commit0d3547275842e88330a7c4804b37d02729c1ff71 (patch)
tree81e87fc1050ff0334fec571c564a79454f0c4b90 /ports/itk
parente93810d2ef7633e374992006af89f2b5056b04f1 (diff)
downloadvcpkg-0d3547275842e88330a7c4804b37d02729c1ff71.tar.gz
vcpkg-0d3547275842e88330a7c4804b37d02729c1ff71.zip
[itk,libsamplerate,libsndfile] Apply some Visual Studio 2019 version 16.9 preview 1 workarounds (#14056)
Diffstat (limited to 'ports/itk')
-rw-r--r--ports/itk/CONTROL38
-rw-r--r--ports/itk/portfile.cmake45
-rw-r--r--ports/itk/use-the-lrintf-intrinsic.patch15
-rw-r--r--ports/itk/vcpkg.json98
4 files changed, 136 insertions, 60 deletions
diff --git a/ports/itk/CONTROL b/ports/itk/CONTROL
deleted file mode 100644
index 94135373e..000000000
--- a/ports/itk/CONTROL
+++ /dev/null
@@ -1,38 +0,0 @@
-Source: itk
-Version: 5.1.0
-Port-Version: 2
-Description: Insight Segmentation and Registration Toolkit (ITK) is used for image processing and analysis.
-Homepage: https://github.com/InsightSoftwareConsortium/ITK
-Build-Depends: double-conversion, libjpeg-turbo, zlib, libpng, tiff, expat, eigen3, hdf5[core,cpp], openjpeg[core], fftw3[core], gtest, gdcm, icu, minc
-
-Feature: vtk
-Description: Build ITKVtkGlue module.
-Build-Depends: vtk[core]
-
-Feature: python
-Description: Python functionality for ITK
-Build-Depends: python3
-
-Feature: opencl
-Description: Use OpenCL
-Build-Depends: opencl
-
-Feature: cufftw
-Description: Use CUDA FFTW
-Build-Depends: cuda
-
-Feature: cuda
-Description: Build CUDA module
-Build-Depends: cuda, itk[core, opencl]
-
-Feature: tbb
-Description: Build TBB Module
-Build-Depends: tbb
-
-Feature: rtk
-Description: Build RTK Module
-
-Feature: tools
-Description: Build RTK with tools
-Build-Depends: itk[core, rtk]
-
diff --git a/ports/itk/portfile.cmake b/ports/itk/portfile.cmake
index b16ba194a..e5cb1383f 100644
--- a/ports/itk/portfile.cmake
+++ b/ports/itk/portfile.cmake
@@ -8,7 +8,7 @@ vcpkg_from_github(
HEAD_REF master
PATCHES
hdf5.patch
- double-conversion.patch
+ double-conversion.patch
openjpeg.patch
openjpeg2.patch
var_libraries.patch
@@ -16,6 +16,7 @@ vcpkg_from_github(
python_gpu_wrapping.patch
opencl.patch
cufftw.patch
+ use-the-lrintf-intrinsic.patch
)
vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS
@@ -27,7 +28,7 @@ vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS
"tbb" Module_ITKTBB
"rtk" Module_RTK
"tools" RTK_BUILD_APPLICATIONS
- # There are a lot of more (remote) modules and options in ITK
+ # There are a lot of more (remote) modules and options in ITK
# feel free to add those as a feature
)
@@ -45,7 +46,7 @@ if("cufftw" IN_LIST FEATURES)
else()
message(FATAL_ERROR "Architecture ${VCPKG_TARGET_ARCHITECTURE} not supported !")
endif()
-
+
list(APPEND ADDITIONAL_OPTIONS
"-DFFTW_LIB_SEARCHPATH=${CUDA_LIB_PATH}"
"-DFFTW_INCLUDE_PATH=${CUDA_PATH}/include"
@@ -64,7 +65,7 @@ if("rtk" IN_LIST FEATURES)
)
if("cuda" IN_LIST FEATURES)
list(APPEND ADDITIONAL_OPTIONS "-DRTK_USE_CUDA=ON")
- #RTK + CUDA + PYTHON + dynamic library linkage will fail and needs upstream fixes.
+ #RTK + CUDA + PYTHON + dynamic library linkage will fail and needs upstream fixes.
endif()
endif()
file(REMOVE_RECURSE "${SOURCE_PATH}/Modules/Remote/RTK")
@@ -76,16 +77,16 @@ if("opencl" IN_LIST FEATURES)
)
endif()
if("tools" IN_LIST FEATURES)
-
+
if("rtk" IN_LIST FEATURES)
- list(APPEND TOOL_NAMES rtkadmmtotalvariation rtkadmmwavelets rtkamsterdamshroud rtkbackprojections rtkbioscangeometry rtkcheckimagequality rtkconjugategradient
- rtkdigisensgeometry rtkdrawgeometricphantom rtkdrawshepploganphantom rtkdualenergysimplexdecomposition rtkelektasynergygeometry rtkextractphasesignal
- rtkextractshroudsignal rtkfdk rtkfdktwodweights rtkfieldofview rtkforwardprojections rtkfourdconjugategradient rtkfourdfdk rtkfourdrooster rtkfourdsart
- rtkgaincorrection rtki0estimation rtkimagxgeometry rtkiterativefdk rtklagcorrection rtklastdimensionl0gradientdenoising rtklut rtkmaskcollimation rtkmcrooster
- rtkmotioncompensatedfourdconjugategradient rtkorageometry rtkosem rtkoverlayphaseandshroud rtkparkershortscanweighting rtkprojectgeometricphantom
- rtkprojectionmatrix rtkprojections rtkprojectshepploganphantom rtkramp rtkrayboxintersection rtkrayquadricintersection rtkregularizedconjugategradient
- rtksart rtkscatterglarecorrection rtksimulatedgeometry rtkspectraldenoiseprojections rtkspectralforwardmodel rtkspectralonestep rtkspectralrooster rtkspectralsimplexdecomposition
- rtksubselect rtktotalnuclearvariationdenoising rtktotalvariationdenoising rtktutorialapplication rtkvarianobigeometry rtkvarianprobeamgeometry rtkvectorconjugategradient
+ list(APPEND TOOL_NAMES rtkadmmtotalvariation rtkadmmwavelets rtkamsterdamshroud rtkbackprojections rtkbioscangeometry rtkcheckimagequality rtkconjugategradient
+ rtkdigisensgeometry rtkdrawgeometricphantom rtkdrawshepploganphantom rtkdualenergysimplexdecomposition rtkelektasynergygeometry rtkextractphasesignal
+ rtkextractshroudsignal rtkfdk rtkfdktwodweights rtkfieldofview rtkforwardprojections rtkfourdconjugategradient rtkfourdfdk rtkfourdrooster rtkfourdsart
+ rtkgaincorrection rtki0estimation rtkimagxgeometry rtkiterativefdk rtklagcorrection rtklastdimensionl0gradientdenoising rtklut rtkmaskcollimation rtkmcrooster
+ rtkmotioncompensatedfourdconjugategradient rtkorageometry rtkosem rtkoverlayphaseandshroud rtkparkershortscanweighting rtkprojectgeometricphantom
+ rtkprojectionmatrix rtkprojections rtkprojectshepploganphantom rtkramp rtkrayboxintersection rtkrayquadricintersection rtkregularizedconjugategradient
+ rtksart rtkscatterglarecorrection rtksimulatedgeometry rtkspectraldenoiseprojections rtkspectralforwardmodel rtkspectralonestep rtkspectralrooster rtkspectralsimplexdecomposition
+ rtksubselect rtktotalnuclearvariationdenoising rtktotalvariationdenoising rtktutorialapplication rtkvarianobigeometry rtkvarianprobeamgeometry rtkvectorconjugategradient
rtkwangdisplaceddetectorweighting rtkwarpedbackprojectsequence rtkwarpedforwardprojectsequence rtkwaveletsdenoising rtkxradgeometry)
endif()
endif()
@@ -122,8 +123,8 @@ if("python" IN_LIST FEATURES)
list(APPEND OPTIONS_RELEASE "-DPython3_LIBRARY=${CURRENT_INSTALLED_DIR}/lib/libpython38m.a")
elseif(VCPKG_TARGET_IS_OSX)
#Need Python3 information on OSX within VCPKG
- endif()
- #ITK_PYTHON_SITE_PACKAGES_SUFFIX should be set to the install dir of the site-packages within vcpkg
+ endif()
+ #ITK_PYTHON_SITE_PACKAGES_SUFFIX should be set to the install dir of the site-packages within vcpkg
endif()
set(USE_64BITS_IDS OFF)
@@ -139,7 +140,7 @@ vcpkg_configure_cmake(
OPTIONS
-DBUILD_TESTING=OFF
-DBUILD_EXAMPLES=OFF
- -DBUILD_PKGCONFIG_FILES=OFF
+ -DBUILD_PKGCONFIG_FILES=OFF
-DITK_DOXYGEN_HTML=OFF
-DDO_NOT_INSTALL_ITK_TEST_DRIVER=ON
-DITK_SKIP_PATH_LENGTH_CHECKS=ON
@@ -160,7 +161,7 @@ vcpkg_configure_cmake(
-DITK_USE_SYSTEM_HDF5=ON # HDF5 was problematic in the past and still is. ITK still has not figured out how to do it correctly!
-DITK_USE_SYSTEM_GDCM=ON
-DITK_USE_SYSTEM_OpenJPEG=ON # Added by VCPKG
- -DITK_USE_SYSTEM_DCMTK=ON
+ -DITK_USE_SYSTEM_DCMTK=ON
-DDCMTK_USE_ICU=ON
-DITK_USE_SYSTEM_ICU=ON
#-DITK_USE_SYSTEM_VXL=ON
@@ -171,16 +172,16 @@ vcpkg_configure_cmake(
-DINSTALL_GTEST=OFF
-DITK_USE_SYSTEM_GOOGLETEST=ON
-DEXECUTABLE_OUTPUT_PATH=tools/${PORT}
-
+
# TODO
#-DVXL_USE_GEOTIFF=ON
-DVXL_USE_LFS=ON
-
+
-DITK_MINIMUM_COMPLIANCE_LEVEL:STRING=1 # To Display all remote modules within cmake-gui
#-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
-
+
# Some additional wraping options
#-DITK_WRAP_double=ON
#-DITK_WRAP_complex_double=ON
@@ -189,11 +190,11 @@ vcpkg_configure_cmake(
${FEATURE_OPTIONS}
${ADDITIONAL_OPTIONS}
-
+
OPTIONS_DEBUG ${OPTIONS_DEBUG}
OPTIONS_RELEASE ${OPTIONS_RELEASE}
)
-if(BUILD_RTK) # Remote Modules are only downloaded on configure.
+if(BUILD_RTK) # Remote Modules are only downloaded on configure.
# TODO: In the future try to download via vcpkg_from_github and move the files. That way patching does not need this workaround
vcpkg_apply_patches(SOURCE_PATH "${SOURCE_PATH}/Modules/Remote/RTK" QUIET PATCHES rtk/already_defined.patch rtk/unresolved.patch)
endif()
diff --git a/ports/itk/use-the-lrintf-intrinsic.patch b/ports/itk/use-the-lrintf-intrinsic.patch
new file mode 100644
index 000000000..27df6cd9b
--- /dev/null
+++ b/ports/itk/use-the-lrintf-intrinsic.patch
@@ -0,0 +1,15 @@
+diff --git a/Modules/ThirdParty/OpenJPEG/src/openjpeg/opj_includes.h b/Modules/ThirdParty/OpenJPEG/src/openjpeg/opj_includes.h
+index e75a220d4d..4b13e1726a 100644
+--- a/Modules/ThirdParty/OpenJPEG/src/openjpeg/opj_includes.h
++++ b/Modules/ThirdParty/OpenJPEG/src/openjpeg/opj_includes.h
+@@ -87,8 +87,8 @@ Most compilers implement their own version of this keyword ...
+ #endif
+ #endif
+
+-/* MSVC and Borland C do not have lrintf */
+-#if defined(_MSC_VER) || defined(__BORLANDC__)
++/* MSVC pre 16.8 and Borland C do not have lrintf */
++#if (defined(_MSC_VER) && _MSC_VER < 1928) || defined(__BORLANDC__)
+
+ /* MSVC 64bits doesn't support _asm */
+ #if !defined(_WIN64)
diff --git a/ports/itk/vcpkg.json b/ports/itk/vcpkg.json
new file mode 100644
index 000000000..4231c3cdc
--- /dev/null
+++ b/ports/itk/vcpkg.json
@@ -0,0 +1,98 @@
+{
+ "name": "itk",
+ "version-string": "5.1.0",
+ "port-version": 3,
+ "description": "Insight Segmentation and Registration Toolkit (ITK) is used for image processing and analysis.",
+ "homepage": "https://github.com/InsightSoftwareConsortium/ITK",
+ "dependencies": [
+ "double-conversion",
+ "eigen3",
+ "expat",
+ {
+ "name": "fftw3",
+ "default-features": false
+ },
+ "gdcm",
+ "gtest",
+ {
+ "name": "hdf5",
+ "default-features": false,
+ "features": [
+ "cpp"
+ ]
+ },
+ "icu",
+ "libjpeg-turbo",
+ "libpng",
+ "minc",
+ {
+ "name": "openjpeg",
+ "default-features": false
+ },
+ "tiff",
+ "zlib"
+ ],
+ "features": {
+ "cuda": {
+ "description": "Build CUDA module",
+ "dependencies": [
+ "cuda",
+ {
+ "name": "itk",
+ "default-features": false,
+ "features": [
+ "opencl"
+ ]
+ }
+ ]
+ },
+ "cufftw": {
+ "description": "Use CUDA FFTW",
+ "dependencies": [
+ "cuda"
+ ]
+ },
+ "opencl": {
+ "description": "Use OpenCL",
+ "dependencies": [
+ "opencl"
+ ]
+ },
+ "python": {
+ "description": "Python functionality for ITK",
+ "dependencies": [
+ "python3"
+ ]
+ },
+ "rtk": {
+ "description": "Build RTK Module"
+ },
+ "tbb": {
+ "description": "Build TBB Module",
+ "dependencies": [
+ "tbb"
+ ]
+ },
+ "tools": {
+ "description": "Build RTK with tools",
+ "dependencies": [
+ {
+ "name": "itk",
+ "default-features": false,
+ "features": [
+ "rtk"
+ ]
+ }
+ ]
+ },
+ "vtk": {
+ "description": "Build ITKVtkGlue module.",
+ "dependencies": [
+ {
+ "name": "vtk",
+ "default-features": false
+ }
+ ]
+ }
+ }
+}