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