annotate CMakeLists.txt @ 108:2004b41d4a59

*: huge commit 1. WORKING LOCALIZATION + translation for Spanish and British English 2. idk like 2 changes for the dark theme :)
author Paper <mrpapersonic@gmail.com>
date Sun, 05 Nov 2023 23:31:49 -0500
parents 6d8da6e64d61
children 79714c95a145
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
108
2004b41d4a59 *: huge commit
Paper <mrpapersonic@gmail.com>
parents: 105
diff changeset
1 cmake_minimum_required(VERSION 3.18)
103
621084cc542c resources: add icons
Paper <mrpapersonic@gmail.com>
parents: 102
diff changeset
2 project(minori LANGUAGES CXX VERSION 0.1.0)
17
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
64
fe719c109dbc *: update
Paper <mrpapersonic@gmail.com>
parents: 63
diff changeset
8 set(CMAKE_RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}")
fe719c109dbc *: update
Paper <mrpapersonic@gmail.com>
parents: 63
diff changeset
9 set(CMAKE_LIBRARY_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}")
fe719c109dbc *: update
Paper <mrpapersonic@gmail.com>
parents: 63
diff changeset
10 set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}")
fe719c109dbc *: update
Paper <mrpapersonic@gmail.com>
parents: 63
diff changeset
11
fe719c109dbc *: update
Paper <mrpapersonic@gmail.com>
parents: 63
diff changeset
12 option(BUILD_SHARED_LIBS "Build using shared libraries" ON)
108
2004b41d4a59 *: huge commit
Paper <mrpapersonic@gmail.com>
parents: 105
diff changeset
13 option(USE_QT6 "Force build with Qt 6" OFF)
2004b41d4a59 *: huge commit
Paper <mrpapersonic@gmail.com>
parents: 105
diff changeset
14 option(USE_QT5 "Force build with Qt 5" OFF)
64
fe719c109dbc *: update
Paper <mrpapersonic@gmail.com>
parents: 63
diff changeset
15
9
5c0397762b53 INCOMPLETE: megacommit :)
Paper <mrpapersonic@gmail.com>
parents: 7
diff changeset
16 add_subdirectory(dep/anitomy)
64
fe719c109dbc *: update
Paper <mrpapersonic@gmail.com>
parents: 63
diff changeset
17 add_subdirectory(dep/animia)
55
d10b6c6b432e add xml lib, we will need to use it eventually
Paper <mrpapersonic@gmail.com>
parents: 54
diff changeset
18 add_subdirectory(dep/pugixml)
9
5c0397762b53 INCOMPLETE: megacommit :)
Paper <mrpapersonic@gmail.com>
parents: 7
diff changeset
19
12
cf6a73a5ba1c cmake: fix for mingw
Paper <mrpapersonic@gmail.com>
parents: 11
diff changeset
20 # Fix for mingw64
cf6a73a5ba1c cmake: fix for mingw
Paper <mrpapersonic@gmail.com>
parents: 11
diff changeset
21 list(APPEND CMAKE_FIND_LIBRARY_SUFFIXES ".dll.a" ".a")
cf6a73a5ba1c cmake: fix for mingw
Paper <mrpapersonic@gmail.com>
parents: 11
diff changeset
22
108
2004b41d4a59 *: huge commit
Paper <mrpapersonic@gmail.com>
parents: 105
diff changeset
23 if (USE_QT6)
2004b41d4a59 *: huge commit
Paper <mrpapersonic@gmail.com>
parents: 105
diff changeset
24 set(QT_VERSION_MAJOR 6)
2004b41d4a59 *: huge commit
Paper <mrpapersonic@gmail.com>
parents: 105
diff changeset
25 elseif(USE_Qt5)
2004b41d4a59 *: huge commit
Paper <mrpapersonic@gmail.com>
parents: 105
diff changeset
26 set(QT_VERSION_MAJOR 5)
62
4c6dd5999b39 *: update
Paper <mrpapersonic@gmail.com>
parents: 57
diff changeset
27 else()
108
2004b41d4a59 *: huge commit
Paper <mrpapersonic@gmail.com>
parents: 105
diff changeset
28 find_package(QT NAMES Qt6 Qt5 REQUIRED COMPONENTS Core)
62
4c6dd5999b39 *: update
Paper <mrpapersonic@gmail.com>
parents: 57
diff changeset
29 endif()
108
2004b41d4a59 *: huge commit
Paper <mrpapersonic@gmail.com>
parents: 105
diff changeset
30
2004b41d4a59 *: huge commit
Paper <mrpapersonic@gmail.com>
parents: 105
diff changeset
31 find_package(Qt${QT_VERSION_MAJOR} REQUIRED COMPONENTS Widgets LinguistTools)
2004b41d4a59 *: huge commit
Paper <mrpapersonic@gmail.com>
parents: 105
diff changeset
32
12
cf6a73a5ba1c cmake: fix for mingw
Paper <mrpapersonic@gmail.com>
parents: 11
diff changeset
33 find_package(CURL REQUIRED)
cf6a73a5ba1c cmake: fix for mingw
Paper <mrpapersonic@gmail.com>
parents: 11
diff changeset
34
cf6a73a5ba1c cmake: fix for mingw
Paper <mrpapersonic@gmail.com>
parents: 11
diff changeset
35 set(LIBRARIES
cf6a73a5ba1c cmake: fix for mingw
Paper <mrpapersonic@gmail.com>
parents: 11
diff changeset
36 ${CURL_LIBRARIES}
108
2004b41d4a59 *: huge commit
Paper <mrpapersonic@gmail.com>
parents: 105
diff changeset
37 ${Qt${QT_VERSION_MAJOR}Widgets_LIBRARIES}
12
cf6a73a5ba1c cmake: fix for mingw
Paper <mrpapersonic@gmail.com>
parents: 11
diff changeset
38 anitomy
64
fe719c109dbc *: update
Paper <mrpapersonic@gmail.com>
parents: 63
diff changeset
39 animia
12
cf6a73a5ba1c cmake: fix for mingw
Paper <mrpapersonic@gmail.com>
parents: 11
diff changeset
40 )
cf6a73a5ba1c cmake: fix for mingw
Paper <mrpapersonic@gmail.com>
parents: 11
diff changeset
41
cf6a73a5ba1c cmake: fix for mingw
Paper <mrpapersonic@gmail.com>
parents: 11
diff changeset
42 # We need Cocoa for some OS X stuff
cf6a73a5ba1c cmake: fix for mingw
Paper <mrpapersonic@gmail.com>
parents: 11
diff changeset
43 if(APPLE)
cf6a73a5ba1c cmake: fix for mingw
Paper <mrpapersonic@gmail.com>
parents: 11
diff changeset
44 find_library(COCOA_LIBRARY Cocoa)
cf6a73a5ba1c cmake: fix for mingw
Paper <mrpapersonic@gmail.com>
parents: 11
diff changeset
45 list(APPEND LIBRARIES ${COCOA_LIBRARY})
cf6a73a5ba1c cmake: fix for mingw
Paper <mrpapersonic@gmail.com>
parents: 11
diff changeset
46 endif()
cf6a73a5ba1c cmake: fix for mingw
Paper <mrpapersonic@gmail.com>
parents: 11
diff changeset
47
2
Paper <mrpapersonic@gmail.com>
parents: 1
diff changeset
48 set(SRC_FILES
9
5c0397762b53 INCOMPLETE: megacommit :)
Paper <mrpapersonic@gmail.com>
parents: 7
diff changeset
49 # Main entrypoint
81
9b2b41f83a5e boring: mass rename to cc
Paper <mrpapersonic@gmail.com>
parents: 75
diff changeset
50 src/main.cc
9
5c0397762b53 INCOMPLETE: megacommit :)
Paper <mrpapersonic@gmail.com>
parents: 7
diff changeset
51
5c0397762b53 INCOMPLETE: megacommit :)
Paper <mrpapersonic@gmail.com>
parents: 7
diff changeset
52 # Core files and datatype declarations...
81
9b2b41f83a5e boring: mass rename to cc
Paper <mrpapersonic@gmail.com>
parents: 75
diff changeset
53 src/core/anime.cc
9b2b41f83a5e boring: mass rename to cc
Paper <mrpapersonic@gmail.com>
parents: 75
diff changeset
54 src/core/anime_db.cc
9b2b41f83a5e boring: mass rename to cc
Paper <mrpapersonic@gmail.com>
parents: 75
diff changeset
55 src/core/config.cc
9b2b41f83a5e boring: mass rename to cc
Paper <mrpapersonic@gmail.com>
parents: 75
diff changeset
56 src/core/date.cc
9b2b41f83a5e boring: mass rename to cc
Paper <mrpapersonic@gmail.com>
parents: 75
diff changeset
57 src/core/filesystem.cc
9b2b41f83a5e boring: mass rename to cc
Paper <mrpapersonic@gmail.com>
parents: 75
diff changeset
58 src/core/http.cc
9b2b41f83a5e boring: mass rename to cc
Paper <mrpapersonic@gmail.com>
parents: 75
diff changeset
59 src/core/json.cc
9b2b41f83a5e boring: mass rename to cc
Paper <mrpapersonic@gmail.com>
parents: 75
diff changeset
60 src/core/strings.cc
9b2b41f83a5e boring: mass rename to cc
Paper <mrpapersonic@gmail.com>
parents: 75
diff changeset
61 src/core/time.cc
9
5c0397762b53 INCOMPLETE: megacommit :)
Paper <mrpapersonic@gmail.com>
parents: 7
diff changeset
62
46
d0adc4aedfc8 *: update...
Paper <mrpapersonic@gmail.com>
parents: 17
diff changeset
63 # Main window
81
9b2b41f83a5e boring: mass rename to cc
Paper <mrpapersonic@gmail.com>
parents: 75
diff changeset
64 src/gui/window.cc
102
b315f3759c56 *: big patch
Paper <mrpapersonic@gmail.com>
parents: 101
diff changeset
65 src/gui/theme.cc
108
2004b41d4a59 *: huge commit
Paper <mrpapersonic@gmail.com>
parents: 105
diff changeset
66 src/gui/locale.cc
46
d0adc4aedfc8 *: update...
Paper <mrpapersonic@gmail.com>
parents: 17
diff changeset
67
d0adc4aedfc8 *: update...
Paper <mrpapersonic@gmail.com>
parents: 17
diff changeset
68 # Main window pages
81
9b2b41f83a5e boring: mass rename to cc
Paper <mrpapersonic@gmail.com>
parents: 75
diff changeset
69 src/gui/pages/anime_list.cc
9b2b41f83a5e boring: mass rename to cc
Paper <mrpapersonic@gmail.com>
parents: 75
diff changeset
70 src/gui/pages/now_playing.cc
9b2b41f83a5e boring: mass rename to cc
Paper <mrpapersonic@gmail.com>
parents: 75
diff changeset
71 src/gui/pages/statistics.cc
9b2b41f83a5e boring: mass rename to cc
Paper <mrpapersonic@gmail.com>
parents: 75
diff changeset
72 src/gui/pages/search.cc
9b2b41f83a5e boring: mass rename to cc
Paper <mrpapersonic@gmail.com>
parents: 75
diff changeset
73 src/gui/pages/seasons.cc
9b2b41f83a5e boring: mass rename to cc
Paper <mrpapersonic@gmail.com>
parents: 75
diff changeset
74 src/gui/pages/torrents.cc
9b2b41f83a5e boring: mass rename to cc
Paper <mrpapersonic@gmail.com>
parents: 75
diff changeset
75 src/gui/pages/history.cc
54
466ac9870df9 add stub pages (to be implemented)
Paper <mrpapersonic@gmail.com>
parents: 51
diff changeset
76
46
d0adc4aedfc8 *: update...
Paper <mrpapersonic@gmail.com>
parents: 17
diff changeset
77 # Custom widgets
81
9b2b41f83a5e boring: mass rename to cc
Paper <mrpapersonic@gmail.com>
parents: 75
diff changeset
78 src/gui/widgets/anime_info.cc
9b2b41f83a5e boring: mass rename to cc
Paper <mrpapersonic@gmail.com>
parents: 75
diff changeset
79 src/gui/widgets/poster.cc
9b2b41f83a5e boring: mass rename to cc
Paper <mrpapersonic@gmail.com>
parents: 75
diff changeset
80 src/gui/widgets/clickable_label.cc
9b2b41f83a5e boring: mass rename to cc
Paper <mrpapersonic@gmail.com>
parents: 75
diff changeset
81 src/gui/widgets/sidebar.cc
9b2b41f83a5e boring: mass rename to cc
Paper <mrpapersonic@gmail.com>
parents: 75
diff changeset
82 src/gui/widgets/text.cc
9b2b41f83a5e boring: mass rename to cc
Paper <mrpapersonic@gmail.com>
parents: 75
diff changeset
83 src/gui/widgets/optional_date.cc
9
5c0397762b53 INCOMPLETE: megacommit :)
Paper <mrpapersonic@gmail.com>
parents: 7
diff changeset
84
5c0397762b53 INCOMPLETE: megacommit :)
Paper <mrpapersonic@gmail.com>
parents: 7
diff changeset
85 # Dialogs
81
9b2b41f83a5e boring: mass rename to cc
Paper <mrpapersonic@gmail.com>
parents: 75
diff changeset
86 src/gui/dialog/about.cc
9b2b41f83a5e boring: mass rename to cc
Paper <mrpapersonic@gmail.com>
parents: 75
diff changeset
87 src/gui/dialog/information.cc
9b2b41f83a5e boring: mass rename to cc
Paper <mrpapersonic@gmail.com>
parents: 75
diff changeset
88 src/gui/dialog/settings.cc
9b2b41f83a5e boring: mass rename to cc
Paper <mrpapersonic@gmail.com>
parents: 75
diff changeset
89 src/gui/dialog/settings/application.cc
9b2b41f83a5e boring: mass rename to cc
Paper <mrpapersonic@gmail.com>
parents: 75
diff changeset
90 src/gui/dialog/settings/services.cc
9
5c0397762b53 INCOMPLETE: megacommit :)
Paper <mrpapersonic@gmail.com>
parents: 7
diff changeset
91
10
Paper <mrpapersonic@gmail.com>
parents: 9
diff changeset
92 # Translate
81
9b2b41f83a5e boring: mass rename to cc
Paper <mrpapersonic@gmail.com>
parents: 75
diff changeset
93 src/gui/translate/anime.cc
9b2b41f83a5e boring: mass rename to cc
Paper <mrpapersonic@gmail.com>
parents: 75
diff changeset
94 src/gui/translate/anilist.cc
90
c4bb49c2f6eb config: improve handling of vars
Paper <mrpapersonic@gmail.com>
parents: 82
diff changeset
95 src/gui/translate/config.cc
10
Paper <mrpapersonic@gmail.com>
parents: 9
diff changeset
96
9
5c0397762b53 INCOMPLETE: megacommit :)
Paper <mrpapersonic@gmail.com>
parents: 7
diff changeset
97 # Services (only AniList for now)
81
9b2b41f83a5e boring: mass rename to cc
Paper <mrpapersonic@gmail.com>
parents: 75
diff changeset
98 src/services/services.cc
9b2b41f83a5e boring: mass rename to cc
Paper <mrpapersonic@gmail.com>
parents: 75
diff changeset
99 src/services/anilist.cc
9
5c0397762b53 INCOMPLETE: megacommit :)
Paper <mrpapersonic@gmail.com>
parents: 7
diff changeset
100
64
fe719c109dbc *: update
Paper <mrpapersonic@gmail.com>
parents: 63
diff changeset
101 # Tracking
82
8b65c417c225 *: fix old stuff, make video players and extensions constants
Paper <mrpapersonic@gmail.com>
parents: 81
diff changeset
102 src/track/constants.cc
81
9b2b41f83a5e boring: mass rename to cc
Paper <mrpapersonic@gmail.com>
parents: 75
diff changeset
103 src/track/media.cc
64
fe719c109dbc *: update
Paper <mrpapersonic@gmail.com>
parents: 63
diff changeset
104
9
5c0397762b53 INCOMPLETE: megacommit :)
Paper <mrpapersonic@gmail.com>
parents: 7
diff changeset
105 # Qt resources
2
Paper <mrpapersonic@gmail.com>
parents: 1
diff changeset
106 rc/icons.qrc
105
6d8da6e64d61 theme: add dark stylesheet, make it actually usable
Paper <mrpapersonic@gmail.com>
parents: 103
diff changeset
107 rc/dark.qrc
2
Paper <mrpapersonic@gmail.com>
parents: 1
diff changeset
108 )
Paper <mrpapersonic@gmail.com>
parents: 1
diff changeset
109
108
2004b41d4a59 *: huge commit
Paper <mrpapersonic@gmail.com>
parents: 105
diff changeset
110 set(INCLUDE
2004b41d4a59 *: huge commit
Paper <mrpapersonic@gmail.com>
parents: 105
diff changeset
111 include
2004b41d4a59 *: huge commit
Paper <mrpapersonic@gmail.com>
parents: 105
diff changeset
112 dep/pugixml/src
2004b41d4a59 *: huge commit
Paper <mrpapersonic@gmail.com>
parents: 105
diff changeset
113 dep/animia/include
2004b41d4a59 *: huge commit
Paper <mrpapersonic@gmail.com>
parents: 105
diff changeset
114 dep/anitomy
2004b41d4a59 *: huge commit
Paper <mrpapersonic@gmail.com>
parents: 105
diff changeset
115 dep
2004b41d4a59 *: huge commit
Paper <mrpapersonic@gmail.com>
parents: 105
diff changeset
116 )
2004b41d4a59 *: huge commit
Paper <mrpapersonic@gmail.com>
parents: 105
diff changeset
117
2004b41d4a59 *: huge commit
Paper <mrpapersonic@gmail.com>
parents: 105
diff changeset
118 set(TS_FILES
2004b41d4a59 *: huge commit
Paper <mrpapersonic@gmail.com>
parents: 105
diff changeset
119 rc/locale/en_GB.ts
2004b41d4a59 *: huge commit
Paper <mrpapersonic@gmail.com>
parents: 105
diff changeset
120 rc/locale/es.ts
2004b41d4a59 *: huge commit
Paper <mrpapersonic@gmail.com>
parents: 105
diff changeset
121 )
2004b41d4a59 *: huge commit
Paper <mrpapersonic@gmail.com>
parents: 105
diff changeset
122
2004b41d4a59 *: huge commit
Paper <mrpapersonic@gmail.com>
parents: 105
diff changeset
123 set_source_files_properties(${TS_FILES} PROPERTIES OUTPUT_LOCATION "${CMAKE_CURRENT_BINARY_DIR}/rc/locale")
2004b41d4a59 *: huge commit
Paper <mrpapersonic@gmail.com>
parents: 105
diff changeset
124
2004b41d4a59 *: huge commit
Paper <mrpapersonic@gmail.com>
parents: 105
diff changeset
125 # dumb little hack to get this working on Qt5 and Qt6
2004b41d4a59 *: huge commit
Paper <mrpapersonic@gmail.com>
parents: 105
diff changeset
126 cmake_language(CALL qt${QT_VERSION_MAJOR}_create_translation ${SRC_FILES} ${TS_FILES} OPTIONS "-I${CMAKE_CURRENT_SOURCE_DIR}/include")
2004b41d4a59 *: huge commit
Paper <mrpapersonic@gmail.com>
parents: 105
diff changeset
127 cmake_language(CALL qt${QT_VERSION_MAJOR}_add_translation QM_FILES ${TS_FILES})
2004b41d4a59 *: huge commit
Paper <mrpapersonic@gmail.com>
parents: 105
diff changeset
128 list(APPEND SRC_FILES ${QM_FILES})
2004b41d4a59 *: huge commit
Paper <mrpapersonic@gmail.com>
parents: 105
diff changeset
129
2004b41d4a59 *: huge commit
Paper <mrpapersonic@gmail.com>
parents: 105
diff changeset
130 function(qt_create_resource_file outfile)
2004b41d4a59 *: huge commit
Paper <mrpapersonic@gmail.com>
parents: 105
diff changeset
131 set(QRC "<!DOCTYPE rcc><RCC version=\"1.0\">\n\t<qresource>\n")
2004b41d4a59 *: huge commit
Paper <mrpapersonic@gmail.com>
parents: 105
diff changeset
132 get_filename_component(DIR ${outfile} DIRECTORY)
2004b41d4a59 *: huge commit
Paper <mrpapersonic@gmail.com>
parents: 105
diff changeset
133 foreach (qm ${ARGN})
2004b41d4a59 *: huge commit
Paper <mrpapersonic@gmail.com>
parents: 105
diff changeset
134 file(RELATIVE_PATH name ${DIR} ${qm})
2004b41d4a59 *: huge commit
Paper <mrpapersonic@gmail.com>
parents: 105
diff changeset
135 string(APPEND QRC "\t\t<file>${name}</file>\n")
2004b41d4a59 *: huge commit
Paper <mrpapersonic@gmail.com>
parents: 105
diff changeset
136 endforeach()
2004b41d4a59 *: huge commit
Paper <mrpapersonic@gmail.com>
parents: 105
diff changeset
137 string(APPEND QRC "\t</qresource>\n</RCC>\n")
2004b41d4a59 *: huge commit
Paper <mrpapersonic@gmail.com>
parents: 105
diff changeset
138 file(WRITE ${outfile} ${QRC})
2004b41d4a59 *: huge commit
Paper <mrpapersonic@gmail.com>
parents: 105
diff changeset
139 endfunction()
2004b41d4a59 *: huge commit
Paper <mrpapersonic@gmail.com>
parents: 105
diff changeset
140
2004b41d4a59 *: huge commit
Paper <mrpapersonic@gmail.com>
parents: 105
diff changeset
141 qt_create_resource_file("${CMAKE_CURRENT_BINARY_DIR}/rc/locale.qrc" ${QM_FILES})
2004b41d4a59 *: huge commit
Paper <mrpapersonic@gmail.com>
parents: 105
diff changeset
142 list(APPEND SRC_FILES "${CMAKE_CURRENT_BINARY_DIR}/rc/locale.qrc")
2004b41d4a59 *: huge commit
Paper <mrpapersonic@gmail.com>
parents: 105
diff changeset
143
2004b41d4a59 *: huge commit
Paper <mrpapersonic@gmail.com>
parents: 105
diff changeset
144 # This is also used in the Win32 rc file
103
621084cc542c resources: add icons
Paper <mrpapersonic@gmail.com>
parents: 102
diff changeset
145 set(RC_INFO_STRING "A lightweight anime tracker built with Qt.")
621084cc542c resources: add icons
Paper <mrpapersonic@gmail.com>
parents: 102
diff changeset
146
9
5c0397762b53 INCOMPLETE: megacommit :)
Paper <mrpapersonic@gmail.com>
parents: 7
diff changeset
147 if(APPLE) # Mac OS X (or OS X (or macOS))
103
621084cc542c resources: add icons
Paper <mrpapersonic@gmail.com>
parents: 102
diff changeset
148 set(MACOSX_BUNDLE_BUNDLE_NAME "Minori")
621084cc542c resources: add icons
Paper <mrpapersonic@gmail.com>
parents: 102
diff changeset
149 set(MACOSX_BUNDLE_BUNDLE_VERSION ${minori_VERSION})
621084cc542c resources: add icons
Paper <mrpapersonic@gmail.com>
parents: 102
diff changeset
150 set(MACOSX_BUNDLE_COPYRIGHT "Copyright (C) Paper 2023")
621084cc542c resources: add icons
Paper <mrpapersonic@gmail.com>
parents: 102
diff changeset
151 set(MACOSX_BUNDLE_GUI_IDENTIFIER "org.eu.us.paper.minori")
621084cc542c resources: add icons
Paper <mrpapersonic@gmail.com>
parents: 102
diff changeset
152 set(MACOSX_BUNDLE_INFO_STRING ${RC_INFO_STRING})
621084cc542c resources: add icons
Paper <mrpapersonic@gmail.com>
parents: 102
diff changeset
153 set(MACOSX_BUNDLE_ICON_FILE rc/osx/favicon.icns)
621084cc542c resources: add icons
Paper <mrpapersonic@gmail.com>
parents: 102
diff changeset
154 set(app_icon_osx "${CMAKE_CURRENT_SOURCE_DIR}/rc/osx/favicon.icns")
621084cc542c resources: add icons
Paper <mrpapersonic@gmail.com>
parents: 102
diff changeset
155 set_source_files_properties(${app_icon_osx} PROPERTIES MACOSX_PACKAGE_LOCATION "Resources")
621084cc542c resources: add icons
Paper <mrpapersonic@gmail.com>
parents: 102
diff changeset
156
5
51ae25154b70 Fix OS X support code
Paper <mrpapersonic@gmail.com>
parents: 4
diff changeset
157 list(APPEND SRC_FILES
51ae25154b70 Fix OS X support code
Paper <mrpapersonic@gmail.com>
parents: 4
diff changeset
158 src/sys/osx/dark_theme.mm
51ae25154b70 Fix OS X support code
Paper <mrpapersonic@gmail.com>
parents: 4
diff changeset
159 src/sys/osx/filesystem.mm
103
621084cc542c resources: add icons
Paper <mrpapersonic@gmail.com>
parents: 102
diff changeset
160 ${app_icon_osx}
5
51ae25154b70 Fix OS X support code
Paper <mrpapersonic@gmail.com>
parents: 4
diff changeset
161 )
9
5c0397762b53 INCOMPLETE: megacommit :)
Paper <mrpapersonic@gmail.com>
parents: 7
diff changeset
162 elseif(WIN32) # Windows
103
621084cc542c resources: add icons
Paper <mrpapersonic@gmail.com>
parents: 102
diff changeset
163 configure_file(
621084cc542c resources: add icons
Paper <mrpapersonic@gmail.com>
parents: 102
diff changeset
164 ${CMAKE_CURRENT_SOURCE_DIR}/rc/win32/version.rc.in
621084cc542c resources: add icons
Paper <mrpapersonic@gmail.com>
parents: 102
diff changeset
165 ${CMAKE_CURRENT_BINARY_DIR}/rc/version.rc
621084cc542c resources: add icons
Paper <mrpapersonic@gmail.com>
parents: 102
diff changeset
166 @ONLY
621084cc542c resources: add icons
Paper <mrpapersonic@gmail.com>
parents: 102
diff changeset
167 )
621084cc542c resources: add icons
Paper <mrpapersonic@gmail.com>
parents: 102
diff changeset
168 list(APPEND SRC_FILES
621084cc542c resources: add icons
Paper <mrpapersonic@gmail.com>
parents: 102
diff changeset
169 src/sys/win32/dark_theme.cc
621084cc542c resources: add icons
Paper <mrpapersonic@gmail.com>
parents: 102
diff changeset
170 rc/win32/resource.rc
621084cc542c resources: add icons
Paper <mrpapersonic@gmail.com>
parents: 102
diff changeset
171 ${CMAKE_CURRENT_BINARY_DIR}/rc/version.rc
621084cc542c resources: add icons
Paper <mrpapersonic@gmail.com>
parents: 102
diff changeset
172 )
2
Paper <mrpapersonic@gmail.com>
parents: 1
diff changeset
173 endif()
Paper <mrpapersonic@gmail.com>
parents: 1
diff changeset
174
103
621084cc542c resources: add icons
Paper <mrpapersonic@gmail.com>
parents: 102
diff changeset
175 add_executable(minori WIN32 MACOSX_BUNDLE ${SRC_FILES})
63
3d2decf093bb *: fix many clang warnings
Paper <mrpapersonic@gmail.com>
parents: 62
diff changeset
176 set_property(TARGET minori PROPERTY CXX_STANDARD 11)
11
fc1bf97c528b *: use C++11 standard
Paper <mrpapersonic@gmail.com>
parents: 10
diff changeset
177 set_property(TARGET minori PROPERTY AUTOMOC ON)
fc1bf97c528b *: use C++11 standard
Paper <mrpapersonic@gmail.com>
parents: 10
diff changeset
178 set_property(TARGET minori PROPERTY AUTORCC ON)
2
Paper <mrpapersonic@gmail.com>
parents: 1
diff changeset
179
108
2004b41d4a59 *: huge commit
Paper <mrpapersonic@gmail.com>
parents: 105
diff changeset
180 target_include_directories(minori PUBLIC ${CURL_INCLUDE_DIRS} PRIVATE ${INCLUDE})
2004b41d4a59 *: huge commit
Paper <mrpapersonic@gmail.com>
parents: 105
diff changeset
181 target_include_directories(minori PUBLIC ${Qt${QT_VERSION_MAJOR}Widgets_INCLUDE_DIRS})
64
fe719c109dbc *: update
Paper <mrpapersonic@gmail.com>
parents: 63
diff changeset
182 target_compile_options(minori PRIVATE -Wall -Wpedantic -Wextra -Wsuggest-override -Wold-style-cast)
5
51ae25154b70 Fix OS X support code
Paper <mrpapersonic@gmail.com>
parents: 4
diff changeset
183 if(APPLE)
11
fc1bf97c528b *: use C++11 standard
Paper <mrpapersonic@gmail.com>
parents: 10
diff changeset
184 target_compile_definitions(minori PUBLIC MACOSX)
9
5c0397762b53 INCOMPLETE: megacommit :)
Paper <mrpapersonic@gmail.com>
parents: 7
diff changeset
185 elseif(WIN32)
11
fc1bf97c528b *: use C++11 standard
Paper <mrpapersonic@gmail.com>
parents: 10
diff changeset
186 target_compile_definitions(minori PUBLIC WIN32)
5
51ae25154b70 Fix OS X support code
Paper <mrpapersonic@gmail.com>
parents: 4
diff changeset
187 endif()
11
fc1bf97c528b *: use C++11 standard
Paper <mrpapersonic@gmail.com>
parents: 10
diff changeset
188 target_link_libraries(minori ${LIBRARIES})