mirror of
https://invent.kde.org/frameworks/kimageformats.git
synced 2025-05-28 00:30:23 -04:00
Disable the DDS and JPEG-2000 plugins when Qt version is 5.3 or later
QtImageFormats 5.3 comes with DDS and JPEG-2000 plugins that support more options and are generally better than our plugins. The only advantage our plugins offer is that the Qt DDS plugin does not work on sequential devices, while ours does. This is outweighed by other improvements, though, such as supporting more variants. REVIEW: 119590
This commit is contained in:
parent
c9ca1f1862
commit
3d45b270ea
@ -30,13 +30,17 @@ if (UNIX)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
find_package(Jasper)
|
||||
set_package_properties(Jasper PROPERTIES
|
||||
DESCRIPTION "A library for handling JPEG-2000 images"
|
||||
PURPOSE "Required for the QImage plugin for JPEG-2000 images"
|
||||
URL "http://www.ece.uvic.ca/~mdadams/jasper"
|
||||
TYPE OPTIONAL
|
||||
)
|
||||
# QtImageFormats 5.3 comes with a JPEG-2000 plugin; don't duplicate it here
|
||||
# TODO: remove our JPEG-2000 plugin when we depend on Qt 5.3.
|
||||
if (Qt5Gui_VERSION VERSION_LESS 5.3.0)
|
||||
find_package(Jasper)
|
||||
set_package_properties(Jasper PROPERTIES
|
||||
DESCRIPTION "A library for handling JPEG-2000 images"
|
||||
PURPOSE "Required for the QImage plugin for JPEG-2000 images"
|
||||
URL "http://www.ece.uvic.ca/~mdadams/jasper"
|
||||
TYPE OPTIONAL
|
||||
)
|
||||
endif()
|
||||
|
||||
find_package(OpenEXR)
|
||||
set_package_properties(OpenEXR PROPERTIES
|
||||
|
@ -2,11 +2,15 @@
|
||||
|
||||
##################################
|
||||
|
||||
add_library(kimg_dds MODULE dds.cpp)
|
||||
target_link_libraries(kimg_dds Qt5::Gui)
|
||||
if (Qt5Gui_VERSION VERSION_LESS 5.3.0)
|
||||
add_library(kimg_dds MODULE dds.cpp)
|
||||
target_link_libraries(kimg_dds Qt5::Gui)
|
||||
|
||||
install(TARGETS kimg_dds DESTINATION ${QT_PLUGIN_INSTALL_DIR}/imageformats/)
|
||||
install(FILES dds.desktop DESTINATION ${SERVICES_INSTALL_DIR}/qimageioplugins/)
|
||||
install(TARGETS kimg_dds DESTINATION ${QT_PLUGIN_INSTALL_DIR}/imageformats/)
|
||||
install(FILES dds.desktop DESTINATION ${SERVICES_INSTALL_DIR}/qimageioplugins/)
|
||||
else()
|
||||
install(FILES dds-qt.desktop RENAME dds.desktop DESTINATION ${SERVICES_INSTALL_DIR}/qimageioplugins/)
|
||||
endif()
|
||||
|
||||
##################################
|
||||
|
||||
@ -34,6 +38,9 @@ if(JASPER_FOUND)
|
||||
|
||||
install(TARGETS kimg_jp2 DESTINATION ${QT_PLUGIN_INSTALL_DIR}/imageformats/)
|
||||
install(FILES jp2.desktop DESTINATION ${SERVICES_INSTALL_DIR}/qimageioplugins/)
|
||||
elseif (NOT Qt5Gui_VERSION VERSION_LESS 5.3.0)
|
||||
# need this for Qt's version of the plugin
|
||||
install(FILES jp2.desktop DESTINATION ${SERVICES_INSTALL_DIR}/qimageioplugins/)
|
||||
endif()
|
||||
|
||||
##################################
|
||||
|
7
src/imageformats/dds-qt.desktop
Normal file
7
src/imageformats/dds-qt.desktop
Normal file
@ -0,0 +1,7 @@
|
||||
[Desktop Entry]
|
||||
Type=Service
|
||||
X-KDE-ServiceTypes=QImageIOPlugins
|
||||
X-KDE-ImageFormat=dds
|
||||
X-KDE-MimeType=image/x-dds
|
||||
X-KDE-Read=true
|
||||
X-KDE-Write=true
|
Loading…
Reference in New Issue
Block a user