Mercurial > minori
annotate CMakeLists.txt @ 63:3d2decf093bb
*: fix many clang warnings
author | Paper <mrpapersonic@gmail.com> |
---|---|
date | Sun, 01 Oct 2023 06:39:47 -0400 |
parents | 4c6dd5999b39 |
children | fe719c109dbc |
rev | line source |
---|---|
5 | 1 cmake_minimum_required(VERSION 3.16) |
17
db445ce42057
cmake: only enable OBJCXX on OS X
Paper <mrpapersonic@gmail.com>
parents:
15
diff
changeset
|
2 project(minori LANGUAGES CXX) |
db445ce42057
cmake: only enable OBJCXX on OS X
Paper <mrpapersonic@gmail.com>
parents:
15
diff
changeset
|
3 |
47
d8eb763e6661
information.cpp: add widgets to the list tab, and add an
Paper <mrpapersonic@gmail.com>
parents:
46
diff
changeset
|
4 # this should check for the target system, rather than |
d8eb763e6661
information.cpp: add widgets to the list tab, and add an
Paper <mrpapersonic@gmail.com>
parents:
46
diff
changeset
|
5 # the host system, for cross-compiling purposes |
17
db445ce42057
cmake: only enable OBJCXX on OS X
Paper <mrpapersonic@gmail.com>
parents:
15
diff
changeset
|
6 if(APPLE) |
db445ce42057
cmake: only enable OBJCXX on OS X
Paper <mrpapersonic@gmail.com>
parents:
15
diff
changeset
|
7 enable_language(OBJCXX) |
db445ce42057
cmake: only enable OBJCXX on OS X
Paper <mrpapersonic@gmail.com>
parents:
15
diff
changeset
|
8 endif() |
2 | 9 |
9 | 10 add_subdirectory(dep/anitomy) |
62 | 11 # add_subdirectory(dep/animia) |
55
d10b6c6b432e
add xml lib, we will need to use it eventually
Paper <mrpapersonic@gmail.com>
parents:
54
diff
changeset
|
12 add_subdirectory(dep/pugixml) |
9 | 13 |
12 | 14 # Fix for mingw64 |
15 list(APPEND CMAKE_FIND_LIBRARY_SUFFIXES ".dll.a" ".a") | |
16 | |
62 | 17 if(USE_QT6) |
18 find_package(Qt6 COMPONENTS Widgets REQUIRED) | |
19 else() | |
20 find_package(Qt5 COMPONENTS Widgets REQUIRED) | |
21 endif() | |
12 | 22 find_package(CURL REQUIRED) |
23 | |
24 set(LIBRARIES | |
25 ${CURL_LIBRARIES} | |
26 anitomy | |
27 ) | |
28 | |
62 | 29 if(USE_QT6) |
30 list(APPEND LIBRARIES ${Qt6Widgets_LIBRARIES}) | |
31 else() | |
32 list(APPEND LIBRARIES ${Qt5Widgets_LIBRARIES}) | |
33 endif() | |
34 | |
12 | 35 # We need Cocoa for some OS X stuff |
36 if(APPLE) | |
37 find_library(COCOA_LIBRARY Cocoa) | |
38 list(APPEND LIBRARIES ${COCOA_LIBRARY}) | |
39 endif() | |
40 | |
2 | 41 set(SRC_FILES |
9 | 42 # Main entrypoint |
2 | 43 src/main.cpp |
9 | 44 |
45 # Core files and datatype declarations... | |
46 src/core/anime.cpp | |
47 src/core/anime_db.cpp | |
48 src/core/config.cpp | |
49 src/core/date.cpp | |
50 src/core/filesystem.cpp | |
51 src/core/json.cpp | |
52 src/core/strings.cpp | |
53 src/core/time.cpp | |
54 | |
46 | 55 # Main window |
9 | 56 src/gui/window.cpp |
46 | 57 src/gui/dark_theme.cpp |
58 | |
59 # Main window pages | |
60 src/gui/pages/anime_list.cpp | |
61 src/gui/pages/now_playing.cpp | |
62 src/gui/pages/statistics.cpp | |
54
466ac9870df9
add stub pages (to be implemented)
Paper <mrpapersonic@gmail.com>
parents:
51
diff
changeset
|
63 src/gui/pages/search.cpp |
466ac9870df9
add stub pages (to be implemented)
Paper <mrpapersonic@gmail.com>
parents:
51
diff
changeset
|
64 src/gui/pages/seasons.cpp |
466ac9870df9
add stub pages (to be implemented)
Paper <mrpapersonic@gmail.com>
parents:
51
diff
changeset
|
65 src/gui/pages/torrents.cpp |
466ac9870df9
add stub pages (to be implemented)
Paper <mrpapersonic@gmail.com>
parents:
51
diff
changeset
|
66 src/gui/pages/history.cpp |
466ac9870df9
add stub pages (to be implemented)
Paper <mrpapersonic@gmail.com>
parents:
51
diff
changeset
|
67 |
46 | 68 |
69 # Custom widgets | |
70 src/gui/widgets/sidebar.cpp | |
71 src/gui/widgets/text.cpp | |
47
d8eb763e6661
information.cpp: add widgets to the list tab, and add an
Paper <mrpapersonic@gmail.com>
parents:
46
diff
changeset
|
72 src/gui/widgets/optional_date.cpp |
9 | 73 |
74 # Dialogs | |
51 | 75 src/gui/dialog/about.cpp |
9 | 76 src/gui/dialog/information.cpp |
77 src/gui/dialog/settings.cpp | |
78 src/gui/dialog/settings/application.cpp | |
79 src/gui/dialog/settings/services.cpp | |
80 | |
10 | 81 # Translate |
82 src/gui/translate/anime.cpp | |
15 | 83 src/gui/translate/anilist.cpp |
10 | 84 |
9 | 85 # Services (only AniList for now) |
10 | 86 src/services/services.cpp |
9 | 87 src/services/anilist.cpp |
88 | |
89 # Qt resources | |
2 | 90 rc/icons.qrc |
91 dep/darkstyle/darkstyle.qrc | |
92 ) | |
93 | |
9 | 94 if(APPLE) # Mac OS X (or OS X (or macOS)) |
5 | 95 list(APPEND SRC_FILES |
96 src/sys/osx/dark_theme.mm | |
97 src/sys/osx/filesystem.mm | |
98 ) | |
9 | 99 elseif(WIN32) # Windows |
2 | 100 list(APPEND SRC_FILES src/sys/win32/dark_theme.cpp) |
101 endif() | |
102 | |
51 | 103 add_executable(minori ${SRC_FILES}) |
63 | 104 set_property(TARGET minori PROPERTY CXX_STANDARD 11) |
11 | 105 set_property(TARGET minori PROPERTY AUTOMOC ON) |
106 set_property(TARGET minori PROPERTY AUTORCC ON) | |
2 | 107 |
62 | 108 target_include_directories(minori PUBLIC ${CURL_INCLUDE_DIRS} PRIVATE include dep/pugixml/src dep/animia/include) |
109 if(USE_QT6) | |
110 target_include_directories(minori PUBLIC ${Qt6Widgets_INCLUDE_DIRS}) | |
111 else() | |
112 target_include_directories(minori PUBLIC ${Qt5Widgets_INCLUDE_DIRS}) | |
113 endif() | |
63 | 114 target_compile_options(minori PRIVATE -Wall -Wpedantic -Wextra -Wsuggest-override) |
5 | 115 if(APPLE) |
11 | 116 target_compile_definitions(minori PUBLIC MACOSX) |
9 | 117 elseif(WIN32) |
11 | 118 target_compile_definitions(minori PUBLIC WIN32) |
5 | 119 endif() |
11 | 120 target_link_libraries(minori ${LIBRARIES}) |