Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Opencv/4.x: bump deps #21765

Merged
merged 13 commits into from
Jan 23, 2024
3 changes: 3 additions & 0 deletions recipes/opencv/4.x/conandata.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,9 @@ patches:
- patch_file: "patches/4.5.5-0003-find-quirc.patch"
patch_description: "Robust discovery & injection of quirc"
patch_type: "conan"
- patch_file: "patches/4.8.1-0004-link-qt-targets.patch"
patch_description: "Link to Qt through CMake targets"
patch_type: "conan"
- patch_file: "patches/4.8.1-0001-find-ade.patch"
patch_description: "Robust discovery & injection of ade"
patch_type: "conan"
Expand Down
25 changes: 11 additions & 14 deletions recipes/opencv/4.x/conanfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -1101,21 +1101,21 @@ def requirements(self):
if self.options.get_safe("with_gtk"):
self.requires("gtk/system")
if self.options.get_safe("with_qt"):
self.requires("qt/5.15.11")
self.requires("qt/5.15.12")
if self.options.get_safe("with_wayland"):
self.requires("xkbcommon/1.6.0")
self.requires("wayland/1.22.0")
# imgcodecs module dependencies
if self.options.get_safe("with_avif"):
self.requires("libavif/1.0.1")
self.requires("libavif/1.0.2")
if self.options.get_safe("with_jpeg") == "libjpeg":
self.requires("libjpeg/9e")
elif self.options.get_safe("with_jpeg") == "libjpeg-turbo":
self.requires("libjpeg-turbo/3.0.0")
self.requires("libjpeg-turbo/3.0.1")
elif self.options.get_safe("with_jpeg") == "mozjpeg":
self.requires("mozjpeg/4.1.3")
self.requires("mozjpeg/4.1.5")
if self.options.get_safe("with_jpeg2000") == "jasper":
self.requires("jasper/4.0.0")
self.requires("jasper/4.1.0")
elif self.options.get_safe("with_jpeg2000") == "openjpeg":
self.requires("openjpeg/2.5.0")
if self.options.get_safe("with_png"):
Expand All @@ -1139,11 +1139,11 @@ def requirements(self):
self.requires("ffmpeg/4.4.4")
# freetype module dependencies
if self.options.freetype:
self.requires("freetype/2.13.0")
self.requires("harfbuzz/8.2.2")
self.requires("freetype/2.13.2")
self.requires("harfbuzz/8.3.0")
# hdf module dependencies
if self.options.hdf:
self.requires("hdf5/1.14.2")
self.requires("hdf5/1.14.3")
# ovis module dependencies
if self.options.ovis:
self.requires("ogre/1.10.2")
Expand Down Expand Up @@ -1210,11 +1210,11 @@ def build_requirements(self):
if not self._is_legacy_one_profile:
self.tool_requires("protobuf/<host_version>")
if self.options.get_safe("with_wayland"):
self.tool_requires("wayland-protocols/1.31")
self.tool_requires("wayland-protocols/1.32")
if not self._is_legacy_one_profile:
self.tool_requires("wayland/<host_version>")
if not self.conf.get("tools.gnu:pkg_config", check_type=str):
self.tool_requires("pkgconf/2.0.3")
self.tool_requires("pkgconf/2.1.0")

def source(self):
get(self, **self.conan_data["sources"][self.version][0], strip_root=True)
Expand Down Expand Up @@ -1290,10 +1290,7 @@ def _patch_sources(self):
)

## Cleanup RPATH
if Version(self.version) < "4.1.2":
install_layout_file = os.path.join(self.source_folder, "CMakeLists.txt")
else:
install_layout_file = os.path.join(self.source_folder, "cmake", "OpenCVInstallLayout.cmake")
install_layout_file = os.path.join(self.source_folder, "cmake", "OpenCVInstallLayout.cmake")
replace_in_file(self, install_layout_file,
"ocv_update(CMAKE_INSTALL_RPATH \"${CMAKE_INSTALL_PREFIX}/${OPENCV_LIB_INSTALL_PATH}\")",
"")
Expand Down
22 changes: 22 additions & 0 deletions recipes/opencv/4.x/patches/4.8.1-0004-link-qt-targets.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
--- a/contrib/modules/cvv/CMakeLists.txt
+++ b/contrib/modules/cvv/CMakeLists.txt
@@ -18,7 +18,7 @@
set(CMAKE_AUTOMOC ON)
set(CMAKE_INCLUDE_CURRENT_DIR ON)
foreach(module ${CVV_QT_MODULES})
- list(APPEND CVV_LIBRARIES ${Qt${QT_VERSION_MAJOR}${module}_LIBRARIES})
+ list(APPEND CVV_LIBRARIES Qt${QT_VERSION_MAJOR}::${module})
endforeach()

ocv_glob_module_sources()
--- a/modules/highgui/CMakeLists.txt
+++ b/modules/highgui/CMakeLists.txt
@@ -116,7 +116,7 @@ if(HAVE_QT)
foreach(dt_dep ${qt_deps})
add_definitions(${Qt${QT_VERSION_MAJOR}${dt_dep}_DEFINITIONS})
include_directories(${Qt${QT_VERSION_MAJOR}${dt_dep}_INCLUDE_DIRS})
- list(APPEND HIGHGUI_LIBRARIES ${Qt${QT_VERSION_MAJOR}${dt_dep}_LIBRARIES})
+ list(APPEND HIGHGUI_LIBRARIES Qt${QT_VERSION_MAJOR}::${dt_dep})
endforeach()
else()
ocv_assert(QT_VERSION_MAJOR EQUAL 4)