Subversion Repositories Scribus

Rev

Rev 24704 | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
19821 craig 1
#For those that want it, show the SVN version in the About dialog
21543 craig 2
if (WANT_SVNVERSION)
3
	add_definitions(-DHAVE_SVNVERSION)
4
	message(STATUS "SVN Version requested in About dialog")
19226 craig 5
	# a custom target that is always built
19176 craig 6
 
21543 craig 7
	if (NOT CMAKE_VERSION VERSION_LESS "3.2.0")
24859 craig 8
		add_custom_target(svnheader ALL COMMAND ${CMAKE_COMMAND} -DSOURCE_DIR=${CMAKE_CURRENT_SOURCE_DIR} -P ${CMAKE_SOURCE_DIR}/cmake/modules/getsvn.cmake BYPRODUCTS ${CMAKE_CURRENT_BINARY_DIR}/svnversion.h)
21543 craig 9
	else ()
23017 craig 10
		add_custom_target(svnheader ALL DEPENDS svn_header ) # svn_header is nothing more than a unique string
11
		# creates svnheader.h using cmake script
12
		add_custom_command(OUTPUT svn_header ${CMAKE_CURRENT_BINARY_DIR}/svnversion.h
20019 avox 13
		COMMAND ${CMAKE_COMMAND} -DSOURCE_DIR=${CMAKE_CURRENT_SOURCE_DIR} -P ${CMAKE_MODULE_PATH}/getsvn.cmake)
23017 craig 14
		set_source_files_properties(${CMAKE_CURRENT_BINARY_DIR}/svnversion.h
15
			PROPERTIES GENERATED TRUE
16
			HEADER_FILE_ONLY TRUE)
21543 craig 17
	endif ()
18
endif ()
19176 craig 19
 
21543 craig 20
if(WIN32)
21
	add_definitions(-DQT_DLL)
22
endif()
10778 craig 23
 
23660 craig 24
 
25
include_directories(
26
	${CMAKE_SOURCE_DIR}
27
	${CMAKE_CURRENT_BINARY_DIR}
28
	${CMAKE_CURRENT_SOURCE_DIR}
29
	${FREETYPE_INCLUDE_DIRS}
30
	${HARFBUZZ_INCLUDE_DIRS}
24469 jghali 31
	${HARFBUZZ_SUBSET_INCLUDE_DIRS}
23660 craig 32
)
33
 
24275 craig 34
include(api/CMakeLists.txt)
24260 jghali 35
include(colormgmt/CMakeLists.txt)
36
include(desaxe/CMakeLists.txt)
37
include(fonts/CMakeLists.txt)
38
include(styles/CMakeLists.txt)
24250 craig 39
include(text/CMakeLists.txt)
40
 
21543 craig 41
add_subdirectory(dtd)
42
add_subdirectory(ui/qml)
43
if(WITH_TESTS)
44
	add_subdirectory(tests)
45
endif()
46
if (WANT_DESIGNER)
47
	add_subdirectory(designer)
48
endif ()
49
add_subdirectory(third_party)
5142 cbradney 50
 
21543 craig 51
if(HAVE_OSG)
52
	set(SCRIBUS_OSG_CLASS
19821 craig 53
		ui/AdapterWidget.h
54
		ui/osgeditor.h
55
		pageitem_osgframe.h
19079 craig 56
	)
21543 craig 57
	set(SCRIBUS_OSG_SRC
19821 craig 58
		ui/AdapterWidget.cpp
59
		ui/osgeditor.cpp
60
		pageitem_osgframe.cpp
19079 craig 61
	)
21543 craig 62
endif ()
13962 herm 63
 
21543 craig 64
if (GMAGICK_FOUND)
65
	set(SCRIBUS_GMAGICK_SRC imagedataloaders/scimgdataloader_gmagick.cpp)
66
else()
67
	set(SCRIBUS_GMAGICK_SRC)
68
endif()
13962 herm 69
 
21543 craig 70
set(SCRIBUS_SOURCES
19079 craig 71
	actionmanager.cpp
23088 jghali 72
	actionsearch.cpp
19079 craig 73
	appmodehelper.cpp
74
	canvas.cpp
75
	canvasgesture_cellselect.cpp
76
	canvasgesture_columnresize.cpp
77
	canvasgesture_linemove.cpp
78
	canvasgesture_pan.cpp
79
	canvasgesture_rectselect.cpp
80
	canvasgesture_resize.cpp
81
	canvasgesture_rowresize.cpp
82
	canvasgesture_rulermove.cpp
83
	canvasgesture_table.cpp
84
	canvasgesture_tableresize.cpp
85
	canvasmode.cpp
86
	canvasmode_copyproperties.cpp
87
	canvasmode_create.cpp
88
	canvasmode_drawbezier.cpp
89
	canvasmode_drawcalligraphic.cpp
90
	canvasmode_drawfreehand.cpp
91
	canvasmode_eyedropper.cpp
92
	canvasmode_framelinks.cpp
93
	canvasmode_imageimport.cpp
94
	canvasmode_edit.cpp
95
	canvasmode_editarc.cpp
96
	canvasmode_editgradient.cpp
97
	canvasmode_editmeshgradient.cpp
98
	canvasmode_editmeshpatch.cpp
99
	canvasmode_editpolygon.cpp
100
	canvasmode_editspiral.cpp
101
	canvasmode_edittable.cpp
102
	canvasmode_editweldpoint.cpp
103
	canvasmode_magnifier.cpp
104
	canvasmode_measurements.cpp
105
	canvasmode_nodeedit.cpp
106
	canvasmode_normal.cpp
107
	canvasmode_objimport.cpp
108
	canvasmode_panning.cpp
109
	canvasmode_rotate.cpp
110
	cellarea.cpp
111
	chartablemodel.cpp
112
	chartableview.cpp
113
	cmserrorhandling.cpp
114
	cmsettings.cpp
115
	collapsedtablepainter.cpp
20630 jghali 116
	collapsedtablepainterex.cpp
19079 craig 117
	collect4output.cpp
118
	colorblind.cpp
119
	colorsetmanager.cpp
120
	commonstrings.cpp
121
	deferredtask.cpp
122
	documentchecker.cpp
123
	documentinformation.cpp
124
	exif.cpp
125
	fileloader.cpp
126
	filesearch.cpp
127
	filewatcher.cpp
128
	fontlistmodel.cpp
129
	fpoint.cpp
130
	fpointarray.cpp
131
	gtaction.cpp
132
	gtfont.cpp
133
	gtframestyle.cpp
134
	gtgettext.cpp
135
	gtmeasure.cpp
136
	gtparagraphstyle.cpp
137
	gtstyle.cpp
138
	gtwriter.cpp
139
	guidemanagercore.cpp
140
	guidesdelegate.cpp
141
	guidesmodel.cpp
142
	guidesview.cpp
143
	hyphenator.cpp
20185 craig 144
	iconmanager.cpp
19079 craig 145
	ioapi.c
146
	KarbonCurveFit.cpp
147
	langdef.cpp
148
	langmgr.cpp
149
	latexhelpers.cpp
150
	loadsaveplugin.cpp
151
	localemgr.cpp
20528 craig 152
	marks.cpp
19079 craig 153
	menumanager.cpp
154
	mesh.cpp
155
	navigator.cpp
156
	numeration.cpp
157
	observable.cpp
158
	nftrcreader.cpp
159
	nftsettings.cpp
160
	nfttemplate.cpp
19946 craig 161
	nodeeditcontext.cpp
19079 craig 162
	notesstyles.cpp
163
	pageitem.cpp
164
	pageitem_arc.cpp
165
	pageitem_group.cpp
166
	pageitem_imageframe.cpp
167
	pageitem_latexframe.cpp
168
	pageitem_line.cpp
169
	pageitem_pathtext.cpp
170
	pageitem_polygon.cpp
171
	pageitem_polyline.cpp
172
	pageitem_regularpolygon.cpp
173
	pageitem_spiral.cpp
174
	pageitem_symbol.cpp
175
	pageitem_table.cpp
176
	pageitem_textframe.cpp
177
	pageitem_noteframe.cpp
22461 jghali 178
	pageitemiterator.cpp
19079 craig 179
	pageitempointer.cpp
180
	pagesize.cpp
181
	pdf_analyzer.cpp
182
	pdflib.cpp
183
	pdflib_core.cpp
184
	pdfoptions.cpp
185
	pdfoptionsio.cpp
23548 jghali 186
	pdfversion.cpp
20103 avox 187
	pdfwriter.cpp
19079 craig 188
	pluginmanager.cpp
189
	pp_proxy.cpp
190
	prefscontext.cpp
191
	prefsfile.cpp
192
	prefsmanager.cpp
193
	prefsreader.cpp
194
	prefstable.cpp
24010 jghali 195
	printpreviewcreator.cpp
196
	printpreviewcreator_pdf.cpp
197
	printpreviewcreator_ps.cpp
198
	printpreviewcreatorfactory.cpp
19079 craig 199
	pslib.cpp
200
	qtiocompressor.cpp
201
	rawimage.cpp
202
	rc4.c
203
	sampleitem.cpp
204
	scclocale.cpp
205
	sccolor.cpp
206
	sccolorengine.cpp
207
	sccolorshade.cpp
22614 jghali 208
	sccolorstructs.cpp
19079 craig 209
	scdocoutput.cpp
210
	scdocoutput_ps2.cpp
211
	scdomelement.cpp
212
	scfonts.cpp
213
	scgtplugin.cpp
214
	schelptreemodel.cpp
215
	scimage.cpp
216
	scimagecacheproxy.cpp
217
	scimagecachedir.cpp
218
	scimagecachefile.cpp
219
	scimagecachemanager.cpp
220
	scimagecachewriteaction.cpp
221
	scimagestructs.cpp
222
	sclayer.cpp
223
	sclockedfile.cpp
224
	scmimedata.cpp
225
	scpage.cpp
226
	scpageoutput.cpp
227
	scpageoutput_ps2.cpp
228
	scpainter.cpp
229
	scpainterex_ps2.cpp
230
	scpainterexbase.cpp
231
	scpaths.cpp
232
	scpattern.cpp
233
	scplugin.cpp
234
	scpreview.cpp
24494 craig 235
	scprintengine.cpp
23874 jghali 236
	scprintengine_pdf.cpp
19079 craig 237
	scprintengine_ps.cpp
238
	scraction.cpp
239
	scribus.cpp
240
	scribusXml.cpp
241
	scribusapp.cpp
242
	scribuscore.cpp
243
	scribusdoc.cpp
244
	scribusview.cpp
245
	scribuswin.cpp
246
	scslainforeader.cpp
247
	scstreamfilter.cpp
248
	scstreamfilter_ascii85.cpp
249
	scstreamfilter_flate.cpp
250
	scstreamfilter_jpeg.cpp
251
	scstreamfilter_rc4.cpp
252
	sctextstream.cpp
253
	sctextstruct.cpp
254
	scxmlstreamreader.cpp
255
	selection.cpp
256
	selectionrubberband.cpp
257
	serializer.cpp
24265 jghali 258
	storyloader.cpp
19079 craig 259
	styleitem.cpp
260
	tableborder.cpp
261
	tablecell.cpp
262
	tableutils.cpp
24684 jghali 263
	textnote.cpp
19079 craig 264
	textwriter.cpp
265
	tocgenerator.cpp
266
	transaction.cpp
267
	undogui.cpp
268
	undomanager.cpp
269
	undoobject.cpp
270
	undostack.cpp
271
	undostate.cpp
19416 jghali 272
	undotransaction.cpp
19079 craig 273
	units.cpp
274
	updatemanager.cpp
275
	upgradechecker.cpp
276
	urllauncher.cpp
277
	util.cpp
278
	util_color.cpp
19271 craig 279
	util_debug.cpp
19079 craig 280
	util_file.cpp
281
	util_formats.cpp
282
	util_ghostscript.cpp
283
	util_layer.cpp
284
	util_math.cpp
19405 craig 285
	util_os.cpp
19079 craig 286
	util_printer.cpp
287
	util_text.cpp
288
	vgradient.cpp
289
	vgradientex.cpp
22413 jghali 290
	downloadmanager/scdlmgr.cpp
291
	downloadmanager/scdlthread.cpp
292
	imagedataloaders/scimgdataloader.cpp
293
	imagedataloaders/scimgdataloader_gimp.cpp
294
	imagedataloaders/scimgdataloader_jpeg.cpp
295
	imagedataloaders/scimgdataloader_kra.cpp
296
	imagedataloaders/scimgdataloader_ora.cpp
297
	imagedataloaders/scimgdataloader_pdf.cpp
298
	imagedataloaders/scimgdataloader_pgf.cpp
299
	imagedataloaders/scimgdataloader_pict.cpp
23489 jghali 300
	imagedataloaders/scimgdataloader_png.cpp
22413 jghali 301
	imagedataloaders/scimgdataloader_ps.cpp
302
	imagedataloaders/scimgdataloader_psd.cpp
303
	imagedataloaders/scimgdataloader_qt.cpp
304
	imagedataloaders/scimgdataloader_tiff.cpp
305
	imagedataloaders/scimgdataloader_wpg.cpp
22426 jghali 306
	palettes/cxfcolor.cpp
22423 jghali 307
	palettes/cxfcolorspecification.cpp
22426 jghali 308
	palettes/cxfdocument.cpp
22427 jghali 309
	palettes/cxfobject.cpp
22423 jghali 310
	palettes/cxfmeasurementspec.cpp
311
	palettes/cxftristimulusspec.cpp
312
	palettes/cxfutils.cpp
22413 jghali 313
	palettes/paletteloader.cpp
314
	palettes/paletteloader_adobe_acb.cpp
315
	palettes/paletteloader_adobe_aco.cpp
316
	palettes/paletteloader_adobe_ase.cpp
317
	palettes/paletteloader_autocad_acb.cpp
22427 jghali 318
	palettes/paletteloader_cxf.cpp
22413 jghali 319
	palettes/paletteloader_ps.cpp
320
	palettes/paletteloader_sk1.cpp
321
	palettes/paletteloader_swatchbook.cpp
322
	third_party/fparser/fpoptimizer.cc
323
	third_party/fparser/fparser.cc
19079 craig 324
	ui/about.cpp
325
	ui/aboutplugins.cpp
23088 jghali 326
	ui/actionsearchdialog.cpp
19079 craig 327
	ui/aligndistribute.cpp
328
	ui/alignselect.cpp
21563 jghali 329
	ui/directionselect.cpp
19079 craig 330
	ui/annot.cpp
331
	ui/annota.cpp
332
	ui/applytemplatedialog.cpp
333
	ui/arcwidget.cpp
334
	ui/arcvectordialog.cpp
335
	ui/arrowchooser.cpp
336
	ui/autoform.cpp
337
	ui/autoformbuttongroup.cpp
338
	ui/basepointwidget.cpp
339
	ui/bookmarkpalette.cpp
340
	ui/bookmwin.cpp
341
	ui/buttonicon.cpp
342
	ui/charselect.cpp
343
	ui/charselectenhanced.cpp
344
	ui/charzoom.cpp
345
	ui/checkDocument.cpp
346
	ui/clockwidget.cpp
347
	ui/cmykfw.cpp
348
	ui/collectforoutput_ui.cpp
349
	ui/colorchart.cpp
350
	ui/colorcombo.cpp
351
	ui/colorlistbox.cpp
21855 jghali 352
	ui/colorlistmodel.cpp
21926 craig 353
	ui/colorsandfills.cpp
23282 craig 354
	ui/contentpalette.cpp
23346 jghali 355
	ui/contentpalette_default.cpp
356
	ui/contentpalette_page.cpp
19079 craig 357
	ui/contextmenu.cpp
358
	ui/cpalette.cpp
359
	ui/cupsoptions.cpp
360
	ui/curvewidget.cpp
361
	ui/customfdialog.cpp
22444 jghali 362
	ui/cxfimportdialog.cpp
19079 craig 363
	ui/dasheditor.cpp
364
	ui/dcolor.cpp
365
	ui/delpages.cpp
19783 craig 366
	ui/downloadspalette.cpp
19079 craig 367
	ui/editor.cpp
368
	ui/effectsdialog.cpp
369
	ui/extimageprops.cpp
19153 craig 370
	ui/filedialogeventcatcher.cpp
20338 jghali 371
	ui/fontcombo.cpp
22218 jghali 372
	ui/fontembeddingcombo.cpp
373
	ui/fontembeddingmodel.cpp
19079 craig 374
	ui/fontlistview.cpp
375
	ui/fontreplacedialog.cpp
376
	ui/gradientaddedit.cpp
377
	ui/gradienteditor.cpp
378
	ui/gradientvectordialog.cpp
379
	ui/gradientpreview.cpp
380
	ui/gtdialogs.cpp
381
	ui/gtfiledialog.cpp
382
	ui/guidemanager.cpp
383
	ui/helpbrowser.cpp
384
	ui/hruler.cpp
385
	ui/hyask.cpp
386
	ui/imageinfodialog.cpp
387
	ui/inlinepalette.cpp
388
	ui/insertTable.cpp
389
	ui/insertaframe.cpp
390
	ui/inserttablecolumnsdialog.cpp
391
	ui/inserttablerowsdialog.cpp
392
	ui/inspage.cpp
393
	ui/javadocs.cpp
394
	ui/latexeditor.cpp
395
	ui/layers.cpp
396
	ui/linecombo.cpp
397
	ui/linkbutton.cpp
398
	ui/loremipsum.cpp
399
	ui/mark2item.cpp
400
	ui/mark2mark.cpp
401
	ui/markanchor.cpp
24494 craig 402
	ui/markinsert.cpp
19079 craig 403
	ui/marknote.cpp
404
	ui/marksmanager.cpp
405
	ui/markvariabletext.cpp
406
	ui/marginpresetlayout.cpp
407
	ui/marginwidget.cpp
408
	ui/newmarginwidget.cpp
409
	ui/mergedoc.cpp
410
	ui/missing.cpp
411
	ui/movepage.cpp
412
	ui/multipleduplicate.cpp
413
	ui/multiprogressdialog.cpp
414
	ui/measurements.cpp
23361 jghali 415
	ui/newdocdialog.cpp
19079 craig 416
	ui/newtemp.cpp
417
	ui/nftdialog.cpp
418
	ui/nftwidget.cpp
419
	ui/nodeeditpalette.cpp
420
	ui/notesstyleseditor.cpp
22971 jghali 421
	ui/numformatcombo.cpp
19079 craig 422
	ui/outlinepalette.cpp
23829 jghali 423
	ui/outputpreview_pdf.cpp
23847 jghali 424
	ui/outputpreview_ps.cpp
23829 jghali 425
	ui/outputpreviewbase.cpp
19079 craig 426
	ui/pageitemattributes.cpp
427
	ui/pagelayout.cpp
428
	ui/pagepalette.cpp
429
	ui/pagepalette_pages.cpp
430
	ui/pagepalette_masterpages.cpp
431
	ui/pagepalette_widgets.cpp
21901 craig 432
	ui/pagepropertiesdialog.cpp
19079 craig 433
	ui/pageselector.cpp
434
	ui/patternpropsdialog.cpp
19966 craig 435
	ui/pdfexportdialog.cpp
22438 jghali 436
	ui/pdfversioncombo.cpp
437
	ui/pdfversionmodel.cpp
19079 craig 438
	ui/picsearch.cpp
439
	ui/picsearchoptions.cpp
440
	ui/picstatus.cpp
441
	ui/polygonwidget.cpp
442
	ui/polyprops.cpp
443
	ui/preferencesdialog.cpp
444
	ui/prefs_colormanagement.cpp
445
	ui/prefs_display.cpp
446
	ui/prefs_documentinformation.cpp
447
	ui/prefs_documentsections.cpp
448
	ui/prefs_documentsetup.cpp
449
	ui/prefs_externaltools.cpp
450
	ui/prefs_fonts.cpp
451
	ui/prefs_guides.cpp
452
	ui/prefs_hyphenator.cpp
453
	ui/prefs_imagecache.cpp
454
	ui/prefs_keyboardshortcuts.cpp
455
	ui/prefs_miscellaneous.cpp
456
	ui/prefs_pagesizes.cpp
24494 craig 457
	ui/prefs_pane.cpp
19079 craig 458
	ui/prefs_paths.cpp
459
	ui/prefs_plugins.cpp
460
	ui/prefs_preflightverifier.cpp
461
	ui/prefs_printer.cpp
462
	ui/prefs_scrapbook.cpp
463
	ui/prefs_spelling.cpp
464
	ui/prefs_typography.cpp
465
	ui/prefs_userinterface.cpp
466
	ui/prefs_itemtools.cpp
467
	ui/prefs_operatortools.cpp
468
	ui/prefs_pdfexport.cpp
469
	ui/prefs_tableofcontents.cpp
470
	ui/prefs_documentitemattributes.cpp
471
	ui/printdialog.cpp
24049 jghali 472
	ui/printlanguagecombo.cpp
23791 jghali 473
	ui/printpreview.cpp
19079 craig 474
	ui/propertiespalette.cpp
475
	ui/propertiespalette_image.cpp
476
	ui/propertiespalette_group.cpp
477
	ui/propertiespalette_line.cpp
478
	ui/propertiespalette_shadow.cpp
479
	ui/propertiespalette_shape.cpp
480
	ui/propertiespalette_table.cpp
481
	ui/propertiespalette_text.cpp
482
	ui/propertiespalette_utils.cpp
483
	ui/propertiespalette_xyz.cpp
484
	ui/propertywidget_advanced.cpp
485
	ui/propertywidget_distance.cpp
486
	ui/propertywidget_pareffect.cpp
487
	ui/propertywidget_flop.cpp
21563 jghali 488
	ui/propertywidget_hyphenation.cpp
19079 craig 489
	ui/propertywidget_optmargins.cpp
490
	ui/propertywidget_orphans.cpp
491
	ui/propertywidget_pathtext.cpp
492
	ui/propertywidget_textcolor.cpp
21563 jghali 493
	ui/propertywidget_fontfeatures.cpp
19079 craig 494
	ui/propertywidgetbase.cpp
495
	ui/proptree.cpp
496
	ui/query.cpp
21098 fschmid 497
	ui/recoverdialog.cpp
19079 craig 498
	ui/replacecolors.cpp
499
	ui/replaceonecolor.cpp
19821 craig 500
	ui/resourcemanager.cpp
20410 craig 501
	ui/resourcemanagerlicense.cpp
19079 craig 502
	ui/rulermover.cpp
20338 jghali 503
	ui/sccolorslider.cpp
19079 craig 504
	ui/scdockpalette.cpp
505
	ui/scescapecatcher.cpp
506
	ui/scfilewidget.cpp
507
	ui/sclistwidgetdelegate.cpp
508
	ui/scmenu.cpp
509
	ui/scmessagebox.cpp
510
	ui/scmwmenumanager.cpp
511
	ui/scrapbookpalette.cpp
512
	ui/scresizecursor.cpp
513
	ui/scrpalettebase.cpp
514
	ui/scrspinbox.cpp
515
	ui/sctablewidget.cpp
516
	ui/sctextbrowser.cpp
517
	ui/sctoolbar.cpp
518
	ui/sctreewidget.cpp
519
	ui/search.cpp
520
	ui/selectobjects.cpp
521
	ui/selfield.cpp
522
	ui/shadebutton.cpp
523
	ui/shortcutwidget.cpp
524
	ui/smalignselect.cpp
525
	ui/smcellstylewidget.cpp
526
	ui/smcellstyle.cpp
527
	ui/smcheckbox.cpp
528
	ui/smcolorcombo.cpp
529
	ui/smcstylewidget.cpp
21563 jghali 530
	ui/smdirectionselect.cpp
531
	ui/smfontfeatures.cpp
19079 craig 532
	ui/smfontcomboh.cpp
533
	ui/smlinestyle.cpp
534
	ui/smlinestylewidget.cpp
22971 jghali 535
	ui/smnumformatcombo.cpp
19079 craig 536
	ui/smpstylewidget.cpp
537
	ui/smradiobutton.cpp
538
	ui/smreplacedia.cpp
539
	ui/smsccombobox.cpp
540
	ui/smscrspinbox.cpp
541
	ui/smshadebutton.cpp
542
	ui/smspinbox.cpp
21563 jghali 543
	ui/smlineedit.cpp
19079 craig 544
	ui/smstyleimport.cpp
545
	ui/smstyleselect.cpp
546
	ui/smtablestylewidget.cpp
547
	ui/smtablestyle.cpp
548
	ui/smtabruler.cpp
549
	ui/smtextstyles.cpp
550
	ui/spiralvectordialog.cpp
551
	ui/spiralwidget.cpp
552
	ui/splash.cpp
553
	ui/storyeditor.cpp
23621 jghali 554
	ui/stylecombos.cpp
19079 craig 555
	ui/stylemanager.cpp
556
	ui/styleselect.cpp
557
	ui/styleview.cpp
558
	ui/swatchcombo.cpp
559
	ui/symbolpalette.cpp
560
	ui/tablecolumnwidthsdialog.cpp
561
	ui/tablerowheightsdialog.cpp
562
	ui/tablesideselector.cpp
563
	ui/tabmanager.cpp
564
	ui/tabpdfoptions.cpp
565
	ui/tabruler.cpp
566
	ui/transformdialog.cpp
567
	ui/transparencypalette.cpp
568
	tt/simpletreemodel/treeitem.cpp
569
	tt/simpletreemodel/treemodel.cpp
570
	ui/copypagetomasterpagedialog.cpp
571
	ui/createrange.cpp
572
	ui/edittoolbar.cpp
573
	ui/filetoolbar.cpp
574
	ui/helpnavigation.cpp
575
	ui/modetoolbar.cpp
576
	ui/pdftoolbar.cpp
577
	ui/viewtoolbar.cpp
578
	ui/unicodesearch.cpp
579
	ui/vruler.cpp
580
	ui/useprintermarginsdialog.cpp
581
	ui/weldedit.cpp
582
	${SCRIBUS_OSG_SRC}
583
	${SCRIBUS_GMAGICK_SRC}
5142 cbradney 584
)
585
 
21543 craig 586
if(NOT HAVE_HYPHEN)
587
	include_directories(third_party/hyphen)
588
	set(SCRIBUS_SOURCES
19079 craig 589
	${SCRIBUS_SOURCES}
19819 jghali 590
	third_party/hyphen/hnjalloc.c
591
	third_party/hyphen/hyphen.c
19079 craig 592
	)
21543 craig 593
endif()
16359 craig 594
 
595
 
596
 
21543 craig 597
if(WIN32)
598
	set(SCRIBUS_WIN32_ONLY_SOURCES
24010 jghali 599
		printpreviewcreator_gdi.cpp
19079 craig 600
		scpainterex_cairo.cpp
601
		scprintengine_gdi.cpp
602
		)
21543 craig 603
	set(SCRIBUS_MAIN_CPP main_win32.cpp)
604
else()
605
	set(SCRIBUS_WIN32_ONLY_SOURCES)
606
	set(SCRIBUS_MAIN_CPP main.cpp)
607
endif()
10778 craig 608
 
24494 craig 609
set(CMAKE_AUTOUIC_SEARCH_PATHS ui/)
18194 fschmid 610
 
24494 craig 611
set_property(SOURCE third_party/fparser/file.hh PROPERTY SKIP_AUTOGEN ON)
612
set_property(SOURCE third_party/fparser/fparser.hh PROPERTY SKIP_AUTOGEN ON)
5142 cbradney 613
 
21543 craig 614
link_directories(
19079 craig 615
	${CMAKE_CURRENT_BINARY_DIR}/third_party/wpg
616
	${CMAKE_CURRENT_BINARY_DIR}/third_party/pgf
20448 fschmid 617
	${CMAKE_CURRENT_BINARY_DIR}/third_party/rtf-qt
19079 craig 618
	${CMAKE_CURRENT_BINARY_DIR}/third_party/zip
21563 jghali 619
	${HARFBUZZ_LIBRARY_DIRS}
24469 jghali 620
	${HARFBUZZ_SUBSET_LIBRARY_DIRS}
21563 jghali 621
	${ICU_LIBRARY_DIRS}
5142 cbradney 622
)
623
 
21543 craig 624
if(WITH_TESTS)
625
	link_directories( ${CMAKE_CURRENT_BINARY_DIR}/tests )
626
endif()
16605 avox 627
 
21543 craig 628
if(HAVE_OSG)
629
	link_directories( ${CMAKE_CURRENT_BINARY_DIR}/third_party/prc )
630
endif ()
13839 fschmid 631
 
21543 craig 632
if(HAVE_BOOST)
633
	link_directories( ${CMAKE_CURRENT_BINARY_DIR}/third_party/lib2geom )
634
endif ()
14937 fschmid 635
 
21543 craig 636
if(WITH_TESTS)
637
	set(SCRIBUS_TESTS_LIB "scribus_tests_lib")
638
else()
639
	set(SCRIBUS_TESTS_LIB "")
640
endif()
641
if(HAVE_OSG)
642
	set(SCRIBUS_PRC_LIB "scribus_prc_lib")
643
endif ()
644
if(HAVE_BOOST)
645
	set(SCRIBUS_2GEOM_LIB "scribus_2geom_lib")
646
endif ()
647
set(SCRIBUS_WPG_LIB "scribus_wpg_lib")
648
set(SCRIBUS_PGF_LIB "scribus_pgf_lib")
649
set(SCRIBUS_ZIP_LIB "scribus_zip_lib")
650
set(SCRIBUS_RTF_LIB "scribus_rtf_lib")
15796 fschmid 651
 
21543 craig 652
if (GMAGICK_FOUND)
653
	message(STATUS "GMAGICK: Libs: ${GMAGICK_LDFLAGS}, Inc: ${GMAGICK_INCLUDE_DIRS}, Ldflags: ${GMAGICK_LDFLAGS}")
654
	include_directories(
19735 fschmid 655
		BEFORE ${GMAGICK_INCLUDE_DIRS}
19079 craig 656
	)
21543 craig 657
	link_directories(
19911 craig 658
		${GMAGICK_LIBRARY}
19079 craig 659
	)
21543 craig 660
endif()
13962 herm 661
 
21543 craig 662
if(HAVE_PODOFO)
21774 craig 663
	if(OPENSSL_FOUND)
664
		message(STATUS "Including OpenSSL files for PoDoFo >= 0.9.5")
665
		include_directories(
666
			${OPENSSL_INCLUDE_DIR}
667
		)
21776 jghali 668
	else()
21774 craig 669
#		message(STATUS "Not including OpenSSL files because this system's PoDoFo does not require them")
21776 jghali 670
	endif()
21543 craig 671
	include_directories(
21774 craig 672
		${LIBPODOFO_INCLUDE_DIR}
19079 craig 673
	)
21774 craig 674
 
21543 craig 675
endif()
11956 avox 676
 
21543 craig 677
if(HAVE_HYPHEN)
24704 craig 678
	target_link_libraries(${EXE_NAME} PRIVATE
19079 craig 679
	${HYPHEN_LIBRARY}
680
	)
21543 craig 681
endif()
16359 craig 682
 
683
 
21543 craig 684
if(GESTURE_FRAME_PREVIEW)
685
	 message(STATUS "Enable gesture frame preview [experimental]")
686
	 set(GESTURE_FRAME_PREVIEW_SOURCES	pageitempreview.cpp)
687
	 add_definitions(-DGESTURE_FRAME_PREVIEW)
688
endif()
11956 avox 689
 
21543 craig 690
if(APPLEBUNDLE)
23020 craig 691
	set(EXE_NAME "Scribus${TAG_VERSION}" CACHE STRING "Scribus version")
21543 craig 692
else()
23020 craig 693
	set(EXE_NAME "scribus${TAG_VERSION}" CACHE STRING "Scribus version")
21543 craig 694
endif()
5142 cbradney 695
 
24350 craig 696
#if(COMMAND cmake_policy)
697
#	cmake_policy(SET CMP0003 OLD)
698
#endif()
12373 malex 699
 
24494 craig 700
 
701
if (NOT DEFINED CMAKE_GLOBAL_AUTOGEN_TARGET_NAME)
702
	set(SCRIBUS_AUTOGEN_INCLUDE_PATH "${CMAKE_CURRENT_BINARY_DIR}/${EXE_NAME}_autogen/include")
703
else()
704
	set(SCRIBUS_AUTOGEN_INCLUDE_PATH "${CMAKE_CURRENT_BINARY_DIR}/${EXE_NAME}_${CMAKE_GLOBAL_AUTOGEN_TARGET_NAME}/include")
705
endif()
706
message(STATUS "Autogen Include Path: ${SCRIBUS_AUTOGEN_INCLUDE_PATH}")
707
#set(CMAKE_AUTOUIC_SEARCH_PATHS ${SCRIBUS_AUTOGEN_INCLUDE_PATH})
708
 
21543 craig 709
if(HAVE_OSG)
710
	add_executable(${EXE_NAME}
24260 jghali 711
		${SCRIBUS_MAIN_CPP}
19821 craig 712
		${SCRIBUS_SOURCES}
24275 craig 713
		${SCRIBUS_API_SOURCES}
19821 craig 714
		${SCRIBUS_COLORMGMT_SOURCES}
24260 jghali 715
		${SCRIBUS_DESAXE_SOURCES}
19821 craig 716
		${SCRIBUS_FONTS_SOURCES}
24260 jghali 717
		${SCRIBUS_STYLES_SOURCES}
718
		${SCRIBUS_TEXT_SOURCES}
19821 craig 719
		${SCRIBUS_WIN32_ONLY_SOURCES}
720
		${GESTURE_FRAME_PREVIEW_SOURCES}
721
		${SCRIBUS_PRC_SOURCES}
722
	)
21543 craig 723
else()
724
	add_executable(${EXE_NAME}
24260 jghali 725
		${SCRIBUS_MAIN_CPP}
19821 craig 726
		${SCRIBUS_SOURCES}
24275 craig 727
		${SCRIBUS_API_SOURCES}
19821 craig 728
		${SCRIBUS_COLORMGMT_SOURCES}
24260 jghali 729
		${SCRIBUS_DESAXE_SOURCES}
19821 craig 730
		${SCRIBUS_FONTS_SOURCES}
24260 jghali 731
		${SCRIBUS_STYLES_SOURCES}
732
		${SCRIBUS_TEXT_SOURCES}
19821 craig 733
		${SCRIBUS_WIN32_ONLY_SOURCES}
734
		${GESTURE_FRAME_PREVIEW_SOURCES}
735
	)
21543 craig 736
endif ()
5142 cbradney 737
 
24275 craig 738
if(WANT_PCH)
739
	target_precompile_headers(${EXE_NAME} PRIVATE scribus_pch.h)
740
endif()
741
 
21543 craig 742
if(WIN32)
743
	set_target_properties(${EXE_NAME}
19821 craig 744
		PROPERTIES
745
		COMPILE_FLAGS -DCOMPILE_SCRIBUS_MAIN_APP
746
		ENABLE_EXPORTS TRUE
10778 craig 747
	)
21543 craig 748
	set(WIN32_ONLY_LIBS mscms.lib)
749
else()
750
	set(WIN32_ONLY_LIBS)
751
endif()
10778 craig 752
 
12176 cbradney 753
##
754
 
755
 
8729 cbradney 756
#Set up libraries to link with all found packages
24353 craig 757
include_directories(${cairo_INCLUDE_DIR})
24704 craig 758
target_link_libraries(${EXE_NAME} PRIVATE ${cairo_LIBRARIES})
24353 craig 759
link_directories(${PREFIX_cairo_LIB})
760
set(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_RPATH};${PREFIX_cairo_LIB}")
8729 cbradney 761
 
21543 craig 762
message("RPATH: ${CMAKE_INSTALL_RPATH}")
8729 cbradney 763
 
24859 craig 764
target_link_libraries(${EXE_NAME}
765
	PUBLIC
766
	Qt6::Core
767
	Qt6::Core5Compat
768
	Qt6::Gui
769
	Qt6::Widgets
770
	Qt6::Network
771
	Qt6::Xml
772
	Qt6::PrintSupport
773
	Qt6::OpenGL
24314 craig 774
	)
775
 
21543 craig 776
target_link_libraries(${EXE_NAME}
24704 craig 777
	PUBLIC
778
	${ZLIB_LIBRARIES}
779
	${LIBXML2_LIBRARIES}
780
	PRIVATE
19079 craig 781
	${CUPS_LIBRARIES}
782
	${FREETYPE_LIBRARIES}
21563 jghali 783
	${HARFBUZZ_LIBRARIES}
24469 jghali 784
	${HARFBUZZ_SUBSET_LIBRARIES}
21563 jghali 785
	${ICU_LIBRARIES}
19079 craig 786
	${TIFF_LIBRARIES}
23489 jghali 787
	${PNG_LIBRARIES}
19079 craig 788
	${JPEG_LIBRARIES}
789
	${WIN32_ONLY_LIBS}
790
	${GMAGICK_LIBRARIES}
18194 fschmid 791
)
8729 cbradney 792
 
24314 craig 793
 
23422 craig 794
if (TARGET Fontconfig::Fontconfig)
24704 craig 795
	target_link_libraries(${EXE_NAME} PRIVATE
23422 craig 796
		Fontconfig::Fontconfig
797
	)
798
endif()
799
 
800
 
801
 
21543 craig 802
if (NOT WIN32 AND NOT HAIKU)
24704 craig 803
	target_link_libraries(${EXE_NAME} PRIVATE
19821 craig 804
		${CUPS_LIBRARIES}
19079 craig 805
	)
21543 craig 806
endif ()
18186 craig 807
 
15244 cbradney 808
# required to resolve symbols from libdl when ld is called with --no-add-needed
15397 craig 809
# #9310 for the OpenBSD addition
21543 craig 810
if(UNIX AND NOT CMAKE_SYSTEM_NAME STREQUAL "OpenBSD" AND NOT CMAKE_SYSTEM_NAME STREQUAL "FreeBSD" AND NOT HAIKU)
24704 craig 811
  target_link_libraries(${EXE_NAME} PUBLIC ${CMAKE_DL_LIBS})
21543 craig 812
endif()
15244 cbradney 813
 
15403 craig 814
# #9311 for the OpenBSD addition
21543 craig 815
if(CMAKE_SYSTEM_NAME STREQUAL "OpenBSD" OR CMAKE_SYSTEM_NAME STREQUAL "FreeBSD")
24704 craig 816
  target_link_libraries(${EXE_NAME} PRIVATE util execinfo)
21543 craig 817
endif()
15403 craig 818
 
21780 jghali 819
if(HAIKU)
24704 craig 820
  target_link_libraries(${EXE_NAME} PRIVATE execinfo)
21780 jghali 821
endif(HAIKU)
822
 
21543 craig 823
if(WIN32)
24704 craig 824
  target_link_libraries(${EXE_NAME} PRIVATE ${QT_QTMAIN_LIBRARY})
21543 craig 825
endif()
8729 cbradney 826
 
21543 craig 827
if(APPLE)
828
	target_link_libraries(${EXE_NAME}
24704 craig 829
		PUBLIC
830
		"-undefined dynamic_lookup"
831
		PRIVATE
832
		"-framework CoreFoundation"
833
		)
21543 craig 834
endif()
8729 cbradney 835
 
21543 craig 836
if (WANT_SVNVERSION)
19782 craig 837
	add_dependencies(${EXE_NAME} svnheader)
21543 craig 838
endif ()
19175 craig 839
 
24704 craig 840
target_link_libraries(${EXE_NAME} PRIVATE
19079 craig 841
	${SCRIBUS_WPG_LIB}
842
	${SCRIBUS_PGF_LIB}
843
	${SCRIBUS_ZIP_LIB}
20448 fschmid 844
	${SCRIBUS_RTF_LIB}
19079 craig 845
	${LCMS2_LIBRARIES}
8917 avox 846
)
847
 
21543 craig 848
if(WITH_TESTS)
24704 craig 849
	target_link_libraries(${EXE_NAME} PRIVATE
19079 craig 850
		${QT_QTTEST_LIBRARY}
19821 craig 851
		${SCRIBUS_TESTS_LIB}
19079 craig 852
	)
21543 craig 853
endif()
16605 avox 854
 
21543 craig 855
if(HAVE_PODOFO)
24704 craig 856
	target_link_libraries(${EXE_NAME} PRIVATE
19821 craig 857
		${LIBPODOFO_LIBRARY}
19079 craig 858
	)
21543 craig 859
endif()
11956 avox 860
 
21543 craig 861
if(HAVE_OSG)
24704 craig 862
	target_link_libraries(${EXE_NAME} PRIVATE
19821 craig 863
		${OPENTHREADS_LIBRARY}
864
		${OSG_LIBRARY}
865
		${OSGGA_LIBRARY}
866
		${OSGUTIL_LIBRARY}
867
		${OSGDB_LIBRARY}
868
		${OSGVIEWER_LIBRARY}
869
		${OSGTEXT_LIBRARY}
870
		${SCRIBUS_PRC_LIB}
19079 craig 871
	)
21543 craig 872
endif()
13839 fschmid 873
 
21543 craig 874
if (HAVE_BOOST)
24704 craig 875
	target_link_libraries(${EXE_NAME} PRIVATE
19821 craig 876
		${SCRIBUS_2GEOM_LIB}
19079 craig 877
	)
21543 craig 878
endif()
14937 fschmid 879
 
10778 craig 880
# Now build plugins
18446 craig 881
 
24704 craig 882
# IF your plugin needs additional libraries, please link them privately
883
# in the CMakeLists.txt for your plugin.
10778 craig 884
 
24704 craig 885
add_custom_target(Plugins ALL)
21543 craig 886
add_subdirectory(plugins)
10778 craig 887
 
10311 cbradney 888
#do we want a lib suffix on osx? doubt it
21543 craig 889
if(APPLEBUNDLE)
890
	install(DIRECTORY DESTINATION MacOS)
891
	install(TARGETS ${EXE_NAME}
19079 craig 892
	RUNTIME DESTINATION MacOS
893
	LIBRARY DESTINATION lib
894
	)
21543 craig 895
#	add_custom_command(TARGET ${EXE_NAME} POST_BUILD
12457 avox 896
#	COMMAND ${CMAKE_COMMAND} ARGS -Dinput_file=${CMAKE_CURRENT_BINARY_DIR}/${EXE_NAME}.app/Contents/MacOS/${EXE_NAME} -P ${CMAKE_MODULE_PATH}/ScribusIngestOSXBundleLibraries.cmake
19079 craig 897
#	)
21543 craig 898
#message(STATUS "Installing apple bundle")
12457 avox 899
 
21543 craig 900
#	set(APPS "${APPLE_APP_DIR}")
901
#	set(DIRS ${QT_LIBRARY_DIRS})
902
#	install(CODE "
19624 craig 903
#		file(GLOB_RECURSE QTPLUGINS
904
#		  \"\${CMAKE_INSTALL_PREFIX}/${LIBDIR}/plugins/*${CMAKE_SHARED_LIBRARY_SUFFIX}\")
905
#		include(BundleUtilities)
906
#		fixup_bundle(\"${APPS}\" \"\${QTPLUGINS}\" \"${DIRS}\")
907
#		" COMPONENT Runtime)
908
 
909
 
21543 craig 910
else()
911
	if(WIN32)
912
		install(TARGETS ${EXE_NAME}
19821 craig 913
			RUNTIME DESTINATION .
914
			LIBRARY DESTINATION ${LIB_DIR_NAME}
19079 craig 915
		)
21543 craig 916
	else()
917
		install(TARGETS ${EXE_NAME}
19821 craig 918
			RUNTIME DESTINATION bin
919
			LIBRARY DESTINATION ${LIB_DIR_NAME}
19079 craig 920
		)
21543 craig 921
	endif()
922
endif()
5758 cbradney 923
 
13794 cbradney 924
#Install our header files, selected from all existing dirs, excluding unwanted directories and svn files
21543 craig 925
if(WANT_HEADERINSTALL)
926
	message(STATUS "Source header files will be installed")
927
	install(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/ DESTINATION ${INCLUDEDIR}
19821 craig 928
		FILES_MATCHING
929
		PATTERN "*.h"
930
		PATTERN "dicts" EXCLUDE
931
		PATTERN "doc" EXCLUDE
932
		PATTERN "dtd" EXCLUDE
933
		PATTERN "editorconfig" EXCLUDE
934
		PATTERN "icon*" EXCLUDE
935
		PATTERN "manpages" EXCLUDE
936
		PATTERN "old" EXCLUDE
937
		PATTERN ".svn" EXCLUDE
19079 craig 938
	)
21543 craig 939
else()
940
	message(STATUS "No source header files will be installed")
941
endif()
19956 craig 942
 
943
#Install our stylesheet
21543 craig 944
install(FILES
19956 craig 945
	scribus.css
946
	DESTINATION ${LIBDIR}
947
)