annotate CMakeLists.txt @ 9:5c0397762b53

INCOMPLETE: megacommit :)
author Paper <mrpapersonic@gmail.com>
date Sun, 10 Sep 2023 03:59:16 -0400
parents 07a9095eaeed
children 4b198a111713
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
5
51ae25154b70 Fix OS X support code
Paper <mrpapersonic@gmail.com>
parents: 4
diff changeset
1 cmake_minimum_required(VERSION 3.16)
51ae25154b70 Fix OS X support code
Paper <mrpapersonic@gmail.com>
parents: 4
diff changeset
2 project(weeaboo LANGUAGES CXX OBJCXX)
2
Paper <mrpapersonic@gmail.com>
parents: 1
diff changeset
3
9
5c0397762b53 INCOMPLETE: megacommit :)
Paper <mrpapersonic@gmail.com>
parents: 7
diff changeset
4 add_subdirectory(dep/anitomy)
5c0397762b53 INCOMPLETE: megacommit :)
Paper <mrpapersonic@gmail.com>
parents: 7
diff changeset
5
2
Paper <mrpapersonic@gmail.com>
parents: 1
diff changeset
6 set(SRC_FILES
9
5c0397762b53 INCOMPLETE: megacommit :)
Paper <mrpapersonic@gmail.com>
parents: 7
diff changeset
7 # Main entrypoint
2
Paper <mrpapersonic@gmail.com>
parents: 1
diff changeset
8 src/main.cpp
9
5c0397762b53 INCOMPLETE: megacommit :)
Paper <mrpapersonic@gmail.com>
parents: 7
diff changeset
9
5c0397762b53 INCOMPLETE: megacommit :)
Paper <mrpapersonic@gmail.com>
parents: 7
diff changeset
10 # Core files and datatype declarations...
5c0397762b53 INCOMPLETE: megacommit :)
Paper <mrpapersonic@gmail.com>
parents: 7
diff changeset
11 src/core/anime.cpp
5c0397762b53 INCOMPLETE: megacommit :)
Paper <mrpapersonic@gmail.com>
parents: 7
diff changeset
12 src/core/anime_db.cpp
5c0397762b53 INCOMPLETE: megacommit :)
Paper <mrpapersonic@gmail.com>
parents: 7
diff changeset
13 src/core/config.cpp
5c0397762b53 INCOMPLETE: megacommit :)
Paper <mrpapersonic@gmail.com>
parents: 7
diff changeset
14 src/core/date.cpp
5c0397762b53 INCOMPLETE: megacommit :)
Paper <mrpapersonic@gmail.com>
parents: 7
diff changeset
15 src/core/filesystem.cpp
5c0397762b53 INCOMPLETE: megacommit :)
Paper <mrpapersonic@gmail.com>
parents: 7
diff changeset
16 src/core/json.cpp
5c0397762b53 INCOMPLETE: megacommit :)
Paper <mrpapersonic@gmail.com>
parents: 7
diff changeset
17 src/core/strings.cpp
5c0397762b53 INCOMPLETE: megacommit :)
Paper <mrpapersonic@gmail.com>
parents: 7
diff changeset
18 src/core/time.cpp
5c0397762b53 INCOMPLETE: megacommit :)
Paper <mrpapersonic@gmail.com>
parents: 7
diff changeset
19
5c0397762b53 INCOMPLETE: megacommit :)
Paper <mrpapersonic@gmail.com>
parents: 7
diff changeset
20 # GUI stuff
5c0397762b53 INCOMPLETE: megacommit :)
Paper <mrpapersonic@gmail.com>
parents: 7
diff changeset
21 src/gui/window.cpp
5c0397762b53 INCOMPLETE: megacommit :)
Paper <mrpapersonic@gmail.com>
parents: 7
diff changeset
22 src/gui/sidebar.cpp
5c0397762b53 INCOMPLETE: megacommit :)
Paper <mrpapersonic@gmail.com>
parents: 7
diff changeset
23 src/gui/ui_utils.cpp
5c0397762b53 INCOMPLETE: megacommit :)
Paper <mrpapersonic@gmail.com>
parents: 7
diff changeset
24
5c0397762b53 INCOMPLETE: megacommit :)
Paper <mrpapersonic@gmail.com>
parents: 7
diff changeset
25 # Dialogs
5c0397762b53 INCOMPLETE: megacommit :)
Paper <mrpapersonic@gmail.com>
parents: 7
diff changeset
26 src/gui/dialog/information.cpp
5c0397762b53 INCOMPLETE: megacommit :)
Paper <mrpapersonic@gmail.com>
parents: 7
diff changeset
27 src/gui/dialog/settings.cpp
5c0397762b53 INCOMPLETE: megacommit :)
Paper <mrpapersonic@gmail.com>
parents: 7
diff changeset
28 src/gui/dialog/settings/application.cpp
5c0397762b53 INCOMPLETE: megacommit :)
Paper <mrpapersonic@gmail.com>
parents: 7
diff changeset
29 src/gui/dialog/settings/services.cpp
5c0397762b53 INCOMPLETE: megacommit :)
Paper <mrpapersonic@gmail.com>
parents: 7
diff changeset
30
5c0397762b53 INCOMPLETE: megacommit :)
Paper <mrpapersonic@gmail.com>
parents: 7
diff changeset
31 # Main window pages
5c0397762b53 INCOMPLETE: megacommit :)
Paper <mrpapersonic@gmail.com>
parents: 7
diff changeset
32 src/gui/pages/anime_list.cpp
5c0397762b53 INCOMPLETE: megacommit :)
Paper <mrpapersonic@gmail.com>
parents: 7
diff changeset
33 src/gui/pages/now_playing.cpp
5c0397762b53 INCOMPLETE: megacommit :)
Paper <mrpapersonic@gmail.com>
parents: 7
diff changeset
34 src/gui/pages/statistics.cpp
5c0397762b53 INCOMPLETE: megacommit :)
Paper <mrpapersonic@gmail.com>
parents: 7
diff changeset
35
5c0397762b53 INCOMPLETE: megacommit :)
Paper <mrpapersonic@gmail.com>
parents: 7
diff changeset
36 # Services (only AniList for now)
5c0397762b53 INCOMPLETE: megacommit :)
Paper <mrpapersonic@gmail.com>
parents: 7
diff changeset
37 src/services/anilist.cpp
5c0397762b53 INCOMPLETE: megacommit :)
Paper <mrpapersonic@gmail.com>
parents: 7
diff changeset
38
5c0397762b53 INCOMPLETE: megacommit :)
Paper <mrpapersonic@gmail.com>
parents: 7
diff changeset
39 # Qt resources
2
Paper <mrpapersonic@gmail.com>
parents: 1
diff changeset
40 rc/icons.qrc
Paper <mrpapersonic@gmail.com>
parents: 1
diff changeset
41 dep/darkstyle/darkstyle.qrc
Paper <mrpapersonic@gmail.com>
parents: 1
diff changeset
42 )
Paper <mrpapersonic@gmail.com>
parents: 1
diff changeset
43
9
5c0397762b53 INCOMPLETE: megacommit :)
Paper <mrpapersonic@gmail.com>
parents: 7
diff changeset
44 if(APPLE) # Mac OS X (or OS X (or macOS))
5
51ae25154b70 Fix OS X support code
Paper <mrpapersonic@gmail.com>
parents: 4
diff changeset
45 list(APPEND SRC_FILES
51ae25154b70 Fix OS X support code
Paper <mrpapersonic@gmail.com>
parents: 4
diff changeset
46 src/sys/osx/dark_theme.mm
51ae25154b70 Fix OS X support code
Paper <mrpapersonic@gmail.com>
parents: 4
diff changeset
47 src/sys/osx/filesystem.mm
51ae25154b70 Fix OS X support code
Paper <mrpapersonic@gmail.com>
parents: 4
diff changeset
48 )
9
5c0397762b53 INCOMPLETE: megacommit :)
Paper <mrpapersonic@gmail.com>
parents: 7
diff changeset
49 elseif(WIN32) # Windows
2
Paper <mrpapersonic@gmail.com>
parents: 1
diff changeset
50 list(APPEND SRC_FILES src/sys/win32/dark_theme.cpp)
Paper <mrpapersonic@gmail.com>
parents: 1
diff changeset
51 endif()
Paper <mrpapersonic@gmail.com>
parents: 1
diff changeset
52
9
5c0397762b53 INCOMPLETE: megacommit :)
Paper <mrpapersonic@gmail.com>
parents: 7
diff changeset
53 add_executable(weeaboo ${SRC_FILES})
2
Paper <mrpapersonic@gmail.com>
parents: 1
diff changeset
54 set_property(TARGET weeaboo PROPERTY CXX_STANDARD 20)
Paper <mrpapersonic@gmail.com>
parents: 1
diff changeset
55 set_property(TARGET weeaboo PROPERTY AUTOMOC ON)
Paper <mrpapersonic@gmail.com>
parents: 1
diff changeset
56 set_property(TARGET weeaboo PROPERTY AUTORCC ON)
Paper <mrpapersonic@gmail.com>
parents: 1
diff changeset
57
Paper <mrpapersonic@gmail.com>
parents: 1
diff changeset
58 find_package(Qt5 COMPONENTS Widgets REQUIRED)
Paper <mrpapersonic@gmail.com>
parents: 1
diff changeset
59 find_package(CURL REQUIRED)
5
51ae25154b70 Fix OS X support code
Paper <mrpapersonic@gmail.com>
parents: 4
diff changeset
60
51ae25154b70 Fix OS X support code
Paper <mrpapersonic@gmail.com>
parents: 4
diff changeset
61 set(LIBRARIES
51ae25154b70 Fix OS X support code
Paper <mrpapersonic@gmail.com>
parents: 4
diff changeset
62 ${Qt5Widgets_LIBRARIES}
51ae25154b70 Fix OS X support code
Paper <mrpapersonic@gmail.com>
parents: 4
diff changeset
63 ${CURL_LIBRARIES}
9
5c0397762b53 INCOMPLETE: megacommit :)
Paper <mrpapersonic@gmail.com>
parents: 7
diff changeset
64 anitomy
5
51ae25154b70 Fix OS X support code
Paper <mrpapersonic@gmail.com>
parents: 4
diff changeset
65 )
51ae25154b70 Fix OS X support code
Paper <mrpapersonic@gmail.com>
parents: 4
diff changeset
66
51ae25154b70 Fix OS X support code
Paper <mrpapersonic@gmail.com>
parents: 4
diff changeset
67 if(APPLE)
51ae25154b70 Fix OS X support code
Paper <mrpapersonic@gmail.com>
parents: 4
diff changeset
68 find_library(COCOA_LIBRARY Cocoa)
51ae25154b70 Fix OS X support code
Paper <mrpapersonic@gmail.com>
parents: 4
diff changeset
69 list(APPEND LIBRARIES ${COCOA_LIBRARY})
51ae25154b70 Fix OS X support code
Paper <mrpapersonic@gmail.com>
parents: 4
diff changeset
70 endif()
51ae25154b70 Fix OS X support code
Paper <mrpapersonic@gmail.com>
parents: 4
diff changeset
71
9
5c0397762b53 INCOMPLETE: megacommit :)
Paper <mrpapersonic@gmail.com>
parents: 7
diff changeset
72 target_include_directories(weeaboo PUBLIC ${Qt5Widgets_INCLUDE_DIRS} ${CURL_INCLUDE_DIRS} PRIVATE include)
4
5af270662505 Set override functions as override
Paper <mrpapersonic@gmail.com>
parents: 3
diff changeset
73 target_compile_options(weeaboo PRIVATE -Wall -Wextra -Wsuggest-override)
5
51ae25154b70 Fix OS X support code
Paper <mrpapersonic@gmail.com>
parents: 4
diff changeset
74 if(APPLE)
51ae25154b70 Fix OS X support code
Paper <mrpapersonic@gmail.com>
parents: 4
diff changeset
75 target_compile_definitions(weeaboo PUBLIC MACOSX)
9
5c0397762b53 INCOMPLETE: megacommit :)
Paper <mrpapersonic@gmail.com>
parents: 7
diff changeset
76 elseif(WIN32)
5c0397762b53 INCOMPLETE: megacommit :)
Paper <mrpapersonic@gmail.com>
parents: 7
diff changeset
77 target_compile_definitions(weeaboo PUBLIC WIN32)
5
51ae25154b70 Fix OS X support code
Paper <mrpapersonic@gmail.com>
parents: 4
diff changeset
78 endif()
51ae25154b70 Fix OS X support code
Paper <mrpapersonic@gmail.com>
parents: 4
diff changeset
79 target_link_libraries(weeaboo ${LIBRARIES})