Commit 96a93386 authored by Friedrich W. H. Kossebau's avatar Friedrich W. H. Kossebau
Browse files

thumbnails: consistent formatting of cmake code

GIT_SILENT
parent cc5bcc46
......@@ -4,32 +4,43 @@ find_package(OpenEXR 3.0 CONFIG QUIET)
if(NOT OpenEXR_FOUND)
find_package(OpenEXR)
endif()
set_package_properties(OpenEXR PROPERTIES DESCRIPTION "API for accessing OpenEXR formatted images"
URL "https://www.openexr.com"
TYPE OPTIONAL
PURPOSE "Provides support for OpenEXR formatted images in the thumbnail kioslave"
)
set_package_properties(OpenEXR PROPERTIES
DESCRIPTION "API for accessing OpenEXR formatted images"
URL "https://www.openexr.com"
TYPE OPTIONAL
PURPOSE "Provides support for OpenEXR formatted images in the thumbnail kioslave"
)
find_package(libappimage 0.1.10 CONFIG)
set_package_properties(libappimage PROPERTIES DESCRIPTION "Core library of the AppImage project"
URL "https://github.com/AppImage/libappimage"
TYPE OPTIONAL
PURPOSE "Provides support for AppImage thumbnails"
)
set_package_properties(libappimage PROPERTIES
DESCRIPTION "Core library of the AppImage project"
URL "https://github.com/AppImage/libappimage"
TYPE OPTIONAL
PURPOSE "Provides support for AppImage thumbnails"
)
find_package(X11)
set_package_properties(X11 PROPERTIES DESCRIPTION "X11 libraries"
URL "https://www.x.org"
TYPE OPTIONAL
PURPOSE "Provides support for XCursor thumbnails"
)
set_package_properties(X11 PROPERTIES
DESCRIPTION "X11 libraries"
URL "https://www.x.org"
TYPE OPTIONAL
PURPOSE "Provides support for XCursor thumbnails"
)
find_package(Taglib 1.11)
set_package_properties(Taglib PROPERTIES
TYPE OPTIONAL
PURPOSE "Provides support for audio thumbnails"
)
include_directories(${CMAKE_BINARY_DIR})
########### next target ###############
add_library(kio_thumbnail MODULE)
set_target_properties(kio_thumbnail PROPERTIES OUTPUT_NAME "thumbnail")
set_target_properties(kio_thumbnail PROPERTIES
OUTPUT_NAME "thumbnail"
)
target_sources(kio_thumbnail PRIVATE
thumbnail.cpp
......@@ -37,15 +48,16 @@ target_sources(kio_thumbnail PRIVATE
)
ecm_qt_declare_logging_category(kio_thumbnail
HEADER thumbnail-logsettings.h
IDENTIFIER KIO_THUMBNAIL_LOG
CATEGORY_NAME log_kio_thumbnail)
HEADER thumbnail-logsettings.h
IDENTIFIER KIO_THUMBNAIL_LOG
CATEGORY_NAME log_kio_thumbnail
)
target_link_libraries(kio_thumbnail
KF5::CoreAddons
KF5::KIOCore
KF5::KIOWidgets
KF5::I18n
KF5::CoreAddons
KF5::KIOCore
KF5::KIOWidgets
KF5::I18n
)
install(TARGETS kio_thumbnail DESTINATION ${KDE_INSTALL_PLUGINDIR}/kf5/kio)
......@@ -59,41 +71,45 @@ target_link_libraries(imagethumbnail
)
install(TARGETS imagethumbnail DESTINATION ${KDE_INSTALL_PLUGINDIR})
install(FILES imagethumbnail.desktop DESTINATION ${KDE_INSTALL_KSERVICES5DIR})
########### next target ###############
install( FILES directorythumbnail.desktop DESTINATION ${KDE_INSTALL_KSERVICES5DIR})
install(FILES directorythumbnail.desktop DESTINATION ${KDE_INSTALL_KSERVICES5DIR})
########### next target ###############
add_library(jpegthumbnail MODULE jpegcreator.cpp)
kconfig_add_kcfg_files(jpegthumbnail jpegcreatorsettings5.kcfgc)
target_link_libraries(jpegthumbnail
Qt5::Core
Qt5::Gui
KF5::KIOCore
KF5::KIOWidgets
KF5::I18n
KF5::ConfigCore
KF5::ConfigGui
Qt5::Core
Qt5::Gui
KF5::KIOCore
KF5::KIOWidgets
KF5::I18n
KF5::ConfigCore
KF5::ConfigGui
)
install(FILES jpegcreatorsettings5.kcfg DESTINATION ${KDE_INSTALL_KCFGDIR})
install(TARGETS jpegthumbnail DESTINATION ${KDE_INSTALL_PLUGINDIR})
install(FILES jpegthumbnail.desktop DESTINATION ${KDE_INSTALL_KSERVICES5DIR})
########### next target ###############
add_library(svgthumbnail MODULE svgcreator.cpp)
target_link_libraries(svgthumbnail
Qt5::Gui
Qt5::Svg
KF5::KIOCore
KF5::KIOWidgets
Qt5::Gui
Qt5::Svg
KF5::KIOCore
KF5::KIOWidgets
)
install(TARGETS svgthumbnail DESTINATION ${KDE_INSTALL_PLUGINDIR})
install(FILES svgthumbnail.desktop DESTINATION ${KDE_INSTALL_KSERVICES5DIR})
########### next target ###############
......@@ -106,21 +122,25 @@ target_link_libraries(textthumbnail
)
install(TARGETS textthumbnail DESTINATION ${KDE_INSTALL_PLUGINDIR})
install(FILES textthumbnail.desktop DESTINATION ${KDE_INSTALL_KSERVICES5DIR})
# install(FILES desktopthumbnail.desktop DESTINATION ${KDE_INSTALL_KSERVICES5DIR})
########### next target ###############
if(NOT WIN32)
add_library(djvuthumbnail MODULE djvucreator.cpp)
ecm_qt_declare_logging_category(djvuthumbnail
HEADER thumbnail-djvu-logsettings.h
IDENTIFIER KIO_THUMBNAIL_DJVU_LOG
CATEGORY_NAME log_kio_thumbnail.djvu)
add_library(djvuthumbnail MODULE djvucreator.cpp)
target_link_libraries(djvuthumbnail KF5::KIOWidgets)
ecm_qt_declare_logging_category(djvuthumbnail
HEADER thumbnail-djvu-logsettings.h
IDENTIFIER KIO_THUMBNAIL_DJVU_LOG
CATEGORY_NAME log_kio_thumbnail.djvu
)
install(TARGETS djvuthumbnail DESTINATION ${KDE_INSTALL_PLUGINDIR})
install(FILES djvuthumbnail.desktop DESTINATION ${KDE_INSTALL_KSERVICES5DIR})
target_link_libraries(djvuthumbnail KF5::KIOWidgets)
install(TARGETS djvuthumbnail DESTINATION ${KDE_INSTALL_PLUGINDIR})
install(FILES djvuthumbnail.desktop DESTINATION ${KDE_INSTALL_KSERVICES5DIR})
endif()
......@@ -129,14 +149,16 @@ endif()
if(OpenEXR_FOUND)
add_library(exrthumbnail MODULE exrcreator.cpp)
ecm_qt_declare_logging_category(exrthumbnail
HEADER thumbnail-exr-logsettings.h
IDENTIFIER KIO_THUMBNAIL_EXR_LOG
CATEGORY_NAME log_kio_thumbnail.exr)
HEADER thumbnail-exr-logsettings.h
IDENTIFIER KIO_THUMBNAIL_EXR_LOG
CATEGORY_NAME log_kio_thumbnail.exr
)
target_link_libraries(exrthumbnail
KF5::KIOCore
KF5::KIOWidgets
KF5::KIOCore
KF5::KIOWidgets
)
if(TARGET OpenEXR::OpenEXR)
target_link_libraries(exrthumbnail OpenEXR::OpenEXR)
......@@ -150,7 +172,7 @@ if(OpenEXR_FOUND)
kde_source_files_enable_exceptions(exrcreator.cpp)
install(TARGETS exrthumbnail DESTINATION ${KDE_INSTALL_PLUGINDIR})
install( FILES exrthumbnail.desktop DESTINATION ${KDE_INSTALL_KSERVICES5DIR})
install(FILES exrthumbnail.desktop DESTINATION ${KDE_INSTALL_KSERVICES5DIR})
endif()
......@@ -167,7 +189,7 @@ if(X11_Xcursor_FOUND)
)
install(TARGETS cursorthumbnail DESTINATION ${KDE_INSTALL_PLUGINDIR})
install( FILES cursorthumbnail.desktop DESTINATION ${KDE_INSTALL_KSERVICES5DIR})
install(FILES cursorthumbnail.desktop DESTINATION ${KDE_INSTALL_KSERVICES5DIR})
endif()
......@@ -184,28 +206,32 @@ else()
target_sources(windowsimagethumbnail PRIVATE icoutils_wrestool.cpp)
endif()
target_link_libraries ( windowsexethumbnail KF5::KIOWidgets )
install ( TARGETS windowsexethumbnail DESTINATION ${KDE_INSTALL_PLUGINDIR} )
install ( FILES windowsexethumbnail.desktop DESTINATION ${KDE_INSTALL_KSERVICES5DIR} )
target_link_libraries(windowsexethumbnail KF5::KIOWidgets)
install(TARGETS windowsexethumbnail DESTINATION ${KDE_INSTALL_PLUGINDIR})
install(FILES windowsexethumbnail.desktop DESTINATION ${KDE_INSTALL_KSERVICES5DIR})
target_link_libraries ( windowsimagethumbnail KF5::KIOWidgets )
install ( TARGETS windowsimagethumbnail DESTINATION ${KDE_INSTALL_PLUGINDIR} )
install ( FILES windowsimagethumbnail.desktop DESTINATION ${KDE_INSTALL_KSERVICES5DIR} )
target_link_libraries(windowsimagethumbnail KF5::KIOWidgets)
install(TARGETS windowsimagethumbnail DESTINATION ${KDE_INSTALL_PLUGINDIR})
install(FILES windowsimagethumbnail.desktop DESTINATION ${KDE_INSTALL_KSERVICES5DIR})
########### next target ###############
add_library(comicbookthumbnail MODULE comiccreator.cpp)
ecm_qt_declare_logging_category(comicbookthumbnail
HEADER thumbnail-comic-logsettings.h
IDENTIFIER KIO_THUMBNAIL_COMIC_LOG
CATEGORY_NAME log_kio_thumbnail.comic)
HEADER thumbnail-comic-logsettings.h
IDENTIFIER KIO_THUMBNAIL_COMIC_LOG
CATEGORY_NAME log_kio_thumbnail.comic
)
target_link_libraries(comicbookthumbnail
Qt5::Gui
KF5::Archive
KF5::KIOWidgets
)
install(TARGETS comicbookthumbnail DESTINATION ${KDE_INSTALL_PLUGINDIR})
install(FILES comicbookthumbnail.desktop DESTINATION ${KDE_INSTALL_KSERVICES5DIR})
# ########### next target ###############
......@@ -217,16 +243,22 @@ target_link_libraries(kritathumbnail
)
install(TARGETS kritathumbnail DESTINATION ${KDE_INSTALL_PLUGINDIR})
install(FILES kraorathumbnail.desktop DESTINATION ${KDE_INSTALL_KSERVICES5DIR})
########### next target #################
find_package(Taglib 1.11)
if(Taglib_FOUND)
add_library(audiothumbnail MODULE audiocreator.cpp)
target_link_libraries(audiothumbnail Taglib::Taglib KF5::KIOWidgets)
target_link_libraries(audiothumbnail
Taglib::Taglib
KF5::KIOWidgets
)
install(TARGETS audiothumbnail DESTINATION ${KDE_INSTALL_PLUGINDIR})
set(audiothumbnail_desktop audiothumbnail.desktop)
install(FILES audiothumbnail.desktop DESTINATION ${KDE_INSTALL_KSERVICES5DIR})
endif()
# ########### next target ###############
......@@ -240,21 +272,22 @@ target_link_libraries(opendocumentthumbnail
)
install(TARGETS opendocumentthumbnail DESTINATION ${KDE_INSTALL_PLUGINDIR})
install(FILES opendocumentthumbnail.desktop DESTINATION ${KDE_INSTALL_KSERVICES5DIR})
# ########### next target ###############
if(libappimage_FOUND)
add_library(appimagethumbnail MODULE appimagecreator.cpp)
add_library(appimagethumbnail MODULE appimagecreator.cpp)
target_link_libraries(appimagethumbnail
KF5::KIOWidgets
Qt5::Gui
libappimage
)
target_link_libraries(appimagethumbnail
KF5::KIOWidgets
Qt5::Gui
libappimage
)
install(TARGETS appimagethumbnail DESTINATION ${KDE_INSTALL_PLUGINDIR})
install(FILES appimagethumbnail.desktop DESTINATION ${KDE_INSTALL_KSERVICES5DIR})
install(TARGETS appimagethumbnail DESTINATION ${KDE_INSTALL_PLUGINDIR})
install(FILES appimagethumbnail.desktop DESTINATION ${KDE_INSTALL_KSERVICES5DIR})
endif()
......@@ -269,20 +302,8 @@ target_link_libraries(ebookthumbnail
)
install(TARGETS ebookthumbnail DESTINATION ${KDE_INSTALL_PLUGINDIR})
install(FILES ebookthumbnail.desktop DESTINATION ${KDE_INSTALL_KSERVICES5DIR})
########### install files ###############
install(FILES thumbcreator.desktop DESTINATION ${KDE_INSTALL_KSERVICETYPES5DIR})
install(FILES
svgthumbnail.desktop
imagethumbnail.desktop
jpegthumbnail.desktop
textthumbnail.desktop
# desktopthumbnail.desktop
comicbookthumbnail.desktop
kraorathumbnail.desktop
opendocumentthumbnail.desktop
ebookthumbnail.desktop
${audiothumbnail_desktop}
DESTINATION ${KDE_INSTALL_KSERVICES5DIR})
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment