Skip to content

Commit 421db1c

Browse files
committed
README.md: add build instructions
1 parent 1e94c44 commit 421db1c

File tree

2 files changed

+43
-0
lines changed

2 files changed

+43
-0
lines changed

README.md

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,3 +31,45 @@ sh$ diff recovered-data.txt hidden-data.txt
3131
sh$ echo $?
3232
0
3333
```
34+
35+
# Build instructions
36+
37+
The build process is a bit awkward, as pdfid is an in-tree patch of a library.
38+
39+
The package depends on all packages needed by PoDoFo, plus `libgmp-dev`.
40+
41+
```
42+
cmake
43+
libboost-dev
44+
libcppunit-dev
45+
libfontconfig1-dev
46+
libfreetype6-dev
47+
libidn11-dev
48+
libjpeg-dev
49+
liblua5.1-0-dev
50+
libssl-dev
51+
libtiff-dev
52+
libunistring-dev
53+
zlib1g-dev
54+
libgmp-dev
55+
```
56+
57+
``` sh
58+
mkdir build
59+
cd build
60+
61+
# prepare the out of tree build.
62+
# the library must be staticaly linked against pdfid, as the shared
63+
# library would conflict with the unpatched version of PoDoFo.
64+
cmake -DPODOFO_BUILD_SHARED=OFF \
65+
-DPODOFO_BUILD_STATIC=ON \
66+
-DCMAKE_INSTALL_PREFIX=/usr \
67+
-DCMAKE_BUILD_TYPE=Release ..
68+
69+
# only build what's required.
70+
# the `all` target build all tests and tools
71+
make pdfid
72+
73+
# run the correct subset of `make install`
74+
DESTDIR="${DESTDIR:?missing DESTDIR}" cmake -DCOMPONENT=pdfid -P ./cmake_install.cmake
75+
```

tools/pdfid/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,5 @@ SET_TARGET_PROPERTIES(pdfid PROPERTIES COMPILE_FLAGS "${PODOFO_CFLAGS}")
55
ADD_DEPENDENCIES(pdfid ${PODOFO_DEPEND_TARGET})
66
INCLUDE_DIRECTORIES(${PoDoFo_SOURCE_DIR})
77
INSTALL(TARGETS pdfid
8+
COMPONENT pdfid
89
RUNTIME DESTINATION "bin")

0 commit comments

Comments
 (0)