Subversion Repositories Scribus

Rev

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