diff options
Diffstat (limited to 'docs/markdown')
-rw-r--r-- | docs/markdown/snippets/prebuilt.md | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/docs/markdown/snippets/prebuilt.md b/docs/markdown/snippets/prebuilt.md new file mode 100644 index 0000000..19741c4 --- /dev/null +++ b/docs/markdown/snippets/prebuilt.md @@ -0,0 +1,20 @@ +# Better support for shared libraries in non-system paths + +Meson has had support for prebuilt object files and static libraries. +This release adds feature parity to shared libraries that are either +in non-standard system paths or shipped as part of your project. On +systems that support rpath, Meson automatically adds rpath entries +to built targets using manually found external libraries. + +This means that e.g. supporting prebuilt libraries shipped with your +source or provided by subprojects or wrap definitions by writing a +build file like this: + + project('myprebuiltlibrary', 'c') + + cc = meson.get_compiler('c') + prebuilt = cc.find_library('mylib', dirs : meson.current_source_dir()) + mydep = declare_dependency(include_directories : include_directories('.'), + dependencies : prebuilt) + +Then you can use the dependency object in the same way as any other. |