From 3b191bf2ddc65a97f5c2ec3f7650b112b8e001dc Mon Sep 17 00:00:00 2001 From: Suleyman TURKMEN Date: Fri, 2 Feb 2018 14:19:29 +0300 Subject: [PATCH] update CMakeList.txt --- CMakeLists.txt | 1 + cmake/OpenCVFindWebP.cmake | 2 +- modules/highgui/CMakeLists.txt | 4 ++++ 3 files changed, 6 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 66f03de886..d5eedfbf36 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -197,6 +197,7 @@ OCV_OPTION(BUILD_JASPER "Build libjasper from source" WIN32 O OCV_OPTION(BUILD_JPEG "Build libjpeg from source" WIN32 OR ANDROID OR APPLE) OCV_OPTION(BUILD_PNG "Build libpng from source" WIN32 OR ANDROID OR APPLE) OCV_OPTION(BUILD_OPENEXR "Build openexr from source" (WIN32 OR ANDROID OR APPLE) AND NOT WINRT) +OCV_OPTION(BUILD_WEBP "Build WebP from source" (WIN32 OR ANDROID OR APPLE) AND NOT WINRT) OCV_OPTION(BUILD_TBB "Download and build TBB from source" ANDROID ) OCV_OPTION(BUILD_IPP_IW "Build IPP IW from source" NOT MINGW IF (X86_64 OR X86) AND NOT WINRT ) OCV_OPTION(BUILD_ITT "Build Intel ITT from source" NOT MINGW IF (X86_64 OR X86) AND NOT WINRT AND NOT APPLE_FRAMEWORK ) diff --git a/cmake/OpenCVFindWebP.cmake b/cmake/OpenCVFindWebP.cmake index 740e985128..24f4f93efe 100644 --- a/cmake/OpenCVFindWebP.cmake +++ b/cmake/OpenCVFindWebP.cmake @@ -23,7 +23,7 @@ else() FIND_LIBRARY(WEBP_LIBRARY NAMES webp) MARK_AS_ADVANCED(WEBP_LIBRARY) - # handle the QUIETLY and REQUIRED arguments and set WEBFOUND_FOUND to TRUE if + # handle the QUIETLY and REQUIRED arguments and set WEBP_FOUND to TRUE if # all listed variables are TRUE INCLUDE(${CMAKE_ROOT}/Modules/FindPackageHandleStandardArgs.cmake) FIND_PACKAGE_HANDLE_STANDARD_ARGS(WebP DEFAULT_MSG WEBP_LIBRARY WEBP_INCLUDE_DIR) diff --git a/modules/highgui/CMakeLists.txt b/modules/highgui/CMakeLists.txt index 99d7188661..af54d9c3a0 100644 --- a/modules/highgui/CMakeLists.txt +++ b/modules/highgui/CMakeLists.txt @@ -20,6 +20,10 @@ if(APPLE) list(APPEND HIGHGUI_LIBRARIES ${ZLIB_LIBRARIES}) endif() +if(HAVE_WEBP) + add_definitions(-DHAVE_WEBP) +endif() + set(highgui_hdrs ${CMAKE_CURRENT_LIST_DIR}/src/precomp.hpp )