diff options
author | Dominik Riebeling <Dominik.Riebeling@gmail.com> | 2021-12-27 16:18:17 +0100 |
---|---|---|
committer | Dominik Riebeling <Dominik.Riebeling@gmail.com> | 2021-12-27 16:18:17 +0100 |
commit | 1ddc5a202d6986f5e981ce16c0fce6c49b767765 (patch) | |
tree | c7f3b49b4fe49b8de5fcfb31980711cea4ff381a | |
parent | 36cb0d4050a25182a1dd66bd8c894f457de96fc8 (diff) | |
download | rockbox-1ddc5a202d6986f5e981ce16c0fce6c49b767765.tar.gz rockbox-1ddc5a202d6986f5e981ce16c0fce6c49b767765.zip |
themeeditor: Convert to cmake.
Change-Id: Ib46842c157121c64cd0091118aa9b7e43d83b8b3
-rw-r--r-- | utils/CMakeLists.txt | 18 | ||||
-rw-r--r-- | utils/themeeditor/CMakeLists.txt | 149 |
2 files changed, 167 insertions, 0 deletions
diff --git a/utils/CMakeLists.txt b/utils/CMakeLists.txt index b487e78efe..6aa419ada2 100644 --- a/utils/CMakeLists.txt +++ b/utils/CMakeLists.txt | |||
@@ -333,6 +333,21 @@ add_library(rbtomcrypt | |||
333 | ) | 333 | ) |
334 | target_include_directories(rbtomcrypt PUBLIC ${CMAKE_CURRENT_LIST_DIR}/tomcrypt/src/headers) | 334 | target_include_directories(rbtomcrypt PUBLIC ${CMAKE_CURRENT_LIST_DIR}/tomcrypt/src/headers) |
335 | 335 | ||
336 | add_library(skin_parser | ||
337 | ${CMAKE_CURRENT_LIST_DIR}/../lib/skin_parser/skin_buffer.c | ||
338 | ${CMAKE_CURRENT_LIST_DIR}/../lib/skin_parser/skin_buffer.h | ||
339 | ${CMAKE_CURRENT_LIST_DIR}/../lib/skin_parser/skin_debug.c | ||
340 | ${CMAKE_CURRENT_LIST_DIR}/../lib/skin_parser/skin_debug.h | ||
341 | ${CMAKE_CURRENT_LIST_DIR}/../lib/skin_parser/skin_parser.c | ||
342 | ${CMAKE_CURRENT_LIST_DIR}/../lib/skin_parser/skin_parser.h | ||
343 | ${CMAKE_CURRENT_LIST_DIR}/../lib/skin_parser/skin_scan.c | ||
344 | ${CMAKE_CURRENT_LIST_DIR}/../lib/skin_parser/skin_scan.h | ||
345 | ${CMAKE_CURRENT_LIST_DIR}/../lib/skin_parser/symbols.h | ||
346 | ${CMAKE_CURRENT_LIST_DIR}/../lib/skin_parser/tag_table.c | ||
347 | ${CMAKE_CURRENT_LIST_DIR}/../lib/skin_parser/tag_table.h | ||
348 | ) | ||
349 | target_include_directories(skin_parser PUBLIC ${CMAKE_CURRENT_LIST_DIR}/../lib/skin_parser) | ||
350 | target_compile_definitions(skin_parser PUBLIC __PCTOOL__) | ||
336 | 351 | ||
337 | # target will always be build. File is only updated when contents change. | 352 | # target will always be build. File is only updated when contents change. |
338 | add_custom_target(gitversion.h | 353 | add_custom_target(gitversion.h |
@@ -349,4 +364,7 @@ add_dependencies(gitversion gitversion.h) | |||
349 | target_include_directories(gitversion INTERFACE ${CMAKE_CURRENT_BINARY_DIR}/gitversion) | 364 | target_include_directories(gitversion INTERFACE ${CMAKE_CURRENT_BINARY_DIR}/gitversion) |
350 | 365 | ||
351 | include(${CMAKE_CURRENT_LIST_DIR}/cmake/deploy.cmake) | 366 | include(${CMAKE_CURRENT_LIST_DIR}/cmake/deploy.cmake) |
367 | include(${CMAKE_CURRENT_LIST_DIR}/cmake/QtTest.cmake) | ||
352 | add_subdirectory(rbutilqt) | 368 | add_subdirectory(rbutilqt) |
369 | add_subdirectory(themeeditor) | ||
370 | |||
diff --git a/utils/themeeditor/CMakeLists.txt b/utils/themeeditor/CMakeLists.txt new file mode 100644 index 0000000000..e8e137cd4d --- /dev/null +++ b/utils/themeeditor/CMakeLists.txt | |||
@@ -0,0 +1,149 @@ | |||
1 | # | ||
2 | # __________ __ ___. | ||
3 | # Open \______ \ ____ ____ | | _\_ |__ _______ ___ | ||
4 | # Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / | ||
5 | # Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < | ||
6 | # Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ | ||
7 | # \/ \/ \/ \/ \/ | ||
8 | # | ||
9 | # All files in this archive are subject to the GNU General Public License. | ||
10 | # See the file COPYING in the source tree root for full license agreement. | ||
11 | # | ||
12 | # This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY | ||
13 | # KIND, either express or implied. | ||
14 | # | ||
15 | |||
16 | add_executable(RockboxThemeEditor | ||
17 | graphics/rbalbumart.cpp | ||
18 | graphics/rbalbumart.h | ||
19 | graphics/rbfont.cpp | ||
20 | graphics/rbfont.h | ||
21 | graphics/rbfontcache.cpp | ||
22 | graphics/rbfontcache.h | ||
23 | graphics/rbimage.cpp | ||
24 | graphics/rbimage.h | ||
25 | graphics/rbmovable.cpp | ||
26 | graphics/rbmovable.h | ||
27 | graphics/rbprogressbar.cpp | ||
28 | graphics/rbprogressbar.h | ||
29 | graphics/rbrenderinfo.cpp | ||
30 | graphics/rbrenderinfo.h | ||
31 | graphics/rbscene.cpp | ||
32 | graphics/rbscene.h | ||
33 | graphics/rbscreen.cpp | ||
34 | graphics/rbscreen.h | ||
35 | graphics/rbtext.cpp | ||
36 | graphics/rbtext.h | ||
37 | graphics/rbtextcache.cpp | ||
38 | graphics/rbtextcache.h | ||
39 | graphics/rbtoucharea.cpp | ||
40 | graphics/rbtoucharea.h | ||
41 | graphics/rbviewport.cpp | ||
42 | graphics/rbviewport.h | ||
43 | gui/codeeditor.cpp | ||
44 | gui/codeeditor.h | ||
45 | gui/configdocument.cpp | ||
46 | gui/configdocument.h | ||
47 | gui/configdocument.ui | ||
48 | gui/devicestate.cpp | ||
49 | gui/devicestate.h | ||
50 | gui/editorwindow.cpp | ||
51 | gui/editorwindow.h | ||
52 | gui/editorwindow.ui | ||
53 | gui/fontdownloader.cpp | ||
54 | gui/fontdownloader.h | ||
55 | gui/fontdownloader.ui | ||
56 | gui/newprojectdialog.cpp | ||
57 | gui/newprojectdialog.h | ||
58 | gui/newprojectdialog.ui | ||
59 | gui/preferencesdialog.cpp | ||
60 | gui/preferencesdialog.h | ||
61 | gui/preferencesdialog.ui | ||
62 | gui/projectexporter.cpp | ||
63 | gui/projectexporter.h | ||
64 | gui/projectexporter.ui | ||
65 | gui/rbconsole.cpp | ||
66 | gui/rbconsole.h | ||
67 | gui/rbconsole.ui | ||
68 | gui/skindocument.cpp | ||
69 | gui/skindocument.h | ||
70 | gui/skinhighlighter.cpp | ||
71 | gui/skinhighlighter.h | ||
72 | gui/skintimer.cpp | ||
73 | gui/skintimer.h | ||
74 | gui/skintimer.ui | ||
75 | gui/skinviewer.cpp | ||
76 | gui/skinviewer.h | ||
77 | gui/skinviewer.ui | ||
78 | gui/syntaxcompleter.cpp | ||
79 | gui/syntaxcompleter.h | ||
80 | gui/tabcontent.h | ||
81 | gui/targetdownloader.cpp | ||
82 | gui/targetdownloader.h | ||
83 | gui/targetdownloader.ui | ||
84 | main.cpp | ||
85 | models/parsetreemodel.cpp | ||
86 | models/parsetreemodel.h | ||
87 | models/parsetreenode.cpp | ||
88 | models/parsetreenode.h | ||
89 | models/projectmodel.cpp | ||
90 | models/projectmodel.h | ||
91 | models/targetdata.cpp | ||
92 | models/targetdata.h | ||
93 | qtfindreplacedialog/finddialog.cpp | ||
94 | qtfindreplacedialog/finddialog.h | ||
95 | qtfindreplacedialog/findform.cpp | ||
96 | qtfindreplacedialog/findform.h | ||
97 | qtfindreplacedialog/findreplace_global.h | ||
98 | qtfindreplacedialog/findreplacedialog.cpp | ||
99 | qtfindreplacedialog/findreplacedialog.h | ||
100 | qtfindreplacedialog/findreplacedialog.ui | ||
101 | qtfindreplacedialog/findreplaceform.cpp | ||
102 | qtfindreplacedialog/findreplaceform.h | ||
103 | qtfindreplacedialog/findreplaceform.ui | ||
104 | qtfindreplacedialog/varianteditor.cpp | ||
105 | qtfindreplacedialog/varianteditor.h | ||
106 | quazip/crypt.h | ||
107 | quazip/ioapi.c | ||
108 | quazip/ioapi.h | ||
109 | quazip/quazip.cpp | ||
110 | quazip/quazip.h | ||
111 | quazip/quazipfile.cpp | ||
112 | quazip/quazipfile.h | ||
113 | quazip/quazipfileinfo.h | ||
114 | quazip/quazipnewinfo.cpp | ||
115 | quazip/quazipnewinfo.h | ||
116 | quazip/unzip.c | ||
117 | quazip/unzip.h | ||
118 | quazip/zip.c | ||
119 | quazip/zip.h | ||
120 | zlib/zconf.h | ||
121 | zlib/zlib.h | ||
122 | resources.qrc | ||
123 | themeeditor.rc | ||
124 | ) | ||
125 | set_target_properties(RockboxThemeEditor PROPERTIES AUTOMOC ON) | ||
126 | set_target_properties(RockboxThemeEditor PROPERTIES AUTORCC ON) | ||
127 | set_target_properties(RockboxThemeEditor PROPERTIES AUTOUIC ON) | ||
128 | |||
129 | target_link_libraries(RockboxThemeEditor | ||
130 | Qt${QT_MAJOR_VERSION}::Network Qt${QT_MAJOR_VERSION}::Widgets Qt${QT_MAJOR_VERSION}::Core | ||
131 | skin_parser z) | ||
132 | target_include_directories(RockboxThemeEditor PRIVATE models graphics gui qtfindreplacedialog quazip) | ||
133 | target_compile_definitions(RockboxThemeEditor PRIVATE FINDREPLACE_NOLIB) | ||
134 | |||
135 | if(APPLE) | ||
136 | # MacOS Application Bundle specifics. | ||
137 | target_sources(RockboxThemeEditor PRIVATE | ||
138 | ${CMAKE_CURRENT_LIST_DIR}/resources/windowicon.icns) | ||
139 | set_target_properties(RockboxThemeEditor | ||
140 | PROPERTIES MACOSX_BUNDLE_INFO_PLIST ${CMAKE_CURRENT_LIST_DIR}/Info.plist) | ||
141 | set_source_files_properties(${CMAKE_CURRENT_LIST_DIR}/resources/windowicon.icns | ||
142 | PROPERTIES MACOSX_PACKAGE_LOCATION Resources) | ||
143 | endif() | ||
144 | |||
145 | deploy_qt(RockboxThemeEditor | ||
146 | ${QT_BINDIR} | ||
147 | ${CMAKE_CURRENT_LIST_DIR}/resources/rbthemeeditor.svg | ||
148 | ${CMAKE_CURRENT_LIST_DIR}/RockboxThemeEditor.desktop | ||
149 | ${CMAKE_CURRENT_LIST_DIR}/dmgbuild.cfg) | ||