summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexandru Croitor <alexandru.croitor@qt.io>2019-10-15 14:36:54 +0200
committerAlexandru Croitor <alexandru.croitor@qt.io>2019-10-15 13:12:21 +0000
commit5a6f87a2d368639673e1527c2efc03e236ac1812 (patch)
treeb14749c39125796c870efe876d6f96d78562ce53
parenta56d52b553b16b8f944c62368cdc38db6784b7c3 (diff)
Adjust WebP Find module
Imageformats now also requires finding the mux library. Change-Id: Iedd511e10aa8a10a67564cc7288baaf64d51e39f Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
-rw-r--r--cmake/FindWrapWebP.cmake18
1 files changed, 12 insertions, 6 deletions
diff --git a/cmake/FindWrapWebP.cmake b/cmake/FindWrapWebP.cmake
index e4d0b33..de4c414 100644
--- a/cmake/FindWrapWebP.cmake
+++ b/cmake/FindWrapWebP.cmake
@@ -6,36 +6,42 @@
# paths as hints.
find_package(WebP QUIET)
-if(TARGET WebP::webp AND TARGET WebP::webpdemux)
+if(TARGET WebP::webp AND TARGET WebP::webpdemux AND TARGET WebP::webpmux)
set(WrapWebP_FOUND ON)
add_library(WrapWebP::WrapWebP INTERFACE IMPORTED)
- target_link_libraries(WrapWebP::WrapWebP INTERFACE WebP::webp WebP::webpdemux)
+ target_link_libraries(WrapWebP::WrapWebP INTERFACE WebP::webp WebP::webpdemux Webp::webpmux)
return()
endif()
find_package(PkgConfig)
pkg_check_modules(PC_WebP libwebp)
pkg_check_modules(PC_WebPDemux libwebpdemux)
+pkg_check_modules(PC_WebPMux libwebpmux)
find_library(WebP_LIBRARY NAMES "webp"
HINTS ${PC_WebP_LIBDIR})
find_library(WebP_demux_LIBRARY NAMES "webpdemux"
HINTS ${PC_WebPDemux_LIBDIR})
+find_library(WebP_mux_LIBRARY NAMES "webpmux"
+ HINTS ${PC_WebPMux_LIBDIR})
find_path(WebP_INCLUDE_DIR NAMES "webp/decode.h"
HINTS ${PC_WebP_INCLUDEDIR})
find_path(WebP_demux_INCLUDE_DIR NAMES "webp/demux.h"
HINTS ${PC_WebPDemux_INCLUDEDIR})
+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_demux_INCLUDE_DIR WebP_demux_LIBRARY
+ WebP_mux_INCLUDE_DIR WebP_mux_LIBRARY)
-mark_as_advanced(WebP_INCLUDE_DIR WebP_LIBRARY WebP_INCLUDE_DIR WebP_demux_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)
add_library(WrapWebP::WrapWebP INTERFACE IMPORTED)
- target_link_libraries(WrapWebP::WrapWebP INTERFACE ${WebP_LIBRARY} ${WebP_demux_LIBRARY})
+ target_link_libraries(WrapWebP::WrapWebP INTERFACE ${WebP_LIBRARY} ${WebP_demux_LIBRARY} ${WebP_mux_LIBRARY})
target_include_directories(WrapWebP::WrapWebP
- INTERFACE ${WebP_INCLUDE_DIR} ${WebP_demux_INCLUDE_DIR})
+ INTERFACE ${WebP_INCLUDE_DIR} ${WebP_demux_INCLUDE_DIR} ${WebP_mux_INCLUDE_DIR})
endif()