From b3362e350ad0c8603966bc485e66af553750c648 Mon Sep 17 00:00:00 2001 From: Jussi Pakkanen Date: Sat, 30 Sep 2017 18:25:33 +0300 Subject: Added release note snippet for prebuilt shared libs. --- docs/markdown/snippets/prebuilt.md | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 docs/markdown/snippets/prebuilt.md (limited to 'docs') diff --git a/docs/markdown/snippets/prebuilt.md b/docs/markdown/snippets/prebuilt.md new file mode 100644 index 0000000..a51176a --- /dev/null +++ b/docs/markdown/snippets/prebuilt.md @@ -0,0 +1,15 @@ +# Better support for prebuilt shared libraries + +Meson has had support for prebuilt object files and static libraries. +This release adds feature parity to shared libraries. This means +that e.g. shipping prebuilt libraries as subprojects now can +be as simple as writing a definition file that looks 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. -- cgit v1.1 From bbdba876afa8adfaf3e1d1985908326443875860 Mon Sep 17 00:00:00 2001 From: Niklas Claesson Date: Wed, 6 Sep 2017 23:54:49 +0200 Subject: Boost: Improve search algorithm The new implementation will correctly pick boost from 3 possible locations on windows and two locations on posix compatible OSs. The new search algorithm also differentiates between debug and release builds of Boost and multi or single threading builds. It was also decided to map "Meson modules" to Boost software libraries and not Boost modules since it there are a lot of options regarding linking. Some modules can even be used either as headers-only or with dynamic linking. This commit also fixes a bug that prevented header-only use on Windows. Fixes: #2274 #2239 #1803 #669 --- docs/markdown/Dependencies.md | 15 +++++++++++++-- .../001-boost-platform-improvement.md | 10 ++++++++++ 2 files changed, 23 insertions(+), 2 deletions(-) create mode 100644 docs/markdown/Release-notes-for-0.43.0/001-boost-platform-improvement.md (limited to 'docs') diff --git a/docs/markdown/Dependencies.md b/docs/markdown/Dependencies.md index 187c4fe..c46334c 100644 --- a/docs/markdown/Dependencies.md +++ b/docs/markdown/Dependencies.md @@ -50,8 +50,16 @@ pkg-config files. Meson has autodetection support for some of these. ## Boost ## Boost is not a single dependency but rather a group of different -libraries. To use Boost with Meson, simply list which Boost modules -you would like to use. +libraries. To use Boost headers-only libraries, simply add Boost as a +dependency. + +```meson +boost_dep = dependency('boost') +exe = executable('myprog', 'file.cc', dependencies : boost_dep) +``` + +To link against boost with Meson, simply list which libraries you would like to +use. ```meson boost_dep = dependency('boost', modules : ['thread', 'utility']) @@ -65,6 +73,9 @@ If your boost headers or libraries are in non-standard locations you can set the BOOST_ROOT, BOOST_INCLUDEDIR, and/or BOOST_LIBRARYDIR environment variables. +You can set the argument `threading` to `single` to use boost libraries that +has been compiled for single-threaded use instead. + ## GTest and GMock ## GTest and GMock come as sources that must be compiled as part of your diff --git a/docs/markdown/Release-notes-for-0.43.0/001-boost-platform-improvement.md b/docs/markdown/Release-notes-for-0.43.0/001-boost-platform-improvement.md new file mode 100644 index 0000000..2cd44ce --- /dev/null +++ b/docs/markdown/Release-notes-for-0.43.0/001-boost-platform-improvement.md @@ -0,0 +1,10 @@ +## Portability improvements to Boost Dependency + +The Boost dependency has been improved to better detect the various ways to +install boost on multiple platforms. At the same time the `modules` semantics +for the dependency has been changed. Previously it was allowed to specify +header directories as `modules` but it wasn't required. Now, modules are only +used to specify libraries that require linking. + +This is a breaking change and the fix is to remove all modules that aren't +found. -- cgit v1.1 From a9258923fac2ab145a94f7c72cc5c0127d50bfe2 Mon Sep 17 00:00:00 2001 From: Alexis Jeandet Date: Sun, 1 Oct 2017 16:18:31 +0200 Subject: Added include directory argument for Qt's Moc which is needed to build plugins. Signed-off-by: Alexis Jeandet --- docs/markdown/Qt5-module.md | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'docs') diff --git a/docs/markdown/Qt5-module.md b/docs/markdown/Qt5-module.md index 7082309..a8ad73d 100644 --- a/docs/markdown/Qt5-module.md +++ b/docs/markdown/Qt5-module.md @@ -5,17 +5,19 @@ tools and steps required for Qt. The module has one method. ## preprocess -This method takes four keyword arguments, `moc_headers`, +This method takes five keyword arguments, `moc_headers`, `moc_sources`, `ui_files` and `qresources` which define the files that -require preprocessing with `moc`, `uic` and `rcc`. It returns an +require preprocessing with `moc`, `uic` and `rcc` and 'include_directories' which might be needed by moc. It returns an opaque object that should be passed to a main build target. A simple example would look like this: ```meson qt5 = import('qt5') qt5_dep = dependency('qt5', modules: ['Core', 'Gui']) -moc_files = qt5.preprocess(moc_headers : 'myclass.h') +inc = include_directories('includes') +moc_files = qt5.preprocess(moc_headers : 'myclass.h', include_directories: inc) executable('myprog', 'main.cpp', 'myclass.cpp', moc_files, + include_directories: inc, dependencies : qt5_dep) ``` -- cgit v1.1 From 893d101fff01d72e8df055491d8e609eb0fd8575 Mon Sep 17 00:00:00 2001 From: Patrick Griffis Date: Sun, 13 Aug 2017 12:43:21 -0400 Subject: gnome: Add header kwarg to generate_gir() This is a commonly used flag so lets make it more obvious. --- docs/markdown/Gnome-module.md | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'docs') diff --git a/docs/markdown/Gnome-module.md b/docs/markdown/Gnome-module.md index 99a9c8e..d87e108 100644 --- a/docs/markdown/Gnome-module.md +++ b/docs/markdown/Gnome-module.md @@ -81,6 +81,10 @@ tool so see its documentation for more information. * `includes`: list of gir names to be included, can also be a GirTarget +* `header`: *(Added 0.43.0)* name of main c header to include for the library, e.g. `glib.h` + +* `dependencies`: deps to use during introspection scanning + * `include_directories`: extra include paths to look for gir files * `install`: if true, install the generated files -- cgit v1.1 From ec45c29c9ddd5d848eb1555cdc09246d8900afec Mon Sep 17 00:00:00 2001 From: Jussi Pakkanen Date: Mon, 2 Oct 2017 00:56:38 +0300 Subject: Add rpath entries for all found libraries outside of system libraries. --- docs/markdown/snippets/prebuilt.md | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) (limited to 'docs') diff --git a/docs/markdown/snippets/prebuilt.md b/docs/markdown/snippets/prebuilt.md index a51176a..19741c4 100644 --- a/docs/markdown/snippets/prebuilt.md +++ b/docs/markdown/snippets/prebuilt.md @@ -1,9 +1,14 @@ -# Better support for prebuilt shared libraries +# 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. This means -that e.g. shipping prebuilt libraries as subprojects now can -be as simple as writing a definition file that looks like this. +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') -- cgit v1.1 From 35313c2a850020dc2d98c1aa5b2f4340e49f01d6 Mon Sep 17 00:00:00 2001 From: Mohammed Sadiq Date: Mon, 2 Oct 2017 16:05:10 +0530 Subject: docs: Fix typo Remove the quote before parens --- docs/markdown/Reference-manual.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'docs') diff --git a/docs/markdown/Reference-manual.md b/docs/markdown/Reference-manual.md index f37fb34..3bdd3c5 100644 --- a/docs/markdown/Reference-manual.md +++ b/docs/markdown/Reference-manual.md @@ -1614,7 +1614,7 @@ during tests. It should be passed as the `env` keyword argument to tests. It has the following methods. - `append(varname, value)` appends the given value to the old value of - the environment variable, e.g. `env.append'('FOO', 'BAR', separator + the environment variable, e.g. `env.append('FOO', 'BAR', separator : ';')` produces `BOB;BAR` if `FOO` had the value `BOB` and plain `BAR` if the value was not defined. If the separator is not specified explicitly, the default path separator for the host -- cgit v1.1 From a28db4577a36bf53f09e439f2032f28eb9cd7079 Mon Sep 17 00:00:00 2001 From: xarkes Date: Mon, 2 Oct 2017 21:18:36 +0200 Subject: Fix typo and clarify library documentation --- docs/markdown/Reference-manual.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'docs') diff --git a/docs/markdown/Reference-manual.md b/docs/markdown/Reference-manual.md index 3bdd3c5..86ad15e 100644 --- a/docs/markdown/Reference-manual.md +++ b/docs/markdown/Reference-manual.md @@ -820,10 +820,11 @@ static with only one option. The keyword arguments for this are the same as for [`executable`](#executable) with the following additions: -- `name_prefix` the string that will be used as the suffix for the +- `name_suffix` the string that will be used as the suffix for the target by overriding the default (only used for libraries). By default this is `lib` on all platforms and compilers except with - MSVC where it is omitted. + MSVC where it is omitted and set to `a` to avoid potential name clash + with shared libraries (which also generates `lib` files). - `rust_crate_type` specifies the crate type for Rust libraries. Defaults to `dylib` for shared libraries and `rlib` for static libraries. -- cgit v1.1 From f10b15930bb40424df0d0254ea5576b24b3c10df Mon Sep 17 00:00:00 2001 From: Nirbheek Chauhan Date: Tue, 3 Oct 2017 05:49:24 +0000 Subject: Update Reference-manual.md Fix documentation breakage from https://github.com/mesonbuild/meson/pull/2415 --- docs/markdown/Reference-manual.md | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) (limited to 'docs') diff --git a/docs/markdown/Reference-manual.md b/docs/markdown/Reference-manual.md index 86ad15e..0cc6771 100644 --- a/docs/markdown/Reference-manual.md +++ b/docs/markdown/Reference-manual.md @@ -820,11 +820,18 @@ static with only one option. The keyword arguments for this are the same as for [`executable`](#executable) with the following additions: +- `name_prefix` the string that will be used as the prefix for the + target output filename by overriding the default (only used for + libraries). By default this is `lib` on all platforms and compilers + except with MSVC where it is omitted to follow convention. - `name_suffix` the string that will be used as the suffix for the - target by overriding the default (only used for libraries). By - default this is `lib` on all platforms and compilers except with - MSVC where it is omitted and set to `a` to avoid potential name clash - with shared libraries (which also generates `lib` files). + target output filename by overriding the default (see also: + [executable()](#executable)). By default, for shared libraries this + is `dylib` on macOS, `dll` on Windows, and `so` everywhere else. + For static libraries, it is `a` everywhere. By convention MSVC + static libraries use the `lib` suffix, but we use `a` to avoid a + potential name clash with shared libraries which also generate + `xxx.lib` import files. - `rust_crate_type` specifies the crate type for Rust libraries. Defaults to `dylib` for shared libraries and `rlib` for static libraries. -- cgit v1.1 From 0c3d58baba4a61558ed9b4905f26155a3e95cf6c Mon Sep 17 00:00:00 2001 From: Nirbheek Chauhan Date: Tue, 3 Oct 2017 06:57:46 +0000 Subject: Update Reference-manual.md --- docs/markdown/Reference-manual.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'docs') diff --git a/docs/markdown/Reference-manual.md b/docs/markdown/Reference-manual.md index 0cc6771..14097ed 100644 --- a/docs/markdown/Reference-manual.md +++ b/docs/markdown/Reference-manual.md @@ -823,7 +823,8 @@ The keyword arguments for this are the same as for [`executable`](#executable) w - `name_prefix` the string that will be used as the prefix for the target output filename by overriding the default (only used for libraries). By default this is `lib` on all platforms and compilers - except with MSVC where it is omitted to follow convention. + except with MSVC shared libraries where it is omitted to follow + convention. - `name_suffix` the string that will be used as the suffix for the target output filename by overriding the default (see also: [executable()](#executable)). By default, for shared libraries this -- cgit v1.1