summaryrefslogtreecommitdiff
path: root/src/libnma/meson.build
diff options
context:
space:
mode:
authorLubomir Rintel <lkundrak@v3.sk>2019-09-20 15:24:10 +0200
committerLubomir Rintel <lkundrak@v3.sk>2019-09-20 15:26:21 +0200
commit1f34706f0b55ddabe3f2486904fd35fc94c67717 (patch)
treebf43bb5a10e623e7f7275f3a426858f970e52ca2 /src/libnma/meson.build
parent31c0d3c6b8db22ba464024be7e7cbe31da983a29 (diff)
parentdf7f1f5bd32290b7798d93018e5cb1d094d676f0 (diff)
downloadnetwork-manager-applet-1f34706f0b55ddabe3f2486904fd35fc94c67717.tar.gz
merge: branch 'lr/gtk4'
Uh, huh, let's see how well this flies. https://gitlab.gnome.org/GNOME/network-manager-applet/merge_requests/38
Diffstat (limited to 'src/libnma/meson.build')
-rw-r--r--src/libnma/meson.build92
1 files changed, 64 insertions, 28 deletions
diff --git a/src/libnma/meson.build b/src/libnma/meson.build
index d959ec5f..04f4e65e 100644
--- a/src/libnma/meson.build
+++ b/src/libnma/meson.build
@@ -1,5 +1,3 @@
-lib_name = 'libnma'
-
cert_chooser_headers = files('nma-cert-chooser.h')
cert_chooser_sources = files(
@@ -27,11 +25,9 @@ gir_headers = cert_chooser_headers + files(
'nma-wifi-dialog.h'
)
-headers = gir_headers + files('nma-cert-chooser-private.h')
-
install_headers(
gir_headers,
- subdir: lib_name
+ subdir: 'libnma'
)
gir_sources = [version_header] + cert_chooser_sources + files(
@@ -54,7 +50,6 @@ incs = [
]
deps = [
- gtk_dep,
gudev_dep,
libnm_dep,
libutils_libnm_dep,
@@ -73,29 +68,24 @@ cflags = [
symbol_map = join_paths(meson.current_source_dir(), 'libnma.ver')
+nma_deps = [ deps, gtk_dep ]
+nma_sources = [ gir_sources, built_sources ]
if enable_gcr
- headers += files(
- 'nma-cert-chooser-button.h',
- 'nma-pkcs11-cert-chooser-dialog.h',
- 'nma-pkcs11-token-login-dialog.h'
- )
-
- gir_sources += files(
+ nma_sources += files(
'nma-cert-chooser-button.c',
'nma-pkcs11-cert-chooser.c',
'nma-pkcs11-cert-chooser-dialog.c',
'nma-pkcs11-token-login-dialog.c'
)
-
- deps += gcr_dep
+ nma_deps += gcr_dep
endif
libnma = shared_library(
'nma',
- sources: gir_sources + built_sources,
+ sources: nma_sources,
version: libversion,
include_directories: incs,
- dependencies: deps,
+ dependencies: nma_deps,
c_args: cflags,
link_args: '-Wl,--version-script,' + symbol_map,
link_depends: symbol_map,
@@ -109,26 +99,56 @@ libnma_dep = declare_dependency(
include_directories: libnma_inc
)
+if enable_libnma_gtk4
+ libnma_gtk4 = shared_library(
+ 'nma-gtk4',
+ sources: gir_sources + built_sources,
+ version: libversion,
+ include_directories: incs,
+ dependencies: [ deps, gtk4_dep ],
+ c_args: cflags,
+ link_args: '-Wl,--version-script,' + symbol_map,
+ link_depends: symbol_map,
+ link_whole: libwireless_security_libnma_gtk4,
+ install: true,
+ install_dir: nma_libdir
+ )
+
+ libnma_gtk4_dep = declare_dependency(
+ link_with: libnma_gtk4,
+ include_directories: libnma_inc
+ )
+endif
+
subdir('tests')
pkg.generate(
libraries: libnma,
version: nma_version,
- name: lib_name,
+ name: 'libnma',
description: 'NetworkManager UI utilities (libnm version)',
- filebase: lib_name,
- subdirs: lib_name,
+ filebase: 'libnma',
+ subdirs: 'libnma',
requires: 'libnm',
variables: 'exec_prefix=' + nma_prefix,
install_dir: join_paths(nma_libdir, 'pkgconfig')
)
-if enable_introspection
- gir_incs = [
- 'Gtk-3.0',
- 'NM-1.0'
- ]
+if enable_libnma_gtk4
+ pkg.generate(
+ libraries: libnma_gtk4,
+ version: nma_version,
+ name: 'libnma-gtk4',
+ description: 'NetworkManager UI utilities (gtk4 version)',
+ filebase: 'libnma-gtk4',
+ subdirs: 'libnma',
+ requires: 'libnm',
+ variables: 'exec_prefix=' + nma_prefix,
+ install_dir: join_paths(nma_libdir, 'pkgconfig')
+ )
+endif
+if enable_introspection
gir_dir = join_paths(nma_datadir, 'gir-' + nma_gir_version)
typelib_dir = join_paths(nma_libdir, 'girepository-' + nma_gir_version)
@@ -136,13 +156,29 @@ if enable_introspection
libnma,
sources: gir_sources + gir_headers,
nsversion: nma_gir_version,
- namespace: nma_gir_ns,
- includes: gir_incs,
+ namespace: 'NMA',
+ includes: [ 'Gtk-3.0', 'NM-1.0' ],
identifier_prefix: nma_gir_prefix,
symbol_prefix: nma_gir_prefix.to_lower(),
- export_packages: lib_name,
+ export_packages: 'libnma',
install: true,
install_dir_gir: gir_dir,
install_dir_typelib: typelib_dir
)
+
+ if enable_libnma_gtk4
+ gnome.generate_gir(
+ libnma,
+ sources: gir_sources + gir_headers,
+ nsversion: nma_gir_version,
+ namespace: 'NMA4',
+ includes: [ 'Gtk-4.0', 'NM-1.0' ],
+ identifier_prefix: nma_gir_prefix,
+ symbol_prefix: nma_gir_prefix.to_lower(),
+ export_packages: 'libnma',
+ install: true,
+ install_dir_gir: gir_dir,
+ install_dir_typelib: typelib_dir
+ )
+ endif
endif