summaryrefslogtreecommitdiffstats
path: root/src/qdbus/qdbusviewer/CMakeLists.txt
blob: 9bd959bd135477903bb991b4bd038a7f107d2587 (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
# Copyright (C) 2022 The Qt Company Ltd.
# SPDX-License-Identifier: BSD-3-Clause

#####################################################################
## qdbusviewer App:
#####################################################################

qt_internal_add_app(qdbusviewer
    SOURCES
        logviewer.cpp logviewer.h
        main.cpp
        mainwindow.cpp mainwindow.h
        propertydialog.cpp propertydialog.h
        qdbusmodel.cpp qdbusmodel.h
        qdbusviewer.cpp qdbusviewer.h
        servicesproxymodel.cpp servicesproxymodel.h
    LIBRARIES
        Qt::DBusPrivate
        Qt::Gui
        Qt::Widgets
        Qt::Xml
)

# Resources:
set(qdbusviewer_resource_files
    "images/qdbusviewer-128.png"
    "images/qdbusviewer.png"
)

qt_internal_add_resource(qdbusviewer "qdbusviewer"
    PREFIX
        "/qt-project.org/qdbusviewer"
    FILES
        ${qdbusviewer_resource_files}
)


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

if(APPLE)
    set_target_properties(qdbusviewer PROPERTIES
        MACOSX_BUNDLE_INFO_PLIST "${CMAKE_CURRENT_SOURCE_DIR}/Info_mac.plist"
        MACOSX_BUNDLE TRUE
        MACOSX_BUNDLE_ICON_FILE "qdbusviewer.icns"
    )
    set_source_files_properties(images/qdbusviewer.icns PROPERTIES
        MACOSX_PACKAGE_LOCATION Resources
    )
    target_sources(qdbusviewer PRIVATE
        images/qdbusviewer.icns
    )
    # Set values to be replaced in the custom Info_mac.plist.
    set(ICON "qdbusviewer.icns")
    set(EXECUTABLE "qdbusviewer")
endif()

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