Skip to content

Commit 1d51aaa

Browse files
authored
Fix for #769, corrects typo in shared_libraries docs, install_path -> install_dir. Updates code block to be more explicit with shared_library usage.
1 parent 7efa417 commit 1d51aaa

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

docs/how-to-guides/shared-libraries.rst

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -64,11 +64,16 @@ A shared library produced by ``library()`` or ``shared_library()`` built like th
6464
6565
is installed to ``libdir`` by default. If the only reason the shared library exists
6666
is to be used inside the Python package being built, then it is best to modify
67-
the install location to be within the Python package itself:
67+
the install location, via the `install_dir` argument, to be within the Python package itself:
6868

69-
.. code-block:: python
69+
.. code-block:: meson
7070
71-
install_path: py.get_install_dir() / 'mypkg/subdir'
71+
example_lib = shared_library(
72+
'example',
73+
'examplelib.c',
74+
install: true,
75+
install_dir: py.get_install_dir() / 'mypkg/subdir',
76+
)
7277
7378
Then an extension module in the same install directory can link against the
7479
shared library in a portable manner by using ``install_rpath``:

0 commit comments

Comments
 (0)