Merge branch 'matthiasc/for-main' into 'main'

build: Rename docs build options

See merge request GNOME/gtk!6239
This commit is contained in:
Matthias Clasen
2023-08-05 03:37:05 +00:00
10 changed files with 57 additions and 43 deletions

View File

@@ -418,10 +418,11 @@ reference:
--buildtype=release
--force-fallback-for=gdk-pixbuf,pango
-Dintrospection=enabled
-Ddocumentation=true
-Dgtk_doc=true
-Dgdk-pixbuf:gtk_doc=true
-Dpango:gtk_doc=true
-Ddemos=false
-Dbuild-demos=false
-Dbuild-examples=false
-Dbuild-tests=false
-Dbuild-testsuite=false

View File

@@ -67,6 +67,13 @@ building for:
- [Graphene](https://github.com/ebassi/graphene)
- [Xkb-common](https://github.com/xkbcommon/libxkbcommon)
If you are building the Wayland backend, you will also need:
- Wayland-client
- Wayland-protocols
- Wayland-cursor
- Wayland-EGL
If you are building the X11 backend, you will also need:
- Xlib, and the following X extensions:
@@ -79,32 +86,24 @@ If you are building the X11 backend, you will also need:
- xdamage
- xcomposite
If you are building the Wayland backend, you will also need:
- Wayland-client
- Wayland-protocols
- Wayland-cursor
- Wayland-EGL
Once you have all the necessary dependencies, you can build GTK by using
Meson:
```sh
$ meson _build .
$ cd _build
$ ninja
$ meson setup _build
$ meson compile -C_build
```
You can run the test suite using:
```sh
$ meson test
$ meson test -C_build
```
And, finally, you can install GTK using:
```
$ sudo ninja install
$ sudo meson install -C_build
```
Complete information about installing GTK and related libraries

View File

@@ -1,7 +1,7 @@
expand_content_md_files = [
]
if get_option('gtk_doc')
if get_option('documentation')
gdk4_toml = configure_file(
input: 'gdk4.toml.in',
output: 'gdk4.toml',

View File

@@ -1,4 +1,4 @@
if get_option('gtk_doc')
if get_option('documentation')
gsk4_toml = configure_file(
input: 'gsk4.toml.in',
output: 'gsk4.toml',

View File

@@ -268,7 +268,7 @@ support in the file chooser.
This option controls whether GTK should use colord for color
calibration support in the cups print backend.
### `gtk_doc`, `man-pages` and `update_screenshots`
### `documentation`, `man-pages` and `screenshots`
The *gi-docgen* package is used to generate the reference documentation
included with GTK. By default support for *gi-docgen* is disabled

View File

@@ -78,7 +78,7 @@ ui_files = [
gtk_builder_tool = find_program('gtk4-builder-tool')
if get_option('update_screenshots')
if get_option('screenshots')
foreach ui_file: ui_files
png_file = ui_file.replace('.ui', '.png')
gtk_images += custom_target('@0@ from @1@'.format(png_file, ui_file),

View File

@@ -32,7 +32,7 @@ gtk_images = []
subdir('images')
if get_option('gtk_doc')
if get_option('documentation')
gtk4_toml = configure_file(
input: 'gtk4.toml.in',
output: 'gtk4.toml',

View File

@@ -1,7 +1,7 @@
toml_conf = configuration_data()
toml_conf.set('version', meson.project_version())
gidocgen = find_program('gi-docgen', required: get_option('gtk_doc'), native: true)
gidocgen = find_program('gi-docgen', required: get_option('documentation'), native: true)
gidocgen_common_args = [
'--quiet',
@@ -14,7 +14,7 @@ endif
docs_dir = gtk_datadir / 'doc'
if get_option('gtk_doc') and not build_gir
if get_option('documentation') and not build_gir
error('API reference requires introspection.')
endif

View File

@@ -742,7 +742,7 @@ if not gir.found() and get_option('introspection').enabled()
endif
build_gir = gir.found() and (get_option('introspection').enabled() or
(get_option('introspection').allowed() and get_option('gtk_doc')))
(get_option('introspection').allowed() and get_option('documentation')))
# Resource building
glib_compile_resources = find_program('glib-compile-resources')
@@ -920,7 +920,7 @@ summary('Linker', cc.get_linker_id(), section: 'Toolchain')
summary('Debugging', get_option('debug'), section: 'Build')
summary('Optimization', get_option('optimization'), section: 'Build')
summary('Introspection', build_gir, section: 'Build')
summary('Documentation', get_option('gtk_doc'), section: 'Build')
summary('Documentation', get_option('documentation'), section: 'Build')
summary('Man pages', get_option('man-pages'), section: 'Build')
summary('Testsuite', get_option('build-testsuite'), section: 'Build')
summary('Tests', get_option('build-tests'), section: 'Build')

View File

@@ -83,22 +83,7 @@ option('f16c',
value: 'enabled',
description: 'Enable F16C fast paths (requires F16C)')
# Documentation and introspection
option('gtk_doc',
type: 'boolean',
value: false,
description : 'Build API reference and tools documentation')
option('update_screenshots',
type: 'boolean',
value: false,
description : 'Regenerate screenshots for the documentation')
option('man-pages',
type: 'boolean',
value: false,
description : 'Build man pages for installed tools')
# Introspection
option('introspection',
type: 'feature',
@@ -106,6 +91,35 @@ option('introspection',
yield: true,
description : 'Build introspection data (requires gobject-introspection)')
# Documentation
option('documentation',
type: 'boolean',
value: false,
description : 'Build API reference and tools documentation')
option('gtk_doc',
type: 'boolean',
value: false,
description : 'Build API reference and tools documentation',
deprecated: 'documentation')
option('screenshots',
type: 'boolean',
value: false,
description : 'Regenerate screenshots for the documentation')
option('update_screenshots',
type: 'boolean',
value: false,
description : 'Regenerate screenshots for the documentation',
deprecated: 'screenshots')
option('man-pages',
type: 'boolean',
value: false,
description : 'Build man pages for installed tools')
# Demos, examples and tests
option('demo-profile',
@@ -114,17 +128,17 @@ option('demo-profile',
value: 'default',
description : 'Profile to use for demos')
option('build-demos',
type: 'boolean',
value: true,
description : 'Build demo programs')
option('profile',
type: 'combo',
choices: [ 'default', 'devel' ],
value: 'default',
deprecated: 'demo-profile')
option('build-demos',
type: 'boolean',
value: true,
description : 'Build demo programs')
option('demos',
type: 'boolean',
value: true,