Warning, /office/calligra/sheets/CMakeLists.txt is written in an unsupported language. File is not indexed.
0001 project(calligra-sheets) 0002 0003 # TEMPORARY: for Qt5/KF5 build porting phase deprecation warnings are only annoying noise 0004 if (CMAKE_COMPILER_IS_GNUCXX OR CMAKE_COMPILER_IS_GNUC) 0005 add_definitions(-Wno-deprecated -Wno-deprecated-declarations) 0006 endif () 0007 0008 list(APPEND CMAKE_AUTOMOC_MACRO_NAMES "CALLIGRA_SHEETS_EXPORT_FUNCTION_MODULE") 0009 0010 if (SHOULD_BUILD_PART_SHEETS) 0011 0012 include_directories( ${CMAKE_SOURCE_DIR}/interfaces 0013 ${KOMAIN_INCLUDES} 0014 ${KOTEXT_INCLUDES} 0015 ${TEXTLAYOUT_INCLUDES} 0016 ${Boost_INCLUDE_DIR} 0017 ${EIGEN3_INCLUDE_DIR} ) 0018 0019 # have their own translation domain 0020 ### TODO: The tableshape needs a rewrite, 0021 ### it has been obsoleted by the implementation of texttables 0022 #add_subdirectory( shape ) 0023 0024 add_subdirectory( plugins ) 0025 0026 add_definitions(-DTRANSLATION_DOMAIN=\"calligrasheets\") 0027 0028 add_subdirectory( data ) 0029 if(BUILD_TESTING) 0030 add_subdirectory( tests ) 0031 endif() 0032 add_subdirectory( dtd ) 0033 add_subdirectory( functions ) 0034 0035 #add_definitions(-DCALLIGRA_SHEETS_MT) 0036 0037 if(NOT Qt5Sql_FOUND) 0038 add_definitions(-DQT_NO_SQL) 0039 endif() 0040 0041 ########### next target ############### 0042 set (chart_DIR_SRCS 0043 chart/ChartDatabaseSelectorFactory.cpp 0044 chart/ChartDatabaseSelector.cpp 0045 chart/ChartDialog.cpp 0046 ) 0047 0048 ki18n_wrap_ui(chart_DIR_SRCS 0049 chart/ChartDatabaseSelector.ui 0050 ) 0051 0052 set (commands_DIR_SRCS 0053 commands/AbstractRegionCommand.cpp 0054 commands/ApplyFilterCommand.cpp 0055 commands/AutoFillCommand.cpp 0056 commands/AutoFilterCommand.cpp 0057 commands/AutoFormatCommand.cpp 0058 commands/BorderColorCommand.cpp 0059 commands/CommentCommand.cpp 0060 commands/ConditionCommand.cpp 0061 commands/CopyCommand.cpp 0062 commands/CSVDataCommand.cpp 0063 commands/DataManipulators.cpp 0064 commands/DeleteCommand.cpp 0065 commands/IndentationCommand.cpp 0066 commands/LinkCommand.cpp 0067 commands/MergeCommand.cpp 0068 commands/NamedAreaCommand.cpp 0069 commands/PageBreakCommand.cpp 0070 commands/PasteCommand.cpp 0071 commands/PrecisionCommand.cpp 0072 commands/RowColumnManipulators.cpp 0073 commands/SheetCommands.cpp 0074 commands/SortManipulator.cpp 0075 commands/SpellCheckCommand.cpp 0076 commands/StyleCommand.cpp 0077 commands/ValidityCommand.cpp 0078 ) 0079 0080 set (database_DIR_SRCS 0081 #database/Database.cpp 0082 #database/DatabaseManager.cpp 0083 database/DatabaseSource.cpp 0084 database/DatabaseSourceQuery.cpp 0085 database/DatabaseSourceSql.cpp 0086 database/DatabaseSourceTable.cpp 0087 #database/Filter.cpp 0088 database/FilterPopup.cpp 0089 ) 0090 0091 set (dialogs_DIR_SRCS 0092 dialogs/AddNamedAreaDialog.cpp 0093 dialogs/AngleDialog.cpp 0094 dialogs/AutoFormatDialog.cpp 0095 dialogs/CharacterSelectDialog.cpp 0096 dialogs/CommentDialog.cpp 0097 dialogs/ConditionalDialog.cpp 0098 dialogs/ConsolidateDialog.cpp 0099 dialogs/CSVDialog.cpp 0100 dialogs/DatabaseDialog.cpp 0101 dialogs/DocumentSettingsDialog.cpp 0102 dialogs/FindDialog.cpp 0103 dialogs/FormulaDialog.cpp 0104 dialogs/GoalSeekDialog.cpp 0105 dialogs/GotoDialog.cpp 0106 dialogs/InsertDialog.cpp 0107 dialogs/LayoutDialog.cpp 0108 dialogs/LinkDialog.cpp 0109 dialogs/ListDialog.cpp 0110 dialogs/NamedAreaDialog.cpp 0111 dialogs/PasteInsertDialog.cpp 0112 dialogs/Resize2Dialog.cpp 0113 dialogs/SeriesDialog.cpp 0114 dialogs/ShowDialog.cpp 0115 dialogs/ShowColRowDialog.cpp 0116 dialogs/SortDialog.cpp 0117 dialogs/SpecialPasteDialog.cpp 0118 dialogs/StyleManagerDialog.cpp 0119 dialogs/SubtotalDialog.cpp 0120 dialogs/ValidityDialog.cpp 0121 dialogs/pivot.cpp 0122 dialogs/pivotfilters.cpp 0123 dialogs/pivotoptions.cpp 0124 dialogs/pivotmain.cpp 0125 0126 ) 0127 0128 0129 ki18n_wrap_ui(dialogs_DIR_SRCS 0130 dialogs/ConsolidateWidget.ui 0131 dialogs/ConsolidateDetailsWidget.ui 0132 dialogs/FontWidget.ui 0133 dialogs/GoalSeekWidget.ui 0134 dialogs/PositionWidget.ui 0135 dialogs/ProtectionWidget.ui 0136 dialogs/SpecialPasteWidget.ui 0137 dialogs/SortWidget.ui 0138 dialogs/SortDetailsWidget.ui 0139 dialogs/SubtotalWidget.ui 0140 dialogs/SubtotalsDetailsWidget.ui 0141 dialogs/pivot.ui 0142 dialogs/pivotfilters.ui 0143 dialogs/pivotoptions.ui 0144 dialogs/pivotmain.ui 0145 0146 ) 0147 0148 set (functions_DIR_SRCS 0149 functions/helper.cpp 0150 ) 0151 0152 if(Qt5DBus_FOUND) 0153 set (interfaces_DIR_SRCS 0154 interfaces/MapAdaptor.cpp 0155 interfaces/SheetAdaptor.cpp 0156 interfaces/ViewAdaptor.cpp 0157 ) 0158 endif() 0159 0160 set (odf_DIR_SRCS 0161 odf/SheetsOdfDoc.cpp 0162 odf/SheetsOdfMap.cpp 0163 odf/SheetsOdfSheet.cpp 0164 odf/SheetsOdfCell.cpp 0165 odf/SheetsOdfStyle.cpp 0166 odf/SheetsOdfRegion.cpp 0167 odf/SheetsOdfCondition.cpp 0168 odf/SheetsOdfValidity.cpp 0169 odf/GenValidationStyle.cpp 0170 ) 0171 0172 set (part_DIR_SRCS 0173 part/CanvasBase.cpp 0174 part/Canvas.cpp 0175 part/CanvasItem.cpp 0176 part/CellTool.cpp 0177 part/CellToolFactory.cpp 0178 #part/Digest.cpp 0179 part/Doc.cpp 0180 part/Part.cpp 0181 part/Factory.cpp 0182 part/Find.cpp 0183 part/Headers.cpp 0184 part/HeaderWidgets.cpp 0185 part/HeaderItems.cpp 0186 part/PrintJob.cpp 0187 part/ToolRegistry.cpp 0188 part/TabBar.cpp 0189 part/View.cpp 0190 part/commands/DefinePrintRangeCommand.cpp 0191 part/commands/PageLayoutCommand.cpp 0192 part/dialogs/PageLayoutDialog.cpp 0193 part/dialogs/PreferenceDialog.cpp 0194 part/dialogs/SheetPropertiesDialog.cpp 0195 part/dialogs/SheetSelectPage.cpp 0196 ) 0197 0198 ki18n_wrap_ui(part_DIR_SRCS 0199 part/dialogs/FileOptionsWidget.ui 0200 part/dialogs/InterfaceOptionsWidget.ui 0201 part/dialogs/PageLayoutSheetPage.ui 0202 part/dialogs/SheetPropertiesWidget.ui 0203 part/dialogs/SheetSelectWidget.ui 0204 ) 0205 0206 set (ui_DIR_SRCS 0207 ui/AbstractSelectionStrategy.cpp 0208 ui/ActionOptionWidget.cpp 0209 ui/AutoFillStrategy.cpp 0210 ui/CellEditorBase.cpp 0211 ui/CellEditor.cpp 0212 ui/CellEditorDocker.cpp 0213 ui/CellToolBase.cpp 0214 ui/CellToolBase_p.cpp 0215 ui/CellView.cpp 0216 ui/DragAndDropStrategy.cpp 0217 ui/FormulaEditorHighlighter.cpp 0218 ui/FunctionCompletion.cpp 0219 ui/ExternalEditor.cpp 0220 ui/HyperlinkStrategy.cpp 0221 ui/LocationComboBox.cpp 0222 ui/MapViewModel.cpp 0223 ui/MergeStrategy.cpp 0224 ui/PasteStrategy.cpp 0225 ui/PixmapCachingSheetView.cpp 0226 ui/RegionSelector.cpp 0227 ui/RightToLeftPaintingStrategy.cpp 0228 ui/Selection.cpp 0229 ui/SelectionStrategy.cpp 0230 ui/SheetView.cpp 0231 ) 0232 0233 set (calligrasheetscommon_LIB_SRCS 0234 MapModel.cpp 0235 PageManager.cpp 0236 RegionModel.cpp 0237 tests/inspector.cpp 0238 ${chart_DIR_SRCS} 0239 ${commands_DIR_SRCS} 0240 ${database_DIR_SRCS} 0241 ${dialogs_DIR_SRCS} 0242 ${functions_DIR_SRCS} 0243 ${part_DIR_SRCS} 0244 ${ui_DIR_SRCS} 0245 ) 0246 0247 if(Qt5DBus_FOUND) 0248 set (calligrasheetscommon_LIB_SRCS 0249 ${calligrasheetscommon_LIB_SRCS} 0250 ${interfaces_DIR_SRCS} 0251 ) 0252 endif() 0253 0254 set (calligrasheetsodf_LIB_SRCS 0255 SheetsDebug.cpp 0256 0257 part/Digest.cpp 0258 ApplicationSettings.cpp 0259 Binding.cpp 0260 BindingManager.cpp 0261 BindingModel.cpp 0262 BindingStorage.cpp 0263 CalculationSettings.cpp 0264 Cell.cpp 0265 CellStorage.cpp 0266 Cluster.cpp 0267 Condition.cpp 0268 ConditionsStorage.cpp 0269 Currency.cpp 0270 Damages.cpp 0271 DependencyManager.cpp 0272 DocBase.cpp 0273 Format.cpp 0274 Formula.cpp 0275 HeaderFooter.cpp 0276 Localization.cpp 0277 Map.cpp 0278 NamedAreaManager.cpp 0279 Number.cpp 0280 PrintSettings.cpp 0281 ProtectableObject.cpp 0282 RecalcManager.cpp 0283 RectStorage.cpp 0284 Region.cpp 0285 RowColumnFormat.cpp 0286 RowFormatStorage.cpp 0287 RowRepeatStorage.cpp 0288 ShapeApplicationData.cpp 0289 Sheet.cpp 0290 SheetAccessModel.cpp 0291 SheetModel.cpp 0292 Style.cpp 0293 StyleManager.cpp 0294 StyleStorage.cpp 0295 Util.cpp 0296 Validity.cpp 0297 ValidityStorage.cpp 0298 Value.cpp 0299 ValueCalc.cpp 0300 ValueConverter.cpp 0301 ValueFormatter.cpp 0302 ValueParser.cpp 0303 0304 database/Database.cpp 0305 database/DatabaseManager.cpp 0306 database/DatabaseStorage.cpp 0307 database/Filter.cpp 0308 0309 ${odf_DIR_SRCS} 0310 0311 # TODO: move the formula evaluation out of Formula.cpp so these files can move out of libcalligrasheetsodf 0312 Function.cpp 0313 FunctionDescription.cpp 0314 FunctionModule.cpp 0315 FunctionModuleRegistry.cpp 0316 FunctionRepository.cpp 0317 0318 # TODO: move HeaderFooter from SheetPrint to PrintSettings, and replace SheetPrint with PrintSettings in Sheet to get rid of this dependency 0319 SheetPrint.cpp 0320 SheetPrint_p.cpp 0321 ) 0322 0323 0324 add_library(calligrasheetsodf SHARED ${calligrasheetsodf_LIB_SRCS}) 0325 generate_export_header(calligrasheetsodf 0326 EXPORT_FILE_NAME sheets_odf_generated_export.h 0327 BASE_NAME CALLIGRA_SHEETS_ODF 0328 ) 0329 0330 target_link_libraries(calligrasheetsodf 0331 PUBLIC 0332 komain 0333 KF5::KDELibs4Support 0334 PRIVATE 0335 koplugin 0336 KF5::Completion 0337 ) 0338 0339 set_target_properties(calligrasheetsodf PROPERTIES 0340 VERSION ${GENERIC_CALLIGRA_LIB_VERSION} SOVERSION ${GENERIC_CALLIGRA_LIB_SOVERSION} 0341 ) 0342 install(TARGETS calligrasheetsodf ${INSTALL_TARGETS_DEFAULT_ARGS}) 0343 0344 0345 add_library(calligrasheetscommon SHARED ${calligrasheetscommon_LIB_SRCS}) 0346 generate_export_header(calligrasheetscommon 0347 EXPORT_FILE_NAME sheets_common_generated_export.h 0348 BASE_NAME CALLIGRA_SHEETS_COMMON 0349 ) 0350 0351 target_link_libraries(calligrasheetscommon 0352 PUBLIC 0353 komain 0354 calligrasheetsodf 0355 PRIVATE 0356 koplugin 0357 KF5::Completion 0358 KF5::GuiAddons 0359 KF5::SonnetCore 0360 KF5::SonnetUi 0361 KF5::NotifyConfig 0362 KF5::KCMUtils 0363 ) 0364 if(Qt5Sql_FOUND) 0365 target_link_libraries(calligrasheetscommon PRIVATE Qt5::Sql) 0366 endif() 0367 0368 0369 set_target_properties(calligrasheetscommon PROPERTIES 0370 VERSION ${GENERIC_CALLIGRA_LIB_VERSION} SOVERSION ${GENERIC_CALLIGRA_LIB_SOVERSION} 0371 ) 0372 install(TARGETS calligrasheetscommon ${INSTALL_TARGETS_DEFAULT_ARGS}) 0373 ########### next target ############### 0374 0375 set (calligrasheetspart_PART_SRCS part/Factory_init.cpp ) 0376 0377 add_library(calligrasheetspart MODULE ${calligrasheetspart_PART_SRCS}) 0378 0379 calligra_part_desktop_to_json(calligrasheetspart sheetspart.desktop) 0380 0381 target_link_libraries(calligrasheetspart calligrasheetscommon ) 0382 0383 install(TARGETS calligrasheetspart DESTINATION ${PLUGIN_INSTALL_DIR}/calligra/parts) 0384 0385 ########### install files ############### 0386 0387 install( FILES calligrasheets.rc calligrasheets_readonly.rc DESTINATION ${KXMLGUI_INSTALL_DIR}/calligrasheets) 0388 install( FILES ui/CellToolOptionWidgets.xml DESTINATION ${DATA_INSTALL_DIR}/calligrasheets) 0389 install( FILES calligrasheets.kcfg DESTINATION ${KCFG_INSTALL_DIR} ) 0390 install( FILES calligrasheetsrc DESTINATION ${CONFIG_INSTALL_DIR}) 0391 0392 # TODO: with the new embedded JSON data for plugins there is no schema ATM to define extended 0393 # propertiessheets_plugin.desktop, sheets_viewplugin.desktop 0394 0395 if (SHOULD_BUILD_DEVEL_HEADERS) 0396 0397 install( FILES 0398 sheets_odf_export.h 0399 ${CMAKE_CURRENT_BINARY_DIR}/sheets_odf_generated_export.h 0400 sheets_common_export.h 0401 ${CMAKE_CURRENT_BINARY_DIR}/sheets_common_generated_export.h 0402 0403 calligra_sheets_limits.h 0404 0405 Cell.h 0406 CellStorage.h 0407 Condition.h 0408 Currency.h 0409 DocBase.h 0410 Format.h 0411 Global.h 0412 Map.h 0413 Number.h 0414 odf/OdfLoadingContext.h 0415 PointStorage.h 0416 PrintSettings.h 0417 ProtectableObject.h 0418 RectStorage.h 0419 Region.h 0420 RowColumnFormat.h 0421 RowFormatStorage.h 0422 RTree.h 0423 Sheet.h 0424 Style.h 0425 Value.h 0426 ValueCalc.h 0427 ValueConverter.h 0428 ValueStorage.h 0429 DESTINATION ${INCLUDE_INSTALL_DIR}/sheets COMPONENT Devel) 0430 install( FILES 0431 part/CanvasBase.h 0432 part/CanvasItem.h 0433 part/CellTool.h 0434 part/Doc.h 0435 part/Part.h 0436 part/Find.h 0437 part/HeaderItems.h 0438 part/Headers.h 0439 part/ToolRegistry.h 0440 part/View.h 0441 DESTINATION ${INCLUDE_INSTALL_DIR}/calligrasheets/part COMPONENT Devel) 0442 install( FILES 0443 ui/CellToolBase.h 0444 ui/CellEditorBase.h 0445 ui/Selection.h 0446 ui/SheetView.h 0447 DESTINATION ${INCLUDE_INSTALL_DIR}/calligrasheets/ui COMPONENT Devel) 0448 install( FILES 0449 database/Database.h 0450 database/Filter.h 0451 DESTINATION ${INCLUDE_INSTALL_DIR}/calligrasheets/database COMPONENT Devel) 0452 install( FILES 0453 commands/AbstractRegionCommand.h 0454 commands/DataManipulators.h 0455 commands/SortManipulator.h 0456 dialogs/pivot.h 0457 dialogs/pivotfilters.h 0458 dialogs/pivotoptions.h 0459 dialogs/pivotmain.h 0460 DESTINATION ${INCLUDE_INSTALL_DIR}/calligrasheets/commands COMPONENT Devel) 0461 0462 endif() 0463 0464 endif () 0465 0466 ########### APP ############### 0467 0468 if (SHOULD_BUILD_APP_SHEETS) 0469 0470 set (calligrasheets_KDEINIT_SRCS part/Main.cpp ) 0471 0472 file(GLOB ICONS_SRCS "${CMAKE_CURRENT_SOURCE_DIR}/data/pics/*-apps-calligrasheets.png") 0473 ecm_add_app_icon(kdeinit_app_ICONS_SRCS ICONS ${ICONS_SRCS}) 0474 if(WIN32) 0475 set(_resourcefile "${CMAKE_CURRENT_BINARY_DIR}/kdeinit_app_ICONS_SRCS.rc") 0476 endif() 0477 0478 kf5_add_kdeinit_executable( calligrasheets ${calligrasheets_KDEINIT_SRCS}) 0479 0480 if (APPLE) 0481 set_target_properties(calligrasheets PROPERTIES MACOSX_BUNDLE_INFO_PLIST ${CMAKE_CURRENT_SOURCE_DIR}/Info.plist.template) 0482 set_target_properties(calligrasheets PROPERTIES MACOSX_BUNDLE_GUI_IDENTIFIER "org.calligra.sheets") 0483 set_target_properties(calligrasheets PROPERTIES MACOSX_BUNDLE_BUNDLE_NAME "Calligra Sheets 2") 0484 install( FILES ${CMAKE_CURRENT_BINARY_DIR}/calligrasheets_KDEINIT_SRCS.icns DESTINATION ${BUNDLE_INSTALL_DIR}/calligrasheets.app/Contents/Resources) 0485 endif () 0486 0487 target_link_libraries(kdeinit_calligrasheets komain KF5::KDELibs4Support) 0488 0489 install(TARGETS kdeinit_calligrasheets ${INSTALL_TARGETS_DEFAULT_ARGS}) 0490 0491 target_link_libraries( calligrasheets kdeinit_calligrasheets ) 0492 install(TARGETS calligrasheets ${INSTALL_TARGETS_DEFAULT_ARGS}) 0493 0494 install( PROGRAMS org.kde.calligrasheets.desktop DESTINATION ${XDG_APPS_INSTALL_DIR}) 0495 install( FILES org.kde.calligrasheets.appdata.xml DESTINATION ${KDE_INSTALL_METAINFODIR}) 0496 0497 endif ()