forked from KikoPlayProject/KikoPlay
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCMakeLists.txt
230 lines (213 loc) · 6.04 KB
/
CMakeLists.txt
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
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
cmake_minimum_required(VERSION 3.16.0)
# If QT is installed in your system, it can be FALSE
option(USE_VCPKG_QT "Use vcpkg to add QT dependency" ON)
if (USE_VCPKG_QT)
list(APPEND VCPKG_MANIFEST_FEATURES "qt-dependencies")
endif()
project(KikoPlay)
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
find_package(Qt5 COMPONENTS Widgets Core Gui Network Concurrent Sql REQUIRED)
find_package(ZLIB REQUIRED)
add_subdirectory(Script/lua)
add_executable(${PROJECT_NAME}
Common/counter.cpp
Common/logger.cpp
Common/notifier.cpp
Download/autodownloadmanager.cpp
Download/peermodel.cpp
Download/trackersubscriber.cpp
LANServer/apihandler.cpp
LANServer/dlna/upnpctrlpoint.cpp
LANServer/filehandler.cpp
LANServer/httpserver/httpconnectionhandler.cpp
LANServer/httpserver/httpconnectionhandlerpool.cpp
LANServer/httpserver/httpcookie.cpp
LANServer/httpserver/httpglobal.cpp
LANServer/httpserver/httplistener.cpp
LANServer/httpserver/httprequest.cpp
LANServer/httpserver/httprequesthandler.cpp
LANServer/httpserver/httpresponse.cpp
LANServer/httpserver/httpsession.cpp
LANServer/httpserver/httpsessionstore.cpp
LANServer/httpserver/staticfilecontroller.cpp
LANServer/router.cpp
MediaLibrary/animeinfo.cpp
MediaLibrary/animelistmodel.cpp
MediaLibrary/animeprovider.cpp
MediaLibrary/episodeitem.cpp
MediaLibrary/tagnode.cpp
Play/Danmu/danmuprovider.cpp
Play/Danmu/eventanalyzer.cpp
Play/Video/mpvpreview.cpp
Play/Video/simpleplayer.cpp
Script/bgmcalendarscript.cpp
Script/danmuscript.cpp
Script/libraryscript.cpp
Script/luatablemodel.cpp
Script/modules/lua_htmlparser.cpp
Script/modules/lua_net.cpp
Script/modules/lua_regex.cpp
Script/modules/lua_util.cpp
Script/modules/lua_xmlreader.cpp
Script/modules/modulebase.cpp
Script/playgroundscript.cpp
Script/resourcescript.cpp
Script/scriptbase.cpp
Script/scriptmanager.cpp
Script/scriptmodel.cpp
Script/scriptsettingmodel.cpp
UI/addpool.cpp
UI/addrule.cpp
UI/animebatchaction.cpp
UI/animedetailinfopage.cpp
UI/animeinfoeditor.cpp
UI/animesearch.cpp
UI/autodownloadwindow.cpp
UI/charactereditor.cpp
UI/danmulaunch.cpp
UI/danmuview.cpp
UI/dlnadiscover.cpp
UI/gifcapture.cpp
UI/inputdialog.cpp
UI/logwindow.cpp
UI/luatableviewer.cpp
UI/scriptplayground.cpp
UI/settings.cpp
UI/settings/downloadpage.cpp
UI/settings/lanserverpage.cpp
UI/settings/mpvpage.cpp
UI/settings/mpvshortcutpage.cpp
UI/settings/scriptpage.cpp
UI/settings/stylepage.cpp
UI/settings/settingpage.cpp
UI/snippetcapture.cpp
UI/stylemanager.cpp
UI/widgets/backgroundfadewidget.cpp
UI/widgets/backgroundwidget.cpp
UI/widgets/clickslider.cpp
UI/widgets/colorpicker.cpp
UI/widgets/colorslider.cpp
UI/widgets/danmustatiswidget.cpp
UI/widgets/dialogtip.cpp
UI/widgets/fonticonbutton.cpp
UI/widgets/loadingicon.cpp
main.cpp
UI/mainwindow.cpp
UI/framelesswindow.cpp
Play/Danmu/Layouts/bottomlayout.cpp
Play/Danmu/Layouts/rolllayout.cpp
Play/Danmu/Layouts/toplayout.cpp
Play/Danmu/danmupool.cpp
globalobjects.cpp
Play/Playlist/playlist.cpp
Play/Video/mpvplayer.cpp
UI/list.cpp
UI/player.cpp
UI/pooleditor.cpp
UI/framelessdialog.cpp
Play/Danmu/Provider/localprovider.cpp
UI/adddanmu.cpp
UI/matcheditor.cpp
UI/selectepisode.cpp
Play/Danmu/blocker.cpp
UI/blockeditor.cpp
UI/capture.cpp
UI/mediainfo.cpp
Play/Danmu/common.cpp
UI/about.cpp
Common/network.cpp
Common/htmlparsersax.cpp
MediaLibrary/animeitemdelegate.cpp
UI/librarywindow.cpp
MediaLibrary/episodesmodel.cpp
Download/util.cpp
Download/aria2jsonrpc.cpp
UI/widgets/dirselectwidget.cpp
Download/downloaditemdelegate.cpp
Download/downloadmodel.cpp
Download/torrent.cpp
UI/downloadwindow.cpp
UI/adduritask.cpp
UI/selecttorrentfile.cpp
UI/poolmanager.cpp
UI/checkupdate.cpp
Common/flowlayout.cpp
UI/timelineedit.cpp
LANServer/lanserver.cpp
Play/Playlist/playlistitem.cpp
Play/Playlist/playlistprivate.cpp
Play/Danmu/Render/cacheworker.cpp
Play/Danmu/Render/danmurender.cpp
Play/Danmu/Manager/danmumanager.cpp
Play/Danmu/Manager/nodeinfo.cpp
Play/Danmu/Manager/managermodel.cpp
MediaLibrary/animeworker.cpp
MediaLibrary/animemodel.cpp
MediaLibrary/labelmodel.cpp
MediaLibrary/animefilterproxymodel.cpp
MediaLibrary/labelitemdelegate.cpp
Download/BgmList/bgmlist.cpp
UI/bgmlistwindow.cpp
UI/ressearchwindow.cpp
Play/Danmu/Manager/pool.cpp
MediaLibrary/capturelistmodel.cpp
UI/captureview.cpp
UI/tip.cpp
res.qrc
kikoplay.rc
)
target_include_directories(${PROJECT_NAME}
PRIVATE
Common
Download
LANServer
MediaLibrary
Play
Script
UI
UI/settings/
.
)
set_target_properties(${PROJECT_NAME} PROPERTIES
WIN32_EXECUTABLE TRUE
MACOSX_BUNDLE TRUE
)
target_link_libraries(${PROJECT_NAME}
PRIVATE
ZLIB::ZLIB
Qt::Core
Qt::Gui
Qt::Widgets
Qt::Network
Qt::Concurrent
Qt::Sql
myLua53
)
if (WIN32)
target_compile_definitions(${PROJECT_NAME} PRIVATE UNICODE)
find_package(Qt5WinExtras CONFIG REQUIRED)
target_include_directories(${PROJECT_NAME}
PRIVATE
Play/Video
)
target_link_libraries(${PROJECT_NAME}
PRIVATE
Qt::WinExtras
${PROJECT_SOURCE_DIR}/lib/x64/libmpv.dll.lib
)
endif()
if (UNIX)
include(FindPkgConfig)
pkg_check_modules(mpv QUIET mpv)
if (NOT mpv_FOUND)
message(FATAL_ERROR "libmpv is not found in the system. Use 'sudo apt install libmpv-dev' to install(Ubuntu)")
endif()
target_link_libraries(${PROJECT_NAME}
PRIVATE
${mpv_LIBRARIES}
)
endif()