annotate CMakeLists.txt @ 367:8d45d892be88 default tip

*: instead of pugixml, use Qt XML features this means we have one extra Qt dependency though...
author Paper <paper@tflc.us>
date Sun, 17 Nov 2024 22:55:47 -0500
parents 99c961c91809
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
356
373f92c35bec cmake: update minimum version
Paper <paper@paper.us.eu.org>
parents: 351
diff changeset
1 cmake_minimum_required(VERSION 3.23)
343
1faa72660932 *: transfer back to cmake from autotools
Paper <paper@paper.us.eu.org>
parents:
diff changeset
2 project(minori LANGUAGES CXX VERSION 0.1.0)
1faa72660932 *: transfer back to cmake from autotools
Paper <paper@paper.us.eu.org>
parents:
diff changeset
3
1faa72660932 *: transfer back to cmake from autotools
Paper <paper@paper.us.eu.org>
parents:
diff changeset
4 set(CMAKE_RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}")
1faa72660932 *: transfer back to cmake from autotools
Paper <paper@paper.us.eu.org>
parents:
diff changeset
5 set(CMAKE_LIBRARY_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}")
1faa72660932 *: transfer back to cmake from autotools
Paper <paper@paper.us.eu.org>
parents:
diff changeset
6 set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}")
1faa72660932 *: transfer back to cmake from autotools
Paper <paper@paper.us.eu.org>
parents:
diff changeset
7
1faa72660932 *: transfer back to cmake from autotools
Paper <paper@paper.us.eu.org>
parents:
diff changeset
8 option(BUILD_SHARED_LIBS "Build using shared libraries" ON)
1faa72660932 *: transfer back to cmake from autotools
Paper <paper@paper.us.eu.org>
parents:
diff changeset
9 option(USE_QT6 "Force build with Qt 6" OFF)
1faa72660932 *: transfer back to cmake from autotools
Paper <paper@paper.us.eu.org>
parents:
diff changeset
10 option(USE_QT5 "Force build with Qt 5" OFF)
1faa72660932 *: transfer back to cmake from autotools
Paper <paper@paper.us.eu.org>
parents:
diff changeset
11 option(UPDATE_TRANSLATIONS "Update *.ts translation files" OFF)
1faa72660932 *: transfer back to cmake from autotools
Paper <paper@paper.us.eu.org>
parents:
diff changeset
12
1faa72660932 *: transfer back to cmake from autotools
Paper <paper@paper.us.eu.org>
parents:
diff changeset
13 add_subdirectory(dep/animone)
1faa72660932 *: transfer back to cmake from autotools
Paper <paper@paper.us.eu.org>
parents:
diff changeset
14 add_subdirectory(dep/anitomy)
1faa72660932 *: transfer back to cmake from autotools
Paper <paper@paper.us.eu.org>
parents:
diff changeset
15
1faa72660932 *: transfer back to cmake from autotools
Paper <paper@paper.us.eu.org>
parents:
diff changeset
16 # Fix for mingw64
1faa72660932 *: transfer back to cmake from autotools
Paper <paper@paper.us.eu.org>
parents:
diff changeset
17 list(APPEND CMAKE_FIND_LIBRARY_SUFFIXES ".dll.a" ".a")
1faa72660932 *: transfer back to cmake from autotools
Paper <paper@paper.us.eu.org>
parents:
diff changeset
18
1faa72660932 *: transfer back to cmake from autotools
Paper <paper@paper.us.eu.org>
parents:
diff changeset
19 if(USE_QT6 AND USE_QT5)
1faa72660932 *: transfer back to cmake from autotools
Paper <paper@paper.us.eu.org>
parents:
diff changeset
20 message(FATAL_ERROR "Can't build with Qt 5 and Qt 6 at the same time...")
1faa72660932 *: transfer back to cmake from autotools
Paper <paper@paper.us.eu.org>
parents:
diff changeset
21 elseif(USE_QT6)
1faa72660932 *: transfer back to cmake from autotools
Paper <paper@paper.us.eu.org>
parents:
diff changeset
22 set(QT_VERSION_MAJOR 6)
1faa72660932 *: transfer back to cmake from autotools
Paper <paper@paper.us.eu.org>
parents:
diff changeset
23 elseif(USE_QT5)
1faa72660932 *: transfer back to cmake from autotools
Paper <paper@paper.us.eu.org>
parents:
diff changeset
24 set(QT_VERSION_MAJOR 5)
1faa72660932 *: transfer back to cmake from autotools
Paper <paper@paper.us.eu.org>
parents:
diff changeset
25 else()
1faa72660932 *: transfer back to cmake from autotools
Paper <paper@paper.us.eu.org>
parents:
diff changeset
26 find_package(QT NAMES Qt6 Qt5 REQUIRED COMPONENTS Core)
1faa72660932 *: transfer back to cmake from autotools
Paper <paper@paper.us.eu.org>
parents:
diff changeset
27 endif()
1faa72660932 *: transfer back to cmake from autotools
Paper <paper@paper.us.eu.org>
parents:
diff changeset
28
367
8d45d892be88 *: instead of pugixml, use Qt XML features
Paper <paper@tflc.us>
parents: 364
diff changeset
29 find_package(Qt${QT_VERSION_MAJOR} REQUIRED COMPONENTS Widgets LinguistTools Xml)
343
1faa72660932 *: transfer back to cmake from autotools
Paper <paper@paper.us.eu.org>
parents:
diff changeset
30
367
8d45d892be88 *: instead of pugixml, use Qt XML features
Paper <paper@tflc.us>
parents: 364
diff changeset
31 # find_package(CURL) is dysfunctional
345
d085c05247bd build: fix windows build
Paper <paper@paper.us.eu.org>
parents: 343
diff changeset
32 find_package(PkgConfig REQUIRED)
346
e65b89bcc528 cmake: curl -> libcurl
Paper <paper@paper.us.eu.org>
parents: 345
diff changeset
33 pkg_check_modules(CURL REQUIRED libcurl)
367
8d45d892be88 *: instead of pugixml, use Qt XML features
Paper <paper@tflc.us>
parents: 364
diff changeset
34 pkg_check_modules(UTF8PROC libutf8proc)
8d45d892be88 *: instead of pugixml, use Qt XML features
Paper <paper@tflc.us>
parents: 364
diff changeset
35 pkg_check_modules(FMT fmt)
8d45d892be88 *: instead of pugixml, use Qt XML features
Paper <paper@tflc.us>
parents: 364
diff changeset
36
8d45d892be88 *: instead of pugixml, use Qt XML features
Paper <paper@tflc.us>
parents: 364
diff changeset
37 message("${FMT_LINK_LIBRARIES}")
8d45d892be88 *: instead of pugixml, use Qt XML features
Paper <paper@tflc.us>
parents: 364
diff changeset
38
8d45d892be88 *: instead of pugixml, use Qt XML features
Paper <paper@tflc.us>
parents: 364
diff changeset
39 if(NOT UTF8PROC_FOUND)
8d45d892be88 *: instead of pugixml, use Qt XML features
Paper <paper@tflc.us>
parents: 364
diff changeset
40 add_subdirectory(dep/utf8proc)
8d45d892be88 *: instead of pugixml, use Qt XML features
Paper <paper@tflc.us>
parents: 364
diff changeset
41 endif()
8d45d892be88 *: instead of pugixml, use Qt XML features
Paper <paper@tflc.us>
parents: 364
diff changeset
42
8d45d892be88 *: instead of pugixml, use Qt XML features
Paper <paper@tflc.us>
parents: 364
diff changeset
43 if(NOT FMT_FOUND)
8d45d892be88 *: instead of pugixml, use Qt XML features
Paper <paper@tflc.us>
parents: 364
diff changeset
44 add_subdirectory(dep/fmt)
8d45d892be88 *: instead of pugixml, use Qt XML features
Paper <paper@tflc.us>
parents: 364
diff changeset
45 endif()
343
1faa72660932 *: transfer back to cmake from autotools
Paper <paper@paper.us.eu.org>
parents:
diff changeset
46
1faa72660932 *: transfer back to cmake from autotools
Paper <paper@paper.us.eu.org>
parents:
diff changeset
47 set(LIBRARIES
1faa72660932 *: transfer back to cmake from autotools
Paper <paper@paper.us.eu.org>
parents:
diff changeset
48 ${Qt${QT_VERSION_MAJOR}Widgets_LIBRARIES}
367
8d45d892be88 *: instead of pugixml, use Qt XML features
Paper <paper@tflc.us>
parents: 364
diff changeset
49 ${Qt${QT_VERSION_MAJOR}Xml_LIBRARIES}
8d45d892be88 *: instead of pugixml, use Qt XML features
Paper <paper@tflc.us>
parents: 364
diff changeset
50 ${CURL_LINK_LIBRARIES}
343
1faa72660932 *: transfer back to cmake from autotools
Paper <paper@paper.us.eu.org>
parents:
diff changeset
51 anitomy
1faa72660932 *: transfer back to cmake from autotools
Paper <paper@paper.us.eu.org>
parents:
diff changeset
52 animia
1faa72660932 *: transfer back to cmake from autotools
Paper <paper@paper.us.eu.org>
parents:
diff changeset
53 )
1faa72660932 *: transfer back to cmake from autotools
Paper <paper@paper.us.eu.org>
parents:
diff changeset
54
367
8d45d892be88 *: instead of pugixml, use Qt XML features
Paper <paper@tflc.us>
parents: 364
diff changeset
55 if(UTF8PROC_FOUND)
8d45d892be88 *: instead of pugixml, use Qt XML features
Paper <paper@tflc.us>
parents: 364
diff changeset
56 list(APPEND LIBRARIES ${UTF8PROC_LINK_LIBRARIES})
8d45d892be88 *: instead of pugixml, use Qt XML features
Paper <paper@tflc.us>
parents: 364
diff changeset
57 else()
8d45d892be88 *: instead of pugixml, use Qt XML features
Paper <paper@tflc.us>
parents: 364
diff changeset
58 list(APPEND LIBRARIES utf8proc)
8d45d892be88 *: instead of pugixml, use Qt XML features
Paper <paper@tflc.us>
parents: 364
diff changeset
59 endif()
8d45d892be88 *: instead of pugixml, use Qt XML features
Paper <paper@tflc.us>
parents: 364
diff changeset
60
8d45d892be88 *: instead of pugixml, use Qt XML features
Paper <paper@tflc.us>
parents: 364
diff changeset
61 if(FMT_FOUND)
8d45d892be88 *: instead of pugixml, use Qt XML features
Paper <paper@tflc.us>
parents: 364
diff changeset
62 list(APPEND LIBRARIES ${FMT_LINK_LIBRARIES})
8d45d892be88 *: instead of pugixml, use Qt XML features
Paper <paper@tflc.us>
parents: 364
diff changeset
63 else()
8d45d892be88 *: instead of pugixml, use Qt XML features
Paper <paper@tflc.us>
parents: 364
diff changeset
64 list(APPEND LIBRARIES fmt)
8d45d892be88 *: instead of pugixml, use Qt XML features
Paper <paper@tflc.us>
parents: 364
diff changeset
65 endif()
8d45d892be88 *: instead of pugixml, use Qt XML features
Paper <paper@tflc.us>
parents: 364
diff changeset
66
343
1faa72660932 *: transfer back to cmake from autotools
Paper <paper@paper.us.eu.org>
parents:
diff changeset
67 set(QT_MOC_FILES
1faa72660932 *: transfer back to cmake from autotools
Paper <paper@paper.us.eu.org>
parents:
diff changeset
68 include/core/http.h
1faa72660932 *: transfer back to cmake from autotools
Paper <paper@paper.us.eu.org>
parents:
diff changeset
69 include/core/session.h
1faa72660932 *: transfer back to cmake from autotools
Paper <paper@paper.us.eu.org>
parents:
diff changeset
70 include/gui/dialog/about.h
1faa72660932 *: transfer back to cmake from autotools
Paper <paper@paper.us.eu.org>
parents:
diff changeset
71 include/gui/dialog/licenses.h
1faa72660932 *: transfer back to cmake from autotools
Paper <paper@paper.us.eu.org>
parents:
diff changeset
72 include/gui/dialog/information.h
1faa72660932 *: transfer back to cmake from autotools
Paper <paper@paper.us.eu.org>
parents:
diff changeset
73 include/gui/dialog/settings.h
1faa72660932 *: transfer back to cmake from autotools
Paper <paper@paper.us.eu.org>
parents:
diff changeset
74 include/gui/pages/anime_list.h
1faa72660932 *: transfer back to cmake from autotools
Paper <paper@paper.us.eu.org>
parents:
diff changeset
75 include/gui/pages/history.h
1faa72660932 *: transfer back to cmake from autotools
Paper <paper@paper.us.eu.org>
parents:
diff changeset
76 include/gui/pages/now_playing.h
1faa72660932 *: transfer back to cmake from autotools
Paper <paper@paper.us.eu.org>
parents:
diff changeset
77 include/gui/pages/search.h
1faa72660932 *: transfer back to cmake from autotools
Paper <paper@paper.us.eu.org>
parents:
diff changeset
78 include/gui/pages/seasons.h
1faa72660932 *: transfer back to cmake from autotools
Paper <paper@paper.us.eu.org>
parents:
diff changeset
79 include/gui/pages/statistics.h
1faa72660932 *: transfer back to cmake from autotools
Paper <paper@paper.us.eu.org>
parents:
diff changeset
80 include/gui/pages/torrents.h
1faa72660932 *: transfer back to cmake from autotools
Paper <paper@paper.us.eu.org>
parents:
diff changeset
81 include/gui/translate/anilist.h
1faa72660932 *: transfer back to cmake from autotools
Paper <paper@paper.us.eu.org>
parents:
diff changeset
82 include/gui/translate/anime.h
1faa72660932 *: transfer back to cmake from autotools
Paper <paper@paper.us.eu.org>
parents:
diff changeset
83 include/gui/translate/config.h
1faa72660932 *: transfer back to cmake from autotools
Paper <paper@paper.us.eu.org>
parents:
diff changeset
84 include/gui/widgets/anime_button.h
1faa72660932 *: transfer back to cmake from autotools
Paper <paper@paper.us.eu.org>
parents:
diff changeset
85 include/gui/widgets/anime_info.h
1faa72660932 *: transfer back to cmake from autotools
Paper <paper@paper.us.eu.org>
parents:
diff changeset
86 include/gui/widgets/clickable_label.h
1faa72660932 *: transfer back to cmake from autotools
Paper <paper@paper.us.eu.org>
parents:
diff changeset
87 include/gui/widgets/drop_list_widget.h
1faa72660932 *: transfer back to cmake from autotools
Paper <paper@paper.us.eu.org>
parents:
diff changeset
88 include/gui/widgets/graph.h
1faa72660932 *: transfer back to cmake from autotools
Paper <paper@paper.us.eu.org>
parents:
diff changeset
89 include/gui/widgets/optional_date.h
1faa72660932 *: transfer back to cmake from autotools
Paper <paper@paper.us.eu.org>
parents:
diff changeset
90 include/gui/widgets/poster.h
1faa72660932 *: transfer back to cmake from autotools
Paper <paper@paper.us.eu.org>
parents:
diff changeset
91 include/gui/widgets/sidebar.h
1faa72660932 *: transfer back to cmake from autotools
Paper <paper@paper.us.eu.org>
parents:
diff changeset
92 include/gui/widgets/text.h
1faa72660932 *: transfer back to cmake from autotools
Paper <paper@paper.us.eu.org>
parents:
diff changeset
93 include/gui/widgets/elided_label.h
1faa72660932 *: transfer back to cmake from autotools
Paper <paper@paper.us.eu.org>
parents:
diff changeset
94 include/gui/locale.h
1faa72660932 *: transfer back to cmake from autotools
Paper <paper@paper.us.eu.org>
parents:
diff changeset
95 include/gui/theme.h
1faa72660932 *: transfer back to cmake from autotools
Paper <paper@paper.us.eu.org>
parents:
diff changeset
96 include/gui/window.h
1faa72660932 *: transfer back to cmake from autotools
Paper <paper@paper.us.eu.org>
parents:
diff changeset
97 )
1faa72660932 *: transfer back to cmake from autotools
Paper <paper@paper.us.eu.org>
parents:
diff changeset
98
1faa72660932 *: transfer back to cmake from autotools
Paper <paper@paper.us.eu.org>
parents:
diff changeset
99 set(SRC_FILES
1faa72660932 *: transfer back to cmake from autotools
Paper <paper@paper.us.eu.org>
parents:
diff changeset
100 # Main entrypoint
1faa72660932 *: transfer back to cmake from autotools
Paper <paper@paper.us.eu.org>
parents:
diff changeset
101 src/main.cc
1faa72660932 *: transfer back to cmake from autotools
Paper <paper@paper.us.eu.org>
parents:
diff changeset
102
1faa72660932 *: transfer back to cmake from autotools
Paper <paper@paper.us.eu.org>
parents:
diff changeset
103 # Core files and datatype declarations...
1faa72660932 *: transfer back to cmake from autotools
Paper <paper@paper.us.eu.org>
parents:
diff changeset
104 src/core/anime.cc
1faa72660932 *: transfer back to cmake from autotools
Paper <paper@paper.us.eu.org>
parents:
diff changeset
105 src/core/anime_db.cc
1faa72660932 *: transfer back to cmake from autotools
Paper <paper@paper.us.eu.org>
parents:
diff changeset
106 src/core/anime_season.cc
364
99c961c91809 core: refactor out byte stream into its own file
Paper <paper@paper.us.eu.org>
parents: 356
diff changeset
107 src/core/byte_stream.cc
343
1faa72660932 *: transfer back to cmake from autotools
Paper <paper@paper.us.eu.org>
parents:
diff changeset
108 src/core/config.cc
1faa72660932 *: transfer back to cmake from autotools
Paper <paper@paper.us.eu.org>
parents:
diff changeset
109 src/core/date.cc
1faa72660932 *: transfer back to cmake from autotools
Paper <paper@paper.us.eu.org>
parents:
diff changeset
110 src/core/filesystem.cc
1faa72660932 *: transfer back to cmake from autotools
Paper <paper@paper.us.eu.org>
parents:
diff changeset
111 src/core/http.cc
1faa72660932 *: transfer back to cmake from autotools
Paper <paper@paper.us.eu.org>
parents:
diff changeset
112 src/core/json.cc
1faa72660932 *: transfer back to cmake from autotools
Paper <paper@paper.us.eu.org>
parents:
diff changeset
113 src/core/session.cc
1faa72660932 *: transfer back to cmake from autotools
Paper <paper@paper.us.eu.org>
parents:
diff changeset
114 src/core/strings.cc
1faa72660932 *: transfer back to cmake from autotools
Paper <paper@paper.us.eu.org>
parents:
diff changeset
115 src/core/time.cc
1faa72660932 *: transfer back to cmake from autotools
Paper <paper@paper.us.eu.org>
parents:
diff changeset
116
1faa72660932 *: transfer back to cmake from autotools
Paper <paper@paper.us.eu.org>
parents:
diff changeset
117 # Main window
1faa72660932 *: transfer back to cmake from autotools
Paper <paper@paper.us.eu.org>
parents:
diff changeset
118 src/gui/window.cc
1faa72660932 *: transfer back to cmake from autotools
Paper <paper@paper.us.eu.org>
parents:
diff changeset
119 src/gui/theme.cc
1faa72660932 *: transfer back to cmake from autotools
Paper <paper@paper.us.eu.org>
parents:
diff changeset
120 src/gui/locale.cc
1faa72660932 *: transfer back to cmake from autotools
Paper <paper@paper.us.eu.org>
parents:
diff changeset
121
1faa72660932 *: transfer back to cmake from autotools
Paper <paper@paper.us.eu.org>
parents:
diff changeset
122 # Main window pages
1faa72660932 *: transfer back to cmake from autotools
Paper <paper@paper.us.eu.org>
parents:
diff changeset
123 src/gui/pages/anime_list.cc
1faa72660932 *: transfer back to cmake from autotools
Paper <paper@paper.us.eu.org>
parents:
diff changeset
124 src/gui/pages/now_playing.cc
1faa72660932 *: transfer back to cmake from autotools
Paper <paper@paper.us.eu.org>
parents:
diff changeset
125 src/gui/pages/statistics.cc
1faa72660932 *: transfer back to cmake from autotools
Paper <paper@paper.us.eu.org>
parents:
diff changeset
126 src/gui/pages/search.cc
1faa72660932 *: transfer back to cmake from autotools
Paper <paper@paper.us.eu.org>
parents:
diff changeset
127 src/gui/pages/seasons.cc
1faa72660932 *: transfer back to cmake from autotools
Paper <paper@paper.us.eu.org>
parents:
diff changeset
128 src/gui/pages/torrents.cc
1faa72660932 *: transfer back to cmake from autotools
Paper <paper@paper.us.eu.org>
parents:
diff changeset
129 src/gui/pages/history.cc
1faa72660932 *: transfer back to cmake from autotools
Paper <paper@paper.us.eu.org>
parents:
diff changeset
130
1faa72660932 *: transfer back to cmake from autotools
Paper <paper@paper.us.eu.org>
parents:
diff changeset
131 # Custom widgets
1faa72660932 *: transfer back to cmake from autotools
Paper <paper@paper.us.eu.org>
parents:
diff changeset
132 src/gui/widgets/anime_button.cc
1faa72660932 *: transfer back to cmake from autotools
Paper <paper@paper.us.eu.org>
parents:
diff changeset
133 src/gui/widgets/anime_info.cc
1faa72660932 *: transfer back to cmake from autotools
Paper <paper@paper.us.eu.org>
parents:
diff changeset
134 src/gui/widgets/clickable_label.cc
1faa72660932 *: transfer back to cmake from autotools
Paper <paper@paper.us.eu.org>
parents:
diff changeset
135 src/gui/widgets/drop_list_widget.cc
1faa72660932 *: transfer back to cmake from autotools
Paper <paper@paper.us.eu.org>
parents:
diff changeset
136 src/gui/widgets/elided_label.cc
1faa72660932 *: transfer back to cmake from autotools
Paper <paper@paper.us.eu.org>
parents:
diff changeset
137 src/gui/widgets/poster.cc
1faa72660932 *: transfer back to cmake from autotools
Paper <paper@paper.us.eu.org>
parents:
diff changeset
138 src/gui/widgets/sidebar.cc
1faa72660932 *: transfer back to cmake from autotools
Paper <paper@paper.us.eu.org>
parents:
diff changeset
139 src/gui/widgets/text.cc
1faa72660932 *: transfer back to cmake from autotools
Paper <paper@paper.us.eu.org>
parents:
diff changeset
140 src/gui/widgets/optional_date.cc
1faa72660932 *: transfer back to cmake from autotools
Paper <paper@paper.us.eu.org>
parents:
diff changeset
141
1faa72660932 *: transfer back to cmake from autotools
Paper <paper@paper.us.eu.org>
parents:
diff changeset
142 # Dialogs
1faa72660932 *: transfer back to cmake from autotools
Paper <paper@paper.us.eu.org>
parents:
diff changeset
143 src/gui/dialog/about.cc
1faa72660932 *: transfer back to cmake from autotools
Paper <paper@paper.us.eu.org>
parents:
diff changeset
144 src/gui/dialog/licenses.cc
1faa72660932 *: transfer back to cmake from autotools
Paper <paper@paper.us.eu.org>
parents:
diff changeset
145 src/gui/dialog/information.cc
1faa72660932 *: transfer back to cmake from autotools
Paper <paper@paper.us.eu.org>
parents:
diff changeset
146 src/gui/dialog/settings.cc
1faa72660932 *: transfer back to cmake from autotools
Paper <paper@paper.us.eu.org>
parents:
diff changeset
147 src/gui/dialog/settings/application.cc
1faa72660932 *: transfer back to cmake from autotools
Paper <paper@paper.us.eu.org>
parents:
diff changeset
148 src/gui/dialog/settings/services.cc
1faa72660932 *: transfer back to cmake from autotools
Paper <paper@paper.us.eu.org>
parents:
diff changeset
149 src/gui/dialog/settings/torrents.cc
1faa72660932 *: transfer back to cmake from autotools
Paper <paper@paper.us.eu.org>
parents:
diff changeset
150 src/gui/dialog/settings/recognition.cc
1faa72660932 *: transfer back to cmake from autotools
Paper <paper@paper.us.eu.org>
parents:
diff changeset
151 src/gui/dialog/settings/library.cc
1faa72660932 *: transfer back to cmake from autotools
Paper <paper@paper.us.eu.org>
parents:
diff changeset
152
1faa72660932 *: transfer back to cmake from autotools
Paper <paper@paper.us.eu.org>
parents:
diff changeset
153 # Translate
1faa72660932 *: transfer back to cmake from autotools
Paper <paper@paper.us.eu.org>
parents:
diff changeset
154 src/gui/translate/anime.cc
1faa72660932 *: transfer back to cmake from autotools
Paper <paper@paper.us.eu.org>
parents:
diff changeset
155 src/gui/translate/anilist.cc
1faa72660932 *: transfer back to cmake from autotools
Paper <paper@paper.us.eu.org>
parents:
diff changeset
156 src/gui/translate/config.cc
1faa72660932 *: transfer back to cmake from autotools
Paper <paper@paper.us.eu.org>
parents:
diff changeset
157
1faa72660932 *: transfer back to cmake from autotools
Paper <paper@paper.us.eu.org>
parents:
diff changeset
158 # Services
1faa72660932 *: transfer back to cmake from autotools
Paper <paper@paper.us.eu.org>
parents:
diff changeset
159 src/services/services.cc
1faa72660932 *: transfer back to cmake from autotools
Paper <paper@paper.us.eu.org>
parents:
diff changeset
160 src/services/anilist.cc
1faa72660932 *: transfer back to cmake from autotools
Paper <paper@paper.us.eu.org>
parents:
diff changeset
161 src/services/kitsu.cc
1faa72660932 *: transfer back to cmake from autotools
Paper <paper@paper.us.eu.org>
parents:
diff changeset
162
1faa72660932 *: transfer back to cmake from autotools
Paper <paper@paper.us.eu.org>
parents:
diff changeset
163 # Library
1faa72660932 *: transfer back to cmake from autotools
Paper <paper@paper.us.eu.org>
parents:
diff changeset
164 src/library/library.cc
1faa72660932 *: transfer back to cmake from autotools
Paper <paper@paper.us.eu.org>
parents:
diff changeset
165
1faa72660932 *: transfer back to cmake from autotools
Paper <paper@paper.us.eu.org>
parents:
diff changeset
166 # Tracking
1faa72660932 *: transfer back to cmake from autotools
Paper <paper@paper.us.eu.org>
parents:
diff changeset
167 src/track/media.cc
1faa72660932 *: transfer back to cmake from autotools
Paper <paper@paper.us.eu.org>
parents:
diff changeset
168
1faa72660932 *: transfer back to cmake from autotools
Paper <paper@paper.us.eu.org>
parents:
diff changeset
169 # Qt resources
1faa72660932 *: transfer back to cmake from autotools
Paper <paper@paper.us.eu.org>
parents:
diff changeset
170 rc/icons/icons.qrc
1faa72660932 *: transfer back to cmake from autotools
Paper <paper@paper.us.eu.org>
parents:
diff changeset
171 rc/sys/win32/dark/dark.qrc
1faa72660932 *: transfer back to cmake from autotools
Paper <paper@paper.us.eu.org>
parents:
diff changeset
172 rc/animone.qrc
1faa72660932 *: transfer back to cmake from autotools
Paper <paper@paper.us.eu.org>
parents:
diff changeset
173 rc/licenses.qrc
1faa72660932 *: transfer back to cmake from autotools
Paper <paper@paper.us.eu.org>
parents:
diff changeset
174 )
1faa72660932 *: transfer back to cmake from autotools
Paper <paper@paper.us.eu.org>
parents:
diff changeset
175
1faa72660932 *: transfer back to cmake from autotools
Paper <paper@paper.us.eu.org>
parents:
diff changeset
176 set(INCLUDE
367
8d45d892be88 *: instead of pugixml, use Qt XML features
Paper <paper@tflc.us>
parents: 364
diff changeset
177 ${Qt${QT_VERSION_MAJOR}Widgets_INCLUDE_DIRS}
8d45d892be88 *: instead of pugixml, use Qt XML features
Paper <paper@tflc.us>
parents: 364
diff changeset
178 ${Qt${QT_VERSION_MAJOR}Xml_INCLUDE_DIRS}
8d45d892be88 *: instead of pugixml, use Qt XML features
Paper <paper@tflc.us>
parents: 364
diff changeset
179 ${CURL_INCLUDE_DIRS}
343
1faa72660932 *: transfer back to cmake from autotools
Paper <paper@paper.us.eu.org>
parents:
diff changeset
180 include
1faa72660932 *: transfer back to cmake from autotools
Paper <paper@paper.us.eu.org>
parents:
diff changeset
181 dep/animia/include
1faa72660932 *: transfer back to cmake from autotools
Paper <paper@paper.us.eu.org>
parents:
diff changeset
182 dep/anitomy
1faa72660932 *: transfer back to cmake from autotools
Paper <paper@paper.us.eu.org>
parents:
diff changeset
183 dep
1faa72660932 *: transfer back to cmake from autotools
Paper <paper@paper.us.eu.org>
parents:
diff changeset
184 )
1faa72660932 *: transfer back to cmake from autotools
Paper <paper@paper.us.eu.org>
parents:
diff changeset
185
367
8d45d892be88 *: instead of pugixml, use Qt XML features
Paper <paper@tflc.us>
parents: 364
diff changeset
186 if(UTF8PROC_FOUND)
8d45d892be88 *: instead of pugixml, use Qt XML features
Paper <paper@tflc.us>
parents: 364
diff changeset
187 list(APPEND INCLUDE ${UTF8PROC_INCLUDE_DIRS})
8d45d892be88 *: instead of pugixml, use Qt XML features
Paper <paper@tflc.us>
parents: 364
diff changeset
188 else()
8d45d892be88 *: instead of pugixml, use Qt XML features
Paper <paper@tflc.us>
parents: 364
diff changeset
189 list(APPEND INCLUDE dep/utf8proc)
8d45d892be88 *: instead of pugixml, use Qt XML features
Paper <paper@tflc.us>
parents: 364
diff changeset
190 endif()
8d45d892be88 *: instead of pugixml, use Qt XML features
Paper <paper@tflc.us>
parents: 364
diff changeset
191
8d45d892be88 *: instead of pugixml, use Qt XML features
Paper <paper@tflc.us>
parents: 364
diff changeset
192 if(FMT_FOUND)
8d45d892be88 *: instead of pugixml, use Qt XML features
Paper <paper@tflc.us>
parents: 364
diff changeset
193 list(APPEND INCLUDE ${FMT_INCLUDE_DIRS})
8d45d892be88 *: instead of pugixml, use Qt XML features
Paper <paper@tflc.us>
parents: 364
diff changeset
194 else()
8d45d892be88 *: instead of pugixml, use Qt XML features
Paper <paper@tflc.us>
parents: 364
diff changeset
195 list(APPEND INCLUDE dep/fmt/include)
8d45d892be88 *: instead of pugixml, use Qt XML features
Paper <paper@tflc.us>
parents: 364
diff changeset
196 endif()
8d45d892be88 *: instead of pugixml, use Qt XML features
Paper <paper@tflc.us>
parents: 364
diff changeset
197
343
1faa72660932 *: transfer back to cmake from autotools
Paper <paper@paper.us.eu.org>
parents:
diff changeset
198 set(TS_FILES
1faa72660932 *: transfer back to cmake from autotools
Paper <paper@paper.us.eu.org>
parents:
diff changeset
199 rc/locale/en_GB.ts
1faa72660932 *: transfer back to cmake from autotools
Paper <paper@paper.us.eu.org>
parents:
diff changeset
200 )
1faa72660932 *: transfer back to cmake from autotools
Paper <paper@paper.us.eu.org>
parents:
diff changeset
201
1faa72660932 *: transfer back to cmake from autotools
Paper <paper@paper.us.eu.org>
parents:
diff changeset
202 set(DEFINES)
1faa72660932 *: transfer back to cmake from autotools
Paper <paper@paper.us.eu.org>
parents:
diff changeset
203
1faa72660932 *: transfer back to cmake from autotools
Paper <paper@paper.us.eu.org>
parents:
diff changeset
204 list(APPEND DEFINES MINORI_VERSION_MAJOR=${minori_VERSION_MAJOR})
1faa72660932 *: transfer back to cmake from autotools
Paper <paper@paper.us.eu.org>
parents:
diff changeset
205 list(APPEND DEFINES MINORI_VERSION_MINOR=${minori_VERSION_MINOR})
1faa72660932 *: transfer back to cmake from autotools
Paper <paper@paper.us.eu.org>
parents:
diff changeset
206 list(APPEND DEFINES MINORI_VERSION_PATCH=${minori_VERSION_PATCH})
1faa72660932 *: transfer back to cmake from autotools
Paper <paper@paper.us.eu.org>
parents:
diff changeset
207
1faa72660932 *: transfer back to cmake from autotools
Paper <paper@paper.us.eu.org>
parents:
diff changeset
208 ###########################################################################
1faa72660932 *: transfer back to cmake from autotools
Paper <paper@paper.us.eu.org>
parents:
diff changeset
209 # moc
1faa72660932 *: transfer back to cmake from autotools
Paper <paper@paper.us.eu.org>
parents:
diff changeset
210
1faa72660932 *: transfer back to cmake from autotools
Paper <paper@paper.us.eu.org>
parents:
diff changeset
211 cmake_language(CALL qt${QT_VERSION_MAJOR}_wrap_cpp SRC_FILES ${QT_MOC_FILES})
1faa72660932 *: transfer back to cmake from autotools
Paper <paper@paper.us.eu.org>
parents:
diff changeset
212
1faa72660932 *: transfer back to cmake from autotools
Paper <paper@paper.us.eu.org>
parents:
diff changeset
213 ###########################################################################
1faa72660932 *: transfer back to cmake from autotools
Paper <paper@paper.us.eu.org>
parents:
diff changeset
214 # Translations
1faa72660932 *: transfer back to cmake from autotools
Paper <paper@paper.us.eu.org>
parents:
diff changeset
215
1faa72660932 *: transfer back to cmake from autotools
Paper <paper@paper.us.eu.org>
parents:
diff changeset
216 set_source_files_properties(${TS_FILES} PROPERTIES OUTPUT_LOCATION "${CMAKE_CURRENT_BINARY_DIR}/rc/locale")
1faa72660932 *: transfer back to cmake from autotools
Paper <paper@paper.us.eu.org>
parents:
diff changeset
217
1faa72660932 *: transfer back to cmake from autotools
Paper <paper@paper.us.eu.org>
parents:
diff changeset
218 if(UPDATE_TRANSLATIONS)
1faa72660932 *: transfer back to cmake from autotools
Paper <paper@paper.us.eu.org>
parents:
diff changeset
219 cmake_language(CALL qt${QT_VERSION_MAJOR}_create_translation ${SRC_FILES} ${TS_FILES} OPTIONS "-tr-function-alias tr+=Translate -I${CMAKE_CURRENT_SOURCE_DIR}/include")
1faa72660932 *: transfer back to cmake from autotools
Paper <paper@paper.us.eu.org>
parents:
diff changeset
220 endif()
1faa72660932 *: transfer back to cmake from autotools
Paper <paper@paper.us.eu.org>
parents:
diff changeset
221 cmake_language(CALL qt${QT_VERSION_MAJOR}_add_translation QM_FILES ${TS_FILES})
1faa72660932 *: transfer back to cmake from autotools
Paper <paper@paper.us.eu.org>
parents:
diff changeset
222 list(APPEND SRC_FILES ${QM_FILES})
1faa72660932 *: transfer back to cmake from autotools
Paper <paper@paper.us.eu.org>
parents:
diff changeset
223
1faa72660932 *: transfer back to cmake from autotools
Paper <paper@paper.us.eu.org>
parents:
diff changeset
224 set(LOCALE_QRC_LOCATION "${CMAKE_CURRENT_BINARY_DIR}/rc/locale.qrc")
1faa72660932 *: transfer back to cmake from autotools
Paper <paper@paper.us.eu.org>
parents:
diff changeset
225 set(QRC "<!DOCTYPE rcc><RCC version=\"1.0\">\n\t<qresource>\n")
1faa72660932 *: transfer back to cmake from autotools
Paper <paper@paper.us.eu.org>
parents:
diff changeset
226 get_filename_component(DIR "${LOCALE_QRC_LOCATION}" DIRECTORY)
1faa72660932 *: transfer back to cmake from autotools
Paper <paper@paper.us.eu.org>
parents:
diff changeset
227 foreach (qm ${QM_FILES})
1faa72660932 *: transfer back to cmake from autotools
Paper <paper@paper.us.eu.org>
parents:
diff changeset
228 file(RELATIVE_PATH name ${DIR} ${qm})
1faa72660932 *: transfer back to cmake from autotools
Paper <paper@paper.us.eu.org>
parents:
diff changeset
229 string(APPEND QRC "\t\t<file>${name}</file>\n")
1faa72660932 *: transfer back to cmake from autotools
Paper <paper@paper.us.eu.org>
parents:
diff changeset
230 endforeach()
1faa72660932 *: transfer back to cmake from autotools
Paper <paper@paper.us.eu.org>
parents:
diff changeset
231 string(APPEND QRC "\t</qresource>\n</RCC>\n")
1faa72660932 *: transfer back to cmake from autotools
Paper <paper@paper.us.eu.org>
parents:
diff changeset
232 file(WRITE "${LOCALE_QRC_LOCATION}" ${QRC})
1faa72660932 *: transfer back to cmake from autotools
Paper <paper@paper.us.eu.org>
parents:
diff changeset
233
1faa72660932 *: transfer back to cmake from autotools
Paper <paper@paper.us.eu.org>
parents:
diff changeset
234 list(APPEND SRC_FILES "${LOCALE_QRC_LOCATION}")
1faa72660932 *: transfer back to cmake from autotools
Paper <paper@paper.us.eu.org>
parents:
diff changeset
235
1faa72660932 *: transfer back to cmake from autotools
Paper <paper@paper.us.eu.org>
parents:
diff changeset
236 ###########################################################################
1faa72660932 *: transfer back to cmake from autotools
Paper <paper@paper.us.eu.org>
parents:
diff changeset
237 # Platform specific stuff
1faa72660932 *: transfer back to cmake from autotools
Paper <paper@paper.us.eu.org>
parents:
diff changeset
238
364
99c961c91809 core: refactor out byte stream into its own file
Paper <paper@paper.us.eu.org>
parents: 356
diff changeset
239 # Endianness
99c961c91809 core: refactor out byte stream into its own file
Paper <paper@paper.us.eu.org>
parents: 356
diff changeset
240 include (TestBigEndian)
99c961c91809 core: refactor out byte stream into its own file
Paper <paper@paper.us.eu.org>
parents: 356
diff changeset
241 TEST_BIG_ENDIAN(IS_BIG_ENDIAN)
99c961c91809 core: refactor out byte stream into its own file
Paper <paper@paper.us.eu.org>
parents: 356
diff changeset
242 if(IS_BIG_ENDIAN)
99c961c91809 core: refactor out byte stream into its own file
Paper <paper@paper.us.eu.org>
parents: 356
diff changeset
243 list(APPEND DEFINES BYTE_ORDER_BIG)
99c961c91809 core: refactor out byte stream into its own file
Paper <paper@paper.us.eu.org>
parents: 356
diff changeset
244 else()
99c961c91809 core: refactor out byte stream into its own file
Paper <paper@paper.us.eu.org>
parents: 356
diff changeset
245 list(APPEND DEFINES BYTE_ORDER_LITTLE)
99c961c91809 core: refactor out byte stream into its own file
Paper <paper@paper.us.eu.org>
parents: 356
diff changeset
246 endif()
99c961c91809 core: refactor out byte stream into its own file
Paper <paper@paper.us.eu.org>
parents: 356
diff changeset
247
343
1faa72660932 *: transfer back to cmake from autotools
Paper <paper@paper.us.eu.org>
parents:
diff changeset
248 # This is also used in the Win32 rc file
1faa72660932 *: transfer back to cmake from autotools
Paper <paper@paper.us.eu.org>
parents:
diff changeset
249 set(RC_INFO_STRING "A lightweight anime tracker built with Qt.")
1faa72660932 *: transfer back to cmake from autotools
Paper <paper@paper.us.eu.org>
parents:
diff changeset
250
1faa72660932 *: transfer back to cmake from autotools
Paper <paper@paper.us.eu.org>
parents:
diff changeset
251 if(APPLE) # Mac OS X (or OS X (or macOS))
1faa72660932 *: transfer back to cmake from autotools
Paper <paper@paper.us.eu.org>
parents:
diff changeset
252 set(MACOSX_BUNDLE_BUNDLE_NAME "Minori")
1faa72660932 *: transfer back to cmake from autotools
Paper <paper@paper.us.eu.org>
parents:
diff changeset
253 set(MACOSX_BUNDLE_BUNDLE_VERSION ${minori_VERSION})
1faa72660932 *: transfer back to cmake from autotools
Paper <paper@paper.us.eu.org>
parents:
diff changeset
254 set(MACOSX_BUNDLE_COPYRIGHT "Copyright (C) Paper 2023-2024")
1faa72660932 *: transfer back to cmake from autotools
Paper <paper@paper.us.eu.org>
parents:
diff changeset
255 set(MACOSX_BUNDLE_GUI_IDENTIFIER "org.eu.us.paper.minori")
1faa72660932 *: transfer back to cmake from autotools
Paper <paper@paper.us.eu.org>
parents:
diff changeset
256 set(MACOSX_BUNDLE_INFO_STRING ${RC_INFO_STRING})
1faa72660932 *: transfer back to cmake from autotools
Paper <paper@paper.us.eu.org>
parents:
diff changeset
257
1faa72660932 *: transfer back to cmake from autotools
Paper <paper@paper.us.eu.org>
parents:
diff changeset
258 find_library(FOUNDATION_LIBRARY Foundation)
1faa72660932 *: transfer back to cmake from autotools
Paper <paper@paper.us.eu.org>
parents:
diff changeset
259 find_library(APPKIT_LIBRARY AppKit)
1faa72660932 *: transfer back to cmake from autotools
Paper <paper@paper.us.eu.org>
parents:
diff changeset
260 list(APPEND SRC_FILES src/sys/osx/dark_theme.cc src/sys/osx/permissions.cc)
1faa72660932 *: transfer back to cmake from autotools
Paper <paper@paper.us.eu.org>
parents:
diff changeset
261 list(APPEND LIBRARIES ${FOUNDATION_LIBRARY} ${APPKIT_LIBRARY})
1faa72660932 *: transfer back to cmake from autotools
Paper <paper@paper.us.eu.org>
parents:
diff changeset
262 list(APPEND DEFINES MACOSX)
1faa72660932 *: transfer back to cmake from autotools
Paper <paper@paper.us.eu.org>
parents:
diff changeset
263 elseif(WIN32) # Windows
1faa72660932 *: transfer back to cmake from autotools
Paper <paper@paper.us.eu.org>
parents:
diff changeset
264 configure_file(
1faa72660932 *: transfer back to cmake from autotools
Paper <paper@paper.us.eu.org>
parents:
diff changeset
265 ${CMAKE_CURRENT_SOURCE_DIR}/rc/sys/win32/version.rc.in
1faa72660932 *: transfer back to cmake from autotools
Paper <paper@paper.us.eu.org>
parents:
diff changeset
266 ${CMAKE_CURRENT_BINARY_DIR}/rc/version.rc
1faa72660932 *: transfer back to cmake from autotools
Paper <paper@paper.us.eu.org>
parents:
diff changeset
267 @ONLY
1faa72660932 *: transfer back to cmake from autotools
Paper <paper@paper.us.eu.org>
parents:
diff changeset
268 )
1faa72660932 *: transfer back to cmake from autotools
Paper <paper@paper.us.eu.org>
parents:
diff changeset
269 list(APPEND SRC_FILES
1faa72660932 *: transfer back to cmake from autotools
Paper <paper@paper.us.eu.org>
parents:
diff changeset
270 src/sys/win32/dark_theme.cc
1faa72660932 *: transfer back to cmake from autotools
Paper <paper@paper.us.eu.org>
parents:
diff changeset
271 ${CMAKE_CURRENT_BINARY_DIR}/rc/version.rc
1faa72660932 *: transfer back to cmake from autotools
Paper <paper@paper.us.eu.org>
parents:
diff changeset
272 )
1faa72660932 *: transfer back to cmake from autotools
Paper <paper@paper.us.eu.org>
parents:
diff changeset
273 list(APPEND DEFINES WIN32)
1faa72660932 *: transfer back to cmake from autotools
Paper <paper@paper.us.eu.org>
parents:
diff changeset
274 else()
1faa72660932 *: transfer back to cmake from autotools
Paper <paper@paper.us.eu.org>
parents:
diff changeset
275 find_package(PkgConfig)
1faa72660932 *: transfer back to cmake from autotools
Paper <paper@paper.us.eu.org>
parents:
diff changeset
276 if (PKG_CONFIG_FOUND)
1faa72660932 *: transfer back to cmake from autotools
Paper <paper@paper.us.eu.org>
parents:
diff changeset
277 pkg_check_modules(GLIB gio-2.0 glib-2.0)
1faa72660932 *: transfer back to cmake from autotools
Paper <paper@paper.us.eu.org>
parents:
diff changeset
278 if (GLIB_FOUND)
1faa72660932 *: transfer back to cmake from autotools
Paper <paper@paper.us.eu.org>
parents:
diff changeset
279 list(APPEND SRC_FILES src/sys/glib/dark_theme.cc)
1faa72660932 *: transfer back to cmake from autotools
Paper <paper@paper.us.eu.org>
parents:
diff changeset
280 list(APPEND INCLUDE ${GLIB_INCLUDE_DIRS})
1faa72660932 *: transfer back to cmake from autotools
Paper <paper@paper.us.eu.org>
parents:
diff changeset
281 list(APPEND LIBRARIES ${GLIB_LINK_LIBRARIES})
351
c844f8bb87ce gui/theme: add xsettings backend
Paper <paper@paper.us.eu.org>
parents: 346
diff changeset
282 list(APPEND DEFINES GLIB) # XXX rename HAVE_GLIB or something
c844f8bb87ce gui/theme: add xsettings backend
Paper <paper@paper.us.eu.org>
parents: 346
diff changeset
283 endif()
c844f8bb87ce gui/theme: add xsettings backend
Paper <paper@paper.us.eu.org>
parents: 346
diff changeset
284
c844f8bb87ce gui/theme: add xsettings backend
Paper <paper@paper.us.eu.org>
parents: 346
diff changeset
285 pkg_check_modules(XCB xcb)
c844f8bb87ce gui/theme: add xsettings backend
Paper <paper@paper.us.eu.org>
parents: 346
diff changeset
286 if (XCB_FOUND)
c844f8bb87ce gui/theme: add xsettings backend
Paper <paper@paper.us.eu.org>
parents: 346
diff changeset
287 list(APPEND SRC_FILES src/sys/x11/settings.cc src/sys/x11/dark_theme.cc)
c844f8bb87ce gui/theme: add xsettings backend
Paper <paper@paper.us.eu.org>
parents: 346
diff changeset
288 list(APPEND INCLUDE ${XCB_INCLUDE_DIRS})
c844f8bb87ce gui/theme: add xsettings backend
Paper <paper@paper.us.eu.org>
parents: 346
diff changeset
289 list(APPEND LIBRARIES ${XCB_LINK_LIBRARIES})
c844f8bb87ce gui/theme: add xsettings backend
Paper <paper@paper.us.eu.org>
parents: 346
diff changeset
290 list(APPEND DEFINES HAVE_XCB)
343
1faa72660932 *: transfer back to cmake from autotools
Paper <paper@paper.us.eu.org>
parents:
diff changeset
291 endif()
1faa72660932 *: transfer back to cmake from autotools
Paper <paper@paper.us.eu.org>
parents:
diff changeset
292 endif()
1faa72660932 *: transfer back to cmake from autotools
Paper <paper@paper.us.eu.org>
parents:
diff changeset
293 endif()
1faa72660932 *: transfer back to cmake from autotools
Paper <paper@paper.us.eu.org>
parents:
diff changeset
294
1faa72660932 *: transfer back to cmake from autotools
Paper <paper@paper.us.eu.org>
parents:
diff changeset
295 ###########################################################################
1faa72660932 *: transfer back to cmake from autotools
Paper <paper@paper.us.eu.org>
parents:
diff changeset
296
1faa72660932 *: transfer back to cmake from autotools
Paper <paper@paper.us.eu.org>
parents:
diff changeset
297 add_executable(minori WIN32 MACOSX_BUNDLE ${SRC_FILES})
1faa72660932 *: transfer back to cmake from autotools
Paper <paper@paper.us.eu.org>
parents:
diff changeset
298 set_property(TARGET minori PROPERTY CXX_STANDARD 17)
1faa72660932 *: transfer back to cmake from autotools
Paper <paper@paper.us.eu.org>
parents:
diff changeset
299 set_property(TARGET minori PROPERTY AUTORCC ON)
1faa72660932 *: transfer back to cmake from autotools
Paper <paper@paper.us.eu.org>
parents:
diff changeset
300
367
8d45d892be88 *: instead of pugixml, use Qt XML features
Paper <paper@tflc.us>
parents: 364
diff changeset
301 target_include_directories(minori PRIVATE ${INCLUDE})
343
1faa72660932 *: transfer back to cmake from autotools
Paper <paper@paper.us.eu.org>
parents:
diff changeset
302 target_link_libraries(minori PRIVATE ${LIBRARIES})
1faa72660932 *: transfer back to cmake from autotools
Paper <paper@paper.us.eu.org>
parents:
diff changeset
303 target_compile_options(minori PRIVATE -Wall -Wpedantic -Wextra -Wsuggest-override -Wold-style-cast)
1faa72660932 *: transfer back to cmake from autotools
Paper <paper@paper.us.eu.org>
parents:
diff changeset
304 target_compile_definitions(minori PRIVATE ${DEFINES})
1faa72660932 *: transfer back to cmake from autotools
Paper <paper@paper.us.eu.org>
parents:
diff changeset
305
1faa72660932 *: transfer back to cmake from autotools
Paper <paper@paper.us.eu.org>
parents:
diff changeset
306 if(APPLE)
1faa72660932 *: transfer back to cmake from autotools
Paper <paper@paper.us.eu.org>
parents:
diff changeset
307 set_target_properties(minori PROPERTIES MACOSX_BUNDLE TRUE)
1faa72660932 *: transfer back to cmake from autotools
Paper <paper@paper.us.eu.org>
parents:
diff changeset
308 elseif(WIN32)
1faa72660932 *: transfer back to cmake from autotools
Paper <paper@paper.us.eu.org>
parents:
diff changeset
309 install(FILES $<TARGET_RUNTIME_DLLS:minori> TYPE BIN)
1faa72660932 *: transfer back to cmake from autotools
Paper <paper@paper.us.eu.org>
parents:
diff changeset
310 endif()