3 add_definitions( -DQT_NO_CAST_FROM_ASCII )
4 add_definitions( -DQT_NO_CAST_TO_ASCII )
5 add_definitions(-DTRANSLATION_DOMAIN=\"knotes\")
7 add_subdirectory(icons)
10 add_subdirectory(print/autotests)
13 add_subdirectory(kontactplugin)
14 add_subdirectory(kconf_update)
17 ########### next target ###############
19 set(libknotesprivate_config_lib_SRCS
20 configdialog/knotesimpleconfigdialog.cpp
21 configdialog/knoteconfigdialog.cpp
22 configdialog/knotedisplayconfigwidget.cpp
23 configdialog/knoteeditorconfigwidget.cpp
24 configdialog/knotecollectionconfigwidget.cpp
27 set(libknotesprivate_print_lib_SRCS
28 print/knoteprintselectthemedialog.cpp
29 print/knoteprintselectthemecombobox.cpp
30 print/knoteprinter.cpp
31 print/knoteprintobject.cpp
32 print/knotegrantleeprint.cpp
35 set(libknotesprivate_lib_SRCS
36 ${libknotesprivate_config_lib_SRCS}
37 ${libknotesprivate_print_lib_SRCS}
40 notes/knotedisplaysettings.cpp
42 notes/knoteinterface.cpp
43 notes/knotesmigrateapplication.cpp
44 finddialog/knotefinddialog.cpp
47 configure_file(settings/knotesglobalconfig.kcfg.cmake ${CMAKE_CURRENT_BINARY_DIR}/knotesglobalconfig.kcfg )
49 set( libknotesprivate_kcfg_lib_SRCS settings/knotesglobalconfig.kcfgc )
51 kconfig_add_kcfg_files(libknotesprivate_kcfg_lib_SRCS ${libknotesprivate_kcfg_lib_SRCS})
52 ecm_qt_declare_logging_category(libknotesprivate_lib_SRCS HEADER knotes_debug.h IDENTIFIER KNOTES_LOG CATEGORY_NAME log_knotes)
54 add_library(knotesprivate ${libknotesprivate_lib_SRCS} ${libknotesprivate_kcfg_lib_SRCS} )
55 generate_export_header(knotesprivate BASE_NAME knotes)
57 target_link_libraries(knotesprivate
62 KF5::KCMUtils Grantlee5::Templates KF5::NewStuff KF5::WindowSystem Qt5::PrintSupport KF5::KDELibs4Support KF5::NoteShared KF5::AkonadiSearchPIM KF5::AkonadiNotes KF5::PimTextEdit
65 set_target_properties(knotesprivate
66 PROPERTIES VERSION ${KDEPIM_LIB_VERSION} SOVERSION ${KDEPIM_LIB_SOVERSION}
69 install(TARGETS knotesprivate ${KDE_INSTALL_TARGETS_DEFAULT_ARGS} LIBRARY NAMELINK_SKIP)
72 set(knotes_SRCS knotes_debug.cpp
76 apps/knotesakonaditray.cpp
77 dialog/knoteskeydialog.cpp
78 dialog/knotedeleteselectednotesdialog.cpp
80 print/knoteprintselectednotesdialog.cpp
82 dialog/knoteselectednotesdialog.cpp
86 qt5_add_dbus_adaptor(knotes_SRCS apps/org.kde.KNotes.xml apps/knotesapp.h KNotesApp )
88 file(GLOB ICONS_SRCS "${CMAKE_CURRENT_SOURCE_DIR}/icons/*-apps-knotes.png")
89 ecm_add_app_icon(knotes_SRCS ICONS ${ICONS_SRCS})
91 add_executable(knotes ${knotes_SRCS})
93 target_link_libraries(knotes
104 KF5::AkonadiSearchDebug
106 if (Qt5X11Extras_FOUND)
107 target_link_libraries(knotes Qt5::X11Extras ${X11_LIBRARIES})
109 install(TARGETS knotes ${KDE_INSTALL_TARGETS_DEFAULT_ARGS} )
112 ########### next target ###############
113 set(kcm_knotes_PART_SRCS configdialog/knoteconfigdialog.cpp configdialog/knotedisplayconfigwidget.cpp configdialog/knoteeditorconfigwidget.cpp configdialog/knotecollectionconfigwidget.cpp knotes_debug.cpp)
115 add_library(kcm_knote MODULE ${kcm_knotes_PART_SRCS} )
117 target_link_libraries(kcm_knote knotesprivate KF5::AkonadiCore KF5::KCMUtils KF5::NewStuff KF5::WindowSystem KF5::NoteShared KF5::AkonadiNotes KF5::PimCommon)
119 install(TARGETS kcm_knote DESTINATION ${KDE_INSTALL_PLUGINDIR})
123 data/knote_config_action.desktop
124 data/knote_config_display.desktop
125 data/knote_config_editor.desktop
126 data/knote_config_network.desktop
127 data/knote_config_print.desktop
128 data/knote_config_collection.desktop
129 data/knote_config_misc.desktop
130 DESTINATION ${KDE_INSTALL_KSERVICES5DIR})
132 ########### install files ###############
134 install( PROGRAMS data/org.kde.knotes.desktop DESTINATION ${KDE_INSTALL_APPDIR})
135 install( FILES data/knotes.appdata.xml DESTINATION ${KDE_INSTALL_METAINFODIR})
136 install( FILES ${CMAKE_CURRENT_BINARY_DIR}/knotesglobalconfig.kcfg DESTINATION ${KDE_INSTALL_KCFGDIR})
137 install( FILES data/knotesappui.rc data/knotesui.rc DESTINATION ${KDE_INSTALL_KXMLGUI5DIR}/knotes)
138 install( FILES apps/org.kde.KNotes.xml DESTINATION ${KDE_INSTALL_DBUSINTERFACEDIR})
139 install( FILES data/knotes_printing_theme.knsrc DESTINATION ${KDE_INSTALL_CONFDIR} )
141 install(DIRECTORY print/themes/ DESTINATION ${KDE_INSTALL_DATADIR}/knotes/print/themes )