forked from bylee20/okular-backend-mupdf
-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathCMakeLists.txt
70 lines (57 loc) · 1.6 KB
/
CMakeLists.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
project(okular-mupdf)
set(CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake/modules ${CMAKE_MODULE_PATH})
cmake_minimum_required(VERSION 2.8.12)
set(CMAKE_CXX_STANDARD 20)
find_package(PkgConfig REQUIRED)
pkg_check_modules(OPENJPEG2 REQUIRED libopenjp2)
pkg_check_modules(OPENSSL REQUIRED openssl)
find_package(ECM 5.19.0 CONFIG REQUIRED)
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${ECM_MODULE_PATH})
include(FeatureSummary)
include(KDEInstallDirs)
include(ECMEnableSanitizers)
# Unless we do this we get some really fucking annoying warnings about stuff
# noone cares about (yes, I'm hangry).
set(KDE_SKIP_TEST_SETTINGS TRUE)
include(KDECMakeSettings)
find_package(Okular5 REQUIRED)
find_package(MuPDF REQUIRED)
find_package(JPEG REQUIRED)
# TODO: old crap style, fix
find_package(jbig2dec REQUIRED)
find_package(OpenJPEG REQUIRED)
find_package(LCMS2 REQUIRED)
find_package(KF5 REQUIRED COMPONENTS
CoreAddons
I18n
)
set(okularGenerator_mupdf_SRCS
document.cpp
page.cpp
generator_mupdf.cpp
document.hpp
page.hpp
generator_mupdf.hpp
)
kcoreaddons_add_plugin(okularGenerator_mupdf
JSON "libokularGenerator_mupdf.json"
INSTALL_NAMESPACE "okular/generators"
SOURCES ${okularGenerator_mupdf_SRCS}
)
target_link_libraries(okularGenerator_mupdf
Okular::Core
KF5::I18n
MuPDF::Main
MuPDF::Third
MuPDF::MuJS
JPEG::JPEG
${OPENJPEG_LIBRARIES}
${JBIG2DEC_LIBRARIES}
${LCMS2_LIBRARIES}
)
include_directories(
${OPENJPEG_INCLUDE_DIRS}
${JBIG2DEC_INCLUDE_DIRS}
${LCMS2_INCLUDE_DIR}
)
feature_summary(WHAT ALL FATAL_ON_MISSING_REQUIRED_PACKAGES)