Import the WebP image I/O code from kde-runtime

The plugin export mechanism has been patched up (including the addition
of the JSON file), and the FindWebP.cmake file is new.

Writing is currently disabled, as it produces broken images.

Autotests are generated using the cwebp and dwebp utilities distributed
with the libwebp reference library.

REVIEW: 115355
This commit is contained in:
Alex Merry
2014-01-19 11:23:06 +00:00
parent f490ab0761
commit 7177296335
16 changed files with 539 additions and 0 deletions

View File

@ -119,6 +119,32 @@ install(FILES tga.desktop DESTINATION ${SERVICES_INSTALL_DIR}/qimageioplugins/)
##################################
find_package(WebP COMPONENTS WebP)
set_package_properties(WebP PROPERTIES
TYPE OPTIONAL
PURPOSE "Required for the QImage plugin for WebP images"
)
if(WebP_FOUND)
add_library(kimg_webp MODULE webp.cpp)
target_link_libraries(kimg_webp Qt5::Gui WebP::WebP)
install(TARGETS kimg_webp DESTINATION ${QT_PLUGIN_INSTALL_DIR}/imageformats/)
install(FILES webp.desktop DESTINATION ${SERVICES_INSTALL_DIR}/qimageioplugins/)
find_package(SharedMimeInfo)
set_package_properties(SharedMimeInfo PROPERTIES
TYPE RECOMMENDED
PURPOSE "Required to install the WebP MIME Type information"
)
if (SharedMimeInfo_FOUND)
install(FILES webp.xml DESTINATION ${XDG_MIME_INSTALL_DIR})
update_xdg_mimetypes(${XDG_MIME_INSTALL_DIR})
endif()
endif()
##################################
add_library(kimg_xcf MODULE xcf.cpp)
target_link_libraries(kimg_xcf Qt5::Gui)