SVN_SILENT made messages (.desktop file)
[kdepim.git] / kjots / CMakeLists.txt
blob75a864f4c95facf295692a6df8d3ab3201c88d15
1 project(kjots)
3 set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${KDE4_ENABLE_EXCEPTIONS}" )
5 add_definitions( -DQT_NO_CAST_FROM_ASCII )
6 add_definitions( -DQT_NO_CAST_TO_ASCII )
9 include_directories(
10   ${KDE4_INCLUDES}
11   ${KDEPIMLIBS_INCLUDE_DIRS}
12   ${Boost_INCLUDE_DIRS}
13   ${Grantlee_INCLUDE_DIRS}
14   ${CMAKE_SOURCE_DIR}/noteshared
17 set(kjotsLibs ${KDE4_KIO_LIBS} kdepim)
19 add_subdirectory( icons )
20 add_subdirectory( plasmoid )
22 #########################################################################
23 # Code common to the kjots application and the kontact plugin
24 # Don't make it a static library, this code needs to be compiled
25 # with -fPIC for the part and without -fPIC for the executable
26 #########################################################################
28 set(kjots_config_SRCS kjotsconfigdlg.cpp)
30 kde4_add_kcfg_files(kjots_config_SRCS KJotsSettings.kcfgc )
32 kde4_add_ui_files(kjots_config_SRCS confpagemisc.ui)
35 set (kjots_common_SRCS
36      aboutdata.cpp
37      kjotslockjob.cpp
38      kjotsedit.cpp
39      kjotstreeview.cpp
40      kjotsbookmarks.cpp
41      kjotsreplacenextdialog.cpp
42      kjotsmodel.cpp
43      kjotssortproxymodel.cpp
44      kjotswidget.cpp
45      kjotsbrowser.cpp
46      kjotslinkdialog.cpp
47      localresourcecreator.cpp
48      kjotsbookshelfentryvalidator.cpp
49      knowitimporter.cpp ${kjots_config_SRCS}
52 #########################################################################
53 # D-Bus interface
54 #########################################################################
56 qt4_generate_dbus_interface( kjotswidget.h org.kde.KJotsWidget.xml OPTIONS -m )
57 qt4_add_dbus_interfaces(kjots_common_SRCS
58     ${CMAKE_CURRENT_BINARY_DIR}/org.kde.KJotsWidget.xml)
61 #########################################################################
62 # Main Application SECTION
63 #########################################################################
65 set(kjots_SRCS
66    main.cpp
67    KJotsMain.cpp
68    ${kjots_common_SRCS}
70 kde4_add_app_icon(kjots_SRCS "${CMAKE_CURRENT_SOURCE_DIR}/icons/hi*-apps-kjots.png")
72 kde4_add_executable(kjots ${kjots_SRCS})
74 target_link_libraries(kjots
75   ${kjotsLibs}
76   ${KDE4_KCMUTILS_LIBS}
77   ${KDEPIMLIBS_AKONADI_LIBS}
78   ${KDEPIMLIBS_KMIME_LIBS}
79   ${KDEPIMLIBS_AKONADI_KMIME_LIBS}
80   ${Grantlee_CORE_LIBRARIES}
81   ${Grantlee_GUI_LIBRARIES}
82   ${KDEPIMLIBS_KPIMTEXTEDIT_LIBS}
83   ${KDEPIMLIBS_KONTACTINTERFACE_LIBS}
84    ${KDE4_KPRINTUTILS_LIBS}
85   akonadi_next
86   noteshared
90 install(TARGETS kjots  ${INSTALL_TARGETS_DEFAULT_ARGS} )
93 ########### install files ###############
95 install( PROGRAMS Kjots.desktop  DESTINATION ${XDG_APPS_INSTALL_DIR})
96 install( FILES kjots.kcfg  DESTINATION ${KCFG_INSTALL_DIR})
97 install( FILES kjotsui.rc  DESTINATION ${DATA_INSTALL_DIR}/kjots)
99 install(DIRECTORY themes DESTINATION ${DATA_INSTALL_DIR}/kjots PATTERN *.svn EXCLUDE )
104   set(kjotspart_PART_SRCS
105     kjotspart.cpp
106     ${kjots_common_SRCS}
107   )
109   kde4_add_plugin(kjotspart ${kjotspart_PART_SRCS}
110   )
113   target_link_libraries(kjotspart
114     ${KDE4_KCMUTILS_LIBS}
115     ${KDE4_KPARTS_LIBS}
116     kdepim
117     ${KDEPIMLIBS_KMIME_LIBS}
118     ${KDEPIMLIBS_AKONADI_LIBS}
119     ${KDEPIMLIBS_AKONADI_KMIME_LIBS}
120     ${KDEPIMLIBS_KMIME_LIBS}
121     ${Grantlee_CORE_LIBRARIES}
122     ${Grantlee_GUI_LIBRARIES}
123     ${KDEPIMLIBS_KPIMTEXTEDIT_LIBS}
124     ${KDE4_KPRINTUTILS_LIBS}
125     akonadi_next
126     noteshared
127   )
129   install( FILES kjotspart.desktop  DESTINATION ${SERVICES_INSTALL_DIR} )
130   install( FILES kjotspartui.rc  DESTINATION ${DATA_INSTALL_DIR}/kjots)
132   install(TARGETS kjotspart  DESTINATION ${PLUGIN_INSTALL_DIR} )
135   ###########################################################################
136   set(kcm_kjots_PART_SRCS kcm_kjots.cpp ${kjots_config_SRCS} )
138   kde4_add_plugin(kcm_kjots ${kcm_kjots_PART_SRCS})
140   target_link_libraries(kcm_kjots  ${KDE4_KDEUI_LIBS} ${KDE4_KCMUTILS_LIBS})
142   install(TARGETS kcm_kjots DESTINATION ${PLUGIN_INSTALL_DIR})
145   install(FILES
146         kjots_config_misc.desktop
147         DESTINATION ${SERVICES_INSTALL_DIR})