diff options
Diffstat (limited to 'docs')
-rw-r--r-- | docs/markdown/Builtin-options.md | 34 | ||||
-rw-r--r-- | docs/markdown/Qt5-module.md | 22 | ||||
-rw-r--r-- | docs/markdown/Reference-manual.md | 15 | ||||
-rw-r--r-- | docs/markdown/Reference-tables.md | 3 | ||||
-rw-r--r-- | docs/markdown/Users.md | 10 | ||||
-rw-r--r-- | docs/markdown/snippets/emscripten_threads.md | 6 | ||||
-rw-r--r-- | docs/markdown/snippets/override_dependency.md | 65 | ||||
-rw-r--r-- | docs/markdown/snippets/qt_has_tools.md | 10 | ||||
-rw-r--r-- | docs/markdown/snippets/wasm_ld.md | 5 |
9 files changed, 154 insertions, 16 deletions
diff --git a/docs/markdown/Builtin-options.md b/docs/markdown/Builtin-options.md index 9c8c54c..c2b10b6 100644 --- a/docs/markdown/Builtin-options.md +++ b/docs/markdown/Builtin-options.md @@ -151,20 +151,22 @@ The following options are available. Note that both the options themselves and the possible values they can take will depend on the target platform or compiler being used: -| Option | Default value | Possible values | Description | -| ------ | ------------- | --------------- | ----------- | -| c_args | | free-form comma-separated list | C compile arguments to use | -| c_link_args | | free-form comma-separated list | C link arguments to use | -| c_std | none | none, c89, c99, c11, c17, c18, gnu89, gnu99, gnu11, gnu17, gnu18 | C language standard to use | -| c_winlibs | see below | free-form comma-separated list | Standard Windows libs to link against | -| cpp_args | | free-form comma-separated list | C++ compile arguments to use | -| cpp_link_args| | free-form comma-separated list | C++ link arguments to use | -| cpp_std | none | none, c++98, c++03, c++11, c++14, c++17, <br/>c++1z, gnu++03, gnu++11, gnu++14, gnu++17, gnu++1z, <br/> vc++14, vc++17, vc++latest | C++ language standard to use | -| cpp_debugstl | false | true, false | C++ STL debug mode | -| cpp_eh | default | none, default, a, s, sc | C++ exception handling type | -| cpp_rtti | true | true, false | Whether to enable RTTI (runtime type identification) | -| cpp_winlibs | see below | free-form comma-separated list | Standard Windows libs to link against | -| fortran_std | none | [none, legacy, f95, f2003, f2008, f2018] | Fortran language standard to use | +| Option | Default value | Possible values | Description | +| ------ | ------------- | --------------- | ----------- | +| c_args | | free-form comma-separated list | C compile arguments to use | +| c_link_args | | free-form comma-separated list | C link arguments to use | +| c_std | none | none, c89, c99, c11, c17, c18, gnu89, gnu99, gnu11, gnu17, gnu18 | C language standard to use | +| c_winlibs | see below | free-form comma-separated list | Standard Windows libs to link against | +| c_thread_count | 4 | integer value ≥ 0 | Number of threads to use with emcc when using threads | +| cpp_args | | free-form comma-separated list | C++ compile arguments to use | +| cpp_link_args | | free-form comma-separated list | C++ link arguments to use | +| cpp_std | none | none, c++98, c++03, c++11, c++14, c++17, <br/>c++1z, gnu++03, gnu++11, gnu++14, gnu++17, gnu++1z, <br/> vc++14, vc++17, vc++latest | C++ language standard to use | +| cpp_debugstl | false | true, false | C++ STL debug mode | +| cpp_eh | default | none, default, a, s, sc | C++ exception handling type | +| cpp_rtti | true | true, false | Whether to enable RTTI (runtime type identification) | +| cpp_thread_count | 4 | integer value ≥ 0 | Number of threads to use with emcc when using threads | +| cpp_winlibs | see below | free-form comma-separated list | Standard Windows libs to link against | +| fortran_std | none | [none, legacy, f95, f2003, f2008, f2018] | Fortran language standard to use | The default values of `c_winlibs` and `cpp_winlibs` are in compiler-specific argument forms, but the libraries are: kernel32, user32, gdi32, winspool, @@ -179,3 +181,7 @@ while the `cpp_eh=[value]` will result in `/EH[value]`. Since *0.51.0* `cpp_eh=default` will result in `/EHsc` on MSVC. When using gcc-style compilers, nothing is passed (allowing exceptions to work), while `cpp_eh=none` passes `-fno-exceptions`. + +Since *0.54.0* The `<lang>_thread_count` option can be used to control the +value passed to `-s PTHREAD_POOL_SIZE` when using emcc. No other c/c++ +compiler supports this option. diff --git a/docs/markdown/Qt5-module.md b/docs/markdown/Qt5-module.md index 3a51954..f1c2f6c 100644 --- a/docs/markdown/Qt5-module.md +++ b/docs/markdown/Qt5-module.md @@ -23,6 +23,28 @@ This method generates the necessary targets to build translation files with lrel - `install_dir` directory to install to (optional). - `build_by_default` when set to true, to have this target be built by default, that is, when invoking plain ninja; the default value is false (optional). +## has_tools + +This method returns `true` if all tools used by this module are found, `false` +otherwise. + +It should be used to compile optional Qt code: +```meson +qt5 = import('qt5') +if qt5.has_tools(required: get_option('qt_feature')) + moc_files = qt5.preprocess(...) + ... +endif +``` + +This method takes the following keyword arguments: +- `required`: by default, `required` is set to `false`. If `required` is set to + `true` or an enabled [`feature`](Build-options.md#features) and some tools are + missing Meson will abort. +- `method`: method used to find the Qt dependency (`auto` by default). + +*Since: 0.54.0* + ## Dependencies See [Qt dependencies](Dependencies.md#qt4-qt5) diff --git a/docs/markdown/Reference-manual.md b/docs/markdown/Reference-manual.md index e43ef57..9bb7911 100644 --- a/docs/markdown/Reference-manual.md +++ b/docs/markdown/Reference-manual.md @@ -445,6 +445,10 @@ arguments: [`dependency()`](#dependency), etc. Note that this means the fallback dependency may be a not-found dependency, in which case the value of the `required:` kwarg will be obeyed. + *Since 0.54.0* `'subproj_dep'` argument can be omitted in the case the + subproject used `meson.override_dependency('dependency_name', subproj_dep)`. + In that case, the `fallback` keyword argument can be a single string instead + of a list of 2 strings. - `language` *(added 0.42.0)* defines what language-specific dependency to find if it's available for multiple languages. - `method` defines the way the dependency is detected, the default is @@ -1825,12 +1829,21 @@ the following methods. - `override_find_program(progname, program)` [*(Added 0.46.0)*](Release-notes-for-0.46.0.md#can-override-find_program) specifies that whenever `find_program` is used to find a program - named `progname`, Meson should not not look it up on the system but + named `progname`, Meson should not look it up on the system but instead return `program`, which may either be the result of `find_program`, `configure_file` or `executable`. If `program` is an `executable`, it cannot be used during configure. +- `override_dependency(name, dep_object)` [*(Added + 0.54.0)*](Release-notes-for-0.54.0.md#override-dependency) + specifies that whenever `dependency(name, ...)` is used, Meson should not + look it up on the system but instead return `dep_object`, which may either be + the result of `dependency()` or `declare_dependency()`. It takes optional + `native` keyword arguments. Doing this in a subproject allows the parent + project to retrieve the dependency without having to know the dependency + variable name: `dependency(name, fallback : subproject_name)`. + - `project_version()` returns the version string specified in `project` function call. diff --git a/docs/markdown/Reference-tables.md b/docs/markdown/Reference-tables.md index 9f432f0..59e252f 100644 --- a/docs/markdown/Reference-tables.md +++ b/docs/markdown/Reference-tables.md @@ -37,10 +37,11 @@ These are return values of the `get_linker_id` method in a compiler object. | Value | Linker family | | ----- | --------------- | -| ld.bfd | The GNU linker | +| ld.bfd | The GNU linker | | ld.gold | The GNU gold linker | | ld.lld | The LLVM linker, with the GNU interface | | ld.solaris | Solaris and illumos | +| ld.wasm | emscripten's wasm-ld linker | | ld64 | Apple ld64 | | link | MSVC linker | | lld-link | The LLVM linker, with the MSVC interface | diff --git a/docs/markdown/Users.md b/docs/markdown/Users.md index 06404cf..f215ce9 100644 --- a/docs/markdown/Users.md +++ b/docs/markdown/Users.md @@ -23,6 +23,7 @@ topic](https://github.com/topics/meson). - [Cage](https://github.com/Hjdskes/cage), a Wayland kiosk - [casync](https://github.com/systemd/casync), Content-Addressable Data Synchronization Tool - [cinnamon-desktop](https://github.com/linuxmint/cinnamon-desktop), the cinnamon desktop library + - [Cozy](https://github.com/geigi/cozy), a modern audio book player for Linux and macOS using GTK+ 3 - [dav1d](https://code.videolan.org/videolan/dav1d), an AV1 decoder - [dbus-broker](https://github.com/bus1/dbus-broker), Linux D-Bus Message Broker - [DPDK](http://dpdk.org/browse/dpdk), Data Plane Development Kit, a set of libraries and drivers for fast packet processing @@ -31,6 +32,8 @@ topic](https://github.com/topics/meson). - [Emeus](https://github.com/ebassi/emeus), constraint based layout manager for GTK+ - [ESP8266 Arduino sample project](https://github.com/trilader/arduino-esp8266-meson), sample project for using the ESP8266 Arduino port with Meson - [FeedReader](https://github.com/jangernert/FeedReader), a modern desktop application designed to complement existing web-based RSS accounts + - [Flecs](https://github.com/SanderMertens/flecs), a Fast and Lightweight ECS (Entity Component System) C library + - [Foliate](https://github.com/johnfactotum/foliate), a simple and modern GTK eBook reader, built with GJS and Epub.js - [Fractal](https://wiki.gnome.org/Apps/Fractal/), a Matrix messaging client for GNOME - [Frida](https://github.com/frida/frida-core), a dynamic binary instrumentation toolkit - [fwupd](https://github.com/hughsie/fwupd), a simple daemon to allow session software to update firmware @@ -55,6 +58,7 @@ topic](https://github.com/topics/meson). - [HelenOS](http://helenos.org), a portable microkernel-based multiserver operating system - [HexChat](https://github.com/hexchat/hexchat), a cross-platform IRC client in C - [IGT](https://cgit.freedesktop.org/xorg/app/intel-gpu-tools/), Linux kernel graphics driver test suite + - [inih](https://github.com/benhoyt/inih) (INI Not Invented Here), a small and simple .INI file parser written in C - [Irssi](https://github.com/irssi/irssi), a terminal chat client in C - [iSH](https://github.com/tbodt/ish), Linux shell for iOS - [Janet](https://github.com/janet-lang/janet), a functional and imperative programming language and bytecode interpreter @@ -87,6 +91,7 @@ format files - [mrsh](https://github.com/emersion/mrsh), a minimal POSIX shell - [Nautilus](https://gitlab.gnome.org/GNOME/nautilus), the GNOME file manager - [Nemo](https://github.com/linuxmint/nemo), the file manager for the Cinnamon desktop environment + - [OcherBook](https://github.com/ccoffing/OcherBook), an open source book reader for Kobo devices - [oomd](https://github.com/facebookincubator/oomd), a userspace Out-Of-Memory (OOM) killer for Linux systems - [OpenH264](https://github.com/cisco/openh264), open source H.264 codec - [OpenHMD](https://github.com/OpenHMD/OpenHMD), a free and open source API and drivers for immersive technology, such as head mounted displays with built in head tracking @@ -106,6 +111,8 @@ format files - [qboot](https://github.com/bonzini/qboot), a minimal x86 firmware for booting Linux kernels - [radare2](https://github.com/radare/radare2), unix-like reverse engineering framework and commandline tools (not the default) - [RxDock](https://gitlab.com/rxdock/rxdock), a protein-ligand docking software designed for high throughput virtual screening (fork of rDock) + - [scrcpy](https://github.com/Genymobile/scrcpy), a cross platform application that provides display and control of Android devices connected on USB or over TCP/IP + - [Sequeler](https://github.com/Alecaddd/sequeler), a friendly SQL client for Linux, built with Vala and Gtk - [SSHFS](https://github.com/libfuse/sshfs), allows you to mount a remote filesystem using SFTP - [sway](https://github.com/swaywm/sway), i3-compatible Wayland compositor - [Sysprof](https://git.gnome.org/browse/sysprof), a profiling tool @@ -114,7 +121,10 @@ format files - [Taisei Project](https://taisei-project.org/), an open-source Touhou Project clone and fangame - [Terminology](https://github.com/billiob/terminology), a terminal emulator based on the Enlightenment Foundation Libraries - [Tilix](https://github.com/gnunn1/tilix), a tiling terminal emulator for Linux using GTK+ 3 + - [Tizonia](https://github.com/tizonia/tizonia-openmax-il), a command-line cloud music player for Linux with support for Spotify, Google Play Music, YouTube, SoundCloud, TuneIn, Plex servers and Chromecast devices - [Valum](https://github.com/valum-framework/valum), a micro web framework written in Vala + - [Venom](https://github.com/naxuroqa/Venom), a modern Tox client for the GNU/Linux desktop + - [VMAF](https://github.com/Netflix/vmaf) (by Netflix), a perceptual video quality assessment based on multi-method fusion - [Wayland](https://github.com/wayland-project/wayland) and [Weston](https://github.com/wayland-project/weston), a next generation display server - [wlroots](https://github.com/swaywm/wlroots), a modular Wayland compositor library - [wxFormBuilder](https://github.com/wxFormBuilder/wxFormBuilder), RAD tool for wxWidgets GUI design diff --git a/docs/markdown/snippets/emscripten_threads.md b/docs/markdown/snippets/emscripten_threads.md new file mode 100644 index 0000000..bdf808e --- /dev/null +++ b/docs/markdown/snippets/emscripten_threads.md @@ -0,0 +1,6 @@ +## Emscripten (emcc) now supports threads + +In addition to properly setting the compile and linker arguments, a new meson +builtin has been added to control the PTHREAD_POOL_SIZE option, +`-D<lang>_thread_count`, which may be set to any integer value greater than 0. +If it set to 0 then the PTHREAD_POOL_SIZE option will not be passed. diff --git a/docs/markdown/snippets/override_dependency.md b/docs/markdown/snippets/override_dependency.md new file mode 100644 index 0000000..ca420bc --- /dev/null +++ b/docs/markdown/snippets/override_dependency.md @@ -0,0 +1,65 @@ +## `dependency()` consistency + +The first time a dependency is found, using `dependency('foo', ...)`, the return +value is now cached. Any subsequent call will return the same value as long as +version requested match, otherwise not-found dependency is returned. This means +that if a system dependency is first found, it won't fallback to a subproject +in a subsequent call any more and will rather return not-found instead if the +system version does not match. Similarly, if the first call returns the subproject +fallback dependency, it will also return the subproject dependency in a subsequent +call even if no fallback is provided. + +For example, if the system has `foo` version 1.0: +```meson +# d2 is set to foo_dep and not the system dependency, even without fallback argument. +d1 = dependency('foo', version : '>=2.0', required : false, + fallback : ['foo', 'foo_dep']) +d2 = dependency('foo', version : '>=1.0', required : false) +``` +```meson +# d2 is not-found because the first call returned the system dependency, but its version is too old for 2nd call. +d1 = dependency('foo', version : '>=1.0', required : false) +d2 = dependency('foo', version : '>=2.0', required : false, + fallback : ['foo', 'foo_dep']) +``` + +## Override `dependency()` + +It is now possible to override the result of `dependency()` to point +to any dependency object you want. The overriding is global and applies to +every subproject from there on. + +For example, this subproject provides 2 libraries with version 2.0: + +```meson +project(..., version : '2.0') + +libfoo = library('foo', ...) +foo_dep = declare_dependency(link_with : libfoo) +meson.override_dependency('foo', foo_dep) + +libbar = library('bar', ...) +bar_dep = declare_dependency(link_with : libbar) +meson.override_dependency('bar', bar_dep) +``` + +Assuming the system has `foo` and `bar` 1.0 installed, and master project does this: +```meson +foo_dep = dependency('foo', version : '>=2.0', fallback : ['foo', 'foo_dep']) +bar_dep = dependency('bar') +``` + +This used to mix system 1.0 version and subproject 2.0 dependencies, but thanks +to the override `bar_dep` is now set to the subproject's version instead. + +Another case this can be useful is to force a subproject to use a specific dependency. +If the subproject does `dependency('foo')` but the main project wants to provide +its own implementation of `foo`, it can for example call +`meson.override_dependency('foo', declare_dependency(...))` before configuring the +subproject. + +## Simplified `dependency()` fallback + +In the case a subproject `foo` calls `meson.override_dependency('foo-2.0', foo_dep)`, +the parent project can omit the dependency variable name in fallback keyword +argument: `dependency('foo-2.0', fallback : 'foo')`. diff --git a/docs/markdown/snippets/qt_has_tools.md b/docs/markdown/snippets/qt_has_tools.md new file mode 100644 index 0000000..3569ecb --- /dev/null +++ b/docs/markdown/snippets/qt_has_tools.md @@ -0,0 +1,10 @@ +## Added `has_tools` method to qt module + +It should be used to compile optional Qt code: +```meson +qt5 = import('qt5') +if qt5.has_tools(required: get_option('qt_feature')) + moc_files = qt5.preprocess(...) + ... +endif +``` diff --git a/docs/markdown/snippets/wasm_ld.md b/docs/markdown/snippets/wasm_ld.md new file mode 100644 index 0000000..d47767c --- /dev/null +++ b/docs/markdown/snippets/wasm_ld.md @@ -0,0 +1,5 @@ +## Property support emscripten's wasm-ld + +Before 0.54.0 we treated emscripten as both compiler and linker, which isn't +really true. It does have a linker, called wasm-ld (meson's name is ld.wasm). +This is a special version of clang's lld. This will now be detected properly. |