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