2014-11-13 01:04:59 +02:00
|
|
|
project(kimgio)
|
|
|
|
|
|
|
|
macro_optional_find_package(Jasper)
|
2015-11-01 05:10:05 +02:00
|
|
|
set_package_properties(Jasper PROPERTIES
|
|
|
|
URL "http://www.ece.uvic.ca/~mdadams/jasper"
|
2016-04-13 07:46:13 +00:00
|
|
|
PURPOSE "Support for JPEG-2000 images"
|
2015-11-01 05:10:05 +02:00
|
|
|
TYPE OPTIONAL
|
|
|
|
)
|
2014-11-13 01:04:59 +02:00
|
|
|
|
|
|
|
macro_optional_find_package(OpenEXR)
|
2015-11-01 05:10:05 +02:00
|
|
|
set_package_properties(OpenEXR PROPERTIES
|
|
|
|
URL "http://www.openexr.com"
|
2016-04-13 07:46:13 +00:00
|
|
|
PURPOSE "Support for OpenEXR images"
|
2015-11-01 05:10:05 +02:00
|
|
|
TYPE OPTIONAL
|
|
|
|
)
|
|
|
|
|
|
|
|
macro_optional_find_package(WebP)
|
|
|
|
set_package_properties(WebP PROPERTIES
|
|
|
|
DESCRIPTION "A new image format for the Web"
|
|
|
|
URL "https://developers.google.com/speed/webp"
|
|
|
|
TYPE OPTIONAL
|
|
|
|
)
|
2014-11-13 01:04:59 +02:00
|
|
|
|
2015-11-01 15:28:30 +02:00
|
|
|
include_directories(${KDE4_KDEUI_INCLUDES})
|
2014-11-13 01:04:59 +02:00
|
|
|
|
2015-11-01 05:10:05 +02:00
|
|
|
##################################
|
2014-11-13 01:04:59 +02:00
|
|
|
|
|
|
|
if(JASPER_FOUND)
|
2015-11-01 15:28:30 +02:00
|
|
|
include_directories(${JASPER_INCLUDE_DIR})
|
|
|
|
kde4_add_plugin(kimg_jp2 jp2.cpp)
|
|
|
|
target_link_libraries(kimg_jp2
|
|
|
|
${KDE4_KDECORE_LIBS}
|
|
|
|
${QT_QTGUI_LIBRARY}
|
|
|
|
${JASPER_LIBRARIES}
|
|
|
|
)
|
|
|
|
|
|
|
|
install(
|
|
|
|
TARGETS kimg_jp2
|
2016-03-06 14:59:19 +00:00
|
|
|
DESTINATION ${PLUGIN_INSTALL_DIR}/kde4/plugins/imageformats
|
2015-11-01 15:28:30 +02:00
|
|
|
)
|
|
|
|
install(
|
|
|
|
FILES
|
|
|
|
jp2.desktop
|
|
|
|
DESTINATION ${SERVICES_INSTALL_DIR}/qimageioplugins
|
|
|
|
)
|
2014-11-13 01:04:59 +02:00
|
|
|
endif(JASPER_FOUND)
|
|
|
|
|
|
|
|
##################################
|
|
|
|
|
|
|
|
if(OPENEXR_FOUND)
|
2015-11-05 03:48:16 +02:00
|
|
|
include_directories(${CMAKE_SOURCE_DIR}/kio ${OPENEXR_INCLUDE_DIR})
|
2014-11-13 01:04:59 +02:00
|
|
|
add_definitions(${OPENEXR_DEFINITIONS})
|
2016-04-13 07:46:13 +00:00
|
|
|
set_source_files_properties(exr.cpp PROPERTIES COMPILE_FLAGS "${KDE4_ENABLE_EXCEPTIONS}")
|
2014-11-13 01:04:59 +02:00
|
|
|
set(kimg_exr_LIB_SRCS exr.cpp)
|
|
|
|
kde4_add_plugin(kimg_exr ${kimg_exr_LIB_SRCS})
|
2015-11-05 03:48:16 +02:00
|
|
|
target_link_libraries(kimg_exr
|
|
|
|
${KDE4_KDECORE_LIBS}
|
|
|
|
${QT_QTGUI_LIBRARY}
|
|
|
|
${OPENEXR_LIBRARIES}
|
|
|
|
)
|
2014-11-13 01:04:59 +02:00
|
|
|
|
2015-11-05 03:48:16 +02:00
|
|
|
install(
|
|
|
|
TARGETS kimg_exr
|
2016-03-06 14:59:19 +00:00
|
|
|
DESTINATION ${PLUGIN_INSTALL_DIR}/kde4/plugins/imageformats
|
2015-11-05 03:48:16 +02:00
|
|
|
)
|
|
|
|
install(
|
|
|
|
FILES exr.desktop
|
|
|
|
DESTINATION ${SERVICES_INSTALL_DIR}/qimageioplugins
|
|
|
|
)
|
2014-11-13 01:04:59 +02:00
|
|
|
endif(OPENEXR_FOUND)
|
|
|
|
|
|
|
|
##################################
|
|
|
|
|
2015-11-01 05:10:05 +02:00
|
|
|
if(WEBP_FOUND)
|
2015-11-05 03:48:16 +02:00
|
|
|
include_directories(${WEBP_INCLUDES})
|
2015-11-01 05:10:05 +02:00
|
|
|
kde4_add_plugin(kimg_webp webp.cpp)
|
2015-11-05 03:48:16 +02:00
|
|
|
target_link_libraries(kimg_webp
|
|
|
|
${KDE4_KDECORE_LIBS}
|
|
|
|
${QT_QTGUI_LIBRARY}
|
|
|
|
${WEBP_LIBRARIES}
|
|
|
|
)
|
2015-11-01 05:10:05 +02:00
|
|
|
|
2015-11-05 03:48:16 +02:00
|
|
|
install(
|
|
|
|
TARGETS kimg_webp
|
2016-03-06 14:59:19 +00:00
|
|
|
DESTINATION ${PLUGIN_INSTALL_DIR}/kde4/plugins/imageformats
|
2015-11-05 03:48:16 +02:00
|
|
|
)
|
|
|
|
install(
|
|
|
|
FILES
|
|
|
|
webp.desktop
|
|
|
|
x-webp.desktop
|
|
|
|
DESTINATION ${SERVICES_INSTALL_DIR}/qimageioplugins
|
|
|
|
)
|
2015-11-01 05:10:05 +02:00
|
|
|
|
|
|
|
install(FILES webp.xml DESTINATION ${XDG_MIME_INSTALL_DIR})
|
|
|
|
update_xdg_mimetypes(${XDG_MIME_INSTALL_DIR})
|
2015-11-01 15:28:30 +02:00
|
|
|
endif(WEBP_FOUND)
|
|
|
|
|
|
|
|
##################################
|
|
|
|
|
|
|
|
set(imgioplugins
|
|
|
|
eps
|
|
|
|
pcx
|
|
|
|
ras
|
|
|
|
rgb
|
|
|
|
xcf
|
|
|
|
dds
|
|
|
|
psd
|
|
|
|
xview
|
|
|
|
)
|
|
|
|
|
|
|
|
foreach(plugin ${imgioplugins})
|
|
|
|
kde4_add_plugin(kimg_${plugin} ${plugin}.cpp)
|
|
|
|
target_link_libraries(kimg_${plugin}
|
|
|
|
${KDE4_KDECORE_LIBS}
|
|
|
|
${QT_QTGUI_LIBRARY}
|
|
|
|
)
|
|
|
|
install(
|
|
|
|
TARGETS kimg_${plugin}
|
2016-03-06 14:59:19 +00:00
|
|
|
DESTINATION ${PLUGIN_INSTALL_DIR}/kde4/plugins/imageformats
|
2015-11-01 15:28:30 +02:00
|
|
|
)
|
|
|
|
endforeach()
|
|
|
|
|
|
|
|
##################################
|
|
|
|
|
|
|
|
set(kimg_pic_LIB_SRCS
|
|
|
|
pic_read.cpp
|
|
|
|
pic_write.cpp
|
|
|
|
pic_io_plugin.cpp
|
|
|
|
pic_io_handler.cpp
|
|
|
|
)
|
|
|
|
|
|
|
|
kde4_add_plugin(kimg_pic ${kimg_pic_LIB_SRCS})
|
|
|
|
target_link_libraries(kimg_pic
|
|
|
|
${KDE4_KDECORE_LIBS}
|
|
|
|
${QT_QTGUI_LIBRARY}
|
|
|
|
)
|
|
|
|
|
|
|
|
install(
|
|
|
|
TARGETS kimg_pic
|
2016-03-06 14:59:19 +00:00
|
|
|
DESTINATION ${PLUGIN_INSTALL_DIR}/kde4/plugins/imageformats
|
2015-11-01 15:28:30 +02:00
|
|
|
)
|
2014-11-13 01:04:59 +02:00
|
|
|
|
|
|
|
########### install files ###############
|
|
|
|
|
2015-11-01 05:10:05 +02:00
|
|
|
install(
|
|
|
|
FILES
|
|
|
|
xv.desktop
|
|
|
|
eps.desktop
|
|
|
|
pcx.desktop
|
|
|
|
ras.desktop
|
|
|
|
rgb.desktop
|
|
|
|
xcf.desktop
|
|
|
|
dds.desktop
|
|
|
|
psd.desktop
|
|
|
|
hdr.desktop
|
|
|
|
pic.desktop
|
2015-11-01 15:28:30 +02:00
|
|
|
DESTINATION ${SERVICES_INSTALL_DIR}/qimageioplugins
|
2015-11-01 05:10:05 +02:00
|
|
|
)
|
|
|
|
|
|
|
|
install(
|
|
|
|
FILES qimageio_plugin.desktop
|
2015-11-01 15:28:30 +02:00
|
|
|
DESTINATION ${SERVICETYPES_INSTALL_DIR}
|
2015-11-01 05:10:05 +02:00
|
|
|
)
|
2014-11-13 01:04:59 +02:00
|
|
|
|
|
|
|
|