Skip to content

Commit

Permalink
Fix issue with quirc
Browse files Browse the repository at this point in the history
  • Loading branch information
AbrilRBS committed Feb 13, 2024
1 parent 485dca4 commit a9001e4
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion recipes/opencv/4.x/conanfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -351,6 +351,9 @@ def config_options(self):
if not self._has_with_wayland_option:
self.options.with_gtk = True

if Version(self.version) >= "4.9":
self.options.with_quirc = True

@property
def _opencv_modules(self):
def imageformats_deps():
Expand Down Expand Up @@ -1238,6 +1241,10 @@ def _patch_sources(self):
replace_in_file(self, os.path.join(self.source_folder, "CMakeLists.txt"), "ANDROID OR NOT UNIX", "FALSE")
replace_in_file(self, os.path.join(self.source_folder, "CMakeLists.txt"), "elseif(EMSCRIPTEN)", "elseif(QNXNTO)\nelseif(EMSCRIPTEN)")

if self.options.with_quirc:
replace_in_file(self, os.path.join(self.source_folder, "CMakeLists.txt"), "add_subdirectory(3rdparty/quirc)", "# add_subdirectory(3rdparty/quirc)")


## Fix link to several dependencies
replace_in_file(self, os.path.join(self.source_folder, "modules", "imgcodecs", "CMakeLists.txt"), "JASPER_", "Jasper_")
replace_in_file(self, os.path.join(self.source_folder, "modules", "imgcodecs", "CMakeLists.txt"), "${GDAL_LIBRARY}", "GDAL::GDAL")
Expand Down Expand Up @@ -1427,10 +1434,11 @@ def generate(self):
tc.variables["WITH_OPENNI"] = False
tc.variables["WITH_OPENNI2"] = False
tc.variables["WITH_OPENVX"] = False
tc.variables["WITH_CAROTENE"] = False
tc.variables["WITH_PLAIDML"] = False
tc.variables["WITH_PVAPI"] = False
tc.variables["WITH_QT"] = self.options.get_safe("with_qt", False)
tc.variables["WITH_QUIRC"] = False
tc.variables["WITH_QUIRC"] = self.options.get_safe("with_quirc", False)
tc.variables["WITH_V4L"] = self.options.get_safe("with_v4l", False)
tc.variables["WITH_VA"] = False
tc.variables["WITH_VA_INTEL"] = False
Expand Down

0 comments on commit a9001e4

Please sign in to comment.