summaryrefslogtreecommitdiffstats
path: root/src/designer/src/designer/CMakeLists.txt
blob: cc938f58d6a6dab350705398929294e1dd7978bb (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
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
# Generated from designer.pro.

#####################################################################
## designer App:
#####################################################################

qt_internal_add_app(designer
    SOURCES
        ../../../shared/fontpanel/fontpanel.cpp ../../../shared/fontpanel/fontpanel.h
        ../../../shared/qttoolbardialog/qttoolbardialog.cpp ../../../shared/qttoolbardialog/qttoolbardialog.h ../../../shared/qttoolbardialog/qttoolbardialog.ui
        appfontdialog.cpp appfontdialog.h
        assistantclient.cpp assistantclient.h
        designer_enums.h
        main.cpp
        mainwindow.cpp mainwindow.h
        newform.cpp newform.h
        preferencesdialog.cpp preferencesdialog.h preferencesdialog.ui
        qdesigner.cpp qdesigner.h
        qdesigner_actions.cpp qdesigner_actions.h
        qdesigner_appearanceoptions.cpp qdesigner_appearanceoptions.h qdesigner_appearanceoptions.ui
        qdesigner_formwindow.cpp qdesigner_formwindow.h
        qdesigner_server.cpp qdesigner_server.h
        qdesigner_settings.cpp qdesigner_settings.h
        qdesigner_toolwindow.cpp qdesigner_toolwindow.h
        qdesigner_workbench.cpp qdesigner_workbench.h
        saveformastemplate.cpp saveformastemplate.h saveformastemplate.ui
        versiondialog.cpp versiondialog.h
    INCLUDE_DIRECTORIES
        ../../../shared/fontpanel
        ../../../shared/qttoolbardialog
        ../lib/extension
        ../lib/sdk
        ../lib/shared
        extra
    PUBLIC_LIBRARIES
        Qt::CorePrivate
        Qt::DesignerComponentsPrivate
        Qt::DesignerPrivate
        Qt::Gui
        Qt::Network
        Qt::Widgets
        Qt::Xml
    ENABLE_AUTOGEN_TOOLS
        uic
    PRECOMPILED_HEADER
        "qdesigner_pch.h"
)

# Resources:
set(designer_resource_files
    "images/designer.png"
)

qt_add_resource(designer "designer"
    PREFIX
        "/qt-project.org/designer"
    FILES
        ${designer_resource_files}
)
set_source_files_properties("../../../shared/qttoolbardialog/images/back.png"
    PROPERTIES QT_RESOURCE_ALIAS "images/back.png"
)
set_source_files_properties("../../../shared/qttoolbardialog/images/down.png"
    PROPERTIES QT_RESOURCE_ALIAS "images/down.png"
)
set_source_files_properties("../../../shared/qttoolbardialog/images/forward.png"
    PROPERTIES QT_RESOURCE_ALIAS "images/forward.png"
)
set_source_files_properties("../../../shared/qttoolbardialog/images/minus.png"
    PROPERTIES QT_RESOURCE_ALIAS "images/minus.png"
)
set_source_files_properties("../../../shared/qttoolbardialog/images/plus.png"
    PROPERTIES QT_RESOURCE_ALIAS "images/plus.png"
)
set_source_files_properties("../../../shared/qttoolbardialog/images/up.png"
    PROPERTIES QT_RESOURCE_ALIAS "images/up.png"
)
set(qttoolbardialog_resource_files
    "images/back.png"
    "images/down.png"
    "images/forward.png"
    "images/minus.png"
    "images/plus.png"
    "images/up.png"
)

qt_add_resource(designer "qttoolbardialog"
    PREFIX
        "/qt-project.org/qttoolbardialog"
    BASE
        "../../../shared/qttoolbardialog"
    FILES
        ${qttoolbardialog_resource_files}
)

set_target_properties(designer PROPERTIES
    QT_TARGET_DESCRIPTION "Qt Designer"
)

## Scopes:
#####################################################################

qt_extend_target(designer CONDITION TARGET Qt::PrintSupport
    PUBLIC_LIBRARIES
        Qt::PrintSupport
)

qt_extend_target(designer CONDITION QT_CONFIG___contains___static
    DEFINES
        QT_DESIGNER_STATIC
)

if(WIN32)
    set_target_properties(designer PROPERTIES
        QT_TARGET_RC_ICONS "${CMAKE_CURRENT_SOURCE_DIR}/designer.ico"
    )
endif()

if(WIN32)
    set_target_properties(designer PROPERTIES
        QT_TARGET_VERSION "${PROJECT_VERSION}.0"
    )
endif()

if(UNIX)
    set_target_properties(designer PROPERTIES
        QT_TARGET_VERSION "${PROJECT_VERSION}"
    )
endif()

if(APPLE)
    set_target_properties(designer PROPERTIES
        MACOSX_BUNDLE_INFO_PLIST "${CMAKE_CURRENT_SOURCE_DIR}/Info_mac.plist"
        MACOSX_BUNDLE TRUE
        MACOSX_BUNDLE_ICON_FILE "designer.icns"
        OUTPUT_NAME "Designer"
    )
    set_source_files_properties(designer.icns PROPERTIES
        MACOSX_PACKAGE_LOCATION Resources
    )
    target_sources(designer PRIVATE
        designer.icns
    )
    # special case end
    # Set values to be replaced in the custom Info_mac.plist.
    # Also package the uifile.icns.
    set(ICON "designer.icns")
    set(EXECUTABLE "Designer")
    set_source_files_properties(uifile.icns PROPERTIES MACOSX_PACKAGE_LOCATION Resources)
    target_sources(designer PRIVATE uifile.icns)
    # special case end
endif()

#### Keys ignored in scope 6:.:.:designer.pro:APPLE:
# FILETYPES.files = "uifile.icns"
# FILETYPES.path = "Contents/Resources"
# QMAKE_BUNDLE_DATA = "FILETYPES"

qt_extend_target(designer CONDITION UNIX AND NOT HAIKU AND NOT MACOS
    PUBLIC_LIBRARIES
        m
)
qt_add_docs(designer
    doc/qtdesigner.qdocconf
)