summaryrefslogtreecommitdiffstats
path: root/utils/themeeditor/CMakeLists.txt
blob: 8d239b55f14acccd797640bdfcb4e0599256f4b9 (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
#
#             __________               __   ___.
#   Open      \______   \ ____   ____ |  | _\_ |__   _______  ___
#   Source     |       _//  _ \_/ ___\|  |/ /| __ \ /  _ \  \/  /
#   Jukebox    |    |   (  <_> )  \___|    < | \_\ (  <_> > <  <
#   Firmware   |____|_  /\____/ \___  >__|_ \|___  /\____/__/\_ \
#                     \/            \/     \/    \/            \/
#
# All files in this archive are subject to the GNU General Public License.
# See the file COPYING in the source tree root for full license agreement.
#
# This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
# KIND, either express or implied.
#

find_package(QuaZip-Qt${QT_VERSION_MAJOR} QUIET)
if(QuaZip-Qt${QT_VERSION_MAJOR}_FOUND)
  set(QUAZIP_LIBRARY QuaZip::QuaZip)
else()
  set(QUAZIP_LIBRARY quazip)
endif()

add_executable(RockboxThemeEditor WIN32 MACOSX_BUNDLE
    graphics/rbalbumart.cpp
    graphics/rbalbumart.h
    graphics/rbfont.cpp
    graphics/rbfont.h
    graphics/rbfontcache.cpp
    graphics/rbfontcache.h
    graphics/rbimage.cpp
    graphics/rbimage.h
    graphics/rbmovable.cpp
    graphics/rbmovable.h
    graphics/rbprogressbar.cpp
    graphics/rbprogressbar.h
    graphics/rbrenderinfo.cpp
    graphics/rbrenderinfo.h
    graphics/rbscene.cpp
    graphics/rbscene.h
    graphics/rbscreen.cpp
    graphics/rbscreen.h
    graphics/rbtext.cpp
    graphics/rbtext.h
    graphics/rbtextcache.cpp
    graphics/rbtextcache.h
    graphics/rbtoucharea.cpp
    graphics/rbtoucharea.h
    graphics/rbviewport.cpp
    graphics/rbviewport.h
    gui/codeeditor.cpp
    gui/codeeditor.h
    gui/configdocument.cpp
    gui/configdocument.h
    gui/configdocument.ui
    gui/devicestate.cpp
    gui/devicestate.h
    gui/editorwindow.cpp
    gui/editorwindow.h
    gui/editorwindow.ui
    gui/fontdownloader.cpp
    gui/fontdownloader.h
    gui/fontdownloader.ui
    gui/newprojectdialog.cpp
    gui/newprojectdialog.h
    gui/newprojectdialog.ui
    gui/preferencesdialog.cpp
    gui/preferencesdialog.h
    gui/preferencesdialog.ui
    gui/projectexporter.cpp
    gui/projectexporter.h
    gui/projectexporter.ui
    gui/rbconsole.cpp
    gui/rbconsole.h
    gui/rbconsole.ui
    gui/skindocument.cpp
    gui/skindocument.h
    gui/skinhighlighter.cpp
    gui/skinhighlighter.h
    gui/skintimer.cpp
    gui/skintimer.h
    gui/skintimer.ui
    gui/skinviewer.cpp
    gui/skinviewer.h
    gui/skinviewer.ui
    gui/syntaxcompleter.cpp
    gui/syntaxcompleter.h
    gui/tabcontent.h
    gui/targetdownloader.cpp
    gui/targetdownloader.h
    gui/targetdownloader.ui
    main.cpp
    models/parsetreemodel.cpp
    models/parsetreemodel.h
    models/parsetreenode.cpp
    models/parsetreenode.h
    models/projectmodel.cpp
    models/projectmodel.h
    models/targetdata.cpp
    models/targetdata.h
    qtfindreplacedialog/finddialog.cpp
    qtfindreplacedialog/finddialog.h
    qtfindreplacedialog/findform.cpp
    qtfindreplacedialog/findform.h
    qtfindreplacedialog/findreplace_global.h
    qtfindreplacedialog/findreplacedialog.cpp
    qtfindreplacedialog/findreplacedialog.h
    qtfindreplacedialog/findreplacedialog.ui
    qtfindreplacedialog/findreplaceform.cpp
    qtfindreplacedialog/findreplaceform.h
    qtfindreplacedialog/findreplaceform.ui
    qtfindreplacedialog/varianteditor.cpp
    qtfindreplacedialog/varianteditor.h
    resources.qrc
    themeeditor.rc
    )
set_target_properties(RockboxThemeEditor PROPERTIES AUTOMOC ON)
set_target_properties(RockboxThemeEditor PROPERTIES AUTORCC ON)
set_target_properties(RockboxThemeEditor PROPERTIES AUTOUIC ON)

target_link_libraries(RockboxThemeEditor
    Qt${QT_VERSION_MAJOR}::Network Qt${QT_VERSION_MAJOR}::Widgets Qt${QT_VERSION_MAJOR}::Core
    skin_parser z ${QUAZIP_LIBRARY})
target_include_directories(RockboxThemeEditor PRIVATE models graphics gui qtfindreplacedialog quazip)
target_compile_definitions(RockboxThemeEditor PRIVATE FINDREPLACE_NOLIB)

if(APPLE)
    # MacOS Application Bundle specifics.
    target_sources(RockboxThemeEditor PRIVATE
        ${CMAKE_CURRENT_LIST_DIR}/resources/windowicon.icns)
    set_target_properties(RockboxThemeEditor
        PROPERTIES MACOSX_BUNDLE_INFO_PLIST ${CMAKE_CURRENT_LIST_DIR}/Info.plist)
    set_source_files_properties(${CMAKE_CURRENT_LIST_DIR}/resources/windowicon.icns
        PROPERTIES MACOSX_PACKAGE_LOCATION Resources)
endif()

deploy_qt(TARGET RockboxThemeEditor
    QTBINDIR ${QT_BINDIR}
    ICONFILE ${CMAKE_CURRENT_LIST_DIR}/resources/rbthemeeditor.svg
    DESKTOPFILE ${CMAKE_CURRENT_LIST_DIR}/RockboxThemeEditor.desktop
    DMGBUILDCFG ${CMAKE_CURRENT_LIST_DIR}/dmgbuild.cfg)