diff options
author | Kjell Ahlstedt <kjellahlstedt@gmail.com> | 2019-10-26 11:17:49 +0200 |
---|---|---|
committer | Kjell Ahlstedt <kjellahlstedt@gmail.com> | 2019-10-26 11:17:49 +0200 |
commit | 2d22e63f359315c4e2fa2aa3be1f558ed4397b65 (patch) | |
tree | 7f5e9037ac978dd460ecbf146463be7b9d4b8671 /skeletonmm/examples | |
parent | a0daa2b074923f115bfd9ae9ff1101563f6ba5d5 (diff) | |
download | mm-common-2d22e63f359315c4e2fa2aa3be1f558ed4397b65.tar.gz |
skeletonmm: Use Meson instead of Autotools
The files in the skeletonmm directory now show the start of a project
that will use Meson.
The new skeletonmm is based on experience from building pangomm with Meson.
It does not include code necessary for running Meson under MSVC.
See !2 and pangomm!4. Fixes #1
Diffstat (limited to 'skeletonmm/examples')
-rw-r--r-- | skeletonmm/examples/.gitignore | 1 | ||||
-rw-r--r-- | skeletonmm/examples/Makefile.am | 29 | ||||
-rw-r--r-- | skeletonmm/examples/example1/main.cc (renamed from skeletonmm/examples/example/example.cc) | 2 | ||||
-rw-r--r-- | skeletonmm/examples/meson.build | 34 |
4 files changed, 35 insertions, 31 deletions
diff --git a/skeletonmm/examples/.gitignore b/skeletonmm/examples/.gitignore deleted file mode 100644 index d4109ac..0000000 --- a/skeletonmm/examples/.gitignore +++ /dev/null @@ -1 +0,0 @@ -/example/example diff --git a/skeletonmm/examples/Makefile.am b/skeletonmm/examples/Makefile.am deleted file mode 100644 index 43341d0..0000000 --- a/skeletonmm/examples/Makefile.am +++ /dev/null @@ -1,29 +0,0 @@ -## Copyright (c) 2010 Joe Hacker <joe@example.com> -## -## This file is part of skeletonmm. -## -## skeletonmm is free software: you can redistribute it and/or modify it -## under the terms of the GNU Lesser General Public License as published -## by the Free Software Foundation, either version 2.1 of the License, -## or (at your option) any later version. -## -## skeletonmm is distributed in the hope that it will be useful, but -## WITHOUT ANY WARRANTY; without even the implied warranty of -## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. -## See the GNU Lesser General Public License for more details. -## -## You should have received a copy of the GNU Lesser General Public License -## along with this program. If not, see <http://www.gnu.org/licenses/>. - -AUTOMAKE_OPTIONS = subdir-objects - -check_PROGRAMS = example/example - -local_includes = -I$(top_builddir)/skeleton $(if $(srcdir:.=),-I$(top_srcdir)/skeleton) -local_libs = $(top_builddir)/skeleton/skeletonmm/libskeletonmm-$(SKELETONMM_API_VERSION).la - -AM_CPPFLAGS = -I$(top_builddir) $(local_includes) $(GTHREAD_CFLAGS) $(SKELETONMM_CFLAGS) -AM_CXXFLAGS = $(SKELETONMM_WXXFLAGS) -LDADD = $(SKELETONMM_LIBS) $(local_libs) - -example_example_SOURCES = example/example.cc diff --git a/skeletonmm/examples/example/example.cc b/skeletonmm/examples/example1/main.cc index 4e8dbb0..3507caf 100644 --- a/skeletonmm/examples/example/example.cc +++ b/skeletonmm/examples/example1/main.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2010 Joe Hacker <joe@example.com> +/* Copyright (c) 2019 Joe Hacker <joe@example.com> * * This file is part of skeletonmm. * diff --git a/skeletonmm/examples/meson.build b/skeletonmm/examples/meson.build new file mode 100644 index 0000000..69e2f0a --- /dev/null +++ b/skeletonmm/examples/meson.build @@ -0,0 +1,34 @@ +# examples + +# input: gnome, skeletonmm_dep, build_examples + +examples = [ +# [[dir-name], exe-name, [sources]] + [['example1'], 'example', ['main.cc']], +] + +foreach ex : examples + dir = '' + foreach dir_part : ex[0] + dir = dir / dir_part + endforeach + ex_name = (dir / ex[1]).underscorify() + ex_sources = [] + resources = [] + foreach src : ex[2] + if src.endswith('.gresource.xml') + resources = gnome.compile_resources(dir.underscorify() + '_resources', + dir / src, + source_dir: dir + ) + else + ex_sources += dir / src + endif + endforeach + + exe_file = executable(ex_name, ex_sources, resources, + dependencies: skeletonmm_dep, + gui_app: true, + build_by_default: build_examples + ) +endforeach |