annotate CMakeLists.txt @ 23:386b9c08f185

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