CMakeLists.txt 21.2 KB
Newer Older
1
include_directories(
Halla Rempt's avatar
Halla Rempt committed
2
    ${CMAKE_CURRENT_SOURCE_DIR}/qtlockedfile
3 4 5
)

include_directories(SYSTEM
Halla Rempt's avatar
Halla Rempt committed
6 7 8
    ${EIGEN3_INCLUDE_DIR}
    ${OCIO_INCLUDE_DIR}
)
9

Sharaf Zaman's avatar
Sharaf Zaman committed
10 11
if (ANDROID)
    add_definitions(-DQT_OPENGL_ES_3)
12
    add_definitions(-DHAS_ONLY_OPENGL_ES)
13
    include_directories (${Qt5AndroidExtras_INCLUDE_DIRS})
Sharaf Zaman's avatar
Sharaf Zaman committed
14 15
endif()

16
add_subdirectory( tests )
17

18 19
if (APPLE)
    find_library(FOUNDATION_LIBRARY Foundation)
Halla Rempt's avatar
Halla Rempt committed
20
    find_library(APPKIT_LIBRARY AppKit)
21
endif ()
22

23
set(kritaui_LIB_SRCS
24
    canvas/kis_canvas_widget_base.cpp
25
    canvas/kis_canvas2.cpp
26
    canvas/kis_canvas_updates_compressor.cpp
27
    canvas/kis_canvas_controller.cpp
28
    canvas/kis_display_color_converter.cpp
29
    canvas/kis_display_filter.cpp
30
    canvas/kis_exposure_gamma_correction_interface.cpp
31
    canvas/kis_tool_proxy.cpp
Halla Rempt's avatar
Halla Rempt committed
32
    canvas/kis_canvas_decoration.cc
33 34
    canvas/kis_coordinates_converter.cpp
    canvas/kis_grid_manager.cpp
35
    canvas/kis_grid_decoration.cpp
36
    canvas/kis_grid_config.cpp
Halla Rempt's avatar
Halla Rempt committed
37 38
    canvas/kis_prescaled_projection.cpp
    canvas/kis_qpainter_canvas.cpp
39
    canvas/kis_projection_backend.cpp
40
    canvas/kis_update_info.cpp
41
    canvas/kis_image_patch.cpp
42
    canvas/kis_image_pyramid.cpp
43
    canvas/kis_infinity_manager.cpp
44
    canvas/kis_change_guides_command.cpp
45
    canvas/kis_guides_decoration.cpp
46
    canvas/kis_guides_manager.cpp
47
    canvas/kis_guides_config.cpp
48
    canvas/kis_snap_config.cpp
49
    canvas/kis_snap_line_strategy.cpp
50
    canvas/KisSnapPointStrategy.cpp
51
    canvas/KisSnapPixelStrategy.cpp
zan's avatar
zan committed
52 53
    canvas/KisMirrorAxisConfig.cpp
    dialogs/kis_about_application.cpp
54
    dialogs/kis_dlg_adj_layer_props.cc
55 56 57
    dialogs/kis_dlg_adjustment_layer.cc
    dialogs/kis_dlg_filter.cpp
    dialogs/kis_dlg_generator_layer.cpp
58
    dialogs/kis_dlg_file_layer.cpp
59 60
    dialogs/kis_dlg_filter.cpp
    dialogs/kis_dlg_stroke_selection_properties.cpp
61 62 63
    dialogs/kis_dlg_image_properties.cc
    dialogs/kis_dlg_layer_properties.cc
    dialogs/kis_dlg_preferences.cc
64
    dialogs/slider_and_spin_box_sync.cpp
65
    dialogs/kis_dlg_layer_style.cpp
66
    dialogs/kis_dlg_png_import.cpp
67
    dialogs/kis_dlg_import_image_sequence.cpp
68
    dialogs/kis_delayed_save_dialog.cpp
69
    dialogs/KisSessionManagerDialog.cpp
70
    dialogs/KisNewWindowLayoutDialog.cpp
71
    dialogs/KisDlgChangeCloneSource.cpp
72
    dialogs/KisRecoverNamedAutosaveDialog.cpp
73
    flake/kis_node_dummies_graph.cpp
74 75
    flake/kis_dummies_facade_base.cpp
    flake/kis_dummies_facade.cpp
76
    flake/kis_node_shapes_graph.cpp
77 78
    flake/kis_node_shape.cpp
    flake/kis_shape_controller.cpp
79 80
    flake/kis_shape_layer.cc
    flake/kis_shape_layer_canvas.cpp
81 82
    flake/kis_shape_selection.cpp
    flake/kis_shape_selection_canvas.cpp
83
    flake/kis_shape_selection_model.cpp
84
    flake/kis_take_all_shapes_command.cpp
85 86 87
    brushhud/kis_uniform_paintop_property_widget.cpp
    brushhud/kis_brush_hud.cpp
    brushhud/kis_round_hud_button.cpp
88 89 90
    brushhud/kis_dlg_brush_hud_config.cpp
    brushhud/kis_brush_hud_properties_list.cpp
    brushhud/kis_brush_hud_properties_config.cpp
91

92
    kis_aspect_ratio_locker.cpp
93
    kis_autogradient.cc
94
    kis_bookmarked_configurations_editor.cc
95
    kis_bookmarked_configurations_model.cc
96
    kis_bookmarked_filter_configurations_model.cc
97
    KisPaintopPropertiesBase.cpp
98
    kis_canvas_resource_provider.cpp
99
    kis_derived_resources.cpp
100 101
    kis_categories_mapper.cpp
    kis_categorized_list_model.cpp
102
    kis_categorized_item_delegate.cpp
103
    kis_clipboard.cc
104
    kis_config.cc
105
    KisOcioConfiguration.cpp
106 107
    kis_control_frame.cpp
    kis_composite_ops_model.cc
108
    kis_paint_ops_model.cpp
Halla Rempt's avatar
Halla Rempt committed
109
    kis_custom_pattern.cc
110
    kis_file_layer.cpp
111
    kis_change_file_layer_command.h
112
    kis_safe_document_loader.cpp
113
    kis_splash_screen.cpp
114
    kis_filter_manager.cc
115
    kis_filters_model.cc
116
    KisImageBarrierLockerWithFeedback.cpp
Halla Rempt's avatar
Halla Rempt committed
117 118
    kis_image_manager.cc
    kis_image_view_converter.cpp
119
    kis_import_catcher.cc
120
    kis_layer_manager.cc
Halla Rempt's avatar
Halla Rempt committed
121
    kis_mask_manager.cc
Halla Rempt's avatar
Halla Rempt committed
122
    kis_mimedata.cpp
123
    kis_node_commands_adapter.cpp
124
    kis_node_manager.cpp
125
    kis_node_juggler_compressed.cpp
126
    kis_node_selection_adapter.cpp
127
    kis_node_insertion_adapter.cpp
128
    KisNodeDisplayModeAdapter.cpp
Halla Rempt's avatar
Halla Rempt committed
129
    kis_node_model.cpp
130
    kis_node_filter_proxy_model.cpp
131 132 133
    kis_model_index_converter_base.cpp
    kis_model_index_converter.cpp
    kis_model_index_converter_show_all.cpp
134
    kis_painting_assistant.cc
135
    kis_painting_assistants_decoration.cpp
136
    KisDecorationsManager.cpp
137
    kis_paintop_box.cc
138 139
    kis_paintop_option.cpp
    kis_paintop_options_model.cpp
140
    kis_paintop_settings_widget.cpp
141
    kis_popup_palette.cpp
Halla Rempt's avatar
Halla Rempt committed
142
    kis_png_converter.cpp
143
    kis_preference_set_registry.cpp
144
    KisResourceServerProvider.cpp
145
    KisSelectedShapesProxy.cpp
Sven Langkamp's avatar
 
Sven Langkamp committed
146
    kis_selection_decoration.cc
147
    kis_selection_manager.cc
148
    KisSelectionActionsAdapter.cpp
149
    kis_statusbar.cc
150
    kis_zoom_manager.cc
151
    kis_favorite_resource_manager.cpp
Sven Langkamp's avatar
Sven Langkamp committed
152
    kis_workspace_resource.cpp
153 154
    kis_action.cpp
    kis_action_manager.cpp
155
    KisActionPlugin.cpp
156
    kis_canvas_controls_manager.cpp
157
    kis_tooltip_manager.cpp
158
    kis_multinode_property.cpp
159
    kis_stopgradient_editor.cpp
160
    KisWelcomePageWidget.cpp
161
    KisChangeCloneLayersCommand.cpp
162
    KisGenericGradientEditor.cpp
163

164 165 166 167
    kisexiv2/kis_exif_io.cpp
    kisexiv2/kis_exiv2.cpp
    kisexiv2/kis_iptc_io.cpp
    kisexiv2/kis_xmp_io.cpp
168

169
    opengl/kis_opengl.cpp
170
    opengl/kis_opengl_canvas2.cpp
171
    opengl/kis_opengl_canvas_debugger.cpp
172
    opengl/kis_opengl_image_textures.cpp
173
    opengl/kis_texture_tile.cpp
Julian Thijssen's avatar
Julian Thijssen committed
174
    opengl/kis_opengl_shader_loader.cpp
175
    opengl/kis_texture_tile_info_pool.cpp
176
    opengl/KisOpenGLUpdateInfoBuilder.cpp
177 178
    opengl/KisOpenGLModeProber.cpp
    opengl/KisScreenInformationAdapter.cpp
179
    kis_fps_decoration.cpp
180

Dmitry Kazakov's avatar
Dmitry Kazakov committed
181 182
    tool/KisToolChangesTracker.cpp
    tool/KisToolChangesTrackerData.cpp
183 184
    tool/kis_selection_tool_helper.cpp
    tool/kis_selection_tool_config_widget_helper.cpp
185
    tool/kis_rectangle_constraint_widget.cpp
186 187
    tool/kis_shape_tool_helper.cpp
    tool/kis_tool.cc
188
    tool/kis_delegated_tool_policies.cpp
189
    tool/kis_tool_freehand.cc
190
    tool/kis_speed_smoother.cpp
191
    tool/kis_painting_information_builder.cpp
192
    tool/kis_stabilized_events_sampler.cpp
193
    tool/kis_tool_freehand_helper.cpp
Dmitry Kazakov's avatar
Dmitry Kazakov committed
194
    tool/kis_tool_multihand_helper.cpp
195
    tool/kis_figure_painting_tool_helper.cpp
196
    tool/KisAsyncronousStrokeUpdateHelper.cpp
197
    tool/kis_tool_paint.cc
198
    tool/kis_tool_shape.cc
199 200
    tool/kis_tool_ellipse_base.cpp
    tool/kis_tool_rectangle_base.cpp
201
    tool/kis_tool_polyline_base.cpp
202
    tool/kis_tool_utils.cpp
203
    tool/kis_resources_snapshot.cpp
204
    tool/kis_smoothing_options.cpp
205
    tool/KisStabilizerDelayedPaintHelper.cpp
206
    tool/KisStrokeSpeedMonitor.cpp
207
    tool/strokes/freehand_stroke.cpp
208
    tool/strokes/KisStrokeEfficiencyMeasurer.cpp
209
    tool/strokes/kis_painter_based_stroke_strategy.cpp
210
    tool/strokes/kis_filter_stroke_strategy.cpp
211
    tool/strokes/kis_color_sampler_stroke_strategy.cpp
212 213
    tool/strokes/KisFreehandStrokeInfo.cpp
    tool/strokes/KisMaskedFreehandStrokePainter.cpp
214
    tool/strokes/KisMaskingBrushRenderer.cpp
215
    tool/strokes/KisMaskingBrushCompositeOpFactory.cpp
216
    tool/strokes/move_stroke_strategy.cpp
217
    tool/strokes/KisNodeSelectionRecipe.cpp
218 219
    tool/KisSelectionToolFactoryBase.cpp
    tool/KisToolPaintFactoryBase.cpp
Eoin O'Neill's avatar
Eoin O'Neill committed
220

221
    widgets/kis_cmb_composite.cc
222 223
    widgets/kis_cmb_contour.cpp
    widgets/kis_cmb_gradient.cpp
224
    widgets/kis_paintop_list_widget.cpp
225
    widgets/kis_cmb_idlist.cc
226
    widgets/kis_color_space_selector.cc
227 228
    widgets/kis_advanced_color_space_selector.cc
    widgets/kis_cie_tongue_widget.cpp
229
    widgets/kis_tone_curve_widget.cpp
230 231
    widgets/kis_transport_controls.cpp
    widgets/kis_utility_title_bar.cpp
232
    widgets/kis_curve_widget.cpp
233
    widgets/kis_custom_image_widget.cc
234
    widgets/kis_image_from_clipboard_widget.cpp
235
    widgets/kis_double_widget.cc
Halla Rempt's avatar
Halla Rempt committed
236
    widgets/kis_filter_selector_widget.cc
237 238 239
    widgets/kis_gradient_chooser.cc
    widgets/kis_iconwidget.cc
    widgets/kis_mask_widgets.cpp
240 241 242 243
    widgets/kis_meta_data_merge_strategy_chooser_widget.cc
    widgets/kis_multi_bool_filter_widget.cc
    widgets/kis_multi_double_filter_widget.cc
    widgets/kis_multi_integer_filter_widget.cc
244
    widgets/kis_multipliers_double_slider_spinbox.cpp
245
    widgets/kis_paintop_presets_popup.cpp
246
    widgets/kis_tool_options_popup.cpp
247
    widgets/kis_paintop_presets_chooser_popup.cpp
248
    widgets/kis_paintop_presets_save.cpp
249
    widgets/kis_paintop_preset_icon_library.cpp
250
    widgets/kis_pattern_chooser.cc
251

252
    widgets/kis_preset_chooser.cpp
253
    widgets/kis_progress_widget.cpp
254
    widgets/kis_selection_options.cc
255
    widgets/kis_scratch_pad.cpp
Dmitry Kazakov's avatar
Dmitry Kazakov committed
256
    widgets/kis_scratch_pad_event_filter.cpp
257
    widgets/kis_preset_selector_strip.cpp
258
    widgets/KisSelectionPropertySlider.cpp
259 260
    widgets/kis_size_group.cpp
    widgets/kis_size_group_p.cpp
261
    widgets/kis_wdg_generator.cpp
Sven Langkamp's avatar
Sven Langkamp committed
262
    widgets/kis_workspace_chooser.cpp
263
    widgets/kis_categorized_list_view.cpp
264
    widgets/kis_widget_chooser.cpp
265
    widgets/kis_tool_button.cpp
Halla Rempt's avatar
Halla Rempt committed
266
    widgets/kis_floating_message.cpp
267
    widgets/kis_lod_availability_widget.cpp
268
    widgets/kis_color_filter_combo.cpp
269 270 271
    widgets/kis_color_label_selector_widget.cpp
    widgets/kis_color_label_button.cpp
    widgets/kis_layer_filter_widget.cpp
272
    widgets/kis_elided_label.cpp
273
    widgets/kis_stopgradient_slider_widget.cpp
274
    widgets/kis_preset_live_preview_view.cpp
275
    widgets/KisScreenColorSampler.cpp
276
    widgets/KoDualColorButton.cpp
277 278
    widgets/KoStrokeConfigWidget.cpp
    widgets/KoFillConfigWidget.cpp
279
    widgets/KisLayerStyleAngleSelector.cpp
280
    widgets/KisMemoryReportButton.cpp
281
    widgets/KisDitherWidget.cpp
282
    widgets/KisWarningWidget.cpp
283

Michael Zhou's avatar
Michael Zhou committed
284 285
    KisPaletteEditor.cpp
    dialogs/KisDlgPaletteEditor.cpp
286

Halla Rempt's avatar
Halla Rempt committed
287
    widgets/KisNewsWidget.cpp
288
    widgets/KisGamutMaskToolbar.cpp
289

290
    utils/kis_document_aware_spin_box_unit_manager.cpp
291
    utils/KisSpinBoxSplineUnitConverter.cpp
292
    utils/KisClipboardUtil.cpp
293
    utils/KisDitherUtil.cpp
294 295
    utils/KisFileIconCreator.cpp

296
    input/kis_input_manager.cpp
297
    input/kis_input_manager_p.cpp
298
    input/kis_extended_modifiers_mapper.cpp
299 300 301 302 303 304
    input/kis_abstract_input_action.cpp
    input/kis_tool_invocation_action.cpp
    input/kis_pan_action.cpp
    input/kis_alternate_invocation_action.cpp
    input/kis_rotate_canvas_action.cpp
    input/kis_zoom_action.cpp
305
    input/kis_change_frame_action.cpp
306
    input/kis_gamma_exposure_action.cpp
307 308
    input/kis_show_palette_action.cpp
    input/kis_change_primary_setting_action.cpp
309
    input/kis_abstract_shortcut.cpp
310
    input/kis_native_gesture_shortcut.cpp
311
    input/kis_single_action_shortcut.cpp
312 313
    input/kis_stroke_shortcut.cpp
    input/kis_shortcut_matcher.cpp
314
    input/kis_select_layer_action.cpp
315
    input/KisQtWidgetsTweaker.cpp
316
    input/KisInputActionGroup.cpp
Sharaf Zaman's avatar
Sharaf Zaman committed
317
    input/kis_zoom_and_rotate_action.cpp
Stuart Dickson's avatar
Stuart Dickson committed
318

Sven Langkamp's avatar
Sven Langkamp committed
319 320 321
    operations/kis_operation.cpp
    operations/kis_operation_configuration.cpp
    operations/kis_operation_registry.cpp
322 323
    operations/kis_operation_ui_factory.cpp
    operations/kis_operation_ui_widget.cpp
324
    operations/kis_filter_selection_operation.cpp
325
    actions/kis_selection_action_factories.cpp
Dmitrii Utkin's avatar
Dmitrii Utkin committed
326
    actions/KisPasteActionFactories.cpp
327
    actions/KisTransformToolActivationCommand.cpp
328 329 330 331 332 333 334
    animation/KisVideoSaver.cpp
    animation/KisAnimationRenderingOptions.cpp
    animation/KisAnimationRender.cpp
    animation/KisDlgAnimationRenderer.cpp
    animation/VideoExportOptionsDialog.cpp
    animation/VideoHDRMetadataOptionsDialog.cpp
    animation/KisHDRMetadataOptions.cpp
335
    input/kis_touch_shortcut.cpp
336
    kis_document_undo_store.cpp
337 338
    kis_gui_context_command.cpp
    kis_gui_context_command_p.cpp
339
    input/kis_tablet_debugger.cpp
340 341 342 343 344 345 346 347 348 349 350 351 352 353 354
    input/kis_input_profile_manager.cpp
    input/kis_input_profile.cpp
    input/kis_shortcut_configuration.cpp
    input/config/kis_input_configuration_page.cpp
    input/config/kis_edit_profiles_dialog.cpp
    input/config/kis_input_profile_model.cpp
    input/config/kis_input_configuration_page_item.cpp
    input/config/kis_action_shortcuts_model.cpp
    input/config/kis_input_type_delegate.cpp
    input/config/kis_input_mode_delegate.cpp
    input/config/kis_input_button.cpp
    input/config/kis_input_editor_delegate.cpp
    input/config/kis_mouse_input_editor.cpp
    input/config/kis_wheel_input_editor.cpp
    input/config/kis_key_input_editor.cpp
355
    processing/fill_processing_visitor.cpp
356 357 358
    canvas/kis_mirror_axis.cpp

    kis_abstract_perspective_grid.cpp
Sharaf Zaman's avatar
Sharaf Zaman committed
359

360 361 362 363
    KisApplication.cpp
    KisAutoSaveRecoveryDialog.cpp
    KisDetailsPane.cpp
    KisDocument.cpp
364
    KisCloneDocumentStroke.cpp
365
    kis_node_view_color_scheme.cpp
366 367
    KisImportExportFilter.cpp
    KisImportExportManager.cpp
368
    KisImportExportUtils.cpp
369
    kis_async_action_feedback.cpp
370 371 372 373 374 375 376 377 378
    KisMainWindow.cpp
    KisOpenPane.cpp
    KisPart.cpp
    KisTemplate.cpp
    KisTemplateCreateDia.cpp
    KisTemplateGroup.cpp
    KisTemplates.cpp
    KisTemplatesPane.cpp
    KisTemplateTree.cpp
379
    KisUndoActionsUpdateManager.cpp
380
    KisView.cpp
381
    KisCanvasWindow.cpp
382
    KisImportExportErrorCode.cpp
Agata Cacko's avatar
Agata Cacko committed
383
    KisImportExportAdditionalChecks.cpp
384 385

    thememanager.cpp
386

387 388 389
    kis_mainwindow_observer.cpp
    KisViewManager.cpp
    kis_mirror_manager.cpp
Halla Rempt's avatar
Halla Rempt committed
390 391 392 393 394

    qtlockedfile/qtlockedfile.cpp

    qtsingleapplication/qtlocalpeer.cpp
    qtsingleapplication/qtsingleapplication.cpp
395

396
    KisApplicationArguments.cpp
397 398

    KisNetworkAccessManager.cpp
Anna Medonosová's avatar
Anna Medonosová committed
399
    KisRssReader.cpp
400
    KisMultiFeedRSSModel.cpp
401
    KisRemoteFileFetcher.cpp
402

403
    KisSaveGroupVisitor.cpp
Jouni Pentikäinen's avatar
Jouni Pentikäinen committed
404
    KisWindowLayoutResource.cpp
405
    KisWindowLayoutManager.cpp
406
    KisSessionResource.cpp
407 408 409

    KisReferenceImagesDecoration.cpp
    KisReferenceImage.cpp
410 411
    flake/KisReferenceImagesLayer.cpp
    flake/KisReferenceImagesLayer.h
412
    KisMouseClickEater.cpp
413 414

    KisDecorationsWrapperLayer.cpp
Halla Rempt's avatar
Halla Rempt committed
415 416 417

    KoDocumentInfoDlg.cpp
    KoDocumentInfo.cpp
418 419

    StoryboardItem.cpp
420 421
)

L. E. Segovia's avatar
L. E. Segovia committed
422
if (KSeExpr_FOUND)
423 424 425 426 427
    set(kritaui_LIB_SRCS ${kritaui_LIB_SRCS}
        widgets/kis_seexpr_script_chooser.cpp
    )
endif()

428
if(WIN32)
429 430 431 432 433
    # Private headers are needed for:
    #    * KisDlgCustomTabletResolution
    #    * KisScreenInformationAdapter
    include_directories(SYSTEM ${Qt5Gui_PRIVATE_INCLUDE_DIRS})

434 435
    set(kritaui_LIB_SRCS
        ${kritaui_LIB_SRCS}
Halla Rempt's avatar
Halla Rempt committed
436
        qtlockedfile/qtlockedfile_win.cpp
437
    )
438 439 440 441 442 443 444
    if (NOT USE_QT_TABLET_WINDOWS)
        set(kritaui_LIB_SRCS
            ${kritaui_LIB_SRCS}
            input/wintab/kis_tablet_support_win.cpp
            input/wintab/kis_screen_size_choice_dialog.cpp
            input/wintab/kis_tablet_support_win8.cpp
            )
445 446 447 448 449
    else()
        set(kritaui_LIB_SRCS
            ${kritaui_LIB_SRCS}
            dialogs/KisDlgCustomTabletResolution.cpp
            )
450
    endif()
451
endif()
452

453 454 455 456
    set(kritaui_LIB_SRCS
        ${kritaui_LIB_SRCS}
        kis_animation_frame_cache.cpp
        kis_animation_cache_populator.cpp
457 458 459 460 461 462
        KisAsyncAnimationRendererBase.cpp
        KisAsyncAnimationCacheRenderer.cpp
        KisAsyncAnimationFramesSavingRenderer.cpp
        dialogs/KisAsyncAnimationRenderDialogBase.cpp
        dialogs/KisAsyncAnimationCacheRenderDialog.cpp
        dialogs/KisAsyncAnimationFramesSaveDialog.cpp
463
        canvas/kis_animation_player.cpp
464
        kis_animation_importer.cpp
465
        KisSyncedAudioPlayback.cpp
466
        KisFrameDataSerializer.cpp
467
        KisFrameCacheStore.cpp
468
        KisFrameCacheSwapper.cpp
469 470
        KisAbstractFrameCacheSwapper.cpp
        KisInMemoryFrameCacheSwapper.cpp
471

Alvin Wong's avatar
Alvin Wong committed
472 473
        input/wintab/drawpile_tablettester/tablettester.cpp
        input/wintab/drawpile_tablettester/tablettest.cpp
474
    )
475

476
if (UNIX)
477 478
    set(kritaui_LIB_SRCS
        ${kritaui_LIB_SRCS}
Halla Rempt's avatar
Halla Rempt committed
479
        qtlockedfile/qtlockedfile_unix.cpp
480
        )
481
endif()
482

Anna Medonosová's avatar
Anna Medonosová committed
483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499
if (ENABLE_UPDATERS)
	if (UNIX)
    	set(kritaui_LIB_SRCS
        	${kritaui_LIB_SRCS}
        	utils/KisAppimageUpdater.cpp
        	)
	endif()

	set(kritaui_LIB_SRCS
        ${kritaui_LIB_SRCS}
    	utils/KisUpdaterBase.cpp
    	utils/KisManualUpdater.cpp
    	utils/KisUpdaterStatus.cpp
		)
endif()


Halla Rempt's avatar
Halla Rempt committed
500 501 502
if(APPLE)
    set(kritaui_LIB_SRCS
        ${kritaui_LIB_SRCS}
Ivan Yossi's avatar
Ivan Yossi committed
503
        input/kis_extended_modifiers_mapper_osx.mm
Halla Rempt's avatar
Halla Rempt committed
504 505 506
        osx.mm
    )
endif()
507

508 509 510 511
if (ANDROID)
    set (kritaui_LIB_SRCS ${kritaui_LIB_SRCS} KisAndroidFileManager.cpp)
endif()

512
ki18n_wrap_ui(kritaui_LIB_SRCS
513
    widgets/KoFillConfigWidget.ui
514
    widgets/KoStrokeConfigWidget.ui
515
    widgets/KisDitherWidget.ui
516
    forms/wdgdlgpngimport.ui
517
    forms/wdgfullscreensettings.ui
518 519 520
    forms/wdgautogradient.ui
    forms/wdggeneralsettings.ui
    forms/wdgperformancesettings.ui
Halla Rempt's avatar
Halla Rempt committed
521
    forms/wdggenerators.ui
522 523 524 525 526
    forms/wdgbookmarkedconfigurationseditor.ui
    forms/wdgapplyprofile.ui
    forms/wdgcustompattern.ui
    forms/wdglayerproperties.ui
    forms/wdgcolorsettings.ui
527
    forms/wdgtabletsettings.ui
528
    forms/wdgcolorspaceselector.ui
529
    forms/wdgcolorspaceselectoradvanced.ui
530 531 532
    forms/wdgdisplaysettings.ui
    forms/kis_matrix_widget.ui
    forms/wdgselectionoptions.ui
Halla Rempt's avatar
Halla Rempt committed
533
    forms/wdggeometryoptions.ui
534 535 536 537 538 539
    forms/wdgnewimage.ui
    forms/wdgimageproperties.ui
    forms/wdgmaskfromselection.ui
    forms/wdgmasksource.ui
    forms/wdgfilterdialog.ui
    forms/wdgmetadatamergestrategychooser.ui
Halla Rempt's avatar
Halla Rempt committed
540
    forms/wdgpaintoppresets.ui
541
    forms/wdgpaintopsettings.ui
542
    forms/wdgdlggeneratorlayer.ui
543
    forms/wdgdlgfilelayer.ui
544
    forms/wdgfilterselector.ui
545
    forms/wdgfilternodecreation.ui
546
    forms/wdgmultipliersdoublesliderspinbox.ui
547
    forms/wdgnodequerypatheditor.ui
548
    forms/wdgpresetselectorstrip.ui
549
    forms/wdgsavebrushpreset.ui
550
    forms/wdgpreseticonlibrary.ui
551
    forms/wdgrectangleconstraints.ui
552
    forms/wdgimportimagesequence.ui
553
    forms/wdgstrokeselectionproperties.ui
554 555
    forms/KisDetailsPaneBase.ui
    forms/KisOpenPaneBase.ui
556
    forms/wdgstopgradienteditor.ui
557
    forms/wdgsessionmanager.ui
558
    forms/wdgnewwindowlayout.ui
559
    forms/KisWelcomePage.ui
Michael Zhou's avatar
Michael Zhou committed
560
    forms/WdgDlgPaletteEditor.ui
Halla Rempt's avatar
Halla Rempt committed
561
    forms/KisNewsPage.ui
562
    forms/wdgGamutMaskToolbar.ui
563
    forms/wdgchangeclonesource.ui
Halla Rempt's avatar
Halla Rempt committed
564 565 566
    forms/koDocumentInfoAboutWidget.ui
    forms/koDocumentInfoAuthorWidget.ui

567

568
    brushhud/kis_dlg_brush_hud_config.ui
569
    dialogs/kis_delayed_save_dialog.ui
570
    dialogs/KisRecoverNamedAutosaveDialog.ui
571 572 573 574 575 576
    input/config/kis_input_configuration_page.ui
    input/config/kis_edit_profiles_dialog.ui
    input/config/kis_input_configuration_page_item.ui
    input/config/kis_mouse_input_editor.ui
    input/config/kis_wheel_input_editor.ui
    input/config/kis_key_input_editor.ui
577 578 579 580 581 582 583 584 585 586 587 588 589 590

    layerstyles/wdgBevelAndEmboss.ui
    layerstyles/wdgblendingoptions.ui
    layerstyles/WdgColorOverlay.ui
    layerstyles/wdgContour.ui
    layerstyles/wdgdropshadow.ui
    layerstyles/WdgGradientOverlay.ui
    layerstyles/wdgInnerGlow.ui
    layerstyles/wdglayerstyles.ui
    layerstyles/WdgPatternOverlay.ui
    layerstyles/WdgSatin.ui
    layerstyles/WdgStroke.ui
    layerstyles/wdgstylesselector.ui
    layerstyles/wdgTexture.ui
591
    layerstyles/wdgKisLayerStyleAngleSelector.ui
592

593
    wdgsplash.ui
594
    input/wintab/kis_screen_size_choice_dialog.ui
Alvin Wong's avatar
Alvin Wong committed
595
    input/wintab/drawpile_tablettester/tablettest.ui
Halla Rempt's avatar
Halla Rempt committed
596

597 598 599
    animation/wdg_animationrenderer.ui
    animation/video_export_options_dialog.ui
    animation/VideoHDRMetadataOptionsDialog.ui
600
)
Adrian Page's avatar
Adrian Page committed
601

602 603 604 605 606 607 608 609 610 611 612
if(WIN32)
    if(USE_QT_TABLET_WINDOWS)
        ki18n_wrap_ui(kritaui_LIB_SRCS
            dialogs/KisDlgCustomTabletResolution.ui
        )
    else()
        ki18n_wrap_ui(kritaui_LIB_SRCS
            input/wintab/kis_screen_size_choice_dialog.ui
        )
    endif()
endif()
613

Laurent Montel's avatar
Laurent Montel committed
614

615
add_library(kritaui SHARED ${kritaui_HEADERS_MOC} ${kritaui_LIB_SRCS} )
616
generate_export_header(kritaui BASE_NAME kritaui)
617

618
target_link_libraries(kritaui KF5::CoreAddons KF5::Completion KF5::I18n KF5::ItemViews Qt5::Network
Anna Medonosová's avatar
Anna Medonosová committed
619
                      kritaversion kritaimpex kritacolor kritaimage kritalibbrush kritawidgets kritawidgetutils kritaresources ${PNG_LIBRARIES} LibExiv2::LibExiv2
620
)
Halla Rempt's avatar
Halla Rempt committed
621

Sharaf Zaman's avatar
Sharaf Zaman committed
622 623 624
if (ANDROID)
    target_link_libraries(kritaui GLESv3)
    target_link_libraries(kritaui Qt5::Gui)
625
    target_link_libraries(kritaui Qt5::AndroidExtras)
Sharaf Zaman's avatar
Sharaf Zaman committed
626 627
endif()

628 629 630 631
if (HAVE_QT_MULTIMEDIA)
    target_link_libraries(kritaui Qt5::Multimedia)
endif()

Sharaf Zaman's avatar
Sharaf Zaman committed
632
if (NOT WIN32 AND NOT APPLE AND NOT ANDROID)
633
  target_link_libraries(kritaui ${X11_X11_LIB}
634
                                ${X11_Xinput_LIB})
635 636
endif()

637 638
if(APPLE)
    target_link_libraries(kritaui ${FOUNDATION_LIBRARY})
Halla Rempt's avatar
Halla Rempt committed
639
    target_link_libraries(kritaui ${APPKIT_LIBRARY})
640
endif ()
Stuart Dickson's avatar
Stuart Dickson committed
641

Adrian Page's avatar
Adrian Page committed
642

643
target_link_libraries(kritaui ${OPENEXR_LIBRARIES})
644

645
# Add VSync disable workaround
Sharaf Zaman's avatar
Sharaf Zaman committed
646
if(NOT WIN32 AND NOT APPLE AND NOT ANDROID)
647
    target_link_libraries(kritaui ${CMAKE_DL_LIBS} Qt5::X11Extras)
648
endif()
Laurent Montel's avatar
Laurent Montel committed
649

650 651 652 653
if(X11_FOUND)
    target_link_libraries(kritaui Qt5::X11Extras ${X11_LIBRARIES})
endif()

654 655 656 657 658 659
target_include_directories(kritaui
    PUBLIC
    $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/canvas>
    $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/flake>
    $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/ora>
    $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/tool>
660
    $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/utils>
661 662 663 664
    $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/widgets>
    $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/input/wintab>
)

Thomas Zander's avatar
Thomas Zander committed
665
set_target_properties(kritaui
666
    PROPERTIES VERSION ${GENERIC_KRITA_LIB_VERSION} SOVERSION ${GENERIC_KRITA_LIB_SOVERSION}
Thomas Zander's avatar
Thomas Zander committed
667
)
668
install(TARGETS kritaui  ${INSTALL_TARGETS_DEFAULT_ARGS})
Laurent Montel's avatar
Laurent Montel committed
669 670


671 672
if (APPLE)
    install(FILES osx.stylesheet DESTINATION ${DATA_INSTALL_DIR}/krita)
673
endif ()
Anna Medonosová's avatar
Anna Medonosová committed
674 675 676 677 678 679

if (UNIX AND BUILD_TESTING AND ENABLE_UPDATERS)
    install(FILES tests/data/AppImageUpdateDummy
            PERMISSIONS OWNER_EXECUTE OWNER_WRITE OWNER_READ GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE
            DESTINATION ${CMAKE_INSTALL_PREFIX}/bin)
endif ()