File: CMakeLists.txt

package info (click to toggle)
calligra 1:2.8.5+dfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 397,516 kB
  • ctags: 185,064
  • sloc: cpp: 1,505,875; python: 45,987; ansic: 28,421; xml: 26,472; sh: 23,986; java: 18,214; objc: 3,965; makefile: 2,816; perl: 2,792; yacc: 2,601; lex: 1,410; sql: 903; ruby: 737; asm: 236; lisp: 121
file content (416 lines) | stat: -rw-r--r-- 11,239 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
project(calligra-sheets)

include_directories( ${CMAKE_SOURCE_DIR}/interfaces
                    ${KOMAIN_INCLUDES}
                    ${KOTEXT_INCLUDES}
                    ${TEXTLAYOUT_INCLUDES}
                    ${Boost_INCLUDE_DIR}
                    ${EIGEN3_INCLUDE_DIR} )

if (SHOULD_BUILD_SHEETS_PART)

add_subdirectory( data )
add_subdirectory( shape )
add_subdirectory( tests )
add_subdirectory( plugins )
add_subdirectory( dtd )
add_subdirectory( functions )

#add_definitions(-DCALLIGRA_SHEETS_MT)

########### next target ###############
SET (chart_DIR_SRCS
    chart/ChartDatabaseSelectorFactory.cpp
    chart/ChartDatabaseSelector.cpp
    chart/ChartDialog.cpp
    )

kde4_add_ui_files(chart_DIR_SRCS
    chart/ChartDatabaseSelector.ui
    )

SET (commands_DIR_SRCS
    commands/AbstractRegionCommand.cpp
    commands/ApplyFilterCommand.cpp
    commands/AutoFillCommand.cpp
    commands/AutoFilterCommand.cpp
    commands/AutoFormatCommand.cpp
    commands/BorderColorCommand.cpp
    commands/CommentCommand.cpp
    commands/ConditionCommand.cpp
    commands/CopyCommand.cpp
    commands/CSVDataCommand.cpp
    commands/DataManipulators.cpp
    commands/DeleteCommand.cpp
    commands/IndentationCommand.cpp
    commands/LinkCommand.cpp
    commands/MergeCommand.cpp
    commands/NamedAreaCommand.cpp
    commands/PageBreakCommand.cpp
    commands/PasteCommand.cpp
    commands/PrecisionCommand.cpp
    commands/RowColumnManipulators.cpp
    commands/SheetCommands.cpp
    commands/SortManipulator.cpp
    commands/SpellCheckCommand.cpp
    commands/StyleCommand.cpp
    commands/ValidityCommand.cpp
    )

SET (database_DIR_SRCS
    #database/Database.cpp
    #database/DatabaseManager.cpp
    database/DatabaseSource.cpp
    database/DatabaseSourceQuery.cpp
    database/DatabaseSourceSql.cpp
    database/DatabaseSourceTable.cpp
    #database/Filter.cpp
    database/FilterPopup.cpp
    )

SET (dialogs_DIR_SRCS
    dialogs/AddNamedAreaDialog.cpp
    dialogs/AngleDialog.cpp
    dialogs/AutoFormatDialog.cpp
    dialogs/CharacterSelectDialog.cpp
    dialogs/CommentDialog.cpp
    dialogs/ConditionalDialog.cpp
    dialogs/ConsolidateDialog.cpp
    dialogs/CSVDialog.cpp
    dialogs/DatabaseDialog.cpp
    dialogs/DocumentSettingsDialog.cpp
    dialogs/FindDialog.cpp
    dialogs/FormulaDialog.cpp
    dialogs/GoalSeekDialog.cpp
    dialogs/GotoDialog.cpp
    dialogs/InsertDialog.cpp
    dialogs/LayoutDialog.cpp
    dialogs/LinkDialog.cpp
    dialogs/ListDialog.cpp
    dialogs/NamedAreaDialog.cpp
    dialogs/PasteInsertDialog.cpp
    dialogs/Resize2Dialog.cpp
    dialogs/SeriesDialog.cpp
    dialogs/ShowDialog.cpp
    dialogs/ShowColRowDialog.cpp
    dialogs/SortDialog.cpp
    dialogs/SpecialPasteDialog.cpp
    dialogs/StyleManagerDialog.cpp
    dialogs/SubtotalDialog.cpp
    dialogs/ValidityDialog.cpp
    )


kde4_add_ui_files(dialogs_DIR_SRCS
    dialogs/ConsolidateWidget.ui
    dialogs/ConsolidateDetailsWidget.ui
    dialogs/FontWidget.ui
    dialogs/GoalSeekWidget.ui
    dialogs/PositionWidget.ui
    dialogs/ProtectionWidget.ui
    dialogs/SpecialPasteWidget.ui
    dialogs/SortWidget.ui
    dialogs/SortDetailsWidget.ui
    dialogs/SubtotalWidget.ui
    dialogs/SubtotalsDetailsWidget.ui
    )

SET (functions_DIR_SRCS
    functions/helper.cpp
    )

if(QT_QTDBUS_FOUND)
SET (interfaces_DIR_SRCS
    interfaces/MapAdaptor.cpp
    interfaces/SheetAdaptor.cpp
    interfaces/ViewAdaptor.cpp
    )
endif()

SET (part_DIR_SRCS
    part/CanvasBase.cpp
    part/Canvas.cpp
    part/CanvasItem.cpp
    part/CellTool.cpp
    part/CellToolFactory.cpp
    #part/Digest.cpp
    part/Doc.cpp
    part/Part.cpp
    part/Factory.cpp
    part/Find.cpp
    part/Headers.cpp
    part/HeaderWidgets.cpp
    part/HeaderItems.cpp
    part/PrintJob.cpp
    part/ToolRegistry.cpp
    part/TabBar.cpp
    part/View.cpp
    part/commands/DefinePrintRangeCommand.cpp
    part/commands/PageLayoutCommand.cpp
    part/dialogs/PageLayoutDialog.cpp
    part/dialogs/PreferenceDialog.cpp
    part/dialogs/SheetPropertiesDialog.cpp
    part/dialogs/SheetSelectPage.cpp
)

kde4_add_ui_files(part_DIR_SRCS
    part/dialogs/FileOptionsWidget.ui
    part/dialogs/InterfaceOptionsWidget.ui
    part/dialogs/PageLayoutSheetPage.ui
    part/dialogs/SheetPropertiesWidget.ui
    part/dialogs/SheetSelectWidget.ui
)

SET (ui_DIR_SRCS
    ui/AbstractSelectionStrategy.cpp
    ui/ActionOptionWidget.cpp
    ui/AutoFillStrategy.cpp
    ui/CellEditorBase.cpp
    ui/CellEditor.cpp
    ui/CellEditorDocker.cpp
    ui/CellToolBase.cpp
    ui/CellToolBase_p.cpp
    ui/CellView.cpp
    ui/DragAndDropStrategy.cpp
    ui/FormulaEditorHighlighter.cpp
    ui/FunctionCompletion.cpp
    ui/ExternalEditor.cpp
    ui/HyperlinkStrategy.cpp
    ui/LocationComboBox.cpp
    ui/MapViewModel.cpp
    ui/MergeStrategy.cpp
    ui/PasteStrategy.cpp
    ui/PixmapCachingSheetView.cpp
    ui/RegionSelector.cpp
    ui/RightToLeftPaintingStrategy.cpp
    ui/Selection.cpp
    ui/SelectionStrategy.cpp
    ui/SheetView.cpp
)

SET (calligrasheetscommon_LIB_SRCS
    MapModel.cpp
    PageManager.cpp
    RegionModel.cpp
    tests/inspector.cpp
    ${chart_DIR_SRCS}
    ${commands_DIR_SRCS}
    ${database_DIR_SRCS}
    ${dialogs_DIR_SRCS}
    ${functions_DIR_SRCS}
    ${part_DIR_SRCS}
    ${ui_DIR_SRCS}
    )

if(QT_QTDBUS_FOUND)
set (calligrasheetscommon_LIB_SRCS
    ${calligrasheetscommon_LIB_SRCS}
    ${interfaces_DIR_SRCS}
    )
endif()

set (calligrasheetsodf_LIB_SRCS
    part/Digest.cpp
    ApplicationSettings.cpp
    Binding.cpp
    BindingManager.cpp
    CalculationSettings.cpp
    Cell.cpp
    CellStorage.cpp
    Cluster.cpp
    Condition.cpp
    Currency.cpp
    Damages.cpp
    DependencyManager.cpp
    DocBase.cpp
    Format.cpp
    Formula.cpp
    GenValidationStyle.cpp
    HeaderFooter.cpp
    Localization.cpp
    Map.cpp
    NamedAreaManager.cpp
    Number.cpp
    PrintSettings.cpp
    ProtectableObject.cpp
    RecalcManager.cpp
    RectStorage.cpp
    Region.cpp
    RowColumnFormat.cpp
    RowFormatStorage.cpp
    RowRepeatStorage.cpp
    ShapeApplicationData.cpp
    Sheet.cpp
    SheetAccessModel.cpp
    SheetModel.cpp
    Style.cpp
    StyleManager.cpp
    StyleStorage.cpp
    Util.cpp
    Validity.cpp
    Value.cpp
    ValueCalc.cpp
    ValueConverter.cpp
    ValueFormatter.cpp
    ValueParser.cpp

    database/Database.cpp
    database/DatabaseManager.cpp
    database/Filter.cpp

    # TODO: move the formula evaluation out of Formula.cpp so these files can move out of libcalligrasheetsodf
    Function.cpp
    FunctionDescription.cpp
    FunctionModule.cpp
    FunctionModuleRegistry.cpp
    FunctionRepository.cpp

    # TODO: move HeaderFooter from SheetPrint to PrintSettings, and replace SheetPrint with PrintSettings in Sheet to get rid of this dependency
    SheetPrint.cpp
    SheetPrint_p.cpp
    )


kde4_add_library(calligrasheetsodf SHARED ${calligrasheetsodf_LIB_SRCS})

target_link_libraries(calligrasheetsodf komain)
target_link_libraries(calligrasheetsodf LINK_INTERFACE_LIBRARIES komain)

set_target_properties(calligrasheetsodf PROPERTIES
   VERSION ${GENERIC_CALLIGRA_LIB_VERSION} SOVERSION ${GENERIC_CALLIGRA_LIB_SOVERSION}
)
install(TARGETS calligrasheetsodf ${INSTALL_TARGETS_DEFAULT_ARGS})


kde4_add_library(calligrasheetscommon SHARED ${calligrasheetscommon_LIB_SRCS})

target_link_libraries(calligrasheetscommon
    komain
    calligrasheetsodf
    ${QT_QTSQL_LIBRARY}
    ${KDE4_THREADWEAVER_LIBS}
)
if(QT_QTDBUS_FOUND)
    target_link_libraries(calligrasheetscommon ${KDE4_KNOTIFYCONFIG_LIBS} )
endif()

if(KDE4_KCMUTILS_LIBS)
    target_link_libraries(calligrasheetscommon ${KDE4_KCMUTILS_LIBS} )
else()
    target_link_libraries(calligrasheetscommon ${KDE4_KUTILS_LIBS} )
endif()

target_link_libraries(calligrasheetscommon LINK_INTERFACE_LIBRARIES komain calligrasheetsodf )

set_target_properties(calligrasheetscommon PROPERTIES
    VERSION ${GENERIC_CALLIGRA_LIB_VERSION} SOVERSION ${GENERIC_CALLIGRA_LIB_SOVERSION}
)
install(TARGETS calligrasheetscommon  ${INSTALL_TARGETS_DEFAULT_ARGS})
########### next target ###############

SET (calligrasheetspart_PART_SRCS part/Factory_init.cpp )

kde4_add_plugin(calligrasheetspart ${calligrasheetspart_PART_SRCS})



target_link_libraries(calligrasheetspart calligrasheetscommon )

install(TARGETS calligrasheetspart  DESTINATION ${PLUGIN_INSTALL_DIR})

########### install files ###############

install( FILES  sheets.rc sheets_readonly.rc DESTINATION ${DATA_INSTALL_DIR}/sheets)
install( FILES  ui/CellToolOptionWidgets.xml DESTINATION ${DATA_INSTALL_DIR}/sheets)
install( FILES  sheetspart.desktop DESTINATION ${SERVICES_INSTALL_DIR})
install( FILES  sheets.kcfg DESTINATION ${KCFG_INSTALL_DIR} )
install( FILES  sheets_plugin.desktop DESTINATION ${SERVICETYPES_INSTALL_DIR})
install( FILES  sheets_viewplugin.desktop DESTINATION ${SERVICETYPES_INSTALL_DIR})
install( FILES  sheetsrc DESTINATION ${CONFIG_INSTALL_DIR})


install( FILES
    calligra_sheets_export.h
    calligra_sheets_limits.h

    Cell.h
    CellStorage.h
    Condition.h
    Currency.h
    DocBase.h
    Format.h
    Global.h
    Map.h
    Number.h
    OdfLoadingContext.h
    PointStorage.h
    PrintSettings.h
    ProtectableObject.h
    RectStorage.h
    Region.h
    RowColumnFormat.h
    RowFormatStorage.h
    RTree.h
    Sheet.h
    Style.h
    Value.h
    ValueCalc.h
    ValueConverter.h
    ValueStorage.h
DESTINATION ${INCLUDE_INSTALL_DIR}/sheets COMPONENT Devel)
install( FILES
    part/CanvasBase.h
    part/CanvasItem.h
    part/CellTool.h
    part/Doc.h
    part/Part.h
    part/Find.h
    part/HeaderItems.h
    part/Headers.h
    part/ToolRegistry.h
    part/View.h
DESTINATION ${INCLUDE_INSTALL_DIR}/sheets/part COMPONENT Devel)
install( FILES
    ui/CellToolBase.h
    ui/CellEditorBase.h
    ui/Selection.h
    ui/SheetView.h
DESTINATION ${INCLUDE_INSTALL_DIR}/sheets/ui COMPONENT Devel)
install( FILES
    database/Database.h
    database/Filter.h
DESTINATION ${INCLUDE_INSTALL_DIR}/sheets/database COMPONENT Devel)
install( FILES
    commands/AbstractRegionCommand.h
    commands/DataManipulators.h
    commands/SortManipulator.h
DESTINATION ${INCLUDE_INSTALL_DIR}/sheets/commands COMPONENT Devel)

endif (SHOULD_BUILD_SHEETS_PART)

########### APP ###############

if (SHOULD_BUILD_SHEETS_APP)

SET (calligrasheets_KDEINIT_SRCS part/Main.cpp )

kde4_add_app_icon(calligrasheets_KDEINIT_SRCS "${CMAKE_CURRENT_SOURCE_DIR}/data/pics/hi*-app-calligrasheets.png")

kde4_add_kdeinit_executable( calligrasheets ${calligrasheets_KDEINIT_SRCS})

if (Q_WS_MAC)
set_target_properties(calligrasheets PROPERTIES MACOSX_BUNDLE_INFO_PLIST ${CMAKE_CURRENT_SOURCE_DIR}/Info.plist.template)
set_target_properties(calligrasheets PROPERTIES MACOSX_BUNDLE_GUI_IDENTIFIER "org.calligra.sheets")
set_target_properties(calligrasheets PROPERTIES MACOSX_BUNDLE_BUNDLE_NAME "Calligra Sheets 2")
endif (Q_WS_MAC)

target_link_libraries(kdeinit_calligrasheets komain )

install(TARGETS kdeinit_calligrasheets  ${INSTALL_TARGETS_DEFAULT_ARGS})

target_link_libraries( calligrasheets kdeinit_calligrasheets )
install(TARGETS calligrasheets  ${INSTALL_TARGETS_DEFAULT_ARGS})

install( PROGRAMS  sheets.desktop DESTINATION ${XDG_APPS_INSTALL_DIR})

endif (SHOULD_BUILD_SHEETS_APP)