diff options
author | Li Xinwei <1326710505@qq.com> | 2021-05-20 10:50:18 +0800 |
---|---|---|
committer | Li Xinwei <1326710505@qq.com> | 2021-05-20 22:06:13 +0800 |
commit | f8f40012ff5484b31980cc295c7826a11d7386dc (patch) | |
tree | ce575ffa37976806e1f58b749ad774eff279ee32 /cmake | |
parent | cdcf4a3dcd02fd6ea670dce066317ed81ada59e7 (diff) | |
download | qtimageformats-f8f40012ff5484b31980cc295c7826a11d7386dc.tar.gz |
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 <alexandru.croitor@qt.io>
Diffstat (limited to 'cmake')
-rw-r--r-- | cmake/FindWrapWebP.cmake | 12 |
1 files changed, 6 insertions, 6 deletions
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 |