diff options
Diffstat (limited to 'docs/markdown')
-rw-r--r-- | docs/markdown/Builtin-options.md | 2 | ||||
-rw-r--r-- | docs/markdown/Configuring-a-build-directory.md | 2 | ||||
-rw-r--r-- | docs/markdown/Cross-compilation.md | 14 | ||||
-rw-r--r-- | docs/markdown/IDE-integration.md | 1 | ||||
-rw-r--r-- | docs/markdown/Qt5-module.md | 17 | ||||
-rw-r--r-- | docs/markdown/Reference-manual.md | 2 | ||||
-rw-r--r-- | docs/markdown/Reference-tables.md | 1 | ||||
-rw-r--r-- | docs/markdown/Tutorial.md | 14 | ||||
-rw-r--r-- | docs/markdown/Users.md | 4 | ||||
-rw-r--r-- | docs/markdown/snippets/add_nvidia_hpc_sdk_compilers.md | 3 | ||||
-rw-r--r-- | docs/markdown/snippets/qt_compile_translations_from_qrc.md | 19 | ||||
-rw-r--r-- | docs/markdown/snippets/stdlib.md | 6 |
12 files changed, 80 insertions, 5 deletions
diff --git a/docs/markdown/Builtin-options.md b/docs/markdown/Builtin-options.md index de801ab..7461fa6 100644 --- a/docs/markdown/Builtin-options.md +++ b/docs/markdown/Builtin-options.md @@ -163,7 +163,7 @@ compiler being used: | ------ | ------------- | --------------- | ----------- | | 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_std | none | none, c89, c99, c11, c17, c18, c2x, gnu89, gnu99, gnu11, gnu17, gnu18, gnu2x | 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 | diff --git a/docs/markdown/Configuring-a-build-directory.md b/docs/markdown/Configuring-a-build-directory.md index 330899f..6081c35 100644 --- a/docs/markdown/Configuring-a-build-directory.md +++ b/docs/markdown/Configuring-a-build-directory.md @@ -60,7 +60,7 @@ sample output for a simple project. ------ ------------- --------------- ----------- c_args [] Extra arguments passed to the C compiler c_link_args [] Extra arguments passed to the C linker - c_std c99 [none, c89, c99, c11, c17, c18, gnu89, gnu99, gnu11, gnu17, gnu18] C language standard to use + c_std c99 [none, c89, c99, c11, c17, c18, c2x, gnu89, gnu99, gnu11, gnu17, gnu18, gnu2x] C language standard to use cpp_args [] Extra arguments passed to the C++ compiler cpp_debugstl false [true, false] STL debug mode cpp_link_args [] Extra arguments passed to the C++ linker diff --git a/docs/markdown/Cross-compilation.md b/docs/markdown/Cross-compilation.md index d86d417..c8cd728 100644 --- a/docs/markdown/Cross-compilation.md +++ b/docs/markdown/Cross-compilation.md @@ -268,7 +268,7 @@ invocation to use in your cross file is the following: ```ini [properties] -c_stdlib = ['mylibc', 'mylibc_dep'] # Subproject name, dependency name +c_stdlib = ['mylibc', 'mylibc_dep'] # Subproject name, variable name ``` This specifies that C standard library is provided in the Meson @@ -277,6 +277,18 @@ is used on every cross built C target in the entire source tree (including subprojects) and the standard library is disabled. The build definitions of these targets do not need any modification. +Note that it is supported for any language, not only `c`, using `<lang>_stdlib` +property. + +Since *0.56.0* the variable name parameter is no longer required as long as the +subproject calls `meson.override_dependency('c_stdlib', mylibc_dep)`. +The above example becomes: + +```ini +[properties] +c_stdlib = 'mylibc' +``` + ## Changing cross file settings Cross file settings are only read when the build directory is set up diff --git a/docs/markdown/IDE-integration.md b/docs/markdown/IDE-integration.md index ee51b64..816225f 100644 --- a/docs/markdown/IDE-integration.md +++ b/docs/markdown/IDE-integration.md @@ -335,3 +335,4 @@ removal of a key) are unlikely and will be announced in the release notes. - [Meson Cmake Wrapper](https://github.com/prozum/meson-cmake-wrapper) (for cmake IDEs) (currently unmaintained !!) - [Meson-UI](https://github.com/michaelbadcrumble/meson-ui) (Meson build GUI) - [Meson Syntax Highlighter](https://plugins.jetbrains.com/plugin/13269-meson-syntax-highlighter) plugin for JetBrains IDEs. +- [asabil.meson](https://open-vsx.org/extension/asabil/meson) extension for VS Code/Codium diff --git a/docs/markdown/Qt5-module.md b/docs/markdown/Qt5-module.md index 0d9a6b6..9665267 100644 --- a/docs/markdown/Qt5-module.md +++ b/docs/markdown/Qt5-module.md @@ -22,6 +22,12 @@ This method generates the necessary targets to build translation files with lrel - `install` when true, this target is installed during the install step (optional). - `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 `meson compile`; the default value is false (optional). + - `qresource` rcc source file to extract ts_files from; cannot be used with ts_files kwarg. Available since v0.56.0. + - `rcc_extra_arguments`, any additional arguments to `rcc` (optional), when used with `qresource. Available since v0.56.0. + +Returns either: a list of custom targets for the compiled translations, or, if +using a `qresource` file, a single custom target containing the processed +source file, which should be passed to a main build target. ## has_tools @@ -71,3 +77,14 @@ executable('myprog', 'main.cpp', 'myclass.cpp', moc_files, include_directories: inc, dependencies : qt5_dep) ``` + +Sometimes, translations are embedded inside the binary using qresource files. +In this case the ts files do not need to be explicitly listed. For example: + +```meson +qt5 = import('qt5') +qt5_dep = dependency('qt5', modules: ['Core', 'Gui']) +lang_cpp = qt5.compile_translations(qresource: 'lang.qrc') +executable('myprog', 'main.cpp', lang_cpp, + dependencies: qt5_dep) +``` diff --git a/docs/markdown/Reference-manual.md b/docs/markdown/Reference-manual.md index 080fe3e..a860f85 100644 --- a/docs/markdown/Reference-manual.md +++ b/docs/markdown/Reference-manual.md @@ -2267,7 +2267,7 @@ The following keyword arguments can be used: some symbols to be exposed on Linux, and it should be passed via `args` keyword argument, see below). Supported by the methods `sizeof`, `has_type`, `has_function`, `has_member`, `has_members`, - `check_header`, `has_header`, `has_header_symbol`. + `check_header`, `has_header`, `has_header_symbol`, `get_define` **Note:** These compiler checks do not use compiler arguments added with `add_*_arguments()`, via `-Dlang_args` on the command-line, or through diff --git a/docs/markdown/Reference-tables.md b/docs/markdown/Reference-tables.md index 3be129f..55c1a99 100644 --- a/docs/markdown/Reference-tables.md +++ b/docs/markdown/Reference-tables.md @@ -25,6 +25,7 @@ These are return values of the `get_id` (Compiler family) and | mono | Xamarin C# compiler | | | msvc | Microsoft Visual Studio | msvc | | nagfor | The NAG Fortran compiler | | +| nvidia_hpc| NVidia HPC SDK compilers | | | open64 | The Open64 Fortran Compiler | | | pathscale | The Pathscale Fortran compiler | | | pgi | Portland PGI C/C++/Fortran compilers | | diff --git a/docs/markdown/Tutorial.md b/docs/markdown/Tutorial.md index c5a4e6b..f108c0c 100644 --- a/docs/markdown/Tutorial.md +++ b/docs/markdown/Tutorial.md @@ -45,7 +45,10 @@ project('tutorial', 'c') executable('demo', 'main.c') ``` -That is all. We are now ready to build our application. First we need +That is all. Note that unlike Autotools you [do not need to add any source +headers to the list of sources](FAQ.md#do-i-need-to-add-my-headers-to-the-sources-list-like-in-autotools). + +We are now ready to build our application. First we need to initialize the build by going into the source directory and issuing the following commands. @@ -118,6 +121,15 @@ gtkdep = dependency('gtk+-3.0') executable('demo', 'main.c', dependencies : gtkdep) ``` +If your app needs to use multiple libraries, you need to use separate +[`dependency()`](Reference-manual.md#dependency) calls for each, like so: + +```meson +gtkdeps = [dependency('gtk+-3.0'), dependency('gtksourceview-3.0')] +``` + +We don't need it for the current example. + Now we are ready to build. The thing to notice is that we do *not* need to recreate our build directory, run any sort of magical commands or the like. Instead we just type the exact same command as if we were diff --git a/docs/markdown/Users.md b/docs/markdown/Users.md index 50cd27a..307aef7 100644 --- a/docs/markdown/Users.md +++ b/docs/markdown/Users.md @@ -88,6 +88,7 @@ lookup based on OpenStreetMap data format files - [libui](https://github.com/andlabs/libui), a simple and portable (but not inflexible) GUI library in C that uses the native GUI technologies of each platform it supports - [Libva](https://github.com/intel/libva), an implementation for the VA (VIdeo Acceleration) API + - [Libvirt](https://libvirt.org), a toolkit to manage virtualization platforms - [Libzim](https://github.com/openzim/libzim), the reference implementation for the ZIM file format - [Marker](https://github.com/fabiocolacio/Marker), a GTK-3 markdown editor - [Mesa](https://gitlab.freedesktop.org/mesa/mesa/), an open source graphics driver project @@ -97,6 +98,7 @@ format files - [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 + - [Owl Chess](https://github.com/michaelbrockus/chess), a chess game written in Rust - [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 - [OpenTitan](https://github.com/lowRISC/opentitan), an open source silicon Root of Trust (RoT) project. @@ -109,12 +111,14 @@ format files - [Peek](https://github.com/phw/peek), simple animated GIF screen recorder with an easy to use interface - [PicoLibc](https://github.com/keith-packard/picolibc), a standard C library for small embedded systems with limited RAM - [PipeWire](https://github.com/PipeWire/pipewire), a framework for video and audio for containerized applications + - [Paper Rock Scissors](https://github.com/michaelbrockus/paper_rock_scissors), a game with weapons themed at home paper rock scissors style. - [Pithos](https://github.com/pithos/pithos), a Pandora Radio client - [Pitivi](https://github.com/pitivi/pitivi/), a nonlinear video editor - [Playerctl](https://github.com/acrisci/playerctl), mpris command-line controller and library for spotify, vlc, audacious, bmp, cmus, and others - [Polari](https://gitlab.gnome.org/GNOME/polari), an IRC client - [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) + - [QEMU](https://qemu.org), a processor emulator and virtualizer - [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 diff --git a/docs/markdown/snippets/add_nvidia_hpc_sdk_compilers.md b/docs/markdown/snippets/add_nvidia_hpc_sdk_compilers.md new file mode 100644 index 0000000..1d9acf9 --- /dev/null +++ b/docs/markdown/snippets/add_nvidia_hpc_sdk_compilers.md @@ -0,0 +1,3 @@ +## Added NVidia HPC SDK compilers + +Added support for `nvidia_hpc` NVidia HPC SDK compilers, which are currently in public beta testing. diff --git a/docs/markdown/snippets/qt_compile_translations_from_qrc.md b/docs/markdown/snippets/qt_compile_translations_from_qrc.md new file mode 100644 index 0000000..bfa8619 --- /dev/null +++ b/docs/markdown/snippets/qt_compile_translations_from_qrc.md @@ -0,0 +1,19 @@ +## Qt5 compile_translations now supports qresource preprocessing + +When using qtmod.preprocess() in combination with qtmod.compile_translations() +to embed translations using rcc, it is no longer required to do this: + +```meson +ts_files = ['list', 'of', 'files'] +qtmod.compile_translations(ts_files) +# lang.qrc also contains the duplicated list of files +lang_cpp = qtmod.preprocess(qresources: 'lang.qrc') +``` + +Instead, use: +```meson +lang_cpp = qtmod.compile_translations(qresource: 'lang.qrc') +``` + +which will automatically detect and generate the needed compile_translations +targets. diff --git a/docs/markdown/snippets/stdlib.md b/docs/markdown/snippets/stdlib.md new file mode 100644 index 0000000..5e80dd5 --- /dev/null +++ b/docs/markdown/snippets/stdlib.md @@ -0,0 +1,6 @@ +## Custom standard library + +- It is not limited to cross builds any more, `<lang>_stdlib` property can be + set in native files. +- The variable name parameter is no longer required as long as the subproject + calls `meson.override_dependency('c_stdlib', mylibc_dep)`. |