-
Notifications
You must be signed in to change notification settings - Fork 18
/
Copy pathCMakeLists.txt
69 lines (61 loc) · 1.47 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
# CMake settings.
# ---------------
cmake_minimum_required(VERSION 3.3)
list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake")
cmake_policy(SET CMP0048 NEW)
# Project settings.
# -----------------
project(jfbview VERSION 0.6.0)
# Build options.
# --------------
option(
ENABLE_IMAGE_SUPPORT
"If OFF, disable support for images via Imlib2 and build a PDF-only variant (jfbpdf)."
ON
)
set(
PACKAGE_FORMAT
"DEB"
CACHE STRING
"CPack package generator to enable.")
set(
LIBJPEG_PACKAGE_NAME
"libjpeg62-turbo"
CACHE STRING
"The name of the libjpeg package to include as a dependency in the generated package.")
set(
PACKAGE_FILE_PREFIX
"jfbview"
CACHE STRING
"CPack package file name prefix.")
option(BUILD_TESTING "Build unit tests." OFF)
option(
ENABLE_LEGACY_PDF_IMPL
"If ON, enables legacy PDF document implementation based on low-level MuPDF APIs."
OFF
)
option(
ENABLE_LEGACY_IMAGE_IMPL
"If ON, enables legacy image document implementation based on Imlib2."
OFF
)
# Third-party code in vendor.
# ---------------------------
add_subdirectory(vendor)
include_directories(${vendor_mupdf_include_dirs})
link_directories(${vendor_mupdf_link_dirs})
# Project source code.
# --------------------
add_subdirectory(src)
# Docs.
# -----
add_subdirectory(doc)
# Packaging.
# ----------
add_subdirectory(packaging)
# Tests.
# ----------
if(CMAKE_PROJECT_NAME STREQUAL PROJECT_NAME AND BUILD_TESTING)
include(CTest)
add_subdirectory(tests)
endif()