2015-01-05 19:23:09 +03:00
|
|
|
project(dolphin-owncloud)
|
|
|
|
|
2021-08-25 13:20:31 +03:00
|
|
|
cmake_minimum_required(VERSION 3.16)
|
2021-04-06 13:06:35 +03:00
|
|
|
|
2021-08-13 12:33:50 +03:00
|
|
|
set(QT_MIN_VERSION "5.15.0")
|
2015-10-19 16:22:27 +03:00
|
|
|
set(KF5_MIN_VERSION "5.16.0")
|
2018-02-03 12:53:35 +03:00
|
|
|
set(KDE_INSTALL_USE_QT_SYS_PATHS ON CACHE BOOL "Install the plugin in the right directory")
|
2015-09-07 21:59:30 +03:00
|
|
|
|
|
|
|
find_package(Qt5 ${QT_MIN_VERSION} CONFIG REQUIRED COMPONENTS Core Network)
|
2015-01-05 19:23:09 +03:00
|
|
|
|
2021-04-06 13:06:35 +03:00
|
|
|
find_package(ECM ${KF5_MIN_VERSION} REQUIRED CONFIG)
|
|
|
|
set(CMAKE_MODULE_PATH ${ECM_MODULE_PATH})
|
2015-01-05 19:23:09 +03:00
|
|
|
|
2015-09-10 12:45:19 +03:00
|
|
|
find_package(KF5 ${KF5_MIN_VERSION} REQUIRED COMPONENTS CoreAddons KIO)
|
2015-09-07 21:59:30 +03:00
|
|
|
|
2018-12-28 16:55:45 +03:00
|
|
|
set(KDE_INSTALL_DIRS_NO_DEPRECATED TRUE)
|
2015-01-05 19:23:09 +03:00
|
|
|
include(KDEInstallDirs)
|
2018-12-28 16:55:45 +03:00
|
|
|
# Before KF5 5.54, kcoreaddons_add_plugin uses deprecated VAR PLUGIN_INSTALL_DIR
|
|
|
|
# when that is fixed and you want to remove this workaround,
|
|
|
|
# you need to _require_ the new enough kcoreaddons
|
|
|
|
set(PLUGIN_INSTALL_DIR "${KDE_INSTALL_PLUGINDIR}")
|
2015-01-05 19:23:09 +03:00
|
|
|
include(KDECMakeSettings)
|
|
|
|
include(KDECompilerSettings)
|
|
|
|
|
|
|
|
add_definitions(-DQT_USE_FAST_CONCATENATION -DQT_USE_FAST_OPERATOR_PLUS)
|
|
|
|
|
2015-10-19 16:22:27 +03:00
|
|
|
#---HELPER---
|
2016-04-13 16:05:04 +03:00
|
|
|
set(OWNCLOUDDOLPHINHELPER ${APPLICATION_EXECUTABLE}dolphinpluginhelper)
|
2022-02-07 15:48:52 +03:00
|
|
|
add_library(${OWNCLOUDDOLPHINHELPER} SHARED
|
|
|
|
ownclouddolphinpluginhelper.h
|
|
|
|
ownclouddolphinpluginhelper.cpp)
|
2016-04-13 16:05:04 +03:00
|
|
|
target_link_libraries(${OWNCLOUDDOLPHINHELPER} Qt5::Network)
|
2016-05-04 15:19:18 +03:00
|
|
|
generate_export_header(${OWNCLOUDDOLPHINHELPER} BASE_NAME ownclouddolphinpluginhelper)
|
2016-04-13 16:05:04 +03:00
|
|
|
install(TARGETS ${OWNCLOUDDOLPHINHELPER} LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR})
|
2015-10-19 16:22:27 +03:00
|
|
|
|
|
|
|
#---OVERLAY PLUGIN---
|
2016-04-13 16:05:04 +03:00
|
|
|
set(OWNCLOUDDOLPHINOVERLAYPLUGIN ${APPLICATION_EXECUTABLE}dolphinoverlayplugin)
|
|
|
|
kcoreaddons_add_plugin(${OWNCLOUDDOLPHINOVERLAYPLUGIN} INSTALL_NAMESPACE "kf5/overlayicon"
|
2015-10-19 16:22:27 +03:00
|
|
|
JSON ownclouddolphinoverlayplugin.json SOURCES ownclouddolphinoverlayplugin.cpp)
|
2016-04-13 16:05:04 +03:00
|
|
|
target_link_libraries(${OWNCLOUDDOLPHINOVERLAYPLUGIN} KF5::CoreAddons KF5::KIOCore KF5::KIOWidgets ${OWNCLOUDDOLPHINHELPER})
|
2015-10-19 16:22:27 +03:00
|
|
|
|
|
|
|
#---ACTION PLUGIN---
|
2016-04-13 16:05:04 +03:00
|
|
|
set(OWNCLOUDDOLPHINACTIONPLUGIN ${APPLICATION_EXECUTABLE}dolphinactionplugin)
|
2016-11-20 18:54:41 +03:00
|
|
|
configure_file(ownclouddolphinactionplugin.desktop.in ${OWNCLOUDDOLPHINACTIONPLUGIN}.desktop ESCAPE_QUOTES @ONLY)
|
2022-11-19 20:59:17 +03:00
|
|
|
kcoreaddons_add_plugin(${OWNCLOUDDOLPHINACTIONPLUGIN} INSTALL_NAMESPACE "kf5/kfileitemaction"
|
|
|
|
SOURCES ownclouddolphinactionplugin.cpp)
|
|
|
|
target_link_libraries(${OWNCLOUDDOLPHINACTIONPLUGIN} KF5::CoreAddons KF5::KIOCore KF5::KIOWidgets ${OWNCLOUDDOLPHINHELPER})
|
|
|
|
kcoreaddons_desktop_to_json(${OWNCLOUDDOLPHINACTIONPLUGIN} ${CMAKE_CURRENT_BINARY_DIR}/${OWNCLOUDDOLPHINACTIONPLUGIN}.desktop)
|