From f8f40012ff5484b31980cc295c7826a11d7386dc Mon Sep 17 00:00:00 2001 From: Li Xinwei <1326710505@qq.com> Date: Thu, 20 May 2021 10:50:18 +0800 Subject: FindWrapWebP.cmake: fix CMake warning CMake Warning (dev) at .../cmake_64/share/cmake-3.19/Modules/ FindPackageHandleStandardArgs.cmake:426 (message): The package name passed to `find_package_handle_standard_args` (WebP) does not match the name of the calling package (WrapWebP). This can lead to problems in calling code that expects `find_package` result variables (e.g., `_FOUND`) to follow a certain pattern. Also, make find_package(PkgConfig) QUIET. Pick-to: 6.1 Change-Id: Ib5daaab88f74272c638d40f8b51226ae9636fbad Reviewed-by: Alexandru Croitor --- cmake/FindWrapWebP.cmake | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'cmake') diff --git a/cmake/FindWrapWebP.cmake b/cmake/FindWrapWebP.cmake index 487c18b..0f41386 100644 --- a/cmake/FindWrapWebP.cmake +++ b/cmake/FindWrapWebP.cmake @@ -20,7 +20,7 @@ if(TARGET WebP::webp AND TARGET WebP::webpdemux AND TARGET WebP::libwebpmux) return() endif() -find_package(PkgConfig) +find_package(PkgConfig QUIET) pkg_check_modules(PC_WebP libwebp) pkg_check_modules(PC_WebPDemux libwebpdemux) pkg_check_modules(PC_WebPMux libwebpmux) @@ -40,13 +40,13 @@ find_path(WebP_mux_INCLUDE_DIR NAMES "webp/mux.h" HINTS ${PC_WebPMux_INCLUDEDIR}) include(FindPackageHandleStandardArgs) -find_package_handle_standard_args(WebP DEFAULT_MSG WebP_INCLUDE_DIR WebP_LIBRARY - WebP_demux_INCLUDE_DIR WebP_demux_LIBRARY - WebP_mux_INCLUDE_DIR WebP_mux_LIBRARY) +find_package_handle_standard_args(WrapWebP DEFAULT_MSG WebP_INCLUDE_DIR WebP_LIBRARY + WebP_demux_INCLUDE_DIR WebP_demux_LIBRARY + WebP_mux_INCLUDE_DIR WebP_mux_LIBRARY) mark_as_advanced(WebP_INCLUDE_DIR WebP_LIBRARY WebP_demux_INCLUDE_DIR WebP_demux_LIBRARY WebP_mux_INCLUDE_DIR WebP_mux_LIBRARY) -if(WebP_FOUND) - set(WrapWebP_FOUND ON) +if(WrapWebP_FOUND) + set(WebP_FOUND ON) add_library(WrapWebP::WrapWebP INTERFACE IMPORTED) target_link_libraries(WrapWebP::WrapWebP INTERFACE ${WebP_LIBRARY} ${WebP_demux_LIBRARY} ${WebP_mux_LIBRARY}) target_include_directories(WrapWebP::WrapWebP -- cgit v1.2.1