Warning, /pim/knotes/src/CMakeLists.txt is written in an unsupported language. File is not indexed.
0001 # SPDX-FileCopyrightText: none 0002 # SPDX-License-Identifier: BSD-3-Clause 0003 add_definitions(-DTRANSLATION_DOMAIN=\"knotes\") 0004 0005 configure_file(config-knotes.h.in ${CMAKE_CURRENT_BINARY_DIR}/config-knotes.h ) 0006 0007 add_subdirectory(icons) 0008 0009 if (BUILD_TESTING) 0010 add_subdirectory(print/autotests) 0011 endif() 0012 0013 add_subdirectory(kontactplugin) 0014 0015 ########### next target ############### 0016 0017 add_library(knotesprivate) 0018 0019 target_sources(knotesprivate PRIVATE 0020 knoteedit.cpp 0021 notes/knotedisplaysettings.cpp 0022 utils/knoteutils.cpp 0023 notes/knoteinterface.cpp 0024 finddialog/knotefinddialog.cpp 0025 configdialog/knotesimpleconfigdialog.cpp 0026 configdialog/knoteconfigdialog.cpp 0027 configdialog/knotedisplayconfigwidget.cpp 0028 configdialog/knoteeditorconfigwidget.cpp 0029 print/knoteprintselectthemedialog.cpp 0030 print/knoteprintselectthemecombobox.cpp 0031 print/knoteprinter.cpp 0032 print/knoteprintobject.cpp 0033 print/knotegrantleeprint.cpp 0034 0035 knoteedit.h 0036 notes/knotedisplaysettings.h 0037 utils/knoteutils.h 0038 notes/knoteinterface.h 0039 finddialog/knotefinddialog.h 0040 configdialog/knotesimpleconfigdialog.h 0041 configdialog/knoteconfigdialog.h 0042 configdialog/knotedisplayconfigwidget.h 0043 configdialog/knoteeditorconfigwidget.h 0044 print/knoteprintselectthemedialog.h 0045 print/knoteprintselectthemecombobox.h 0046 print/knoteprinter.h 0047 print/knoteprintobject.h 0048 print/knotegrantleeprint.h 0049 ) 0050 configure_file(settings/knotesglobalconfig.kcfg.in ${CMAKE_CURRENT_BINARY_DIR}/knotesglobalconfig.kcfg ) 0051 0052 set( libknotesprivate_kcfg_lib_SRCS settings/knotesglobalconfig.kcfgc ) 0053 0054 kconfig_add_kcfg_files(libknotesprivate_kcfg_lib_SRCS ${libknotesprivate_kcfg_lib_SRCS}) 0055 ecm_qt_declare_logging_category(knotesprivate HEADER knotes_debug.h IDENTIFIER KNOTES_LOG CATEGORY_NAME org.kde.pim.knotes 0056 DESCRIPTION "knotes (knotes)" 0057 OLD_CATEGORY_NAMES log_knotes 0058 EXPORT KNOTES 0059 ) 0060 0061 target_sources(knotesprivate PRIVATE ${libknotesprivate_kcfg_lib_SRCS}) 0062 0063 if (COMPILE_WITH_UNITY_CMAKE_SUPPORT) 0064 set_target_properties(knotesprivate PROPERTIES UNITY_BUILD ON) 0065 endif() 0066 0067 generate_export_header(knotesprivate BASE_NAME knotes) 0068 0069 target_link_libraries(knotesprivate 0070 PUBLIC 0071 KF6::IconThemes 0072 PRIVATE 0073 KPim6::PimCommon 0074 KF6::XmlGui 0075 KF6::KCMUtils KF6::NewStuffCore 0076 KF6::WindowSystem Qt::PrintSupport 0077 KF6::TextWidgets KF6::I18n notesharedprivate 0078 KPim6::AkonadiSearchPIM KPim6::AkonadiNotes 0079 KPim6::AkonadiWidgets KPim6::GrantleeTheme 0080 KF6::TextUtils 0081 KF6::TextWidgets 0082 ) 0083 0084 if (TARGET KF6::TextAddonsWidgets) 0085 target_link_libraries(knotesprivate 0086 PRIVATE 0087 KF6::TextAddonsWidgets) 0088 endif() 0089 0090 target_link_libraries(knotesprivate PRIVATE KF6::TextTemplate) 0091 0092 set_target_properties(knotesprivate 0093 PROPERTIES VERSION ${KDEPIM_LIB_VERSION} SOVERSION ${KDEPIM_LIB_SOVERSION} 0094 ) 0095 0096 install(TARGETS knotesprivate ${KDE_INSTALL_TARGETS_DEFAULT_ARGS} LIBRARY NAMELINK_SKIP) 0097 0098 0099 set(knotes_SRCS 0100 knotes_debug.cpp 0101 apps/main.cpp 0102 apps/application.cpp 0103 apps/knotesapp.cpp 0104 apps/knotesakonaditray.cpp 0105 dialog/knoteskeydialog.cpp 0106 dialog/knotedeleteselectednotesdialog.cpp 0107 notes/knotebutton.cpp 0108 print/knoteprintselectednotesdialog.cpp 0109 notes/knote.cpp 0110 dialog/knoteselectednotesdialog.cpp 0111 0112 0113 apps/application.h 0114 apps/knotesapp.h 0115 apps/knotesakonaditray.h 0116 dialog/knoteskeydialog.h 0117 dialog/knotedeleteselectednotesdialog.h 0118 notes/knotebutton.h 0119 print/knoteprintselectednotesdialog.h 0120 notes/knote.h 0121 dialog/knoteselectednotesdialog.h 0122 ) 0123 0124 0125 qt_add_dbus_adaptor(knotes_SRCS apps/org.kde.KNotes.xml apps/knotesapp.h KNotesApp ) 0126 0127 file(GLOB ICONS_SRCS "${CMAKE_CURRENT_SOURCE_DIR}/icons/*-apps-knotes.png") 0128 ecm_add_app_icon(knotes_SRCS ICONS ${ICONS_SRCS}) 0129 0130 add_executable(knotes ${knotes_SRCS}) 0131 if (COMPILE_WITH_UNITY_CMAKE_SUPPORT) 0132 set_target_properties(knotes PROPERTIES UNITY_BUILD ON) 0133 endif() 0134 0135 target_link_libraries(knotes 0136 knotesprivate 0137 KF6::KCMUtils 0138 KF6::I18n 0139 KPim6::PimCommon 0140 KF6::DNSSD 0141 KPim6::KontactInterface 0142 notesharedprivate 0143 KPim6::AkonadiCore 0144 KPim6::Mime 0145 KF6::GlobalAccel 0146 KF6::Notifications 0147 KF6::WindowSystem 0148 KF6::KIOFileWidgets 0149 KPim6::AkonadiSearchDebug 0150 KPim6::AkonadiNotes 0151 KF6::Crash 0152 KF6::XmlGui 0153 KPim6::AkonadiWidgets 0154 KF6::TextWidgets 0155 KF6::StatusNotifierItem 0156 ) 0157 install(TARGETS knotes ${KDE_INSTALL_TARGETS_DEFAULT_ARGS} ) 0158 0159 0160 ########### next target ############### 0161 set(kcm_knotes_PART_SRCS knoteconfigmodule.cpp knoteconfigmodule.h configdialog/knotecollectionconfigwidget.cpp configdialog/knotecollectionconfigwidget.h) 0162 ecm_qt_declare_logging_category(kcm_knotes_PART_SRCS HEADER knotes_kcm_debug.h IDENTIFIER KNOTES_MODULES_LOG CATEGORY_NAME org.kde.pim.knotes.module 0163 DESCRIPTION "knotes (kcm knotes)" 0164 OLD_CATEGORY_NAMES log_knotes_modules 0165 EXPORT KNOTES 0166 ) 0167 0168 add_library(kcm_knote_static STATIC ${kcm_knotes_PART_SRCS} ) 0169 set_property(TARGET kcm_knote_static PROPERTY POSITION_INDEPENDENT_CODE ON) 0170 if (COMPILE_WITH_UNITY_CMAKE_SUPPORT) 0171 set_target_properties(kcm_knote_static PROPERTIES UNITY_BUILD ON) 0172 endif() 0173 target_link_libraries(kcm_knote_static knotesprivate KF6::NewStuffWidgets KPim6::AkonadiCore KF6::KCMUtils notesharedprivate KPim6::AkonadiNotes KPim6::PimCommon KF6::I18n KPim6::AkonadiWidgets) 0174 0175 # Create the individual KCMs 0176 kcoreaddons_add_plugin(kcm_knote_action SOURCES kcm_knote_action.cpp INSTALL_NAMESPACE "pim6/kcms/knotes") 0177 target_link_libraries(kcm_knote_action kcm_knote_static) 0178 0179 kcoreaddons_add_plugin(kcm_knote_display SOURCES kcm_knote_display.cpp INSTALL_NAMESPACE "pim6/kcms/knotes") 0180 target_link_libraries(kcm_knote_display kcm_knote_static) 0181 0182 kcoreaddons_add_plugin(kcm_knote_editor SOURCES kcm_knote_editor.cpp INSTALL_NAMESPACE "pim6/kcms/knotes") 0183 target_link_libraries(kcm_knote_editor kcm_knote_static) 0184 0185 kcoreaddons_add_plugin(kcm_knote_network SOURCES kcm_knote_network.cpp INSTALL_NAMESPACE "pim6/kcms/knotes") 0186 target_link_libraries(kcm_knote_network kcm_knote_static) 0187 0188 kcoreaddons_add_plugin(kcm_knote_print SOURCES kcm_knote_print.cpp INSTALL_NAMESPACE "pim6/kcms/knotes") 0189 target_link_libraries(kcm_knote_print kcm_knote_static) 0190 0191 kcoreaddons_add_plugin(kcm_knote_collection SOURCES kcm_knote_collection.cpp INSTALL_NAMESPACE "pim6/kcms/knotes") 0192 target_link_libraries(kcm_knote_collection kcm_knote_static) 0193 0194 kcoreaddons_add_plugin(kcm_knote_misc SOURCES kcm_knote_misc.cpp INSTALL_NAMESPACE "pim6/kcms/knotes") 0195 target_link_libraries(kcm_knote_misc kcm_knote_static) 0196 0197 ########### install files ############### 0198 0199 install( PROGRAMS data/org.kde.knotes.desktop DESTINATION ${KDE_INSTALL_APPDIR}) 0200 install( FILES data/org.kde.knotes.appdata.xml DESTINATION ${KDE_INSTALL_METAINFODIR}) 0201 install( FILES ${CMAKE_CURRENT_BINARY_DIR}/knotesglobalconfig.kcfg DESTINATION ${KDE_INSTALL_KCFGDIR}) 0202 install( FILES data/knotesappui.rc data/knotesui.rc DESTINATION ${KDE_INSTALL_KXMLGUIDIR}/knotes) 0203 install( FILES apps/org.kde.KNotes.xml DESTINATION ${KDE_INSTALL_DBUSINTERFACEDIR}) 0204 install( FILES data/knotes_printing_theme.knsrc DESTINATION ${KDE_INSTALL_KNSRCDIR} ) 0205 0206 install(DIRECTORY print/themes/ DESTINATION ${KDE_INSTALL_DATADIR}/knotes/print/themes )