mirror of
https://invent.kde.org/frameworks/kimageformats.git
synced 2025-07-18 20:04:16 -04:00
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:
@ -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)
|
||||
|
||||
|
Reference in New Issue
Block a user