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