2018-02-22 08:47:42 +08:00
|
|
|
--- a/cmake/OpenCVFindLibsGrfmt.cmake
|
|
|
|
+++ b/cmake/OpenCVFindLibsGrfmt.cmake
|
2021-06-22 04:21:02 +08:00
|
|
|
@@ -11,7 +11,7 @@ else()
|
|
|
|
set(_zlib_ORIG_CMAKE_FIND_LIBRARY_SUFFIXES ${CMAKE_FIND_LIBRARY_SUFFIXES})
|
|
|
|
set(CMAKE_FIND_LIBRARY_SUFFIXES .so)
|
|
|
|
endif()
|
2018-02-22 08:47:42 +08:00
|
|
|
- find_package(ZLIB "${MIN_VER_ZLIB}")
|
|
|
|
+ find_package(ZLIB "${MIN_VER_ZLIB}" REQUIRED)
|
2021-06-22 04:21:02 +08:00
|
|
|
if(ANDROID)
|
|
|
|
set(CMAKE_FIND_LIBRARY_SUFFIXES ${_zlib_ORIG_CMAKE_FIND_LIBRARY_SUFFIXES})
|
|
|
|
unset(_zlib_ORIG_CMAKE_FIND_LIBRARY_SUFFIXES)
|
|
|
|
@@ -41,7 +41,7 @@ if(WITH_JPEG)
|
2018-02-22 08:47:42 +08:00
|
|
|
ocv_clear_vars(JPEG_FOUND)
|
|
|
|
else()
|
2021-01-29 11:23:57 +08:00
|
|
|
ocv_clear_internal_cache_vars(JPEG_LIBRARY JPEG_INCLUDE_DIR)
|
2018-02-22 08:47:42 +08:00
|
|
|
- include(FindJPEG)
|
|
|
|
+ find_package(JPEG REQUIRED)
|
|
|
|
endif()
|
2019-08-13 00:22:30 +08:00
|
|
|
|
2018-02-22 08:47:42 +08:00
|
|
|
if(NOT JPEG_FOUND)
|
2021-06-22 04:21:02 +08:00
|
|
|
@@ -87,7 +87,7 @@ if(WITH_TIFF)
|
2018-02-22 08:47:42 +08:00
|
|
|
ocv_clear_vars(TIFF_FOUND)
|
|
|
|
else()
|
2021-01-29 11:23:57 +08:00
|
|
|
ocv_clear_internal_cache_vars(TIFF_LIBRARY TIFF_INCLUDE_DIR)
|
2018-02-22 08:47:42 +08:00
|
|
|
- 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()
|
2021-06-22 04:21:02 +08:00
|
|
|
@@ -131,7 +131,7 @@ if(WITH_WEBP)
|
2018-02-22 08:47:42 +08:00
|
|
|
ocv_clear_vars(WEBP_FOUND WEBP_LIBRARY WEBP_LIBRARIES WEBP_INCLUDE_DIR)
|
|
|
|
else()
|
2021-01-29 11:23:57 +08:00
|
|
|
ocv_clear_internal_cache_vars(WEBP_LIBRARY WEBP_INCLUDE_DIR)
|
2018-02-22 08:47:42 +08:00
|
|
|
- include(cmake/OpenCVFindWebP.cmake)
|
2022-04-14 02:26:56 +08:00
|
|
|
+ find_package(WEBP NAMES WebP REQUIRED)
|
2018-02-22 08:47:42 +08:00
|
|
|
if(WEBP_FOUND)
|
|
|
|
set(HAVE_WEBP 1)
|
|
|
|
endif()
|
2021-06-22 04:21:02 +08:00
|
|
|
@@ -172,7 +172,7 @@ if(WITH_OPENJPEG)
|
2021-01-29 11:23:57 +08:00
|
|
|
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)
|
2021-06-22 04:21:02 +08:00
|
|
|
@@ -200,7 +200,7 @@ if(WITH_JASPER AND NOT HAVE_OPENJPEG)
|
2018-02-22 08:47:42 +08:00
|
|
|
if(BUILD_JASPER)
|
|
|
|
ocv_clear_vars(JASPER_FOUND)
|
|
|
|
else()
|
|
|
|
- include(FindJasper)
|
|
|
|
+ find_package(Jasper REQUIRED)
|
|
|
|
endif()
|
2019-08-13 00:22:30 +08:00
|
|
|
|
2018-02-22 08:47:42 +08:00
|
|
|
if(NOT JASPER_FOUND)
|
2021-06-22 04:21:02 +08:00
|
|
|
@@ -225,7 +225,7 @@ if(WITH_PNG)
|
2018-02-22 08:47:42 +08:00
|
|
|
ocv_clear_vars(PNG_FOUND)
|
|
|
|
else()
|
2021-01-29 11:23:57 +08:00
|
|
|
ocv_clear_internal_cache_vars(PNG_LIBRARY PNG_INCLUDE_DIR)
|
2018-02-22 08:47:42 +08:00
|
|
|
- include(FindPNG)
|
|
|
|
+ find_package(PNG REQUIRED)
|
|
|
|
if(PNG_FOUND)
|
|
|
|
include(CheckIncludeFile)
|
|
|
|
check_include_file("${PNG_PNG_INCLUDE_DIR}/libpng/png.h" HAVE_LIBPNG_PNG_H)
|
2021-06-22 04:21:02 +08:00
|
|
|
@@ -257,7 +257,7 @@ if(WITH_OPENEXR)
|
2019-08-13 00:22:30 +08:00
|
|
|
ocv_clear_vars(HAVE_OPENEXR)
|
|
|
|
if(NOT BUILD_OPENEXR)
|
2021-01-29 11:23:57 +08:00
|
|
|
ocv_clear_internal_cache_vars(OPENEXR_INCLUDE_PATHS OPENEXR_LIBRARIES OPENEXR_ILMIMF_LIBRARY OPENEXR_VERSION)
|
2018-02-22 08:47:42 +08:00
|
|
|
- include("${OpenCV_SOURCE_DIR}/cmake/OpenCVFindOpenEXR.cmake")
|
|
|
|
+ find_package(OpenEXR REQUIRED)
|
|
|
|
endif()
|
2019-08-13 00:22:30 +08:00
|
|
|
|
|
|
|
if(OPENEXR_FOUND)
|
2021-06-22 04:21:02 +08:00
|
|
|
@@ -275,7 +275,7 @@ endif()
|
2019-08-13 00:22:30 +08:00
|
|
|
|
2018-02-22 08:47:42 +08:00
|
|
|
# --- GDAL (optional) ---
|
|
|
|
if(WITH_GDAL)
|
|
|
|
- find_package(GDAL QUIET)
|
2021-01-29 11:23:57 +08:00
|
|
|
+ find_package(GDAL REQUIRED)
|
2019-08-13 00:22:30 +08:00
|
|
|
|
2018-02-22 08:47:42 +08:00
|
|
|
if(NOT GDAL_FOUND)
|
|
|
|
set(HAVE_GDAL NO)
|
2021-06-22 04:21:02 +08:00
|
|
|
@@ -287,7 +287,7 @@ if(WITH_GDAL)
|
2018-02-22 08:47:42 +08:00
|
|
|
endif()
|
2019-08-13 00:22:30 +08:00
|
|
|
|
2021-01-29 11:23:57 +08:00
|
|
|
if(WITH_GDCM)
|
2018-02-22 08:47:42 +08:00
|
|
|
- find_package(GDCM QUIET)
|
|
|
|
+ find_package(GDCM REQUIRED)
|
|
|
|
if(NOT GDCM_FOUND)
|
|
|
|
set(HAVE_GDCM NO)
|
|
|
|
ocv_clear_vars(GDCM_VERSION GDCM_LIBRARIES)
|