File: build-howto.md

package info (click to toggle)
gmobile 0.3.1-1
  • links: PTS, VCS
  • area: main
  • in suites: trixie
  • size: 632 kB
  • sloc: ansic: 2,079; sh: 36; xml: 31; makefile: 10; javascript: 6
file content (77 lines) | stat: -rw-r--r-- 1,713 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
Title: Compiling with gmobile
Slug: building

# Compiling with gmobile

If you need to build gmobile, get the source from
[here](https://gitlab.gnome.org/World/Phosh/gmobile/) and see the `README.md` file.

## Using pkg-config

Like other libraries, gmobile uses `pkg-config` to provide compiler
options. The package name is `gmobile`.


If you use Automake/Autoconf, in your `configure.ac` script, you might specify
something like:

```
PKG_CHECK_MODULES(GMOBILE, [gmobile])
AC_SUBST(GMOBILE_CFLAGS)
AC_SUBST(GMOBILE_LIBS)
```

Or when using the Meson build system you can declare a dependency like:

```meson
dependency('gmobile')
```

## Bundling the library

If you don't want to use the shared library gmobile can be bundled in
one of two ways:

### As a git submodule

To use it as a submodule add the submodule to git

```
git submodule add https://gitlab.gnome.org/World/Phosh/gmobile.git subprojects/gmobile
```

And then add this to your `meson.build`:

```meson
gmobile = subproject('gmobile',
  default_options: [
    'package_name=' + meson.project_name(),
    'package_version=' + meson.project_version(),
    'pkgdatadir=' + pkgdatadir,
    'pkglibdir=' + pkglibdir,
    'examples=false',
    'gtk_doc=false',
    'tests=false',
  ])
gmobile_dep = gmobile.get_variable('gmobile_dep')
```

### As a meson subproject

To use it as a meson subproject add this to `subprojects/gmobile.wrap`:

```ini
[wrap-git]
directory=gmobile
url=https://gitlab.gnome.org/World/Phosh/gmobile.git
revision=main
depth=1
```

You can then use `gmobile_dep` in your mesn build files like:

```meson
gmobile = dependency('gmobile',
                     fallback: ['gmobile', 'gmobile_dep'],
			         native: true)
```