summaryrefslogtreecommitdiffstats
path: root/src/gui/doc/snippets/CMakeLists.txt
blob: e314d577d276226e2dd253d82c2c19a6e865e3d5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
# Copyright (C) 2025 The Qt Company Ltd.
# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause

qt_add_library(gui_snippets OBJECT
    brush/brush.cpp
    brush/gradientcreationsnippet.cpp
    image/image.cpp
    image/supportedformat.cpp
    picture/picture.cpp
    polygon/polygon.cpp
    qimagewriter/main.cpp
    qtextobject/textobjectinterface.h
    rhioffscreen/main.cpp
    textdocument-end/textdocumentendsnippet.cpp
)

target_link_libraries(gui_snippets PRIVATE
    Qt::Core
    Qt::Gui
    Qt::GuiPrivate
)

if(QT_FEATURE_widgets)
    target_link_libraries(gui_snippets PRIVATE
        Qt::Widgets
    )
    target_sources(gui_snippets PRIVATE
        draganddrop/dragwidget.cpp
        dragging/mainwindow.cpp
        droparea/droparea.cpp
        dropevents/window.cpp
        droprectangle/window.cpp
        plaintextlayout/window.cpp
        qfileopenevent/main.cpp
        qfontdatabase/qfontdatabase_snippets.cpp
        qstatustipevent/main.cpp
        scribe-overview/main.cpp
        separations/finalwidget.cpp
        textblock-formats/main.cpp
        textdocument-blocks/mainwindow.cpp
        textdocument-charformats/main.cpp
        textdocument-css/main.cpp
        textdocument-cursors/main.cpp
        textdocument-find/main.cpp
        textdocument-frames/mainwindow.cpp
        textdocument-imageformat/main.cpp
        textdocument-images/main.cpp
        textdocument-listitems/mainwindow.cpp
        textdocument-listitemstyles/mainwindow.cpp
        textdocument-lists/mainwindow.cpp
        textdocument-resources/main.cpp
        textdocument-selections/mainwindow.cpp
        textdocument-tables/mainwindow.cpp
        textdocument-tables/mainwindow.cpp
        transform/main.cpp
    )
endif()


if(QT_FEATURE_xml)
    target_link_libraries(gui_snippets PRIVATE
        Qt::Xml
    )
    target_sources(gui_snippets PRIVATE
        textblock-fragments/xmlwriter.cpp
    )
endif()

if(QT_FEATURE_printsupport)
    target_link_libraries(gui_snippets PRIVATE
        Qt::PrintSupport
    )
    target_sources(gui_snippets PRIVATE
        textdocument-printing/mainwindow.cpp
    )
endif()

if(QT_FEATURE_widgets AND QT_FEATURE_clipboard)
    target_sources(gui_snippets PRIVATE
        clipboard/clipwindow.cpp
    )
endif()

set_target_properties(gui_snippets PROPERTIES COMPILE_OPTIONS "-w")

if ("${CMAKE_CXX_COMPILE_FEATURES}" MATCHES "cxx_std_23")
    set_property(TARGET gui_snippets PROPERTY CXX_STANDARD 23)
endif()

set_target_properties(gui_snippets PROPERTIES UNITY_BUILD OFF)

add_subdirectory(code)