CMakeLists.txt 21.1 KB
Newer Older
1
add_subdirectory( headings )
2

3
4
5
6
7
8
9
10
if(ENABLE_OBJECT_DIAGRAM)
    set(ACTION_NEW_OBJECT_DIAGRAM "<Action name=\"new_object_diagram\"/>")
endif()
configure_file(umbrelloui.rc.cmake ${CMAKE_CURRENT_BINARY_DIR}/umbrelloui.rc @ONLY)
if(BUILD_KF5)
    configure_file(ui.qrc.cmake ${CMAKE_CURRENT_BINARY_DIR}/ui.qrc @ONLY)
endif()

11
########### set variables #############
12

13
# Some definitions for experimental code or debugging
Oliver Kellogg's avatar
Oliver Kellogg committed
14
15
add_definitions(-DQT_NO_CAST_TO_ASCII)
add_definitions(-DQT_NO_CAST_FROM_ASCII)
Ralf Habacker's avatar
Ralf Habacker committed
16
# TODO migrate debug settings to DEBUG_REGISTER macro
17
18
19
20
21
#add_definitions(-DXMI_FLAT_PACKAGES)             # umlobject
#add_definitions(-DDEBUG_LVITEM_INSERTION_ORDER)  # umllistviewitem
#add_definitions(-DTRY_BUGFIX_120682)             # model_utils
#add_definitions(-DVERBOSE_DEBUGGING)             # listpopupmenu, association, petaltree2uml,
                                                  # umlobject, umldoc, classifierlistpage
22
23
24
if(UNIX)
    add_definitions(-D_GLIBCXX_PERMIT_BACKWARD_HASH)
endif()
25

26
27
add_definitions(-DCMAKE_BINARY_DIR="${CMAKE_BINARY_DIR}")

28
include_directories(
29
30
  ${LIBXML2_INCLUDE_DIR}
  ${LIBXSLT_INCLUDE_DIR}
31
  ${CMAKE_CURRENT_SOURCE_DIR}/
32
  ${CMAKE_CURRENT_SOURCE_DIR}/clipboard/
33
  ${CMAKE_CURRENT_SOURCE_DIR}/cmds
Andi Fischer's avatar
Andi Fischer committed
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
  ${CMAKE_CURRENT_SOURCE_DIR}/codegenerators/
  ${CMAKE_CURRENT_SOURCE_DIR}/codegenerators/ada/
  ${CMAKE_CURRENT_SOURCE_DIR}/codegenerators/as/
  ${CMAKE_CURRENT_SOURCE_DIR}/codegenerators/cpp/
  ${CMAKE_CURRENT_SOURCE_DIR}/codegenerators/csharp/
  ${CMAKE_CURRENT_SOURCE_DIR}/codegenerators/d/
  ${CMAKE_CURRENT_SOURCE_DIR}/codegenerators/idl/
  ${CMAKE_CURRENT_SOURCE_DIR}/codegenerators/java/
  ${CMAKE_CURRENT_SOURCE_DIR}/codegenerators/js/
  ${CMAKE_CURRENT_SOURCE_DIR}/codegenerators/pascal/
  ${CMAKE_CURRENT_SOURCE_DIR}/codegenerators/perl/
  ${CMAKE_CURRENT_SOURCE_DIR}/codegenerators/php/
  ${CMAKE_CURRENT_SOURCE_DIR}/codegenerators/python/
  ${CMAKE_CURRENT_SOURCE_DIR}/codegenerators/ruby/
  ${CMAKE_CURRENT_SOURCE_DIR}/codegenerators/sql/
  ${CMAKE_CURRENT_SOURCE_DIR}/codegenerators/tcl/
50
  ${CMAKE_CURRENT_SOURCE_DIR}/codegenerators/vala/
Andi Fischer's avatar
Andi Fischer committed
51
  ${CMAKE_CURRENT_SOURCE_DIR}/codegenerators/xml/
52
  ${CMAKE_CURRENT_SOURCE_DIR}/codegenwizard/
53
  ${CMAKE_CURRENT_SOURCE_DIR}/codeimport/
54
  ${CMAKE_CURRENT_SOURCE_DIR}/codeimport/csharp/
55
56
57
  ${CMAKE_CURRENT_SOURCE_DIR}/codeimpwizard/
  ${CMAKE_CURRENT_SOURCE_DIR}/debug/
  ${CMAKE_CURRENT_SOURCE_DIR}/dialogs/
58
  ${CMAKE_CURRENT_SOURCE_DIR}/dialogs/pages/
59
  ${CMAKE_CURRENT_SOURCE_DIR}/dialogs/widgets/
60
  ${CMAKE_CURRENT_SOURCE_DIR}/docgenerators/
61
  ${CMAKE_CURRENT_SOURCE_DIR}/finder/
62
  ${CMAKE_CURRENT_SOURCE_DIR}/refactoring/
63
  ${CMAKE_CURRENT_SOURCE_DIR}/uml1model/
64
  ${CMAKE_CURRENT_SOURCE_DIR}/umlwidgets/
65
  ${CMAKE_SOURCE_DIR}/lib/cppparser/
66
  ${CMAKE_SOURCE_DIR}/lib/interfaces/
67
)
68

69
70
71
72
set(libdebug_SRCS
    debug/debug_utils.cpp
)

Laurent Montel's avatar
Laurent Montel committed
73
set(libcodegenerator_SRCS
74
    codegenerators/advancedcodegenerator.cpp
75
76
    codegenerators/classifiercodedocument.cpp
    codegenerators/codeaccessormethod.cpp
Andi Fischer's avatar
Andi Fischer committed
77
78
79
80
81
82
83
84
    codegenerators/codeblock.cpp
    codegenerators/codeblockwithcomments.cpp
    codegenerators/codeclassfield.cpp
    codegenerators/codeclassfielddeclarationblock.cpp
    codegenerators/codecomment.cpp
    codegenerators/codedocument.cpp
    codegenerators/codegenerationpolicy.cpp
    codegenerators/codegenerator.cpp
Ralf Habacker's avatar
Ralf Habacker committed
85
    codegenerators/codegenfactory.cpp
Andi Fischer's avatar
Andi Fischer committed
86
    codegenerators/codegenobjectwithtextblocks.cpp
Ralf Habacker's avatar
Ralf Habacker committed
87
88
    codegenerators/codegenpolicyext.cpp
    codegenerators/codegen_utils.cpp
Andi Fischer's avatar
Andi Fischer committed
89
90
91
    codegenerators/codemethodblock.cpp
    codegenerators/codeoperation.cpp
    codegenerators/codeparameter.cpp
Ralf Habacker's avatar
Ralf Habacker committed
92
93
    codegenerators/ada/adawriter.cpp
    codegenerators/as/aswriter.cpp
Andi Fischer's avatar
Andi Fischer committed
94
95
    codegenerators/cpp/cppcodeclassfield.cpp
    codegenerators/cpp/cppcodecomment.cpp
Ralf Habacker's avatar
Ralf Habacker committed
96
97
98
99
100
    codegenerators/cpp/cppcodedocumentation.cpp
    codegenerators/cpp/cppcodegenerationform.cpp
    codegenerators/cpp/cppcodegenerationpolicy.cpp
    codegenerators/cpp/cppcodegenerationpolicypage.cpp
    codegenerators/cpp/cppcodegenerator.cpp
Andi Fischer's avatar
Andi Fischer committed
101
102
103
    codegenerators/cpp/cppheaderclassdeclarationblock.cpp
    codegenerators/cpp/cppheadercodeaccessormethod.cpp
    codegenerators/cpp/cppheadercodeclassfielddeclarationblock.cpp
Ralf Habacker's avatar
Ralf Habacker committed
104
105
106
107
108
109
110
111
112
    codegenerators/cpp/cppheadercodedocument.cpp
    codegenerators/cpp/cppheadercodeoperation.cpp
    codegenerators/cpp/cppmakecodedocument.cpp
    codegenerators/cpp/cppsourcecodeaccessormethod.cpp
    codegenerators/cpp/cppsourcecodeclassfielddeclarationblock.cpp
    codegenerators/cpp/cppsourcecodedocument.cpp
    codegenerators/cpp/cppsourcecodeoperation.cpp
    codegenerators/cpp/cppwriter.cpp
    codegenerators/csharp/csharpwriter.cpp
Andi Fischer's avatar
Andi Fischer committed
113
114
115
    codegenerators/d/dclassdeclarationblock.cpp
    codegenerators/d/dclassifiercodedocument.cpp
    codegenerators/d/dcodeaccessormethod.cpp
Ralf Habacker's avatar
Ralf Habacker committed
116
    codegenerators/d/dcodeclassfield.cpp
Andi Fischer's avatar
Andi Fischer committed
117
    codegenerators/d/dcodeclassfielddeclarationblock.cpp
Ralf Habacker's avatar
Ralf Habacker committed
118
119
    codegenerators/d/dcodecomment.cpp
    codegenerators/d/dcodedocumentation.cpp
Andi Fischer's avatar
Andi Fischer committed
120
121
    codegenerators/d/dcodegenerationpolicy.cpp
    codegenerators/d/dcodegenerationpolicypage.cpp
Ralf Habacker's avatar
Ralf Habacker committed
122
123
    codegenerators/d/dcodegenerator.cpp
    codegenerators/d/dcodeoperation.cpp
Andi Fischer's avatar
Andi Fischer committed
124
    codegenerators/d/dwriter.cpp
Ralf Habacker's avatar
Ralf Habacker committed
125
126
127
128
129
130
131
132
133
134
135
136
137
138
    codegenerators/hierarchicalcodeblock.cpp
    codegenerators/idl/idlwriter.cpp
    codegenerators/java/javaantcodedocument.cpp
    codegenerators/java/javaclassdeclarationblock.cpp
    codegenerators/java/javaclassifiercodedocument.cpp
    codegenerators/java/javacodeaccessormethod.cpp
    codegenerators/java/javacodeclassfield.cpp
    codegenerators/java/javacodeclassfielddeclarationblock.cpp
    codegenerators/java/javacodecomment.cpp
    codegenerators/java/javacodedocumentation.cpp
    codegenerators/java/javacodegenerationpolicy.cpp
    codegenerators/java/javacodegenerationpolicypage.cpp
    codegenerators/java/javacodegenerator.cpp
    codegenerators/java/javacodeoperation.cpp
Andi Fischer's avatar
Andi Fischer committed
139
140
    codegenerators/java/javawriter.cpp
    codegenerators/js/jswriter.cpp
Ralf Habacker's avatar
Ralf Habacker committed
141
142
    codegenerators/ownedcodeblock.cpp
    codegenerators/ownedhierarchicalcodeblock.cpp
Andi Fischer's avatar
Andi Fischer committed
143
144
145
    codegenerators/pascal/pascalwriter.cpp
    codegenerators/perl/perlwriter.cpp
    codegenerators/php/php5writer.cpp
Ralf Habacker's avatar
Ralf Habacker committed
146
    codegenerators/php/phpwriter.cpp
Andi Fischer's avatar
Andi Fischer committed
147
    codegenerators/python/pythonwriter.cpp
Ralf Habacker's avatar
Ralf Habacker committed
148
149
150
151
152
153
154
155
156
157
158
    codegenerators/ruby/rubyclassdeclarationblock.cpp
    codegenerators/ruby/rubyclassifiercodedocument.cpp
    codegenerators/ruby/rubycodeaccessormethod.cpp
    codegenerators/ruby/rubycodeclassfield.cpp
    codegenerators/ruby/rubycodeclassfielddeclarationblock.cpp
    codegenerators/ruby/rubycodecomment.cpp
    codegenerators/ruby/rubycodedocumentation.cpp
    codegenerators/ruby/rubycodegenerationpolicy.cpp
    codegenerators/ruby/rubycodegenerationpolicypage.cpp
    codegenerators/ruby/rubycodegenerator.cpp
    codegenerators/ruby/rubycodeoperation.cpp
Andi Fischer's avatar
Andi Fischer committed
159
    codegenerators/ruby/rubywriter.cpp
Ralf Habacker's avatar
Ralf Habacker committed
160
161
162
    codegenerators/simplecodegenerator.cpp
    codegenerators/sql/mysqlwriter.cpp
    codegenerators/sql/postgresqlwriter.cpp
Andi Fischer's avatar
Andi Fischer committed
163
164
    codegenerators/sql/sqlwriter.cpp
    codegenerators/tcl/tclwriter.cpp
Ralf Habacker's avatar
Ralf Habacker committed
165
    codegenerators/textblock.cpp
166
    codegenerators/vala/valawriter.cpp
Andi Fischer's avatar
Andi Fischer committed
167
    codegenerators/xml/xmlcodecomment.cpp
Ralf Habacker's avatar
Ralf Habacker committed
168
169
    codegenerators/xml/xmlelementcodeblock.cpp
    codegenerators/xml/xmlschemawriter.cpp
170
171
)

172
ki18n_wrap_ui(  libcodegenerator_SRCS
Andi Fischer's avatar
Andi Fischer committed
173
174
175
    ${CMAKE_CURRENT_SOURCE_DIR}/codegenerators/cpp/cppcodegenerationformbase.ui
    ${CMAKE_CURRENT_SOURCE_DIR}/codegenerators/d/dcodegenerationformbase.ui
    ${CMAKE_CURRENT_SOURCE_DIR}/codegenerators/java/javacodegenerationformbase.ui
Ralf Habacker's avatar
Ralf Habacker committed
176
    ${CMAKE_CURRENT_SOURCE_DIR}/codegenerators/ruby/rubycodegenerationformbase.ui
177
178
)

179
set(libdocgenerator_SRCS
Ralf Habacker's avatar
Ralf Habacker committed
180
    docgenerators/docbook2xhtmlgeneratorjob.cpp
181
    docgenerators/docbookgenerator.cpp
182
    docgenerators/docbookgeneratorjob.cpp
183
    docgenerators/xhtmlgenerator.cpp
184
)
185

Laurent Montel's avatar
Laurent Montel committed
186
set(libdialogs_SRCS
Andi Fischer's avatar
Andi Fischer committed
187
    dialogs/activitydialog.cpp
188
    dialogs/associationpropertiesdialog.cpp
189
    dialogs/classpropertiesdialog.cpp
Andi Fischer's avatar
Andi Fischer committed
190
191
    dialogs/classwizard.cpp
    dialogs/codeeditor.cpp
192
193
    dialogs/codetextedit.cpp
    dialogs/codetexthighlighter.cpp
Ralf Habacker's avatar
Ralf Habacker committed
194
    dialogs/codeviewerdialog.cpp
195
    dialogs/diagramselectiondialog.cpp
196
    dialogs/dialog_utils.cpp
197
    dialogs/exportallviewsdialog.cpp
198
    dialogs/finddialog.cpp
199
    dialogs/multipagedialogbase.cpp
200
    dialogs/notedialog.cpp
201
    dialogs/objectnodedialog.cpp
202
    dialogs/overwritedialog.cpp
203
    dialogs/parameterpropertiesdialog.cpp
204
    dialogs/selectoperationdialog.cpp
205
    dialogs/settingsdialog.cpp
206
    dialogs/singlepagedialogbase.cpp
Andi Fischer's avatar
Andi Fischer committed
207
208
    dialogs/statedialog.cpp
    dialogs/umlattributedialog.cpp
209
    dialogs/umlinstanceattributedialog.cpp
210
    dialogs/umlcheckconstraintdialog.cpp
Andi Fischer's avatar
Andi Fischer committed
211
    dialogs/umlentityattributedialog.cpp
212
    dialogs/umlenumliteraldialog.cpp
213
    dialogs/umlfiledialog.cpp
Ralf Habacker's avatar
Ralf Habacker committed
214
    dialogs/umlforeignkeyconstraintdialog.cpp
Andi Fischer's avatar
Andi Fischer committed
215
216
    dialogs/umloperationdialog.cpp
    dialogs/umlroledialog.cpp
Ralf Habacker's avatar
Ralf Habacker committed
217
    dialogs/umltemplatedialog.cpp
Andi Fischer's avatar
Andi Fischer committed
218
    dialogs/umluniqueconstraintdialog.cpp
219
    dialogs/umlviewdialog.cpp
220
    dialogs/pages/activitypage.cpp
221
    dialogs/pages/associationgeneralpage.cpp
222
    dialogs/pages/associationrolepage.cpp
223
    dialogs/pages/autolayoutoptionpage.cpp
224
    dialogs/pages/classassociationspage.cpp
225
    dialogs/pages/classgeneralpage.cpp
226
227
228
229
230
231
232
    dialogs/pages/classifierlistpage.cpp
    dialogs/pages/classoptionspage.cpp
    dialogs/pages/codegenerationpolicypage.cpp
    dialogs/pages/codeimportoptionspage.cpp
    dialogs/pages/codevieweroptionspage.cpp
    dialogs/pages/constraintlistpage.cpp
    dialogs/pages/defaultcodegenpolicypage.cpp
Ralf Habacker's avatar
Ralf Habacker committed
233
    dialogs/pages/diagramprintpage.cpp
234
235
236
    dialogs/pages/diagrampropertiespage.cpp
    dialogs/pages/dialogpagebase.cpp
    dialogs/pages/generaloptionpage.cpp
237
    dialogs/pages/packagecontentspage.cpp
238
239
    dialogs/pages/umlroleproperties.cpp
    dialogs/pages/umlwidgetstylepage.cpp
240
    dialogs/widgets/documentationwidget.cpp
241
    dialogs/widgets/imagetypewidget.cpp
242
    dialogs/widgets/resolutionwidget.cpp
243
    dialogs/widgets/umlartifacttypewidget.cpp
244
    dialogs/widgets/umldatatypewidget.cpp
245
    dialogs/widgets/umlobjectnamewidget.cpp
246
    dialogs/widgets/umlpackagewidget.cpp
Ralf Habacker's avatar
Ralf Habacker committed
247
    dialogs/widgets/umlstereotypewidget.cpp
248
    dialogs/widgets/visibilityenumwidget.cpp
249
)
Laurent Montel's avatar
Laurent Montel committed
250

251
ki18n_wrap_ui(  libdialogs_SRCS
Andi Fischer's avatar
Andi Fischer committed
252
253
254
    ${CMAKE_CURRENT_SOURCE_DIR}/dialogs/codeviewerdialogbase.ui
    ${CMAKE_CURRENT_SOURCE_DIR}/dialogs/codevieweroptionsbase.ui
    ${CMAKE_CURRENT_SOURCE_DIR}/dialogs/exportallviewsdialogbase.ui
255
    ${CMAKE_CURRENT_SOURCE_DIR}/dialogs/finddialog.ui
256
257
258
259
    ${CMAKE_CURRENT_SOURCE_DIR}/dialogs/pages/autolayoutoptionpage.ui
    ${CMAKE_CURRENT_SOURCE_DIR}/dialogs/pages/codeimportoptionspage.ui
    ${CMAKE_CURRENT_SOURCE_DIR}/dialogs/pages/diagrampropertiespage.ui
    ${CMAKE_CURRENT_SOURCE_DIR}/dialogs/pages/umlrolepropertiesbase.ui
260
    ${CMAKE_CURRENT_SOURCE_DIR}/dialogs/umlinstanceattributedialog.ui
261
262
)

263
set(librefactoring_SRCS
Andi Fischer's avatar
Andi Fischer committed
264
    refactoring/refactoringassistant.cpp
265
266
267
)

set(libcodegenwizard_SRCS
Ralf Habacker's avatar
Ralf Habacker committed
268
    codegenwizard/codegenerationwizard.cpp
Andi Fischer's avatar
Andi Fischer committed
269
    codegenwizard/codegenoptionspage.cpp
Ralf Habacker's avatar
Ralf Habacker committed
270
    codegenwizard/codegenselectpage.cpp
Andi Fischer's avatar
Andi Fischer committed
271
    codegenwizard/codegenstatuspage.cpp
272
273
)

274
ki18n_wrap_ui(  libcodegenwizard_SRCS
Andi Fischer's avatar
Andi Fischer committed
275
    ${CMAKE_CURRENT_SOURCE_DIR}/codegenwizard/codegenoptionspage.ui
Ralf Habacker's avatar
Ralf Habacker committed
276
    ${CMAKE_CURRENT_SOURCE_DIR}/codegenwizard/codegenselectpage.ui
Andi Fischer's avatar
Andi Fischer committed
277
    ${CMAKE_CURRENT_SOURCE_DIR}/codegenwizard/codegenstatuspage.ui
278
)
279

280
set(libcodeimpwizard_SRCS
Ralf Habacker's avatar
Ralf Habacker committed
281
    codeimpwizard/codeimportingwizard.cpp
282
283
284
285
286
    codeimpwizard/codeimpselectpage.cpp
    codeimpwizard/codeimpstatuspage.cpp
    codeimpwizard/codeimpthread.cpp
)

287
ki18n_wrap_ui(  libcodeimpwizard_SRCS
288
289
290
291
    ${CMAKE_CURRENT_SOURCE_DIR}/codeimpwizard/codeimpselectpage.ui
    ${CMAKE_CURRENT_SOURCE_DIR}/codeimpwizard/codeimpstatuspage.ui
)

292
set(libcodeimport_SRCS
Andi Fischer's avatar
Andi Fischer committed
293
294
295
296
297
298
299
300
    codeimport/adaimport.cpp
    codeimport/classimport.cpp
    codeimport/idlimport.cpp
    codeimport/import_utils.cpp
    codeimport/javaimport.cpp
    codeimport/nativeimportbase.cpp
    codeimport/pascalimport.cpp
    codeimport/pythonimport.cpp
301
    codeimport/sqlimport.cpp
302
    codeimport/csharp/csharpimport.cpp
303
304
)

305
306
307
list(APPEND libcodeimport_SRCS
    codeimport/cppimport.cpp
)
308

309
set(libkdevcppparser_SRCS
310
311
    ${CMAKE_SOURCE_DIR}/lib/cppparser/ast.cpp
    ${CMAKE_SOURCE_DIR}/lib/cppparser/ast_utils.cpp
312
    ${CMAKE_SOURCE_DIR}/lib/cppparser/cachemanager.cpp
313
314
315
    ${CMAKE_SOURCE_DIR}/lib/cppparser/driver.cpp
    ${CMAKE_SOURCE_DIR}/lib/cppparser/errors.cpp
    ${CMAKE_SOURCE_DIR}/lib/cppparser/lexer.cpp
316
    ${CMAKE_SOURCE_DIR}/lib/cppparser/lexercache.cpp
317
318
319
    ${CMAKE_SOURCE_DIR}/lib/cppparser/lookup.cpp
    ${CMAKE_SOURCE_DIR}/lib/cppparser/parser.cpp
    ${CMAKE_SOURCE_DIR}/lib/cppparser/tree_parser.cpp
320
    ${CMAKE_SOURCE_DIR}/lib/interfaces/hashedstring.cpp
321
322
    codeimport/kdevcppparser/cpptree2uml.cpp
)
323

324
set(libclipboard_SRCS
Andi Fischer's avatar
Andi Fischer committed
325
    clipboard/idchangelog.cpp
Ralf Habacker's avatar
Ralf Habacker committed
326
327
    clipboard/umlclipboard.cpp
    clipboard/umldragdata.cpp
328
)
Thibault Normand's avatar
Thibault Normand committed
329
330

set(libcmds_SRCS
331
332
333
334
335
336
    cmds/cmdbaseobjectcommand.cpp
    cmds/cmdcreatediagram.cpp
    cmds/cmdhandlerename.cpp
    cmds/cmdremovediagram.cpp
    cmds/cmdsetstereotype.cpp
    cmds/cmdsetvisibility.cpp
337
    cmds/generic/cmdrenameumlinstancetype.cpp
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
    cmds/generic/cmdcreateumlobject.cpp
    cmds/generic/cmdremoveumlobject.cpp
    cmds/generic/cmdrenameumlobject.cpp
    cmds/widget/cmdbasewidgetcommand.cpp
    cmds/widget/cmdchangefont.cpp
    cmds/widget/cmdchangetextcolor.cpp
    cmds/widget/cmdchangelinecolor.cpp
    cmds/widget/cmdchangelinewidth.cpp
    cmds/widget/cmdchangefillcolor.cpp
    cmds/widget/cmdchangeusefillcolor.cpp
    cmds/widget/cmdchangemultiplicity.cpp
    cmds/widget/cmdchangevisualproperty.cpp
    cmds/widget/cmdcreatewidget.cpp
    cmds/widget/cmdmovewidget.cpp
    cmds/widget/cmdresizewidget.cpp
    cmds/widget/cmdremovewidget.cpp
    cmds/widget/cmdsetname.cpp
    cmds/widget/cmdsettxt.cpp
Thibault Normand's avatar
Thibault Normand committed
356
)
357

358
359
360
361
362
363
364
365
set(libumlwidgets_SRCS
    umlwidgets/activitywidget.cpp
    umlwidgets/actorwidget.cpp
    umlwidgets/artifactwidget.cpp
    umlwidgets/associationline.cpp
    umlwidgets/associationwidget.cpp
    umlwidgets/boxwidget.cpp
    umlwidgets/categorywidget.cpp
366
367
368
    umlwidgets/childwidgetplacement.cpp
    umlwidgets/childwidgetplacementpin.cpp
    umlwidgets/childwidgetplacementport.cpp
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
    umlwidgets/classifierwidget.cpp
    umlwidgets/combinedfragmentwidget.cpp
    umlwidgets/componentwidget.cpp
    umlwidgets/datatypewidget.cpp
    umlwidgets/entitywidget.cpp
    umlwidgets/enumwidget.cpp
    umlwidgets/floatingdashlinewidget.cpp
    umlwidgets/floatingtextwidget.cpp
    umlwidgets/forkjoinwidget.cpp
    umlwidgets/layoutgrid.cpp
    umlwidgets/linkwidget.cpp
    umlwidgets/messagewidget.cpp
    umlwidgets/nodewidget.cpp
    umlwidgets/notewidget.cpp
    umlwidgets/objectnodewidget.cpp
    umlwidgets/objectwidget.cpp
    umlwidgets/packagewidget.cpp
    umlwidgets/pinportbase.cpp
    umlwidgets/pinwidget.cpp
    umlwidgets/portwidget.cpp
    umlwidgets/preconditionwidget.cpp
    umlwidgets/regionwidget.cpp
    umlwidgets/seqlinewidget.cpp
    umlwidgets/signalwidget.cpp
    umlwidgets/statewidget.cpp
    umlwidgets/toolbarstateonewidget.cpp
    umlwidgets/umlwidget.cpp
    umlwidgets/usecasewidget.cpp
    umlwidgets/widget_factory.cpp
    umlwidgets/widget_utils.cpp
    umlwidgets/widgetbase.cpp
    umlwidgets/widgetlist_utils.cpp
    umlwidgets/statusbartoolbutton.cpp
402
403
)

404
405
406
set(libfinder_SRCS
    finder/findresults.cpp
    finder/umldocfinder.cpp
Ralf Habacker's avatar
Ralf Habacker committed
407
    finder/umlfinder.cpp
408
409
410
411
    finder/umllistviewfinder.cpp
    finder/umlscenefinder.cpp
)

412
set(libuml_SRCS
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
    uml1model/actor.cpp
    uml1model/artifact.cpp
    uml1model/association.cpp
    uml1model/attribute.cpp
    uml1model/category.cpp
    uml1model/checkconstraint.cpp
    uml1model/classifier.cpp
    uml1model/classifierlistitem.cpp
    uml1model/component.cpp
    uml1model/datatype.cpp
    uml1model/entity.cpp
    uml1model/entityattribute.cpp
    uml1model/entityconstraint.cpp
    uml1model/enum.cpp
    uml1model/enumliteral.cpp
    uml1model/folder.cpp
    uml1model/foreignkeyconstraint.cpp
    uml1model/node.cpp
    uml1model/operation.cpp
    uml1model/package.cpp
    uml1model/port.cpp
    uml1model/stereotype.cpp
    uml1model/template.cpp
    uml1model/umlattributelist.cpp
    uml1model/umlcanvasobject.cpp
    uml1model/umlclassifierlistitemlist.cpp
    uml1model/umlentityattributelist.cpp
    uml1model/umlentityconstraintlist.cpp
    uml1model/umlobject.cpp
    uml1model/umlobjectlist.cpp
    uml1model/umlrole.cpp
    uml1model/usecase.cpp
    uml1model/uniqueconstraint.cpp
    uml1model/instance.cpp
    uml1model/instanceattribute.cpp
448
)
449

450
set(umbrellobase_SRCS
Andi Fischer's avatar
Andi Fischer committed
451
    assocrules.cpp
452
    basictypes.cpp
453
    birdview.cpp
Andi Fischer's avatar
Andi Fischer committed
454
    cmdlineexportallviewsevent.cpp
Ralf Habacker's avatar
Ralf Habacker committed
455
    diagramswindow.cpp
456
    diagram_utils.cpp
457
    objectswindow.cpp
Andi Fischer's avatar
Andi Fischer committed
458
    docwindow.cpp
Ralf Habacker's avatar
Ralf Habacker committed
459
    dotgenerator.cpp
Andi Fischer's avatar
Andi Fischer committed
460
    icon_utils.cpp
461
    import_argo.cpp
Andi Fischer's avatar
Andi Fischer committed
462
    import_rose.cpp
463
    layoutgenerator.cpp
Andi Fischer's avatar
Andi Fischer committed
464
465
466
467
468
469
    listpopupmenu.cpp
    model_utils.cpp
    object_factory.cpp
    optionstate.cpp
    petalnode.cpp
    petaltree2uml.cpp
470
    stereotypeswindow.cpp
Andi Fischer's avatar
Andi Fischer committed
471
472
    toolbarstatearrow.cpp
    toolbarstateassociation.cpp
Ralf Habacker's avatar
Ralf Habacker committed
473
    toolbarstate.cpp
Andi Fischer's avatar
Andi Fischer committed
474
475
476
477
    toolbarstatefactory.cpp
    toolbarstatemessages.cpp
    toolbarstateother.cpp
    toolbarstatepool.cpp
478
    umlappprivate.cpp
Ralf Habacker's avatar
Ralf Habacker committed
479
    uml.cpp
Andi Fischer's avatar
Andi Fischer committed
480
481
482
    umldoc.cpp
    umllistview.cpp
    umllistviewitem.cpp
483
    umlscene.cpp
Andi Fischer's avatar
Andi Fischer committed
484
485
    umlview.cpp
    umlviewimageexporterall.cpp
Ralf Habacker's avatar
Ralf Habacker committed
486
    umlviewimageexporter.cpp
Andi Fischer's avatar
Andi Fischer committed
487
    umlviewimageexportermodel.cpp
488
    uniqueid.cpp
Andi Fischer's avatar
Andi Fischer committed
489
    worktoolbar.cpp
490
)
491

Ralf Habacker's avatar
Ralf Habacker committed
492
493
set(umbrellomodels_SRCS
    models/diagramsmodel.cpp
494
    models/objectsmodel.cpp
Ralf Habacker's avatar
Ralf Habacker committed
495
496
497
    models/stereotypesmodel.cpp
)

498
kconfig_add_kcfg_files(umbrellobase_SRCS umbrellosettings.kcfgc)
Laurent Montel's avatar
Laurent Montel committed
499

500
set(libumbrello_SRCS
501
    ${libdebug_SRCS}
Andi Fischer's avatar
Andi Fischer committed
502
    ${libdialogs_SRCS}
503
    ${libfinder_SRCS}
Andi Fischer's avatar
Andi Fischer committed
504
505
    ${librefactoring_SRCS}
    ${libcodegenwizard_SRCS}
506
    ${libcodeimpwizard_SRCS}
Andi Fischer's avatar
Andi Fischer committed
507
508
509
510
511
512
513
    ${libclassparser_SRCS}
    ${libclipboard_SRCS}
    ${libkdevcppparser_SRCS}
    ${libcodeimport_SRCS}
    ${libcodegenerator_SRCS}
    ${libdocgenerator_SRCS}
    ${libcmds_SRCS}
514
    ${libuml_SRCS}
515
    ${libumlwidgets_SRCS}
516
    ${umbrellobase_SRCS}
Ralf Habacker's avatar
Ralf Habacker committed
517
    ${umbrellomodels_SRCS}
Ralf Habacker's avatar
Ralf Habacker committed
518
519
)

520
set(umbrello_SRCS
521
522
523
524
525
    main.cpp
)

set(LIB_BUILD_MODE STATIC)

526
if(NOT BUILD_KF5)
527
528
529
530
531
    if(CMAKE_MAJOR_VERSION LESS 3)
        qt4_add_resources(libumbrello_SRCS icons.qrc)
    else()
        list(APPEND libumbrello_SRCS icons.qrc)
    endif()
532
533
    kde4_add_library(libumbrello ${LIB_BUILD_MODE} ${libumbrello_SRCS})
    set_target_properties(libumbrello PROPERTIES OUTPUT_NAME umbrello)
534
535
536
537
    target_link_libraries(libumbrello
        Qt4::QtCore
        Qt4::QtGui
        Qt4::QtXml
538
        Qt4::QtWebKit
539
540
541
542
543
        ${LIBXML2_LIBRARIES}
        ${LIBXSLT_LIBRARIES}
        ${KDE4_KTEXTEDITOR_LIBS}
        ${KDE4_KFILE_LIBS}
    )
544
    kde4_add_app_icon(umbrello_SRCS "${CMAKE_CURRENT_SOURCE_DIR}/pics/global/kde4/hi*-apps-umbrello.png")
545
546
    kde4_add_executable(umbrello ${umbrello_SRCS})
    target_link_libraries(umbrello ${LIBXML2_LIBRARIES} ${LIBXSLT_LIBRARIES} ${KDE4_KTEXTEDITOR_LIBS} ${KDE4_KFILE_LIBS} libumbrello)
547
else()
548
    if(CMAKE_MAJOR_VERSION LESS 3)
549
        qt5_add_resources(libumbrello_SRCS icons.qrc ${CMAKE_CURRENT_BINARY_DIR}/ui.qrc)
550
    else()
551
        list(APPEND libumbrello_SRCS icons.qrc ui.qrc)
552
    endif()
553
554
555
    add_library(libumbrello ${LIB_BUILD_MODE} ${libumbrello_SRCS})
    set_target_properties(libumbrello PROPERTIES OUTPUT_NAME umbrello)
    target_link_libraries(libumbrello
556
557
558
559
        Qt5::Widgets
        Qt5::Xml
        Qt5::PrintSupport
        Qt5::Svg
560
        Qt5::WebKitWidgets
561
562
563
564
565
566
567
568
569
570
571
572
        KF5::Archive
        KF5::Completion
        KF5::CoreAddons
        KF5::I18n
        KF5::IconThemes
        KF5::KIOCore
        KF5::TextEditor
        KF5::WidgetsAddons
        KF5::XmlGui
        ${LIBXSLT_LIBRARIES}
        ${LIBXML2_LIBRARIES}
    )
Ralf Habacker's avatar
Ralf Habacker committed
573
574
    ecm_add_app_icon(umbrello_SRCS
        ICONS
575
576
577
578
579
580
        ${CMAKE_CURRENT_SOURCE_DIR}/pics/global/16-apps-umbrello.png
        ${CMAKE_CURRENT_SOURCE_DIR}/pics/global/22-apps-umbrello.png
        ${CMAKE_CURRENT_SOURCE_DIR}/pics/global/32-apps-umbrello.png
        ${CMAKE_CURRENT_SOURCE_DIR}/pics/global/48-apps-umbrello.png
        ${CMAKE_CURRENT_SOURCE_DIR}/pics/global/64-apps-umbrello.png
        ${CMAKE_CURRENT_SOURCE_DIR}/pics/global/128-apps-umbrello.png
Ralf Habacker's avatar
Ralf Habacker committed
581
    )
582
    add_executable(umbrello ${umbrello_SRCS})
583
    target_link_libraries(umbrello libumbrello KF5::WindowSystem)
584
    set_target_properties(umbrello PROPERTIES OUTPUT_NAME umbrello5)
585
586
endif()
if(LIB_BUILD_MODE EQUAL SHARED)
587
    install(TARGETS libumbrello ${INSTALL_TARGETS_DEFAULT_ARGS} )
588
endif()
589
install(TARGETS umbrello ${INSTALL_TARGETS_DEFAULT_ARGS} )
590

591
########### install files #############
592

593
594
595
if(NOT BUILD_KF5)
    install( PROGRAMS umbrello.desktop  DESTINATION  ${XDG_APPS_INSTALL_DIR} )
    install( FILES
596
        ${CMAKE_CURRENT_BINARY_DIR}/umbrelloui.rc
597
        DESTINATION ${UMBRELLO_DATA_INSTALL_DIR} )
598
else()
599
600
601
    file(READ umbrello.desktop UMBRELLO_DESKTOP)
    string(REPLACE "-caption" "-qwindowtitle" UMBRELLO_DESKTOP_OUT "${UMBRELLO_DESKTOP}")
    file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/umbrello.desktop "${UMBRELLO_DESKTOP_OUT}")
602
    install( PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/umbrello.desktop  DESTINATION  ${XDG_APPS_INSTALL_DIR} RENAME org.kde.umbrello5.desktop)
603
    install(FILES org.kde.umbrello.appdata.xml  DESTINATION  ${KDE_INSTALL_METAINFODIR})
604
605
endif()

606
install( FILES
Andi Fischer's avatar
Andi Fischer committed
607
608
609
610
    docgenerators/xmi2docbook.xsl
    docgenerators/docbook2xhtml.xsl
    docgenerators/xmi.css
    docgenerators/common.ent
611
    DESTINATION ${UMBRELLO_DATA_INSTALL_DIR} )
612

613
614
install( DIRECTORY
    layouts
615
    DESTINATION ${UMBRELLO_DATA_INSTALL_DIR}
616
    PATTERN .svn EXCLUDE )
617
618

add_subdirectory( pics )