Commit 2e35ead5791feea1f7d9cde9c4eaf5c8d1efa2fa
1 parent
faac493a
Doc: add examples for install dev component (fixes #767)
Showing
1 changed file
with
35 additions
and
0 deletions
manual/installation.rst
| @@ -190,6 +190,41 @@ There are several components that can be installed separately: | @@ -190,6 +190,41 @@ There are several components that can be installed separately: | ||
| 190 | - - examples | 190 | - - examples |
| 191 | - Example source files | 191 | - Example source files |
| 192 | 192 | ||
| 193 | +Note that the ``lib`` component installs only runtime libraries, not | ||
| 194 | +header files or other files/links needed to build against qpdf. For | ||
| 195 | +that, you need ``dev``. If you are using shared libraries, the ``dev`` | ||
| 196 | +will install files or create symbolic links that depend on files | ||
| 197 | +installed by ``lib``, so you will need to install both. If you wanted | ||
| 198 | +to build software against the qpdf library and only wanted to install | ||
| 199 | +the files you needed for that purpose, here are some examples: | ||
| 200 | + | ||
| 201 | +- Install development files with static libraries only: | ||
| 202 | + | ||
| 203 | + :: | ||
| 204 | + | ||
| 205 | + cmake -S . -B build -DCMAKE_BUILD_TYPE=RelWithDebInfo -DBUILD_SHARED_LIBS=OFF | ||
| 206 | + cmake --build build --parallel --target libqpdf | ||
| 207 | + cmake --install build --component dev | ||
| 208 | + | ||
| 209 | +- Install development files with shared libraries only: | ||
| 210 | + | ||
| 211 | + :: | ||
| 212 | + | ||
| 213 | + cmake -S . -B build -DCMAKE_BUILD_TYPE=RelWithDebInfo -DBUILD_STATIC_LIBS=OFF | ||
| 214 | + cmake --build build --parallel --target libqpdf | ||
| 215 | + cmake --install build --component lib | ||
| 216 | + cmake --install build --component dev | ||
| 217 | + | ||
| 218 | + | ||
| 219 | +- Install development files with shared and static libraries: | ||
| 220 | + | ||
| 221 | + :: | ||
| 222 | + | ||
| 223 | + cmake -S . -B build -DCMAKE_BUILD_TYPE=RelWithDebInfo | ||
| 224 | + cmake --build build --parallel --target libqpdf libqpdf_static | ||
| 225 | + cmake --install build --component lib | ||
| 226 | + cmake --install build --component dev | ||
| 227 | + | ||
| 193 | There are also separate options, discussed in :ref:`build-options`, | 228 | There are also separate options, discussed in :ref:`build-options`, |
| 194 | that control how certain specific parts of the software are installed. | 229 | that control how certain specific parts of the software are installed. |
| 195 | 230 |