2019-08-13 00:22:30 +08:00
|
|
|
diff --git a/cmake/OpenCVFindLibsGrfmt.cmake b/cmake/OpenCVFindLibsGrfmt.cmake
|
|
|
|
index 227cfb2..7a97a19 100644
|
2018-02-22 08:47:42 +08:00
|
|
|
--- a/cmake/OpenCVFindLibsGrfmt.cmake
|
|
|
|
+++ b/cmake/OpenCVFindLibsGrfmt.cmake
|
|
|
|
@@ -6,7 +6,7 @@
|
|
|
|
if(BUILD_ZLIB)
|
|
|
|
ocv_clear_vars(ZLIB_FOUND)
|
|
|
|
else()
|
|
|
|
- find_package(ZLIB "${MIN_VER_ZLIB}")
|
|
|
|
+ find_package(ZLIB "${MIN_VER_ZLIB}" REQUIRED)
|
|
|
|
if(ZLIB_FOUND AND ANDROID)
|
2018-03-04 18:31:06 +08:00
|
|
|
if(ZLIB_LIBRARIES MATCHES "/usr/(lib|lib32|lib64)/libz.so$")
|
|
|
|
set(ZLIB_LIBRARIES z)
|
|
|
|
@@ -30,7 +30,7 @@ if(WITH_JPEG)
|
2018-02-22 08:47:42 +08:00
|
|
|
if(BUILD_JPEG)
|
|
|
|
ocv_clear_vars(JPEG_FOUND)
|
|
|
|
else()
|
|
|
|
- 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)
|
2019-08-13 00:22:30 +08:00
|
|
|
@@ -74,7 +74,7 @@ if(WITH_TIFF)
|
2018-02-22 08:47:42 +08:00
|
|
|
if(BUILD_TIFF)
|
|
|
|
ocv_clear_vars(TIFF_FOUND)
|
|
|
|
else()
|
|
|
|
- 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()
|
2019-08-13 00:22:30 +08:00
|
|
|
@@ -117,7 +117,7 @@ if(WITH_WEBP)
|
2018-02-22 08:47:42 +08:00
|
|
|
if(BUILD_WEBP)
|
|
|
|
ocv_clear_vars(WEBP_FOUND WEBP_LIBRARY WEBP_LIBRARIES WEBP_INCLUDE_DIR)
|
|
|
|
else()
|
|
|
|
- include(cmake/OpenCVFindWebP.cmake)
|
|
|
|
+ find_package(WebP REQUIRED)
|
|
|
|
if(WEBP_FOUND)
|
|
|
|
set(HAVE_WEBP 1)
|
|
|
|
endif()
|
2019-08-13 00:22:30 +08:00
|
|
|
@@ -158,7 +158,7 @@ if(WITH_JASPER)
|
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)
|
2019-08-13 00:22:30 +08:00
|
|
|
@@ -182,7 +182,7 @@ if(WITH_PNG)
|
2018-02-22 08:47:42 +08:00
|
|
|
if(BUILD_PNG)
|
|
|
|
ocv_clear_vars(PNG_FOUND)
|
|
|
|
else()
|
|
|
|
- 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)
|
2019-08-13 00:22:30 +08:00
|
|
|
@@ -213,7 +213,7 @@ endif()
|
|
|
|
if(WITH_OPENEXR)
|
|
|
|
ocv_clear_vars(HAVE_OPENEXR)
|
|
|
|
if(NOT BUILD_OPENEXR)
|
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)
|
|
|
|
@@ -231,7 +231,7 @@ endif()
|
|
|
|
|
2018-02-22 08:47:42 +08:00
|
|
|
# --- GDAL (optional) ---
|
|
|
|
if(WITH_GDAL)
|
|
|
|
- find_package(GDAL QUIET)
|
2019-08-13 00:22:30 +08:00
|
|
|
+ find_package(GDAL REQUIRED)
|
|
|
|
|
2018-02-22 08:47:42 +08:00
|
|
|
if(NOT GDAL_FOUND)
|
|
|
|
set(HAVE_GDAL NO)
|
2019-08-13 00:22:30 +08:00
|
|
|
@@ -243,7 +243,7 @@ if(WITH_GDAL)
|
2018-02-22 08:47:42 +08:00
|
|
|
endif()
|
2019-08-13 00:22:30 +08:00
|
|
|
|
2018-02-22 08:47:42 +08:00
|
|
|
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)
|
2019-08-13 00:22:30 +08:00
|
|
|
@@ -273,4 +273,4 @@ if(WITH_IMGCODEC_PFM)
|
|
|
|
set(HAVE_IMGCODEC_PFM ON)
|
|
|
|
elseif(DEFINED WITH_IMGCODEC_PFM)
|
|
|
|
set(HAVE_IMGCODEC_PFM OFF)
|
|
|
|
-endif()
|
|
|
|
\ No newline at end of file
|
|
|
|
+endif()
|
|
|
|
diff --git a/cmake/OpenCVFindLibsPerf.cmake b/cmake/OpenCVFindLibsPerf.cmake
|
|
|
|
index a658bf6..5c9411a 100644
|
|
|
|
--- a/cmake/OpenCVFindLibsPerf.cmake
|
|
|
|
+++ b/cmake/OpenCVFindLibsPerf.cmake
|
|
|
|
@@ -41,14 +41,9 @@ endif(WITH_CUDA)
|
|
|
|
|
|
|
|
# --- Eigen ---
|
|
|
|
if(WITH_EIGEN AND NOT HAVE_EIGEN)
|
|
|
|
- find_package(Eigen3 QUIET)
|
|
|
|
+ find_package(Eigen3 REQUIRED)
|
|
|
|
|
|
|
|
if(Eigen3_FOUND)
|
|
|
|
- if(TARGET Eigen3::Eigen)
|
|
|
|
- # Use Eigen3 imported target if possible
|
|
|
|
- list(APPEND OPENCV_LINKER_LIBS Eigen3::Eigen)
|
|
|
|
- set(HAVE_EIGEN 1)
|
|
|
|
- else()
|
|
|
|
if(DEFINED EIGEN3_INCLUDE_DIRS)
|
|
|
|
set(EIGEN_INCLUDE_PATH ${EIGEN3_INCLUDE_DIRS})
|
|
|
|
set(HAVE_EIGEN 1)
|
|
|
|
@@ -56,7 +51,6 @@ if(WITH_EIGEN AND NOT HAVE_EIGEN)
|
|
|
|
set(EIGEN_INCLUDE_PATH ${EIGEN3_INCLUDE_DIR})
|
|
|
|
set(HAVE_EIGEN 1)
|
|
|
|
endif()
|
|
|
|
- endif()
|
|
|
|
if(HAVE_EIGEN)
|
|
|
|
if(DEFINED EIGEN3_WORLD_VERSION) # CMake module
|
|
|
|
set(EIGEN_WORLD_VERSION ${EIGEN3_WORLD_VERSION})
|
|
|
|
@@ -67,6 +61,7 @@ if(WITH_EIGEN AND NOT HAVE_EIGEN)
|
|
|
|
set(EIGEN_MAJOR_VERSION ${EIGEN3_VERSION_MINOR})
|
|
|
|
set(EIGEN_MINOR_VERSION ${EIGEN3_VERSION_PATCH})
|
|
|
|
endif()
|
|
|
|
+ ocv_include_directories(${EIGEN_INCLUDE_PATH})
|
|
|
|
endif()
|
|
|
|
endif()
|
|
|
|
|