5
|
1 cmake_minimum_required(VERSION 3.16)
|
11
|
2 project(minori LANGUAGES CXX OBJCXX)
|
2
|
3
|
9
|
4 add_subdirectory(dep/anitomy)
|
|
5
|
2
|
6 set(SRC_FILES
|
9
|
7 # Main entrypoint
|
2
|
8 src/main.cpp
|
9
|
9
|
|
10 # Core files and datatype declarations...
|
|
11 src/core/anime.cpp
|
|
12 src/core/anime_db.cpp
|
|
13 src/core/config.cpp
|
|
14 src/core/date.cpp
|
|
15 src/core/filesystem.cpp
|
|
16 src/core/json.cpp
|
|
17 src/core/strings.cpp
|
|
18 src/core/time.cpp
|
|
19
|
|
20 # GUI stuff
|
|
21 src/gui/window.cpp
|
|
22 src/gui/sidebar.cpp
|
|
23 src/gui/ui_utils.cpp
|
|
24
|
|
25 # Dialogs
|
|
26 src/gui/dialog/information.cpp
|
|
27 src/gui/dialog/settings.cpp
|
|
28 src/gui/dialog/settings/application.cpp
|
|
29 src/gui/dialog/settings/services.cpp
|
|
30
|
|
31 # Main window pages
|
|
32 src/gui/pages/anime_list.cpp
|
|
33 src/gui/pages/now_playing.cpp
|
|
34 src/gui/pages/statistics.cpp
|
|
35
|
10
|
36 # Translate
|
|
37 src/gui/translate/anime.cpp
|
|
38
|
9
|
39 # Services (only AniList for now)
|
10
|
40 src/services/services.cpp
|
9
|
41 src/services/anilist.cpp
|
|
42
|
|
43 # Qt resources
|
2
|
44 rc/icons.qrc
|
|
45 dep/darkstyle/darkstyle.qrc
|
|
46 )
|
|
47
|
9
|
48 if(APPLE) # Mac OS X (or OS X (or macOS))
|
5
|
49 list(APPEND SRC_FILES
|
|
50 src/sys/osx/dark_theme.mm
|
|
51 src/sys/osx/filesystem.mm
|
|
52 )
|
9
|
53 elseif(WIN32) # Windows
|
2
|
54 list(APPEND SRC_FILES src/sys/win32/dark_theme.cpp)
|
|
55 endif()
|
|
56
|
11
|
57 add_executable(minori ${SRC_FILES})
|
|
58 set_property(TARGET minori PROPERTY CXX_STANDARD 11)
|
|
59 set_property(TARGET minori PROPERTY AUTOMOC ON)
|
|
60 set_property(TARGET minori PROPERTY AUTORCC ON)
|
2
|
61
|
10
|
62 find_package(Qt5 COMPONENTS Widgets Test REQUIRED)
|
2
|
63 find_package(CURL REQUIRED)
|
5
|
64
|
|
65 set(LIBRARIES
|
|
66 ${Qt5Widgets_LIBRARIES}
|
10
|
67 ${Qt5Test_LIBRARIES}
|
5
|
68 ${CURL_LIBRARIES}
|
9
|
69 anitomy
|
5
|
70 )
|
|
71
|
|
72 if(APPLE)
|
|
73 find_library(COCOA_LIBRARY Cocoa)
|
|
74 list(APPEND LIBRARIES ${COCOA_LIBRARY})
|
|
75 endif()
|
|
76
|
11
|
77 target_include_directories(minori PUBLIC ${Qt5Widgets_INCLUDE_DIRS} ${Qt5Test_INCLUDE_DIRS} ${CURL_INCLUDE_DIRS} PRIVATE include)
|
|
78 target_compile_options(minori PRIVATE -Wall -Wextra -Wsuggest-override)
|
5
|
79 if(APPLE)
|
11
|
80 target_compile_definitions(minori PUBLIC MACOSX)
|
9
|
81 elseif(WIN32)
|
11
|
82 target_compile_definitions(minori PUBLIC WIN32)
|
5
|
83 endif()
|
11
|
84 target_link_libraries(minori ${LIBRARIES})
|