-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
59 lines (48 loc) · 1.71 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
cmake_minimum_required(VERSION 3.10)
project(calendar NONE)
# Create a booklet from templated and manual pages.
# Can be used for example to create a weekly agenda (one week per double page).
# pdf are generated from template svg files (SVG_EVEN and SVG_ODD)
# and a data file (DATA_FILE).
# Some pages can be inserted before (EXTRA_BEFORE) and after
# (EXTRA_AFTER).
# Path to Inkscape generator plugin (generator.py, cf. https://github.com/galou/inkscape_generator).
set(GENERATOR "$ENV{HOME}/.config/inkscape/extensions/generator/generator.py")
# SVG templates relative to this file
set(SVG_EVEN "templates/template-even-fr.svg")
set(SVG_ODD "templates/template-odd-fr.svg")
set(DATA_FILE "${CMAKE_SOURCE_DIR}/calendar_data.csv")
# Directory where to find inkex.py
set(INKEX_PY_DIR "/usr/share/inkscape/extensions")
# Extra replacement used by the Inkscape generator plugin.
# Cf. https://github.com/galou/inkscape_generator.
set(EXTRA_REPLACEMENT "")
# First page generated by ${GENERATOR}
set(FIRST_GEN_PAGE 8)
# Last page generated by ${GENERATOR}.
# Value last line, fourth column in ${DATA_FILE}.
set(LAST_GEN_PAGE 117)
# Extra manually-created pages at the beginning.
# These pages need to be in ${CMAKE_BINARY_DIR}.
set(EXTRA_BEFORE
p001-cover.pdf
white.pdf
p003-memento.pdf
p004.pdf
p005.pdf
p006.pdf
p007.pdf
)
# Extra manually-created pages at the end.
# These pages need to be in ${CMAKE_BINARY_DIR}.
# The total number of pages must be a multiple of 4.
set(EXTRA_AFTER
notes-even.pdf
white.pdf
white.pdf
)
set(OUTPUT_FILE "calendar.pdf")
option(GENERATE_SVG "Also generate the svg." OFF)
# End of configuration, do not touch under this line
include(${CMAKE_SOURCE_DIR}/cmake/calendar.cmake)
generate_calendar()