mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-12-21 18:07:55 +08:00
98 lines
2.7 KiB
Diff
98 lines
2.7 KiB
Diff
|
From 7e02db97d43cb9aa331da0dbfce8c372c19ad32b Mon Sep 17 00:00:00 2001
|
||
|
From: Robert Schumacher <roschuma@microsoft.com>
|
||
|
Date: Wed, 21 Feb 2018 17:20:49 -0800
|
||
|
Subject: [PATCH 4/5] use-find-package-required
|
||
|
|
||
|
---
|
||
|
cmake/OpenCVFindLibsGrfmt.cmake | 18 +++++++++---------
|
||
|
1 file changed, 9 insertions(+), 9 deletions(-)
|
||
|
|
||
|
diff --git a/cmake/OpenCVFindLibsGrfmt.cmake b/cmake/OpenCVFindLibsGrfmt.cmake
|
||
|
index 0ae58c8..5832d56 100644
|
||
|
--- 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)
|
||
|
if(ZLIB_LIBRARIES STREQUAL "${ANDROID_SYSROOT}/usr/lib/libz.so" OR
|
||
|
ZLIB_LIBRARIES STREQUAL "${ANDROID_SYSROOT}/usr/lib64/libz.so")
|
||
|
@@ -31,7 +31,7 @@ if(WITH_JPEG)
|
||
|
if(BUILD_JPEG)
|
||
|
ocv_clear_vars(JPEG_FOUND)
|
||
|
else()
|
||
|
- include(FindJPEG)
|
||
|
+ find_package(JPEG REQUIRED)
|
||
|
endif()
|
||
|
|
||
|
if(NOT JPEG_FOUND)
|
||
|
@@ -52,7 +52,7 @@ if(WITH_TIFF)
|
||
|
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()
|
||
|
@@ -95,7 +95,7 @@ if(WITH_WEBP)
|
||
|
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()
|
||
|
@@ -136,7 +136,7 @@ if(WITH_JASPER)
|
||
|
if(BUILD_JASPER)
|
||
|
ocv_clear_vars(JASPER_FOUND)
|
||
|
else()
|
||
|
- include(FindJasper)
|
||
|
+ find_package(Jasper REQUIRED)
|
||
|
endif()
|
||
|
|
||
|
if(NOT JASPER_FOUND)
|
||
|
@@ -160,7 +160,7 @@ if(WITH_PNG)
|
||
|
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)
|
||
|
@@ -192,7 +192,7 @@ if(WITH_OPENEXR)
|
||
|
if(BUILD_OPENEXR)
|
||
|
ocv_clear_vars(OPENEXR_FOUND)
|
||
|
else()
|
||
|
- include("${OpenCV_SOURCE_DIR}/cmake/OpenCVFindOpenEXR.cmake")
|
||
|
+ find_package(OpenEXR REQUIRED)
|
||
|
endif()
|
||
|
|
||
|
if(NOT OPENEXR_FOUND)
|
||
|
@@ -208,7 +208,7 @@ endif()
|
||
|
|
||
|
# --- GDAL (optional) ---
|
||
|
if(WITH_GDAL)
|
||
|
- find_package(GDAL QUIET)
|
||
|
+ find_package(GDAL REQUIRED)
|
||
|
|
||
|
if(NOT GDAL_FOUND)
|
||
|
set(HAVE_GDAL NO)
|
||
|
@@ -220,7 +220,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)
|
||
|
--
|
||
|
2.15.1.windows.2
|
||
|
|