CMakeLists.txt 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. project(dolphin-owncloud)
  2. cmake_minimum_required(VERSION 2.8.12)
  3. include(FeatureSummary)
  4. set(QT_MIN_VERSION "5.3.0")
  5. set(KF5_MIN_VERSION "5.16.0")
  6. find_package(Qt5 ${QT_MIN_VERSION} CONFIG REQUIRED COMPONENTS Core Network)
  7. find_package(ECM 1.2.0 REQUIRED CONFIG)
  8. set(CMAKE_MODULE_PATH ${ECM_MODULE_PATH} ${ECM_KDE_MODULE_DIR} "${CMAKE_CURRENT_SOURCE_DIR}/cmake")
  9. find_package(KF5 ${KF5_MIN_VERSION} REQUIRED COMPONENTS CoreAddons KIO)
  10. set_package_properties(DolphinVcs PROPERTIES
  11. DESCRIPTION "the Dolphin plugin library"
  12. URL "http://dolphin.kde.org/"
  13. TYPE REQUIRED
  14. PURPOSE "Provides plugin interfaces for Dolphin."
  15. )
  16. include(KDEInstallDirs)
  17. include(KDECMakeSettings)
  18. include(KDECompilerSettings)
  19. include(ECMMarkNonGuiExecutable)
  20. include(GenerateExportHeader)
  21. include_directories(${CMAKE_CURRENT_BINARY_DIR})
  22. add_definitions(-DQT_USE_FAST_CONCATENATION -DQT_USE_FAST_OPERATOR_PLUS)
  23. #---HELPER---
  24. add_library(ownclouddolphinpluginhelper SHARED ownclouddolphinpluginhelper.cpp)
  25. target_link_libraries(ownclouddolphinpluginhelper Qt5::Network)
  26. generate_export_header(ownclouddolphinpluginhelper)
  27. install(TARGETS ownclouddolphinpluginhelper LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR})
  28. #---OVERLAY PLUGIN---
  29. kcoreaddons_add_plugin(ownclouddolphinoverlayplugin INSTALL_NAMESPACE "kf5/overlayicon"
  30. JSON ownclouddolphinoverlayplugin.json SOURCES ownclouddolphinoverlayplugin.cpp)
  31. target_link_libraries(ownclouddolphinoverlayplugin KF5::CoreAddons KF5::KIOCore KF5::KIOWidgets ownclouddolphinpluginhelper)
  32. #---ACTION PLUGIN---
  33. add_library(ownclouddolphinactionplugin MODULE ownclouddolphinactionplugin.cpp)
  34. target_link_libraries(ownclouddolphinactionplugin KF5::CoreAddons KF5::KIOCore KF5::KIOWidgets ownclouddolphinpluginhelper)
  35. install(FILES ownclouddolphinactionplugin.desktop DESTINATION ${KDE_INSTALL_KSERVICES5DIR})
  36. install(TARGETS ownclouddolphinactionplugin DESTINATION ${KDE_INSTALL_PLUGINDIR})