aboutsummaryrefslogtreecommitdiffstats
path: root/manual/library.rst
diff options
context:
space:
mode:
authorJay Berkenbilt <ejb@ql.org>2022-03-12 23:32:05 +0100
committerJay Berkenbilt <jberkenbilt@users.noreply.github.com>2022-03-19 00:53:18 +0100
commitf58d2a60d57653071609a0a9ec0d693c6bda0024 (patch)
treeb4111f3ea0c1f0f343b5bc4e23fb985245032c30 /manual/library.rst
parent70d0d0889b0c72bcdeb0658335094f61105f8b02 (diff)
downloadqpdf-f58d2a60d57653071609a0a9ec0d693c6bda0024.tar.zst
Update build-related documentation and comments
Diffstat (limited to 'manual/library.rst')
-rw-r--r--manual/library.rst18
1 files changed, 14 insertions, 4 deletions
diff --git a/manual/library.rst b/manual/library.rst
index 33abdebe..32bb21c1 100644
--- a/manual/library.rst
+++ b/manual/library.rst
@@ -23,10 +23,20 @@ All header files are installed in the
you use ``#include <qpdf/QPDF.hh>`` rather than adding
:file:`include/qpdf` to your include path.
-When linking against the qpdf static library, you may also need to
-specify ``-lz -ljpeg`` on your link command. If your system understands
-how to read libtool :file:`.la` files, this may not
-be necessary.
+qpdf installs a ``pkg-config`` configuration with package name
+``libqpdf`` and a ``cmake`` configuration with package name ``qpdf``.
+The ``libqpdf`` target is exported in the ``qpdf::`` namespace. The
+following is an example of a :file:`CMakeLists.txt` file for a
+single-file executable that links with qpdf:
+
+.. code-block:: cmake
+
+ cmake_minimum_required(VERSION 3.16)
+ project(some-application LANGUAGES CXX)
+ find_package(qpdf)
+ add_executable(some-application some-application.cc)
+ target_link_libraries(some-application qpdf::libqpdf)
+
The qpdf library is safe to use in a multithreaded program, but no
individual ``QPDF`` object instance (including ``QPDF``,