From ed9ba1e0a9a443cd1e84e24bf311b7c9c5da78b8 Mon Sep 17 00:00:00 2001 From: andremueller-cosateq <77957172+andremueller-cosateq@users.noreply.github.com> Date: Tue, 22 Mar 2022 03:27:37 +0100 Subject: [PATCH] [itk] Add feature opencv supporting ITKBridgeOpenCV (#23502) * add itk[opencv] supporting the ITKBridgeOpenCV module see https://github.com/InsightSoftwareConsortium/ITK/tree/master/Modules/Video/BridgeOpenCV * Add version * update version * reduce dependencies to opencv * update version Co-authored-by: Andre Mueller Co-authored-by: Jonliu1993 <13720414433@163.com> --- ports/itk/portfile.cmake | 7 +++++++ ports/itk/vcpkg.json | 12 ++++++++++++ versions/i-/itk.json | 2 +- 3 files changed, 20 insertions(+), 1 deletion(-) diff --git a/ports/itk/portfile.cmake b/ports/itk/portfile.cmake index 5bd030f4e6..b36ce928a2 100644 --- a/ports/itk/portfile.cmake +++ b/ports/itk/portfile.cmake @@ -26,6 +26,7 @@ vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS "tbb" Module_ITKTBB "rtk" Module_RTK "tools" RTK_BUILD_APPLICATIONS + "opencv" Module_ITKVideoBridgeOpenCV # There are a lot of more (remote) modules and options in ITK # feel free to add those as a feature ) @@ -108,6 +109,12 @@ if("python" IN_LIST FEATURES) ) #ITK_PYTHON_SITE_PACKAGES_SUFFIX should be set to the install dir of the site-packages within vcpkg endif() +if("opencv" IN_LIST FEATURES) + message(STATUS "${PORT} includes the ITKVideoBridgeOpenCV") + list(APPEND ADDITIONAL_OPTIONS + -DModule_ITKVideoBridgeOpenCV:BOOL=ON + ) +endif() set(USE_64BITS_IDS OFF) if (VCPKG_TARGET_ARCHITECTURE STREQUAL x64 OR VCPKG_TARGET_ARCHITECTURE STREQUAL arm64) diff --git a/ports/itk/vcpkg.json b/ports/itk/vcpkg.json index c50fa5f0fb..a86e3e10fd 100644 --- a/ports/itk/vcpkg.json +++ b/ports/itk/vcpkg.json @@ -67,6 +67,18 @@ "opencl" ] }, + "opencv": { + "description": "Build ITKVideoBridgeOpenCV module.", + "dependencies": [ + { + "name": "opencv", + "default-features": false, + "features": [ + "default-features" + ] + } + ] + }, "python": { "description": "Python functionality for ITK", "dependencies": [ diff --git a/versions/i-/itk.json b/versions/i-/itk.json index e723245764..7b63c922b0 100644 --- a/versions/i-/itk.json +++ b/versions/i-/itk.json @@ -1,7 +1,7 @@ { "versions": [ { - "git-tree": "292c97cb7b593c84d77628fbe7f6e91ea0f43902", + "git-tree": "21beac1c375ce633f869566345d7418849633c3e", "version": "5.2.1", "port-version": 1 },