Warning, /office/calligraplan/src/CMakeLists.txt is written in an unsupported language. File is not indexed.
0001 0002 set(PLAN_SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}) 0003 0004 include_directories(BEFORE ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/interfaces) 0005 0006 set(PLANPLUGIN_INCLUDES 0007 ${CMAKE_CURRENT_SOURCE_DIR}/libs/plugin 0008 ) 0009 0010 set(PLANKUNDO2_INCLUDES 0011 ${CMAKE_CURRENT_SOURCE_DIR}/libs/kundo2 0012 ${CMAKE_CURRENT_BINARY_DIR}/libs/kundo2 0013 ) 0014 0015 set(PLANSTORE_INCLUDES 0016 ${CMAKE_CURRENT_SOURCE_DIR}/libs/store 0017 ${CMAKE_CURRENT_BINARY_DIR}/libs/store 0018 ) 0019 0020 set(PLANODF_INCLUDES 0021 ${CMAKE_CURRENT_SOURCE_DIR}/libs/odf 0022 ${CMAKE_CURRENT_BINARY_DIR}/libs/odf 0023 ${PLANSTORE_INCLUDES} 0024 ) 0025 0026 set(PLANWIDGETS_INCLUDES 0027 ${CMAKE_CURRENT_SOURCE_DIR}/libs/widgetutils 0028 ${CMAKE_CURRENT_BINARY_DIR}/libs/widgetutils 0029 ${CMAKE_CURRENT_SOURCE_DIR}/libs/widgets 0030 ${CMAKE_CURRENT_BINARY_DIR}/libs/widgets 0031 ) 0032 0033 set(PLANMAIN_INCLUDES 0034 ${PLANWIDGETS_INCLUDES} 0035 ${PLANODF_INCLUDES} 0036 ${PLANKUNDO2_INCLUDES} 0037 ${CMAKE_CURRENT_SOURCE_DIR}/libs/main 0038 ${CMAKE_CURRENT_BINARY_DIR}/libs/main 0039 ) 0040 0041 set(PLANKERNEL_INCLUDES 0042 ${CMAKE_CURRENT_SOURCE_DIR}/libs/kernel 0043 ${CMAKE_CURRENT_BINARY_DIR}/libs/kernel 0044 ) 0045 0046 set(PLANMODELS_INCLUDES 0047 ${CMAKE_CURRENT_SOURCE_DIR}/libs/models 0048 ${CMAKE_CURRENT_BINARY_DIR}/libs/models 0049 ) 0050 0051 set(PLANUI_INCLUDES 0052 ${CMAKE_CURRENT_SOURCE_DIR}/libs/ui 0053 ${CMAKE_CURRENT_BINARY_DIR}/libs/ui 0054 ) 0055 0056 set(PLAN_INCLUDES 0057 ${CMAKE_CURRENT_BINARY_DIR} 0058 0059 ${PLANKERNEL_INCLUDES} 0060 ${PLANMODELS_INCLUDES} 0061 ${PLANUI_INCLUDES} 0062 ${PLANMAIN_INCLUDES} 0063 ) 0064 0065 # For odf 0066 set(RNG_SOURCE_DIR ${PROJECT_SOURCE_DIR}/devtools/scripts) 0067 0068 if(KF5Holidays_FOUND) 0069 add_definitions(-DHAVE_KHOLIDAYS) 0070 endif() 0071 0072 if (KF5AkonadiContact_FOUND) 0073 # disable for now: there is a bug 0074 # it only works if you use kde contacts (of course) but many use other stuff, so gets dissapointed 0075 add_definitions(-DPLAN_KDEPIMLIBS_FOUND) 0076 message(WARNING "AkonadiContacs available, but function is disabled due to Bug 311940") 0077 endif () 0078 0079 if (PLANCHARTDEBUG) 0080 add_definitions(-DPLAN_CHART_DEBUG) 0081 endif () 0082 0083 #add_subdirectory(interfaces) 0084 add_subdirectory(servicetypes) 0085 0086 add_subdirectory( templates ) 0087 add_subdirectory( pics ) 0088 add_subdirectory( toolbar ) 0089 add_subdirectory( plugins ) 0090 0091 add_subdirectory( libs ) 0092 0093 if(BUILD_TESTING) 0094 add_subdirectory( tests ) 0095 endif() 0096 0097 add_subdirectory( workpackage ) 0098 0099 include_directories(${PLAN_INCLUDES}) 0100 0101 add_definitions(-DTRANSLATION_DOMAIN=\"calligraplan\") 0102 0103 ########### KPlato private library ############### 0104 0105 set(planprivate_LIB_SRCS 0106 welcome/WelcomeView.cpp 0107 0108 kptviewlistdocker.cpp 0109 kptviewlist.cpp 0110 kptviewlistdialog.cpp 0111 0112 kptschedulesdocker.cpp 0113 0114 kptconfig.cpp 0115 0116 config/ConfigWorkVacationPanel.cpp 0117 config/ConfigProjectPanel.cpp 0118 config/kpttaskdefaultpanel.cpp 0119 config/kptworkpackageconfigpanel.cpp 0120 config/kptcolorsconfigpanel.cpp 0121 config/ConfigDocumentationPanel.cpp 0122 config/ConfigTaskModulesPanel.cpp 0123 config/ConfigProjectTemplatesPanel.cpp 0124 config/ConfigDialog.cpp 0125 0126 kptcontext.cpp 0127 0128 kptfactory.cpp 0129 kptpart.cpp 0130 kptmaindocument.cpp 0131 kptview.cpp 0132 # KPtViewAdaptor.cpp 0133 kptprintingcontrolprivate.cpp 0134 0135 kptschedulerpluginloader.cpp 0136 kptbuiltinschedulerplugin.cpp 0137 kptconfigskeleton.cpp 0138 0139 kptinsertfiledlg.cpp 0140 kptloadsharedprojectsdialog.cpp 0141 0142 KPlatoXmlLoader.cpp 0143 ) 0144 0145 ki18n_wrap_ui(planprivate_LIB_SRCS 0146 welcome/WelcomeView.ui 0147 0148 kptviewlistaddview.ui 0149 kptviewlisteditview.ui 0150 kptviewlisteditcategory.ui 0151 0152 config/ConfigWorkVacationPanel.ui 0153 config/ConfigProjectPanel.ui 0154 config/kptconfigtaskpanelbase.ui 0155 config/kptworkpackageconfigpanel.ui 0156 config/kptcolorsconfigpanel.ui 0157 config/ConfigDocumentationPanel.ui 0158 config/ConfigTaskModulesPanel.ui 0159 config/ConfigProjectTemplatesPanel.ui 0160 0161 kptinsertfilepanel.ui 0162 ) 0163 0164 kconfig_add_kcfg_files(plansettings_SRCS calligraplansettings.kcfgc) 0165 0166 add_library(planprivate SHARED ${planprivate_LIB_SRCS} ${plansettings_SRCS} ) 0167 generate_export_header(planprivate BASE_NAME plan) 0168 0169 target_link_libraries(planprivate 0170 PUBLIC 0171 plankernel 0172 planmodels 0173 planui 0174 planmain 0175 PRIVATE 0176 planplugin 0177 KF5::IconThemes 0178 #KF5::KHtml 0179 ) 0180 if(KF5AkonadiContact_FOUND) 0181 target_link_libraries(planprivate PRIVATE KF5::AkonadiContact) 0182 endif() 0183 set_target_properties(planprivate PROPERTIES VERSION ${GENERIC_PLAN_LIB_VERSION} SOVERSION ${GENERIC_PLAN_LIB_SOVERSION} ) 0184 0185 install(TARGETS planprivate ${INSTALL_TARGETS_DEFAULT_ARGS}) 0186 0187 ########### KPlato part ############### 0188 0189 set(planpart_PART_SRCS kptfactoryinit.cpp ) 0190 0191 add_library(calligraplanpart MODULE ${planpart_PART_SRCS}) 0192 0193 #calligraplan_part_desktop_to_json(calligraplanpart planpart.desktop) 0194 if(${KF5_VERSION} VERSION_LESS "5.16.0") 0195 kcoreaddons_desktop_to_json(calligraplanpart planpart.desktop) 0196 else() 0197 kcoreaddons_desktop_to_json(calligraplanpart planpart.desktop 0198 # SERVICE_TYPES ${PLAN_SOURCE_DIR}/servicetypes/calligraplan_part.desktop 0199 ) 0200 endif() 0201 0202 0203 target_link_libraries(calligraplanpart PUBLIC KF5::Parts KF5::CoreAddons PRIVATE planprivate) 0204 0205 install(TARGETS calligraplanpart DESTINATION ${PLUGIN_INSTALL_DIR}/calligraplan/parts) 0206 0207 0208 ########### KPlato executable ############### 0209 0210 set(calligraplan_KDEINIT_SRCS main.cpp ) 0211 0212 file(GLOB ICONS_SRCS "${CMAKE_CURRENT_SOURCE_DIR}/pics/*-apps-calligraplan.png") 0213 ecm_add_app_icon(kdeinit_app_ICONS_SRCS ICONS ${ICONS_SRCS}) 0214 if(WIN32) 0215 set(_resourcefile "${CMAKE_CURRENT_BINARY_DIR}/kdeinit_app_ICONS_SRCS.rc") 0216 endif() 0217 0218 kf5_add_kdeinit_executable( calligraplan ${calligraplan_KDEINIT_SRCS}) 0219 0220 if (APPLE) 0221 set_target_properties(calligraplan PROPERTIES MACOSX_BUNDLE_INFO_PLIST ${CMAKE_CURRENT_SOURCE_DIR}/Info.plist.template) 0222 set_target_properties(calligraplan PROPERTIES MACOSX_BUNDLE_GUI_IDENTIFIER "org.calligra.plan") 0223 set_target_properties(calligraplan PROPERTIES MACOSX_BUNDLE_BUNDLE_NAME "Plan") 0224 install( FILES ${CMAKE_CURRENT_BINARY_DIR}/calligraplan_KDEINIT_SRCS.icns DESTINATION ${BUNDLE_INSTALL_DIR}/calligraplan.app/Contents/Resources) 0225 endif () 0226 0227 target_link_libraries(kdeinit_calligraplan planmain) 0228 0229 install(TARGETS kdeinit_calligraplan ${INSTALL_TARGETS_DEFAULT_ARGS}) 0230 0231 target_link_libraries(calligraplan kdeinit_calligraplan planmain) 0232 install(TARGETS calligraplan ${INSTALL_TARGETS_DEFAULT_ARGS}) 0233 0234 ########### install files ############### 0235 0236 install( FILES calligraplan.rc calligraplan_readonly.rc DESTINATION ${KXMLGUI_INSTALL_DIR}/calligraplan) 0237 install( PROGRAMS org.kde.calligraplan.desktop DESTINATION ${XDG_APPS_INSTALL_DIR}) 0238 install( FILES calligraplanrc DESTINATION ${CONFIG_INSTALL_DIR}) 0239 install(FILES calligraplansettings.kcfg DESTINATION ${KCFG_INSTALL_DIR}) 0240 install(FILES org.kde.calligraplan.appdata.xml DESTINATION ${KDE_INSTALL_METAINFODIR}) 0241 0242 # TODO: with the new embedded JSON data for plugins there is no schema ATM to define extended properties 0243 # plan_viewplugin.desktop 0244 0245 0246 configure_file(config.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/config.h ) 0247 0248 #add_custom_target(apidox doc/api/gendocs.pl WORKING_DIRECTORY ${CMAKE_SOURCE_DIR})