vcpkg/ports/opencv4/0003-force-package-requirements.patch
Stefano Sinigardi ca1501f4b2
[opencv] update to 4.9 (#38928)
Co-authored-by: Howard Su <howard0su@gmail.com>
Co-authored-by: Nick Logozzo <nlogozzo225@gmail.com>
Co-authored-by: sidy3d <sidy3d@users.noreply.github.com>
Co-authored-by: c8ef <c8ef@outlook.com>
Co-authored-by: autoantwort <41973254+autoantwort@users.noreply.github.com>
Co-authored-by: jim wang <122244446+jimwang118@users.noreply.github.com>
Co-authored-by: Lily Wang <94091114+LilyWangLL@users.noreply.github.com>
Co-authored-by: Lily Wang <v-lilywang@microsoft.com>
Co-authored-by: Matthias Kuhn <matthias@opengis.ch>
Co-authored-by: Mark Harmstone <mark@harmstone.com>
Co-authored-by: Kai Pastor <dg0yt@darc.de>
Co-authored-by: Alexandre Bique <bique.alexandre@gmail.com>
Co-authored-by: Peter Adam Korodi <52385411+kp-cat@users.noreply.github.com>
Co-authored-by: Jakub Melka <mgr.jakub.melka@gmail.com>
Co-authored-by: LE GARREC Vincent <github@le-garrec.fr>
Co-authored-by: Josh Harris <126129571+harris-josh@users.noreply.github.com>
Co-authored-by: Theodore Tsirpanis <theodore.tsirpanis@tiledb.com>
Co-authored-by: Kaoru <shiinasama2001@gmail.com>
Co-authored-by: Javier Matos Denizac <javier.matosd@gmail.com>
Co-authored-by: Javier Matos <javiermatos@Javiers-Laptop.local>
Co-authored-by: Pravila <pravila0011@gmail.com>
Co-authored-by: JacobBarthelmeh <jacob@wolfssl.com>
Co-authored-by: myd7349 <myd7349@gmail.com>
Co-authored-by: Billy O'Neal <bion@microsoft.com>
Co-authored-by: Frank <65999885+FrankXie05@users.noreply.github.com>
Co-authored-by: Cheney Wang <38240633+Cheney-W@users.noreply.github.com>
Co-authored-by: 王太阳 <wangfangkai@qq.com>
Co-authored-by: 王方凯 <fk.wang@hydro-tech.cn>
Co-authored-by: Chuck Walbourn <walbourn@users.noreply.github.com>
Co-authored-by: Jaap Aarts <JAicewizard@users.noreply.github.com>
2024-11-05 11:17:22 -08:00

123 lines
3.7 KiB
Diff

--- a/cmake/OpenCVFindLibsGrfmt.cmake
+++ b/cmake/OpenCVFindLibsGrfmt.cmake
@@ -11,7 +11,7 @@ else()
set(_zlib_ORIG_CMAKE_FIND_LIBRARY_SUFFIXES ${CMAKE_FIND_LIBRARY_SUFFIXES})
set(CMAKE_FIND_LIBRARY_SUFFIXES .so)
endif()
- find_package(ZLIB "${MIN_VER_ZLIB}")
+ find_package(ZLIB "${MIN_VER_ZLIB}" REQUIRED)
if(ANDROID)
set(CMAKE_FIND_LIBRARY_SUFFIXES ${_zlib_ORIG_CMAKE_FIND_LIBRARY_SUFFIXES})
unset(_zlib_ORIG_CMAKE_FIND_LIBRARY_SUFFIXES)
@@ -41,7 +41,7 @@ endif()
if(WITH_AVIF)
ocv_clear_internal_cache_vars(AVIF_LIBRARY AVIF_INCLUDE_DIR)
- include(cmake/OpenCVFindAVIF.cmake)
+ find_package(libavif REQUIRED)
if(AVIF_FOUND)
set(HAVE_AVIF 1)
endif()
@@ -53,7 +53,7 @@ if(WITH_JPEG)
ocv_clear_vars(JPEG_FOUND)
else()
ocv_clear_internal_cache_vars(JPEG_LIBRARY JPEG_INCLUDE_DIR)
- include(FindJPEG)
+ find_package(JPEG REQUIRED)
endif()
if(NOT JPEG_FOUND)
@@ -99,7 +99,7 @@ if(WITH_TIFF)
ocv_clear_vars(TIFF_FOUND)
else()
ocv_clear_internal_cache_vars(TIFF_LIBRARY TIFF_INCLUDE_DIR)
- include(FindTIFF)
+ find_package(TIFF REQUIRED)
if(TIFF_FOUND)
ocv_parse_header("${TIFF_INCLUDE_DIR}/tiff.h" TIFF_VERSION_LINES TIFF_VERSION_CLASSIC TIFF_VERSION_BIG TIFF_VERSION TIFF_BIGTIFF_VERSION)
endif()
@@ -143,7 +143,7 @@ if(WITH_WEBP)
ocv_clear_vars(WEBP_FOUND WEBP_LIBRARY WEBP_LIBRARIES WEBP_INCLUDE_DIR)
else()
ocv_clear_internal_cache_vars(WEBP_LIBRARY WEBP_INCLUDE_DIR)
- include(cmake/OpenCVFindWebP.cmake)
+ find_package(WEBP NAMES WebP REQUIRED)
if(WEBP_FOUND)
set(HAVE_WEBP 1)
endif()
@@ -184,7 +184,7 @@ if(WITH_OPENJPEG)
if(BUILD_OPENJPEG)
ocv_clear_vars(OpenJPEG_FOUND)
else()
- find_package(OpenJPEG QUIET)
+ find_package(OpenJPEG REQUIRED)
endif()
if(NOT OpenJPEG_FOUND OR OPENJPEG_MAJOR_VERSION LESS 2)
@@ -213,7 +213,7 @@ if(WITH_JASPER AND NOT HAVE_OPENJPEG)
if(BUILD_JASPER)
ocv_clear_vars(JASPER_FOUND)
else()
- include(FindJasper)
+ find_package(Jasper REQUIRED)
endif()
if(NOT JASPER_FOUND)
@@ -239,7 +239,7 @@ if(WITH_SPNG)
# CMakeConfig bug in SPNG, include is missing there in version 0.7.4 and older
# See https://github.com/randy408/libspng/pull/264
include(CMakeFindDependencyMacro)
- find_package(SPNG QUIET)
+ find_package(SPNG REQUIRED)
if(SPNG_FOUND)
set(SPNG_LIBRARY "spng::spng" CACHE INTERNAL "")
set(SPNG_LIBRARIES ${SPNG_LIBRARY})
@@ -273,7 +273,7 @@ if(NOT HAVE_SPNG AND WITH_PNG)
ocv_clear_vars(PNG_FOUND)
else()
ocv_clear_internal_cache_vars(PNG_LIBRARY PNG_INCLUDE_DIR)
- find_package(PNG QUIET)
+ find_package(PNG REQUIRED)
endif()
if(NOT PNG_FOUND)
@@ -296,7 +296,8 @@ if(WITH_OPENEXR)
ocv_clear_vars(HAVE_OPENEXR)
if(NOT BUILD_OPENEXR)
ocv_clear_internal_cache_vars(OPENEXR_INCLUDE_PATHS OPENEXR_LIBRARIES OPENEXR_ILMIMF_LIBRARY OPENEXR_VERSION)
- include("${OpenCV_SOURCE_DIR}/cmake/OpenCVFindOpenEXR.cmake")
+ find_package(OpenEXR CONFIG REQUIRED)
+ set(OPENEXR_FOUND TRUE)
endif()
if(OPENEXR_FOUND)
@@ -316,7 +316,7 @@ endif()
# --- GDAL (optional) ---
if(WITH_GDAL)
- find_package(GDAL QUIET)
+ find_package(GDAL REQUIRED)
if(NOT GDAL_FOUND)
set(HAVE_GDAL NO)
@@ -328,7 +328,7 @@ if(WITH_GDAL)
endif()
if(WITH_GDCM)
- find_package(GDCM QUIET)
+ find_package(GDCM REQUIRED)
if(NOT GDCM_FOUND)
set(HAVE_GDCM NO)
ocv_clear_vars(GDCM_VERSION GDCM_LIBRARIES)
--- a/modules/imgcodecs/CMakeLists.txt
+++ b/modules/imgcodecs/CMakeLists.txt
@@ -25,7 +25,7 @@ endif()
if(HAVE_WEBP)
add_definitions(-DHAVE_WEBP)
- ocv_include_directories(${WEBP_INCLUDE_DIR})
+ ocv_include_directories(${WEBP_INCLUDE_DIRS})
list(APPEND GRFMT_LIBS ${WEBP_LIBRARIES})
endif()