Mercurial > minori
annotate CMakeLists.txt @ 46:d0adc4aedfc8
*: update...
this commit:
1. consolidates dark theme stuff to dark_theme.cpp
2. creates a new widgets folder to store all of our
custom widgets
3. creates the list settings page in the information
dialog, although much of it is nonfunctional: it
doesn't save, and the status doesn't even get filled
in... we'll fix this later!
| author | Paper <mrpapersonic@gmail.com> |
|---|---|
| date | Sat, 23 Sep 2023 01:02:15 -0400 |
| parents | db445ce42057 |
| children | d8eb763e6661 |
| 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 | |
| 46 | 42 # Main window |
| 9 | 43 src/gui/window.cpp |
| 46 | 44 src/gui/dark_theme.cpp |
| 45 | |
| 46 # Main window pages | |
| 47 src/gui/pages/anime_list.cpp | |
| 48 src/gui/pages/now_playing.cpp | |
| 49 src/gui/pages/statistics.cpp | |
| 50 | |
| 51 # Custom widgets | |
| 52 src/gui/widgets/sidebar.cpp | |
| 53 src/gui/widgets/text.cpp | |
| 9 | 54 |
| 55 # Dialogs | |
| 56 src/gui/dialog/information.cpp | |
| 57 src/gui/dialog/settings.cpp | |
| 58 src/gui/dialog/settings/application.cpp | |
| 59 src/gui/dialog/settings/services.cpp | |
| 60 | |
| 10 | 61 # Translate |
| 62 src/gui/translate/anime.cpp | |
| 15 | 63 src/gui/translate/anilist.cpp |
| 10 | 64 |
| 9 | 65 # Services (only AniList for now) |
| 10 | 66 src/services/services.cpp |
| 9 | 67 src/services/anilist.cpp |
| 68 | |
| 69 # Qt resources | |
| 2 | 70 rc/icons.qrc |
| 71 dep/darkstyle/darkstyle.qrc | |
| 72 ) | |
| 73 | |
| 9 | 74 if(APPLE) # Mac OS X (or OS X (or macOS)) |
| 5 | 75 list(APPEND SRC_FILES |
| 76 src/sys/osx/dark_theme.mm | |
| 77 src/sys/osx/filesystem.mm | |
| 78 ) | |
| 9 | 79 elseif(WIN32) # Windows |
| 2 | 80 list(APPEND SRC_FILES src/sys/win32/dark_theme.cpp) |
| 81 endif() | |
| 82 | |
| 11 | 83 add_executable(minori ${SRC_FILES}) |
| 12 | 84 set_property(TARGET minori PROPERTY CXX_STANDARD 20) |
| 11 | 85 set_property(TARGET minori PROPERTY AUTOMOC ON) |
| 86 set_property(TARGET minori PROPERTY AUTORCC ON) | |
| 2 | 87 |
| 12 | 88 target_include_directories(minori PUBLIC ${Qt5Widgets_INCLUDE_DIRS} ${CURL_INCLUDE_DIRS} PRIVATE include) |
| 11 | 89 target_compile_options(minori PRIVATE -Wall -Wextra -Wsuggest-override) |
| 5 | 90 if(APPLE) |
| 11 | 91 target_compile_definitions(minori PUBLIC MACOSX) |
| 9 | 92 elseif(WIN32) |
| 11 | 93 target_compile_definitions(minori PUBLIC WIN32) |
| 5 | 94 endif() |
| 11 | 95 target_link_libraries(minori ${LIBRARIES}) |
