Mercurial > minori
annotate CMakeLists.txt @ 48:e613772f41d5
statistics.cpp: show requests made
author | Paper <mrpapersonic@gmail.com> |
---|---|
date | Mon, 25 Sep 2023 01:07:22 -0400 |
parents | d8eb763e6661 |
children | 75c804f713b2 |
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) |
11 | |
12 | 12 # Fix for mingw64 |
13 list(APPEND CMAKE_FIND_LIBRARY_SUFFIXES ".dll.a" ".a") | |
14 | |
15 find_package(Qt5 COMPONENTS Widgets REQUIRED) | |
16 find_package(CURL REQUIRED) | |
17 | |
18 set(LIBRARIES | |
19 ${Qt5Widgets_LIBRARIES} | |
20 ${CURL_LIBRARIES} | |
21 anitomy | |
22 ) | |
23 | |
24 # We need Cocoa for some OS X stuff | |
25 if(APPLE) | |
26 find_library(COCOA_LIBRARY Cocoa) | |
27 list(APPEND LIBRARIES ${COCOA_LIBRARY}) | |
28 endif() | |
29 | |
2 | 30 set(SRC_FILES |
9 | 31 # Main entrypoint |
2 | 32 src/main.cpp |
9 | 33 |
34 # Core files and datatype declarations... | |
35 src/core/anime.cpp | |
36 src/core/anime_db.cpp | |
37 src/core/config.cpp | |
38 src/core/date.cpp | |
39 src/core/filesystem.cpp | |
40 src/core/json.cpp | |
41 src/core/strings.cpp | |
42 src/core/time.cpp | |
43 | |
46 | 44 # Main window |
9 | 45 src/gui/window.cpp |
46 | 46 src/gui/dark_theme.cpp |
47 | |
48 # Main window pages | |
49 src/gui/pages/anime_list.cpp | |
50 src/gui/pages/now_playing.cpp | |
51 src/gui/pages/statistics.cpp | |
52 | |
53 # Custom widgets | |
54 src/gui/widgets/sidebar.cpp | |
55 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
|
56 src/gui/widgets/optional_date.cpp |
9 | 57 |
58 # Dialogs | |
59 src/gui/dialog/information.cpp | |
60 src/gui/dialog/settings.cpp | |
61 src/gui/dialog/settings/application.cpp | |
62 src/gui/dialog/settings/services.cpp | |
63 | |
10 | 64 # Translate |
65 src/gui/translate/anime.cpp | |
15 | 66 src/gui/translate/anilist.cpp |
10 | 67 |
9 | 68 # Services (only AniList for now) |
10 | 69 src/services/services.cpp |
9 | 70 src/services/anilist.cpp |
71 | |
72 # Qt resources | |
2 | 73 rc/icons.qrc |
74 dep/darkstyle/darkstyle.qrc | |
75 ) | |
76 | |
9 | 77 if(APPLE) # Mac OS X (or OS X (or macOS)) |
5 | 78 list(APPEND SRC_FILES |
79 src/sys/osx/dark_theme.mm | |
80 src/sys/osx/filesystem.mm | |
81 ) | |
9 | 82 elseif(WIN32) # Windows |
2 | 83 list(APPEND SRC_FILES src/sys/win32/dark_theme.cpp) |
84 endif() | |
85 | |
47
d8eb763e6661
information.cpp: add widgets to the list tab, and add an
Paper <mrpapersonic@gmail.com>
parents:
46
diff
changeset
|
86 add_executable(minori WIN32 ${SRC_FILES}) |
d8eb763e6661
information.cpp: add widgets to the list tab, and add an
Paper <mrpapersonic@gmail.com>
parents:
46
diff
changeset
|
87 # There's a bug in JFMC++ that keeps me from setting this to C++11. |
d8eb763e6661
information.cpp: add widgets to the list tab, and add an
Paper <mrpapersonic@gmail.com>
parents:
46
diff
changeset
|
88 set_property(TARGET minori PROPERTY CXX_STANDARD 17) |
11 | 89 set_property(TARGET minori PROPERTY AUTOMOC ON) |
90 set_property(TARGET minori PROPERTY AUTORCC ON) | |
2 | 91 |
12 | 92 target_include_directories(minori PUBLIC ${Qt5Widgets_INCLUDE_DIRS} ${CURL_INCLUDE_DIRS} PRIVATE include) |
11 | 93 target_compile_options(minori PRIVATE -Wall -Wextra -Wsuggest-override) |
5 | 94 if(APPLE) |
11 | 95 target_compile_definitions(minori PUBLIC MACOSX) |
9 | 96 elseif(WIN32) |
11 | 97 target_compile_definitions(minori PUBLIC WIN32) |
5 | 98 endif() |
11 | 99 target_link_libraries(minori ${LIBRARIES}) |