aboutsummaryrefslogtreecommitdiff
path: root/ports/itk
diff options
context:
space:
mode:
Diffstat (limited to 'ports/itk')
-rw-r--r--ports/itk/CONTROL4
-rw-r--r--ports/itk/fix_conflict_with_openjp2_pc.patch33
-rw-r--r--ports/itk/portfile.cmake2
3 files changed, 37 insertions, 2 deletions
diff --git a/ports/itk/CONTROL b/ports/itk/CONTROL
index 5c9d25881..4685d12d1 100644
--- a/ports/itk/CONTROL
+++ b/ports/itk/CONTROL
@@ -1,7 +1,7 @@
Source: itk
-Version: 4.13.0-906736bd-1
+Version: 4.13.0-906736bd-2
Description: Insight Segmentation and Registration Toolkit (ITK) is used for image processing and analysis.
-Build-Depends: double-conversion, libjpeg-turbo, zlib, libpng, tiff, expat, eigen3, hdf5[cpp]
+Build-Depends: double-conversion, libjpeg-turbo, zlib, libpng, tiff, expat, eigen3, hdf5[cpp], openjpeg
Feature: vtk
Description: Build ITKVtkGlue module.
diff --git a/ports/itk/fix_conflict_with_openjp2_pc.patch b/ports/itk/fix_conflict_with_openjp2_pc.patch
new file mode 100644
index 000000000..fc2ad1132
--- /dev/null
+++ b/ports/itk/fix_conflict_with_openjp2_pc.patch
@@ -0,0 +1,33 @@
+diff --git a/Modules/ThirdParty/GDCM/src/gdcm/CMakeLists.txt b/Modules/ThirdParty/GDCM/src/gdcm/CMakeLists.txt
+index 6e3504d..1d641c2 100644
+--- a/Modules/ThirdParty/GDCM/src/gdcm/CMakeLists.txt
++++ b/Modules/ThirdParty/GDCM/src/gdcm/CMakeLists.txt
+@@ -375,7 +375,8 @@ else()
+ endif()
+
+ if(GDCM_USE_SYSTEM_OPENJPEG)
+- find_package(OpenJPEG 2.0.0 REQUIRED)
++ # openjpeg version in vcpkg is already greater than 2.0.0 and openjpeg has no version.cmake file
++ find_package(OpenJPEG REQUIRED)
+ set(GDCM_OPENJPEG_LIBRARIES ${OPENJPEG_LIBRARIES})
+ else()
+ set(GDCM_OPENJPEG_LIBRARIES itkgdcmopenjp2)
+diff --git a/Modules/ThirdParty/GDCM/src/gdcm/Utilities/gdcmopenjpeg/CMakeLists.txt b/Modules/ThirdParty/GDCM/src/gdcm/Utilities/gdcmopenjpeg/CMakeLists.txt
+index 4ffe98e..a269690 100644
+--- a/Modules/ThirdParty/GDCM/src/gdcm/Utilities/gdcmopenjpeg/CMakeLists.txt
++++ b/Modules/ThirdParty/GDCM/src/gdcm/Utilities/gdcmopenjpeg/CMakeLists.txt
+@@ -347,12 +347,8 @@ endif()
+
+ #-----------------------------------------------------------------------------
+ # pkgconfig support
+-# enabled by default on Unix, disabled by default on other platforms
+-if(UNIX)
+- option(BUILD_PKGCONFIG_FILES "Build and install pkg-config files" ON)
+-else()
+- option(BUILD_PKGCONFIG_FILES "Build and install pkg-config files" OFF)
+-endif()
++# Cannot use the built-in openjp2 because the configuration path is under buildtrees
++option(BUILD_PKGCONFIG_FILES "Build and install pkg-config files" OFF)
+ if(BUILD_PKGCONFIG_FILES)
+ # install in lib and not share (see multi-arch note above)
+ configure_file(${CMAKE_CURRENT_SOURCE_DIR}/src/lib/openjp2/libopenjp2.pc.cmake.in
diff --git a/ports/itk/portfile.cmake b/ports/itk/portfile.cmake
index 7339de39d..9307b142c 100644
--- a/ports/itk/portfile.cmake
+++ b/ports/itk/portfile.cmake
@@ -6,6 +6,7 @@ vcpkg_from_github(
REF 906736bd453e95ccf03b318d3d07cb7884285161
SHA512 8ac62262d46e7acbb0e5b2e964292ec17e1687bb162b8cec666e5b67acbe3449f093a0b1c03737e9951cb88248ed890805ffd57df6eae21220488620da833c57
HEAD_REF master
+ PATCHES fix_conflict_with_openjp2_pc.patch
)
if ("vtk" IN_LIST FEATURES)
@@ -60,6 +61,7 @@ vcpkg_configure_cmake(
-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
+ -DGDCM_USE_SYSTEM_OPENJPEG=ON #Use port openjpeg instead of own third-party
${ADDITIONAL_OPTIONS}
)