Subversion Repositories Scribus

Rev

Rev 24651 | Rev 24684 | 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
267
	textwriter.cpp
268
	tocgenerator.cpp
269
	transaction.cpp
270
	undogui.cpp
271
	undomanager.cpp
272
	undoobject.cpp
273
	undostack.cpp
274
	undostate.cpp
19416 jghali 275
	undotransaction.cpp
19079 craig 276
	units.cpp
277
	updatemanager.cpp
278
	upgradechecker.cpp
279
	urllauncher.cpp
280
	util.cpp
281
	util_color.cpp
19271 craig 282
	util_debug.cpp
19079 craig 283
	util_file.cpp
284
	util_formats.cpp
285
	util_ghostscript.cpp
286
	util_layer.cpp
287
	util_math.cpp
19405 craig 288
	util_os.cpp
19079 craig 289
	util_printer.cpp
290
	util_text.cpp
291
	vgradient.cpp
292
	vgradientex.cpp
22413 jghali 293
	downloadmanager/scdlmgr.cpp
294
	downloadmanager/scdlthread.cpp
295
	imagedataloaders/scimgdataloader.cpp
296
	imagedataloaders/scimgdataloader_gimp.cpp
297
	imagedataloaders/scimgdataloader_jpeg.cpp
298
	imagedataloaders/scimgdataloader_kra.cpp
299
	imagedataloaders/scimgdataloader_ora.cpp
300
	imagedataloaders/scimgdataloader_pdf.cpp
301
	imagedataloaders/scimgdataloader_pgf.cpp
302
	imagedataloaders/scimgdataloader_pict.cpp
23489 jghali 303
	imagedataloaders/scimgdataloader_png.cpp
22413 jghali 304
	imagedataloaders/scimgdataloader_ps.cpp
305
	imagedataloaders/scimgdataloader_psd.cpp
306
	imagedataloaders/scimgdataloader_qt.cpp
307
	imagedataloaders/scimgdataloader_tiff.cpp
308
	imagedataloaders/scimgdataloader_wpg.cpp
22426 jghali 309
	palettes/cxfcolor.cpp
22423 jghali 310
	palettes/cxfcolorspecification.cpp
22426 jghali 311
	palettes/cxfdocument.cpp
22427 jghali 312
	palettes/cxfobject.cpp
22423 jghali 313
	palettes/cxfmeasurementspec.cpp
314
	palettes/cxftristimulusspec.cpp
315
	palettes/cxfutils.cpp
22413 jghali 316
	palettes/paletteloader.cpp
317
	palettes/paletteloader_adobe_acb.cpp
318
	palettes/paletteloader_adobe_aco.cpp
319
	palettes/paletteloader_adobe_ase.cpp
320
	palettes/paletteloader_autocad_acb.cpp
22427 jghali 321
	palettes/paletteloader_cxf.cpp
22413 jghali 322
	palettes/paletteloader_ps.cpp
323
	palettes/paletteloader_sk1.cpp
324
	palettes/paletteloader_swatchbook.cpp
325
	third_party/fparser/fpoptimizer.cc
326
	third_party/fparser/fparser.cc
19079 craig 327
	ui/about.cpp
328
	ui/aboutplugins.cpp
23088 jghali 329
	ui/actionsearchdialog.cpp
19079 craig 330
	ui/aligndistribute.cpp
331
	ui/alignselect.cpp
21563 jghali 332
	ui/directionselect.cpp
19079 craig 333
	ui/annot.cpp
334
	ui/annota.cpp
335
	ui/applytemplatedialog.cpp
336
	ui/arcwidget.cpp
337
	ui/arcvectordialog.cpp
338
	ui/arrowchooser.cpp
339
	ui/autoform.cpp
340
	ui/autoformbuttongroup.cpp
341
	ui/basepointwidget.cpp
342
	ui/bookmarkpalette.cpp
343
	ui/bookmwin.cpp
344
	ui/buttonicon.cpp
345
	ui/charselect.cpp
346
	ui/charselectenhanced.cpp
347
	ui/charzoom.cpp
348
	ui/checkDocument.cpp
349
	ui/clockwidget.cpp
350
	ui/cmykfw.cpp
351
	ui/collectforoutput_ui.cpp
352
	ui/colorchart.cpp
353
	ui/colorcombo.cpp
354
	ui/colorlistbox.cpp
21855 jghali 355
	ui/colorlistmodel.cpp
21926 craig 356
	ui/colorsandfills.cpp
23282 craig 357
	ui/contentpalette.cpp
23346 jghali 358
	ui/contentpalette_default.cpp
359
	ui/contentpalette_page.cpp
19079 craig 360
	ui/contextmenu.cpp
361
	ui/cpalette.cpp
362
	ui/cupsoptions.cpp
363
	ui/curvewidget.cpp
364
	ui/customfdialog.cpp
22444 jghali 365
	ui/cxfimportdialog.cpp
19079 craig 366
	ui/dasheditor.cpp
367
	ui/dcolor.cpp
368
	ui/delpages.cpp
19783 craig 369
	ui/downloadspalette.cpp
19079 craig 370
	ui/editor.cpp
371
	ui/effectsdialog.cpp
372
	ui/extimageprops.cpp
19153 craig 373
	ui/filedialogeventcatcher.cpp
20338 jghali 374
	ui/fontcombo.cpp
22218 jghali 375
	ui/fontembeddingcombo.cpp
376
	ui/fontembeddingmodel.cpp
19079 craig 377
	ui/fontlistview.cpp
378
	ui/fontreplacedialog.cpp
379
	ui/gradientaddedit.cpp
380
	ui/gradienteditor.cpp
381
	ui/gradientvectordialog.cpp
382
	ui/gradientpreview.cpp
383
	ui/gtdialogs.cpp
384
	ui/gtfiledialog.cpp
385
	ui/guidemanager.cpp
386
	ui/helpbrowser.cpp
387
	ui/hruler.cpp
388
	ui/hyask.cpp
389
	ui/imageinfodialog.cpp
390
	ui/inlinepalette.cpp
391
	ui/insertTable.cpp
392
	ui/insertaframe.cpp
393
	ui/inserttablecolumnsdialog.cpp
394
	ui/inserttablerowsdialog.cpp
395
	ui/inspage.cpp
396
	ui/javadocs.cpp
397
	ui/latexeditor.cpp
398
	ui/layers.cpp
399
	ui/linecombo.cpp
400
	ui/linkbutton.cpp
401
	ui/loremipsum.cpp
402
	ui/mark2item.cpp
403
	ui/mark2mark.cpp
404
	ui/markanchor.cpp
24494 craig 405
	ui/markinsert.cpp
19079 craig 406
	ui/marknote.cpp
407
	ui/marksmanager.cpp
408
	ui/markvariabletext.cpp
409
	ui/marginpresetlayout.cpp
410
	ui/marginwidget.cpp
411
	ui/newmarginwidget.cpp
412
	ui/mergedoc.cpp
413
	ui/missing.cpp
414
	ui/movepage.cpp
415
	ui/multipleduplicate.cpp
416
	ui/multiprogressdialog.cpp
417
	ui/measurements.cpp
23361 jghali 418
	ui/newdocdialog.cpp
19079 craig 419
	ui/newtemp.cpp
420
	ui/nftdialog.cpp
421
	ui/nftwidget.cpp
422
	ui/nodeeditpalette.cpp
423
	ui/notesstyleseditor.cpp
22971 jghali 424
	ui/numformatcombo.cpp
19079 craig 425
	ui/outlinepalette.cpp
23829 jghali 426
	ui/outputpreview_pdf.cpp
23847 jghali 427
	ui/outputpreview_ps.cpp
23829 jghali 428
	ui/outputpreviewbase.cpp
19079 craig 429
	ui/pageitemattributes.cpp
430
	ui/pagelayout.cpp
431
	ui/pagepalette.cpp
432
	ui/pagepalette_pages.cpp
433
	ui/pagepalette_masterpages.cpp
434
	ui/pagepalette_widgets.cpp
21901 craig 435
	ui/pagepropertiesdialog.cpp
19079 craig 436
	ui/pageselector.cpp
437
	ui/patternpropsdialog.cpp
19966 craig 438
	ui/pdfexportdialog.cpp
22438 jghali 439
	ui/pdfversioncombo.cpp
440
	ui/pdfversionmodel.cpp
19079 craig 441
	ui/picsearch.cpp
442
	ui/picsearchoptions.cpp
443
	ui/picstatus.cpp
444
	ui/polygonwidget.cpp
445
	ui/polyprops.cpp
446
	ui/preferencesdialog.cpp
447
	ui/prefs_colormanagement.cpp
448
	ui/prefs_display.cpp
449
	ui/prefs_documentinformation.cpp
450
	ui/prefs_documentsections.cpp
451
	ui/prefs_documentsetup.cpp
452
	ui/prefs_externaltools.cpp
453
	ui/prefs_fonts.cpp
454
	ui/prefs_guides.cpp
455
	ui/prefs_hyphenator.cpp
456
	ui/prefs_imagecache.cpp
457
	ui/prefs_keyboardshortcuts.cpp
458
	ui/prefs_miscellaneous.cpp
459
	ui/prefs_pagesizes.cpp
24494 craig 460
	ui/prefs_pane.cpp
19079 craig 461
	ui/prefs_paths.cpp
462
	ui/prefs_plugins.cpp
463
	ui/prefs_preflightverifier.cpp
464
	ui/prefs_printer.cpp
465
	ui/prefs_scrapbook.cpp
466
	ui/prefs_spelling.cpp
467
	ui/prefs_typography.cpp
468
	ui/prefs_userinterface.cpp
469
	ui/prefs_itemtools.cpp
470
	ui/prefs_operatortools.cpp
471
	ui/prefs_pdfexport.cpp
472
	ui/prefs_tableofcontents.cpp
473
	ui/prefs_documentitemattributes.cpp
474
	ui/printdialog.cpp
24049 jghali 475
	ui/printlanguagecombo.cpp
23791 jghali 476
	ui/printpreview.cpp
19079 craig 477
	ui/propertiespalette.cpp
478
	ui/propertiespalette_image.cpp
479
	ui/propertiespalette_group.cpp
480
	ui/propertiespalette_line.cpp
481
	ui/propertiespalette_shadow.cpp
482
	ui/propertiespalette_shape.cpp
483
	ui/propertiespalette_table.cpp
484
	ui/propertiespalette_text.cpp
485
	ui/propertiespalette_utils.cpp
486
	ui/propertiespalette_xyz.cpp
487
	ui/propertywidget_advanced.cpp
488
	ui/propertywidget_distance.cpp
489
	ui/propertywidget_pareffect.cpp
490
	ui/propertywidget_flop.cpp
21563 jghali 491
	ui/propertywidget_hyphenation.cpp
19079 craig 492
	ui/propertywidget_optmargins.cpp
493
	ui/propertywidget_orphans.cpp
494
	ui/propertywidget_pathtext.cpp
495
	ui/propertywidget_textcolor.cpp
21563 jghali 496
	ui/propertywidget_fontfeatures.cpp
19079 craig 497
	ui/propertywidgetbase.cpp
498
	ui/proptree.cpp
499
	ui/query.cpp
21098 fschmid 500
	ui/recoverdialog.cpp
19079 craig 501
	ui/replacecolors.cpp
502
	ui/replaceonecolor.cpp
19821 craig 503
	ui/resourcemanager.cpp
20410 craig 504
	ui/resourcemanagerlicense.cpp
19079 craig 505
	ui/rulermover.cpp
20338 jghali 506
	ui/sccolorslider.cpp
19079 craig 507
	ui/scdockpalette.cpp
508
	ui/scescapecatcher.cpp
509
	ui/scfilewidget.cpp
510
	ui/sclistwidgetdelegate.cpp
511
	ui/scmenu.cpp
512
	ui/scmessagebox.cpp
513
	ui/scmwmenumanager.cpp
514
	ui/scrapbookpalette.cpp
515
	ui/scresizecursor.cpp
516
	ui/scrpalettebase.cpp
517
	ui/scrspinbox.cpp
518
	ui/sctablewidget.cpp
519
	ui/sctextbrowser.cpp
520
	ui/sctoolbar.cpp
521
	ui/sctreewidget.cpp
522
	ui/search.cpp
523
	ui/selectobjects.cpp
524
	ui/selfield.cpp
525
	ui/shadebutton.cpp
526
	ui/shortcutwidget.cpp
527
	ui/smalignselect.cpp
528
	ui/smcellstylewidget.cpp
529
	ui/smcellstyle.cpp
530
	ui/smcheckbox.cpp
531
	ui/smcolorcombo.cpp
532
	ui/smcstylewidget.cpp
21563 jghali 533
	ui/smdirectionselect.cpp
534
	ui/smfontfeatures.cpp
19079 craig 535
	ui/smfontcomboh.cpp
536
	ui/smlinestyle.cpp
537
	ui/smlinestylewidget.cpp
22971 jghali 538
	ui/smnumformatcombo.cpp
19079 craig 539
	ui/smpstylewidget.cpp
540
	ui/smradiobutton.cpp
541
	ui/smreplacedia.cpp
542
	ui/smsccombobox.cpp
543
	ui/smscrspinbox.cpp
544
	ui/smshadebutton.cpp
545
	ui/smspinbox.cpp
21563 jghali 546
	ui/smlineedit.cpp
19079 craig 547
	ui/smstyleimport.cpp
548
	ui/smstyleselect.cpp
549
	ui/smtablestylewidget.cpp
550
	ui/smtablestyle.cpp
551
	ui/smtabruler.cpp
552
	ui/smtextstyles.cpp
553
	ui/spiralvectordialog.cpp
554
	ui/spiralwidget.cpp
555
	ui/splash.cpp
556
	ui/storyeditor.cpp
23621 jghali 557
	ui/stylecombos.cpp
19079 craig 558
	ui/stylemanager.cpp
559
	ui/styleselect.cpp
560
	ui/styleview.cpp
561
	ui/swatchcombo.cpp
562
	ui/symbolpalette.cpp
563
	ui/tablecolumnwidthsdialog.cpp
564
	ui/tablerowheightsdialog.cpp
565
	ui/tablesideselector.cpp
566
	ui/tabmanager.cpp
567
	ui/tabpdfoptions.cpp
568
	ui/tabruler.cpp
569
	ui/transformdialog.cpp
570
	ui/transparencypalette.cpp
571
	tt/simpletreemodel/treeitem.cpp
572
	tt/simpletreemodel/treemodel.cpp
573
	ui/copypagetomasterpagedialog.cpp
574
	ui/createrange.cpp
575
	ui/edittoolbar.cpp
576
	ui/filetoolbar.cpp
577
	ui/helpnavigation.cpp
578
	ui/modetoolbar.cpp
579
	ui/pdftoolbar.cpp
580
	ui/viewtoolbar.cpp
581
	ui/unicodesearch.cpp
582
	ui/vruler.cpp
583
	ui/useprintermarginsdialog.cpp
584
	ui/weldedit.cpp
585
	${SCRIBUS_OSG_SRC}
586
	${SCRIBUS_GMAGICK_SRC}
5142 cbradney 587
)
588
 
21543 craig 589
if(NOT HAVE_HYPHEN)
590
	include_directories(third_party/hyphen)
591
	set(SCRIBUS_SOURCES
19079 craig 592
	${SCRIBUS_SOURCES}
19819 jghali 593
	third_party/hyphen/hnjalloc.c
594
	third_party/hyphen/hyphen.c
19079 craig 595
	)
21543 craig 596
endif()
16359 craig 597
 
598
 
599
 
21543 craig 600
if(WIN32)
601
	set(SCRIBUS_WIN32_ONLY_SOURCES
24010 jghali 602
		printpreviewcreator_gdi.cpp
19079 craig 603
		scpainterex_cairo.cpp
604
		scprintengine_gdi.cpp
605
		)
21543 craig 606
	set(SCRIBUS_MAIN_CPP main_win32.cpp)
607
else()
608
	set(SCRIBUS_WIN32_ONLY_SOURCES)
609
	set(SCRIBUS_MAIN_CPP main.cpp)
610
endif()
10778 craig 611
 
24494 craig 612
set(CMAKE_AUTOUIC_SEARCH_PATHS ui/)
18194 fschmid 613
 
24494 craig 614
set_property(SOURCE third_party/fparser/file.hh PROPERTY SKIP_AUTOGEN ON)
615
set_property(SOURCE third_party/fparser/fparser.hh PROPERTY SKIP_AUTOGEN ON)
5142 cbradney 616
 
21543 craig 617
link_directories(
19079 craig 618
	${CMAKE_CURRENT_BINARY_DIR}/third_party/wpg
619
	${CMAKE_CURRENT_BINARY_DIR}/third_party/pgf
20448 fschmid 620
	${CMAKE_CURRENT_BINARY_DIR}/third_party/rtf-qt
19079 craig 621
	${CMAKE_CURRENT_BINARY_DIR}/third_party/zip
21563 jghali 622
	${HARFBUZZ_LIBRARY_DIRS}
24469 jghali 623
	${HARFBUZZ_SUBSET_LIBRARY_DIRS}
21563 jghali 624
	${ICU_LIBRARY_DIRS}
5142 cbradney 625
)
626
 
21543 craig 627
if(WITH_TESTS)
628
	link_directories( ${CMAKE_CURRENT_BINARY_DIR}/tests )
629
endif()
16605 avox 630
 
21543 craig 631
if(HAVE_OSG)
632
	link_directories( ${CMAKE_CURRENT_BINARY_DIR}/third_party/prc )
633
endif ()
13839 fschmid 634
 
21543 craig 635
if(HAVE_BOOST)
636
	link_directories( ${CMAKE_CURRENT_BINARY_DIR}/third_party/lib2geom )
637
endif ()
14937 fschmid 638
 
21543 craig 639
if(WITH_TESTS)
640
	set(SCRIBUS_TESTS_LIB "scribus_tests_lib")
641
else()
642
	set(SCRIBUS_TESTS_LIB "")
643
endif()
644
if(HAVE_OSG)
645
	set(SCRIBUS_PRC_LIB "scribus_prc_lib")
646
endif ()
647
if(HAVE_BOOST)
648
	set(SCRIBUS_2GEOM_LIB "scribus_2geom_lib")
649
endif ()
650
set(SCRIBUS_WPG_LIB "scribus_wpg_lib")
651
set(SCRIBUS_PGF_LIB "scribus_pgf_lib")
652
set(SCRIBUS_ZIP_LIB "scribus_zip_lib")
653
set(SCRIBUS_RTF_LIB "scribus_rtf_lib")
15796 fschmid 654
 
21543 craig 655
if (GMAGICK_FOUND)
656
	message(STATUS "GMAGICK: Libs: ${GMAGICK_LDFLAGS}, Inc: ${GMAGICK_INCLUDE_DIRS}, Ldflags: ${GMAGICK_LDFLAGS}")
657
	include_directories(
19735 fschmid 658
		BEFORE ${GMAGICK_INCLUDE_DIRS}
19079 craig 659
	)
21543 craig 660
	link_directories(
19911 craig 661
		${GMAGICK_LIBRARY}
19079 craig 662
	)
21543 craig 663
endif()
13962 herm 664
 
21543 craig 665
if(HAVE_PODOFO)
21774 craig 666
	if(OPENSSL_FOUND)
667
		message(STATUS "Including OpenSSL files for PoDoFo >= 0.9.5")
668
		include_directories(
669
			${OPENSSL_INCLUDE_DIR}
670
		)
21776 jghali 671
	else()
21774 craig 672
#		message(STATUS "Not including OpenSSL files because this system's PoDoFo does not require them")
21776 jghali 673
	endif()
21543 craig 674
	include_directories(
21774 craig 675
		${LIBPODOFO_INCLUDE_DIR}
19079 craig 676
	)
21774 craig 677
 
21543 craig 678
endif()
11956 avox 679
 
21543 craig 680
if(HAVE_HYPHEN)
681
	target_link_libraries(${EXE_NAME}
19079 craig 682
	${HYPHEN_LIBRARY}
683
	)
21543 craig 684
endif()
16359 craig 685
 
686
 
21543 craig 687
if(GESTURE_FRAME_PREVIEW)
688
	 message(STATUS "Enable gesture frame preview [experimental]")
689
	 set(GESTURE_FRAME_PREVIEW_SOURCES	pageitempreview.cpp)
690
	 add_definitions(-DGESTURE_FRAME_PREVIEW)
691
endif()
11956 avox 692
 
21543 craig 693
if(APPLEBUNDLE)
23020 craig 694
	set(EXE_NAME "Scribus${TAG_VERSION}" CACHE STRING "Scribus version")
21543 craig 695
else()
23020 craig 696
	set(EXE_NAME "scribus${TAG_VERSION}" CACHE STRING "Scribus version")
21543 craig 697
endif()
5142 cbradney 698
 
24350 craig 699
#if(COMMAND cmake_policy)
700
#	cmake_policy(SET CMP0003 OLD)
701
#endif()
12373 malex 702
 
24494 craig 703
 
704
if (NOT DEFINED CMAKE_GLOBAL_AUTOGEN_TARGET_NAME)
705
	set(SCRIBUS_AUTOGEN_INCLUDE_PATH "${CMAKE_CURRENT_BINARY_DIR}/${EXE_NAME}_autogen/include")
706
else()
707
	set(SCRIBUS_AUTOGEN_INCLUDE_PATH "${CMAKE_CURRENT_BINARY_DIR}/${EXE_NAME}_${CMAKE_GLOBAL_AUTOGEN_TARGET_NAME}/include")
708
endif()
709
message(STATUS "Autogen Include Path: ${SCRIBUS_AUTOGEN_INCLUDE_PATH}")
710
#set(CMAKE_AUTOUIC_SEARCH_PATHS ${SCRIBUS_AUTOGEN_INCLUDE_PATH})
711
 
21543 craig 712
if(HAVE_OSG)
713
	add_executable(${EXE_NAME}
24260 jghali 714
		${SCRIBUS_MAIN_CPP}
19821 craig 715
		${SCRIBUS_SOURCES}
24275 craig 716
		${SCRIBUS_API_SOURCES}
19821 craig 717
		${SCRIBUS_COLORMGMT_SOURCES}
24260 jghali 718
		${SCRIBUS_DESAXE_SOURCES}
19821 craig 719
		${SCRIBUS_FONTS_SOURCES}
24260 jghali 720
		${SCRIBUS_STYLES_SOURCES}
721
		${SCRIBUS_TEXT_SOURCES}
19821 craig 722
		${SCRIBUS_WIN32_ONLY_SOURCES}
723
		${GESTURE_FRAME_PREVIEW_SOURCES}
724
		${SCRIBUS_PRC_SOURCES}
725
	)
21543 craig 726
else()
727
	add_executable(${EXE_NAME}
24260 jghali 728
		${SCRIBUS_MAIN_CPP}
19821 craig 729
		${SCRIBUS_SOURCES}
24275 craig 730
		${SCRIBUS_API_SOURCES}
19821 craig 731
		${SCRIBUS_COLORMGMT_SOURCES}
24260 jghali 732
		${SCRIBUS_DESAXE_SOURCES}
19821 craig 733
		${SCRIBUS_FONTS_SOURCES}
24260 jghali 734
		${SCRIBUS_STYLES_SOURCES}
735
		${SCRIBUS_TEXT_SOURCES}
19821 craig 736
		${SCRIBUS_WIN32_ONLY_SOURCES}
737
		${GESTURE_FRAME_PREVIEW_SOURCES}
738
	)
21543 craig 739
endif ()
5142 cbradney 740
 
24275 craig 741
if(WANT_PCH)
742
	target_precompile_headers(${EXE_NAME} PRIVATE scribus_pch.h)
743
endif()
744
 
21543 craig 745
if(WIN32)
746
	set_target_properties(${EXE_NAME}
19821 craig 747
		PROPERTIES
748
		COMPILE_FLAGS -DCOMPILE_SCRIBUS_MAIN_APP
749
		ENABLE_EXPORTS TRUE
10778 craig 750
	)
21543 craig 751
	set(WIN32_ONLY_LIBS mscms.lib)
752
else()
753
	set(WIN32_ONLY_LIBS)
754
endif()
10778 craig 755
 
12176 cbradney 756
##TEST FIX FOR 6897
21543 craig 757
if (CMAKE_SYSTEM_NAME STREQUAL "FreeBSD" OR CMAKE_SYSTEM_NAME STREQUAL "OpenBSD")
12176 cbradney 758
# Use the -E / --export-dynamic flag to ensure that symbols in the Scribus
759
# binary are in the public symbol table for plugins. The symbols must also
760
# be set as SCRIBUS_API if we're building with -fvisibility=hidden .
761
# Should fix bug 6897 .
21543 craig 762
	set_target_properties(${EXE_NAME} PROPERTIES LINK_FLAGS -Wl,-E)
763
endif ()
24672 jghali 764
if (CMAKE_CXX_COMPILER_ID STREQUAL "GNU" AND NOT WIN32)
15437 craig 765
# Use the -E / --export-dynamic flag to ensure that symbols in the Scribus
766
# binary are in the public symbol table for plugins. The symbols must also
767
# be set as SCRIBUS_API if we're building with -fvisibility=hidden .
768
# Should fix bug 6897 .
21543 craig 769
	set_target_properties(${EXE_NAME} PROPERTIES LINK_FLAGS -Wl,-E)
770
endif ()
12176 cbradney 771
##
772
 
773
 
8729 cbradney 774
#Set up libraries to link with all found packages
24353 craig 775
include_directories(${cairo_INCLUDE_DIR})
776
target_link_libraries(${EXE_NAME} ${cairo_LIBRARIES})
777
link_directories(${PREFIX_cairo_LIB})
778
set(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_RPATH};${PREFIX_cairo_LIB}")
8729 cbradney 779
 
21543 craig 780
message("RPATH: ${CMAKE_INSTALL_RPATH}")
8729 cbradney 781
 
24314 craig 782
IF(NOT WANT_QT6)
783
    target_link_libraries(${EXE_NAME}
784
		${Qt5Core_LIBRARIES}
785
		${Qt5Widgets_LIBRARIES}
786
		${Qt5Gui_LIBRARIES}
787
		${Qt5Xml_LIBRARIES}
788
		${Qt5Network_LIBRARIES}
789
		${Qt5OpenGL_LIBRARIES}
790
		${Qt5PrintSupport_LIBRARIES}
791
	)
792
else()
793
	target_link_libraries(${EXE_NAME}
24494 craig 794
		Qt6::Core
795
		Qt6::Core5Compat
796
		Qt6::Gui
24314 craig 797
		Qt6::Widgets
24651 craig 798
		Qt6::Network
24314 craig 799
		)
800
endif()
801
 
21543 craig 802
target_link_libraries(${EXE_NAME}
19079 craig 803
	${CUPS_LIBRARIES}
804
	${FREETYPE_LIBRARIES}
21563 jghali 805
	${HARFBUZZ_LIBRARIES}
24469 jghali 806
	${HARFBUZZ_SUBSET_LIBRARIES}
21563 jghali 807
	${ICU_LIBRARIES}
19079 craig 808
	${LIBXML2_LIBRARIES}
809
	${TIFF_LIBRARIES}
23489 jghali 810
	${PNG_LIBRARIES}
19079 craig 811
	${JPEG_LIBRARIES}
812
	${ZLIB_LIBRARIES}
813
	${WIN32_ONLY_LIBS}
814
	${GMAGICK_LIBRARIES}
18194 fschmid 815
)
8729 cbradney 816
 
24314 craig 817
 
23422 craig 818
if (TARGET Fontconfig::Fontconfig)
819
	target_link_libraries(${EXE_NAME}
820
		Fontconfig::Fontconfig
821
	)
822
endif()
823
 
824
 
825
 
21543 craig 826
if (NOT WIN32 AND NOT HAIKU)
827
	target_link_libraries(${EXE_NAME}
19821 craig 828
		${CUPS_LIBRARIES}
19079 craig 829
	)
21543 craig 830
endif ()
18186 craig 831
 
15244 cbradney 832
# required to resolve symbols from libdl when ld is called with --no-add-needed
15397 craig 833
# #9310 for the OpenBSD addition
21543 craig 834
if(UNIX AND NOT CMAKE_SYSTEM_NAME STREQUAL "OpenBSD" AND NOT CMAKE_SYSTEM_NAME STREQUAL "FreeBSD" AND NOT HAIKU)
835
	target_link_libraries(${EXE_NAME} dl)
836
endif()
15244 cbradney 837
 
15403 craig 838
# #9311 for the OpenBSD addition
21543 craig 839
if(CMAKE_SYSTEM_NAME STREQUAL "OpenBSD" OR CMAKE_SYSTEM_NAME STREQUAL "FreeBSD")
840
	target_link_libraries(${EXE_NAME} util execinfo)
841
endif()
15403 craig 842
 
21780 jghali 843
if(HAIKU)
844
	target_link_libraries(${EXE_NAME} execinfo)
845
endif(HAIKU)
846
 
21543 craig 847
if(WIN32)
848
	target_link_libraries(${EXE_NAME} ${QT_QTMAIN_LIBRARY})
849
endif()
8729 cbradney 850
 
21543 craig 851
if(APPLE)
852
	target_link_libraries(${EXE_NAME}
19079 craig 853
	"-undefined dynamic_lookup"
854
	"-framework CoreFoundation" )
21543 craig 855
endif()
8729 cbradney 856
 
21543 craig 857
if (WANT_SVNVERSION)
19782 craig 858
	add_dependencies(${EXE_NAME} svnheader)
21543 craig 859
endif ()
19175 craig 860
 
21543 craig 861
target_link_libraries(${EXE_NAME}
19079 craig 862
	${SCRIBUS_WPG_LIB}
863
	${SCRIBUS_PGF_LIB}
864
	${SCRIBUS_ZIP_LIB}
20448 fschmid 865
	${SCRIBUS_RTF_LIB}
19079 craig 866
	${LCMS2_LIBRARIES}
8917 avox 867
)
868
 
21543 craig 869
if(WITH_TESTS)
870
	target_link_libraries(${EXE_NAME}
19079 craig 871
		${QT_QTTEST_LIBRARY}
19821 craig 872
		${SCRIBUS_TESTS_LIB}
19079 craig 873
	)
21543 craig 874
endif()
16605 avox 875
 
21543 craig 876
if(HAVE_PODOFO)
877
	target_link_libraries(${EXE_NAME}
19821 craig 878
		${LIBPODOFO_LIBRARY}
19079 craig 879
	)
21543 craig 880
endif()
11956 avox 881
 
21543 craig 882
if(HAVE_OSG)
883
	target_link_libraries(${EXE_NAME}
19821 craig 884
		${OPENTHREADS_LIBRARY}
885
		${OSG_LIBRARY}
886
		${OSGGA_LIBRARY}
887
		${OSGUTIL_LIBRARY}
888
		${OSGDB_LIBRARY}
889
		${OSGVIEWER_LIBRARY}
890
		${OSGTEXT_LIBRARY}
891
		${SCRIBUS_PRC_LIB}
19079 craig 892
	)
21543 craig 893
endif()
13839 fschmid 894
 
21543 craig 895
if (HAVE_BOOST)
896
	target_link_libraries(${EXE_NAME}
19821 craig 897
		${SCRIBUS_2GEOM_LIB}
19079 craig 898
	)
21543 craig 899
endif()
14937 fschmid 900
 
10778 craig 901
# Now build plugins
24494 craig 902
IF(NOT WANT_QT6)
903
    set(PLUGIN_LIBRARIES
904
		${Qt5Core_LIBRARIES}
905
		${Qt5Widgets_LIBRARIES}
906
		${Qt5Gui_LIBRARIES}
907
		${Qt5Xml_LIBRARIES}
908
		${Qt5Network_LIBRARIES}
909
		${Qt5OpenGL_LIBRARIES}
910
		${LIBXML2_LIBRARIES}
911
		${ZLIB_LIBRARIES}
912
	)
913
else()
914
	set(PLUGIN_LIBRARIES
915
		${Qt6Core_LIBRARIES}
916
		${Qt6Core5Compat_LIBRARIES}
917
		${Qt6Widgets_LIBRARIES}
918
		${Qt6Gui_LIBRARIES}
919
		${LIBXML2_LIBRARIES}
920
		${ZLIB_LIBRARIES}
921
	)
922
endif()
18446 craig 923
 
21543 craig 924
if(WIN32)
19079 craig 925
	# IF your plugin needs more than this, please link them privately
926
	# in the CMakeLists.txt for your plugin.
21543 craig 927
	set(PLUGIN_LIBRARIES
19821 craig 928
#		${QT_LIBRARIES} part of #7210
929
		${PLUGIN_LIBRARIES}
930
		${EXE_NAME}
19079 craig 931
	)
21543 craig 932
endif()
933
if(APPLE)
934
	set(PLUGIN_LIBRARIES
19821 craig 935
		${PLUGIN_LIBRARIES}
936
		"-undefined dynamic_lookup"
19079 craig 937
	)
21543 craig 938
endif()
939
message(STATUS ${PLUGIN_LIBRARIES})
10778 craig 940
 
21543 craig 941
add_subdirectory(plugins)
10778 craig 942
 
10311 cbradney 943
#do we want a lib suffix on osx? doubt it
21543 craig 944
if(APPLEBUNDLE)
945
	install(DIRECTORY DESTINATION MacOS)
946
	install(TARGETS ${EXE_NAME}
19079 craig 947
	RUNTIME DESTINATION MacOS
948
	LIBRARY DESTINATION lib
949
	)
21543 craig 950
#	add_custom_command(TARGET ${EXE_NAME} POST_BUILD
12457 avox 951
#	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 952
#	)
21543 craig 953
#message(STATUS "Installing apple bundle")
12457 avox 954
 
21543 craig 955
#	set(APPS "${APPLE_APP_DIR}")
956
#	set(DIRS ${QT_LIBRARY_DIRS})
957
#	install(CODE "
19624 craig 958
#		file(GLOB_RECURSE QTPLUGINS
959
#		  \"\${CMAKE_INSTALL_PREFIX}/${LIBDIR}/plugins/*${CMAKE_SHARED_LIBRARY_SUFFIX}\")
960
#		include(BundleUtilities)
961
#		fixup_bundle(\"${APPS}\" \"\${QTPLUGINS}\" \"${DIRS}\")
962
#		" COMPONENT Runtime)
963
 
964
 
21543 craig 965
else()
966
	if(WIN32)
967
		install(TARGETS ${EXE_NAME}
19821 craig 968
			RUNTIME DESTINATION .
969
			LIBRARY DESTINATION ${LIB_DIR_NAME}
19079 craig 970
		)
21543 craig 971
	else()
972
		install(TARGETS ${EXE_NAME}
19821 craig 973
			RUNTIME DESTINATION bin
974
			LIBRARY DESTINATION ${LIB_DIR_NAME}
19079 craig 975
		)
21543 craig 976
	endif()
977
endif()
5758 cbradney 978
 
13794 cbradney 979
#Install our header files, selected from all existing dirs, excluding unwanted directories and svn files
21543 craig 980
if(WANT_HEADERINSTALL)
981
	message(STATUS "Source header files will be installed")
982
	install(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/ DESTINATION ${INCLUDEDIR}
19821 craig 983
		FILES_MATCHING
984
		PATTERN "*.h"
985
		PATTERN "dicts" EXCLUDE
986
		PATTERN "doc" EXCLUDE
987
		PATTERN "dtd" EXCLUDE
988
		PATTERN "editorconfig" EXCLUDE
989
		PATTERN "icon*" EXCLUDE
990
		PATTERN "manpages" EXCLUDE
991
		PATTERN "old" EXCLUDE
992
		PATTERN ".svn" EXCLUDE
19079 craig 993
	)
21543 craig 994
else()
995
	message(STATUS "No source header files will be installed")
996
endif()
19956 craig 997
 
998
#Install our stylesheet
21543 craig 999
install(FILES
19956 craig 1000
	scribus.css
1001
	DESTINATION ${LIBDIR}
1002
)