Changeset View
Changeset View
Standalone View
Standalone View
CMakeLists.txt
Show All 40 Lines | |||||
41 | endif() | 41 | endif() | ||
42 | 42 | | |||
43 | if(NOT CMAKE_VERSION VERSION_LESS "3.10.0") | 43 | if(NOT CMAKE_VERSION VERSION_LESS "3.10.0") | ||
44 | # CMake 3.9+ warns about automoc on files without Q_OBJECT, and doesn't know about other macros. | 44 | # CMake 3.9+ warns about automoc on files without Q_OBJECT, and doesn't know about other macros. | ||
45 | # 3.10+ lets us provide more macro names that require automoc. | 45 | # 3.10+ lets us provide more macro names that require automoc. | ||
46 | list(APPEND CMAKE_AUTOMOC_MACRO_NAMES "OKULAR_EXPORT_PLUGIN") | 46 | list(APPEND CMAKE_AUTOMOC_MACRO_NAMES "OKULAR_EXPORT_PLUGIN") | ||
47 | endif() | 47 | endif() | ||
48 | 48 | | |||
49 | set(optionalComponents) | ||||
50 | if (ANDROID) | ||||
51 | # we want to make sure that generally all components are found | ||||
52 | | ||||
53 | set(optionalComponents "OPTIONAL_COMPONENTS") | ||||
54 | endif() | ||||
55 | | ||||
49 | find_package(KF5 ${KF5_REQUIRED_VERSION} REQUIRED COMPONENTS | 56 | find_package(KF5 ${KF5_REQUIRED_VERSION} REQUIRED COMPONENTS | ||
50 | Archive | 57 | Archive | ||
51 | Bookmarks | 58 | Bookmarks | ||
52 | Completion | 59 | Completion | ||
53 | Config | 60 | Config | ||
54 | ConfigWidgets | 61 | ConfigWidgets | ||
55 | CoreAddons | 62 | CoreAddons | ||
56 | Crash | 63 | Crash | ||
57 | DocTools | | |||
58 | IconThemes | 64 | IconThemes | ||
59 | JS | | |||
60 | KIO | 65 | KIO | ||
61 | Parts | 66 | Parts | ||
62 | ThreadWeaver | 67 | ThreadWeaver | ||
63 | Wallet | | |||
64 | WindowSystem | 68 | WindowSystem | ||
69 | ${optionalComponents} | ||||
70 | DocTools | ||||
71 | JS | ||||
72 | Wallet | ||||
65 | ) | 73 | ) | ||
74 | | ||||
75 | if(KF5Wallet_FOUND) | ||||
76 | add_definitions(-DWITH_KWALLET=1) | ||||
77 | endif() | ||||
78 | if(KF5JS_FOUND) | ||||
79 | add_definitions(-DWITH_KJS=1) | ||||
80 | endif() | ||||
81 | | ||||
66 | if(NOT WIN32 AND NOT ANDROID) | 82 | if(NOT WIN32 AND NOT ANDROID) | ||
67 | find_package(KF5 ${KF5_REQUIRED_VERSION} REQUIRED COMPONENTS | 83 | find_package(KF5 ${KF5_REQUIRED_VERSION} REQUIRED COMPONENTS | ||
68 | Activities | 84 | Activities | ||
69 | ) | 85 | ) | ||
70 | set_package_properties("KF5Activities" PROPERTIES | 86 | set_package_properties("KF5Activities" PROPERTIES | ||
71 | DESCRIPTION "Activities interface library" | 87 | DESCRIPTION "Activities interface library" | ||
72 | URL "https://api.kde.org/frameworks/kactivities/html/" | 88 | URL "https://api.kde.org/frameworks/kactivities/html/" | ||
73 | TYPE RECOMMENDED | 89 | TYPE RECOMMENDED | ||
▲ Show 20 Lines • Show All 49 Lines • ▼ Show 20 Line(s) | |||||
123 | endif() | 139 | endif() | ||
124 | 140 | | |||
125 | add_subdirectory( ui ) | 141 | add_subdirectory( ui ) | ||
126 | add_subdirectory( shell ) | 142 | add_subdirectory( shell ) | ||
127 | add_subdirectory( generators ) | 143 | add_subdirectory( generators ) | ||
128 | add_subdirectory( autotests ) | 144 | add_subdirectory( autotests ) | ||
129 | add_subdirectory( conf/autotests ) | 145 | add_subdirectory( conf/autotests ) | ||
130 | 146 | | |||
147 | if(KF5DocTools_FOUND) | ||||
131 | add_subdirectory(doc) | 148 | add_subdirectory(doc) | ||
149 | endif() | ||||
132 | 150 | | |||
133 | include(OkularConfigureChecks.cmake) | 151 | include(OkularConfigureChecks.cmake) | ||
134 | 152 | | |||
135 | if(NOT WIN32) | 153 | if(NOT WIN32) | ||
136 | set(MATH_LIB m) | 154 | set(MATH_LIB m) | ||
137 | else(NOT WIN32) | 155 | else(NOT WIN32) | ||
138 | set(MATH_LIB) | 156 | set(MATH_LIB) | ||
139 | endif(NOT WIN32) | 157 | endif(NOT WIN32) | ||
Show All 28 Lines | 161 | set(okularcore_SRCS | |||
168 | core/textdocumentgenerator.cpp | 186 | core/textdocumentgenerator.cpp | ||
169 | core/textdocumentsettings.cpp | 187 | core/textdocumentsettings.cpp | ||
170 | core/textpage.cpp | 188 | core/textpage.cpp | ||
171 | core/tilesmanager.cpp | 189 | core/tilesmanager.cpp | ||
172 | core/utils.cpp | 190 | core/utils.cpp | ||
173 | core/view.cpp | 191 | core/view.cpp | ||
174 | core/fileprinter.cpp | 192 | core/fileprinter.cpp | ||
175 | core/script/event.cpp | 193 | core/script/event.cpp | ||
176 | core/script/executor_kjs.cpp | | |||
177 | core/script/kjs_app.cpp | | |||
178 | core/script/kjs_console.cpp | | |||
179 | core/script/kjs_data.cpp | | |||
180 | core/script/kjs_document.cpp | | |||
181 | core/script/kjs_event.cpp | | |||
182 | core/script/kjs_fullscreen.cpp | | |||
183 | core/script/kjs_field.cpp | | |||
184 | core/script/kjs_spell.cpp | | |||
185 | core/script/kjs_util.cpp | | |||
186 | core/synctex/synctex_parser.c | 194 | core/synctex/synctex_parser.c | ||
187 | core/synctex/synctex_parser_utils.c | 195 | core/synctex/synctex_parser_utils.c | ||
188 | ) | 196 | ) | ||
189 | | ||||
190 | qt5_add_resources(okularcore_SRCS | 197 | qt5_add_resources(okularcore_SRCS | ||
191 | core/script/builtin.qrc | 198 | core/script/builtin.qrc | ||
192 | ) | 199 | ) | ||
193 | 200 | | |||
194 | ki18n_wrap_ui(okularcore_SRCS | 201 | ki18n_wrap_ui(okularcore_SRCS | ||
195 | conf/textdocumentsettings.ui | 202 | conf/textdocumentsettings.ui | ||
196 | ) | 203 | ) | ||
197 | 204 | | |||
▲ Show 20 Lines • Show All 50 Lines • ▼ Show 20 Line(s) | 254 | if(WIN32) | |||
248 | set(SHLWAPI shlwapi) | 255 | set(SHLWAPI shlwapi) | ||
249 | endif(WIN32) | 256 | endif(WIN32) | ||
250 | 257 | | |||
251 | target_link_libraries(okularcore | 258 | target_link_libraries(okularcore | ||
252 | PRIVATE | 259 | PRIVATE | ||
253 | ${OKULAR_IOKIT} | 260 | ${OKULAR_IOKIT} | ||
254 | ${SHLWAPI} | 261 | ${SHLWAPI} | ||
255 | KF5::Archive | 262 | KF5::Archive | ||
256 | KF5::JS | | |||
257 | KF5::JSApi | | |||
258 | KF5::KIOCore | 263 | KF5::KIOCore | ||
259 | KF5::KIOWidgets | 264 | KF5::KIOWidgets | ||
260 | KF5::I18n | 265 | KF5::I18n | ||
261 | KF5::ThreadWeaver | 266 | KF5::ThreadWeaver | ||
262 | KF5::Wallet | | |||
263 | KF5::Bookmarks | 267 | KF5::Bookmarks | ||
264 | Phonon::phonon4qt5 | 268 | Phonon::phonon4qt5 | ||
265 | ${MATH_LIB} | 269 | ${MATH_LIB} | ||
266 | ${ZLIB_LIBRARIES} | 270 | ${ZLIB_LIBRARIES} | ||
267 | PUBLIC # these are included from the installed headers | 271 | PUBLIC # these are included from the installed headers | ||
268 | KF5::CoreAddons | 272 | KF5::CoreAddons | ||
269 | KF5::XmlGui | 273 | KF5::XmlGui | ||
270 | KF5::ConfigGui | 274 | KF5::ConfigGui | ||
271 | Qt5::PrintSupport | 275 | Qt5::PrintSupport | ||
272 | Qt5::Widgets | 276 | Qt5::Widgets | ||
273 | ) | 277 | ) | ||
274 | 278 | | |||
279 | | ||||
280 | if (KF5Wallet_FOUND) | ||||
281 | target_link_libraries(okularcore PRIVATE KF5::Wallet) | ||||
282 | endif() | ||||
283 | if (KF5JS_FOUND) | ||||
284 | target_sources(okularcore PRIVATE | ||||
285 | core/script/executor_kjs.cpp | ||||
286 | core/script/kjs_app.cpp | ||||
287 | core/script/kjs_console.cpp | ||||
288 | core/script/kjs_data.cpp | ||||
289 | core/script/kjs_document.cpp | ||||
290 | core/script/kjs_field.cpp | ||||
291 | core/script/kjs_fullscreen.cpp | ||||
292 | core/script/kjs_field.cpp | ||||
293 | core/script/kjs_spell.cpp | ||||
294 | core/script/kjs_util.cpp | ||||
295 | core/script/kjs_event.cpp | ||||
296 | ) | ||||
297 | target_link_libraries(okularcore PRIVATE KF5::JS KF5::JSApi) | ||||
298 | endif() | ||||
299 | | ||||
275 | set_target_properties(okularcore PROPERTIES VERSION 9.0.0 SOVERSION 9 OUTPUT_NAME Okular5Core EXPORT_NAME Core) | 300 | set_target_properties(okularcore PROPERTIES VERSION 9.0.0 SOVERSION 9 OUTPUT_NAME Okular5Core EXPORT_NAME Core) | ||
276 | 301 | | |||
277 | install(TARGETS okularcore EXPORT Okular5Targets ${KDE_INSTALL_TARGETS_DEFAULT_ARGS}) | 302 | install(TARGETS okularcore EXPORT Okular5Targets ${KDE_INSTALL_TARGETS_DEFAULT_ARGS}) | ||
278 | 303 | | |||
279 | install(FILES conf/okular.kcfg DESTINATION ${KDE_INSTALL_KCFGDIR}) | 304 | install(FILES conf/okular.kcfg DESTINATION ${KDE_INSTALL_KCFGDIR}) | ||
280 | install(FILES conf/okular_core.kcfg DESTINATION ${KDE_INSTALL_KCFGDIR}) | 305 | install(FILES conf/okular_core.kcfg DESTINATION ${KDE_INSTALL_KCFGDIR}) | ||
281 | install(FILES core/okularGenerator.desktop DESTINATION ${KDE_INSTALL_KSERVICETYPES5DIR}) | 306 | install(FILES core/okularGenerator.desktop DESTINATION ${KDE_INSTALL_KSERVICETYPES5DIR}) | ||
282 | 307 | | |||
▲ Show 20 Lines • Show All 90 Lines • ▼ Show 20 Line(s) | 392 | target_link_libraries(okularpart okularcore | |||
373 | KF5::I18n | 398 | KF5::I18n | ||
374 | KF5::IconThemes | 399 | KF5::IconThemes | ||
375 | KF5::ItemViews | 400 | KF5::ItemViews | ||
376 | KF5::KIOCore | 401 | KF5::KIOCore | ||
377 | KF5::KIOFileWidgets | 402 | KF5::KIOFileWidgets | ||
378 | KF5::KIOWidgets | 403 | KF5::KIOWidgets | ||
379 | KF5::Parts | 404 | KF5::Parts | ||
380 | KF5::Solid | 405 | KF5::Solid | ||
381 | KF5::Wallet | | |||
382 | KF5::WindowSystem | 406 | KF5::WindowSystem | ||
383 | ) | 407 | ) | ||
384 | 408 | | |||
409 | if(KF5Wallet_FOUND) | ||||
410 | target_link_libraries(okularpart KF5::Wallet) | ||||
411 | endif() | ||||
412 | | ||||
385 | if (KDEExperimentalPurpose_FOUND) | 413 | if (KDEExperimentalPurpose_FOUND) | ||
386 | target_link_libraries(okularpart KDEExperimental::PurposeWidgets) | 414 | target_link_libraries(okularpart KDEExperimental::PurposeWidgets) | ||
387 | endif() | 415 | endif() | ||
388 | 416 | | |||
389 | set_target_properties(okularpart PROPERTIES PREFIX "") | 417 | set_target_properties(okularpart PROPERTIES PREFIX "") | ||
390 | 418 | | |||
391 | if (Qt5TextToSpeech_FOUND) | 419 | if (Qt5TextToSpeech_FOUND) | ||
392 | target_link_libraries(okularpart Qt5::TextToSpeech) | 420 | target_link_libraries(okularpart Qt5::TextToSpeech) | ||
Show All 36 Lines |