summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJiří Techet <techet@gmail.com>2019-02-23 18:50:58 +0100
committerJiří Techet <techet@gmail.com>2019-02-23 18:50:58 +0100
commit20cd17cc0dedf14aab2688094a224f1f8a4f9def (patch)
treeb6ca16595e0c46a9e9a91b62ce71e05287d53458
parent26d3103213dcd29fd5050a20f73ecee50771f013 (diff)
parentf48d815b79e75c8efc4406d444a6b099de5b52a9 (diff)
downloadlibchamplain-20cd17cc0dedf14aab2688094a224f1f8a4f9def.tar.gz
Merge branch 'heftig/libchamplain-meson'
-rw-r--r--champlain-gtk/meson.build29
-rw-r--r--champlain/meson.build47
-rw-r--r--demos/meson.build17
-rw-r--r--docs/reference/meson.build10
-rw-r--r--meson.build37
5 files changed, 57 insertions, 83 deletions
diff --git a/champlain-gtk/meson.build b/champlain-gtk/meson.build
index c3b579a..4df766e 100644
--- a/champlain-gtk/meson.build
+++ b/champlain-gtk/meson.build
@@ -7,11 +7,14 @@ libchamplain_gtk_sources = [
'gtk-champlain-embed.c',
]
-libchamplain_gtk_deps = [
- glib_dep,
- gobject_dep,
+libchamplain_gtk_requires = [
gtk_dep,
clutter_gtk_dep,
+]
+
+libchamplain_gtk_deps = libchamplain_gtk_requires + [
+ glib_dep,
+ gobject_dep,
libchamplain_dep,
]
@@ -20,18 +23,20 @@ libchamplain_gtk_srcdir = include_directories('.')
libchamplain_gtk_c_args = [
'-DHAVE_CONFIG_H',
'-DCHAMPLAIN_GTK_COMPILATION',
- '-DG_LOG_DOMAIN="@0@"'.format(package_gtk_name),
+ '-DG_LOG_DOMAIN="@0@"'.format(meson.project_name()),
]
libchamplain_gtk_link_args = [
]
+libchamplain_gtk_includedir = join_paths(
+ pkgincludedir,
+ 'champlain-gtk',
+)
+
install_headers(
libchamplain_gtk_public_h,
- install_dir: join_paths(
- pkgincludedir,
- 'champlain-gtk',
- )
+ install_dir: libchamplain_gtk_includedir,
)
libchamplain_gtk_sha = library(
@@ -43,7 +48,6 @@ libchamplain_gtk_sha = library(
c_args: libchamplain_gtk_c_args,
link_args: libchamplain_gtk_link_args,
install: true,
- install_dir: libdir,
)
libchamplain_gtk_dep_sources = [
@@ -69,8 +73,6 @@ if generate_gir
includes: ['Clutter-1.0', 'Gtk-3.0', libchamplain_gir.get(0)],
link_with: libchamplain_gtk_sha,
install: true,
- install_dir_gir: girdir,
- install_dir_typelib: typelibdir,
extra_args: [
'-DCHAMPLAIN_GTK_COMPILATION',
]
@@ -95,7 +97,6 @@ if generate_gir
sources: libchamplain_gtk_gir.get(0),
packages: libchamplain_gtk_vapi_packages,
install: true,
- install_dir: vapidir,
)
endif
endif
@@ -103,7 +104,7 @@ endif
libchamplain_gtk_dep = declare_dependency(
link_with: libchamplain_gtk_sha,
include_directories: rootdir,
- dependencies: libchamplain_gtk_deps,
+ dependencies: libchamplain_gtk_requires + [libchamplain_dep],
sources: libchamplain_gtk_dep_sources,
)
@@ -111,5 +112,5 @@ libchamplain_gtk_pc = pkg.generate(
libchamplain_gtk_sha,
description: 'Gtk+ Widget wrapper for libchamplain',
subdirs: package_string,
- install_dir: pkgconfigdir,
+ requires: libchamplain_gtk_requires + [libchamplain_sha],
)
diff --git a/champlain/meson.build b/champlain/meson.build
index badb863..3285c65 100644
--- a/champlain/meson.build
+++ b/champlain/meson.build
@@ -85,13 +85,16 @@ if build_with_memphis
]
endif
-libchamplain_deps = [
- libm_dep,
+libchamplain_requires = [
glib_dep,
gobject_dep,
- gio_dep,
- clutter_dep,
cairo_dep,
+ clutter_dep,
+]
+
+libchamplain_deps = libchamplain_requires + [
+ libm_dep,
+ gio_dep,
sqlite_dep,
libsoup_dep,
]
@@ -105,12 +108,17 @@ libchamplain_srcdir = include_directories('.')
libchamplain_c_args = [
'-DHAVE_CONFIG_H',
'-DCHAMPLAIN_COMPILATION',
- '-DG_LOG_DOMAIN="@0@"'.format(package_name),
+ '-DG_LOG_DOMAIN="@0@"'.format(meson.project_name()),
]
libchamplain_link_args = [
]
+libchamplain_includedir = join_paths(
+ pkgincludedir,
+ 'champlain',
+)
+
features_h = configuration_data()
if build_with_memphis
features_h.set('CHAMPLAIN_HAS_MEMPHIS', '1')
@@ -119,11 +127,6 @@ endif
libchamplain_features_h = configure_file(
output: 'champlain-features.h',
configuration: features_h,
- install: true,
- install_dir: join_paths(
- pkgincludedir,
- 'champlain',
- )
)
version_h = configuration_data()
@@ -136,11 +139,6 @@ libchamplain_version_h = configure_file(
input: 'champlain-version.h.in',
output: 'champlain-version.h',
configuration: version_h,
- install: true,
- install_dir: join_paths(
- pkgincludedir,
- 'champlain',
- )
)
libchamplain_public_h += [
@@ -154,10 +152,7 @@ libchamplain_enums = gnome.mkenums(
h_template: 'champlain-enum-types.h.in',
c_template: 'champlain-enum-types.c.in',
install_header: true,
- install_dir: join_paths(
- pkgincludedir,
- 'champlain',
- )
+ install_dir: libchamplain_includedir,
)
libchamplain_enums_h = libchamplain_enums.get(1)
@@ -168,10 +163,7 @@ libchamplain_sources += [
install_headers(
libchamplain_public_h,
- install_dir: join_paths(
- pkgincludedir,
- 'champlain',
- )
+ install_dir: libchamplain_includedir,
)
libchamplain_sha = library(
@@ -183,7 +175,6 @@ libchamplain_sha = library(
c_args: libchamplain_c_args,
link_args: libchamplain_link_args,
install: true,
- install_dir: libdir,
)
libchamplain_dep_sources = [
@@ -214,8 +205,6 @@ if generate_gir
includes: libchamplain_gir_includes,
link_with: libchamplain_sha,
install: true,
- install_dir_gir: girdir,
- install_dir_typelib: typelibdir,
extra_args: [
'-DCHAMPLAIN_COMPILATION',
]
@@ -238,7 +227,6 @@ if generate_gir
sources: libchamplain_gir.get(0),
packages: libchamplain_vapi_packages,
install: true,
- install_dir: vapidir,
)
endif
endif
@@ -246,14 +234,13 @@ endif
libchamplain_dep = declare_dependency(
link_with: libchamplain_sha,
include_directories: rootdir,
- dependencies: libchamplain_deps,
+ dependencies: libchamplain_requires,
sources: libchamplain_dep_sources,
)
libchamplain_pc = pkg.generate(
libchamplain_sha,
- name: package_string,
description: 'Map View for Clutter',
subdirs: package_string,
- install_dir: pkgconfigdir,
+ requires: libchamplain_requires,
)
diff --git a/demos/meson.build b/demos/meson.build
index f34def6..cf852d1 100644
--- a/demos/meson.build
+++ b/demos/meson.build
@@ -1,23 +1,22 @@
libchamplain_demos = [
- ['minimal', 'minimal.c'],
- ['launcher', ['launcher.c', 'markers.c']],
- ['animated-marker', 'animated-marker.c'],
- ['polygons', 'polygons.c'],
- ['url-marker', 'url-marker.c'],
- ['create_destroy_test', 'create-destroy-test.c'],
+ ['minimal', 'minimal.c', []],
+ ['launcher', ['launcher.c', 'markers.c'], []],
+ ['animated-marker', 'animated-marker.c', []],
+ ['polygons', 'polygons.c', []],
+ ['url-marker', 'url-marker.c', [libsoup_dep]],
+ ['create_destroy_test', 'create-destroy-test.c', []],
]
foreach demo: libchamplain_demos
demo_name = demo.get(0)
demo_sources = demo.get(1)
+ demo_deps = demo.get(2)
executable(
demo_name,
demo_sources,
install: false,
- dependencies: [
- libchamplain_dep,
- ]
+ dependencies: demo_deps + [libchamplain_dep],
)
endforeach
diff --git a/docs/reference/meson.build b/docs/reference/meson.build
index c99a57a..781205a 100644
--- a/docs/reference/meson.build
+++ b/docs/reference/meson.build
@@ -10,6 +10,8 @@ clutter_docpath = join_paths(clutter_prefix, 'share', 'gtk-doc', 'html', 'clutte
gtk_prefix = gtk_dep.get_pkgconfig_variable('prefix')
gtk_docpath = join_paths(gtk_prefix, 'share', 'gtk-doc', 'html', 'gtk3')
+gtkdocdir = join_paths(datadir, 'gtk-doc', 'html', package_string)
+
libchamplain_reference_ignored_h = [
'champlain-gtk.h',
'champlain-adjustment.h',
@@ -52,7 +54,7 @@ libchamplain_reference_mkdb_args = [
]
libchamplain_reference_fixxref_args = [
- '--html-dir=@0@'.format(join_paths(gtkdocdir, 'html', package_string)),
+ '--html-dir=@0@'.format(gtkdocdir),
'--extra-dir=@0@'.format(glib_docpath),
'--extra-dir=@0@'.format(gobject_docpath),
'--extra-dir=@0@'.format(clutter_docpath),
@@ -69,9 +71,5 @@ gnome.gtkdoc(
mkdb_args: libchamplain_reference_mkdb_args,
fixxref_args: libchamplain_reference_fixxref_args,
install: true,
- install_dir: join_paths(
- gtkdocdir,
- 'html',
- package_string,
- )
+ install_dir: gtkdocdir,
)
diff --git a/meson.build b/meson.build
index 3bdd0b5..89e0e65 100644
--- a/meson.build
+++ b/meson.build
@@ -14,23 +14,22 @@ pkg = import('pkgconfig')
# Versioning
version = meson.project_version()
version_arr = version.split('.')
-version_major = version_arr[0]
-version_minor = version_arr[1]
-version_micro = version_arr[2]
-
-if version_minor.to_int().is_odd()
- api_version = '.'.join([version_major, version_minor + 1])
-else
- api_version = '.'.join([version_major, version_minor])
-endif
+version_major = version_arr[0].to_int()
+version_minor = version_arr[1].to_int()
+version_micro = version_arr[2].to_int()
+
+api_version = '@0@.@1@'.format(
+ version_major,
+ version_minor.is_odd() ? version_minor + 1 : version_minor,
+)
-# Before making a release, the LT_VERSION string should be modified.
-# The string is of the form C.A.R
-# - If the interface is the same as the previous version, change to C.A.R+1
+# Before making a release, the lib_version string should be modified.
+# The string is of the form X.Y.Z
+# - If the interface is the same as the previous version, change to X.Y.Z+1
# - If interfaces have been changed or added, but binary compatibility has
-# been preserved, change to C.A+1.R
+# been preserved, change to X.Y+1.0
# - If binary compatibility has been broken (eg removed or changed interfaces)
-# change to C+1.0.0
+# change to X+1.0.0
lib_version = '0.11.8'
package_name = meson.project_name().strip('lib')
@@ -41,21 +40,11 @@ package_gtk_string = '@0@-@1@'.format(package_gtk_name, api_version)
# Paths
rootdir = include_directories('.')
-srcdir = meson.current_source_dir()
-builddir = meson.current_build_dir()
-
prefix = get_option('prefix')
-
includedir = join_paths(prefix, get_option('includedir'))
libdir = join_paths(prefix, get_option('libdir'))
datadir = join_paths(prefix, get_option('datadir'))
pkgincludedir = join_paths(includedir, package_string)
-typelibdir = join_paths(libdir, 'girepository-1.0')
-pkgconfigdir = join_paths(libdir, 'pkgconfig')
-
-girdir = join_paths(datadir, 'gir-1.0')
-gtkdocdir = join_paths(datadir, 'gtk-doc')
-vapidir = join_paths(datadir, 'vala', 'vapi')
# Dependencies
cc = meson.get_compiler('c')