diff options
author | Dylan Baker <dylan@pnwbakers.com> | 2019-06-25 15:05:34 -0700 |
---|---|---|
committer | Dylan Baker <dylan@pnwbakers.com> | 2019-06-25 15:05:34 -0700 |
commit | e58b2f18001eb8ea02df400fa0ac38e0fb1d6c3d (patch) | |
tree | 2d3e5b8ff9eab4e324f0ce964675a6c635de1b22 | |
parent | 7ad51d42f026203ef52d587f3e15422bd842a822 (diff) |
meson: Add a meson build system
Because why not. Also, I want to use this as a subproject.
-rw-r--r-- | meson.build | 71 |
1 files changed, 71 insertions, 0 deletions
diff --git a/meson.build b/meson.build new file mode 100644 index 0000000..09fb5e3 --- /dev/null +++ b/meson.build @@ -0,0 +1,71 @@ +# Copyright © 2019 Intel Corporation +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; version 2 of the License. +# +# This program 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 +# General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see <https://www.gnu.org/licenses/>. + +project( + 'xtsttopng', + ['c'], + version : '1.0', + meson_version : '>= 0.43', + default_options : ['c_std=c99', 'buildtype=debugoptimized', 'n_debug=if-release'] +) + +cc = meson.get_compiler('c') + +c_args = cc.get_supported_arguments([ + '-Werror=unknown-warning-option', + '-Werror=unused-command-line-argument', + '-Wpointer-arith', + '-Wmissing-declarations', + '-Wformat=2', + '-Wstrict-prototypes', + '-Wmissing-prototypes', + '-Wnested-externs', + '-Wbad-function-cast', + '-Wold-style-definition', + '-Wdeclaration-after-statement', + '-Wunused', + '-Wuninitialized', + '-Wshadow', + '-Wmissing-noreturn', + '-Wmissing-format-attribute', + '-Wredundant-decls', + '-Wlogical-op', + '-Werror=implicit', + '-Werror=nonnull', + '-Werror=init-self', + '-Werror=main', + '-Werror=missing-braces', + '-Werror=sequence-point', + '-Werror=return-type', + '-Werror=trigraphs', + '-Werror=array-bounds', + '-Werror=write-strings', + '-Werror=address', + '-Werror=int-to-pointer-cast', + '-Werror=pointer-to-int-cast', + '-Werror=attributes', +]) + +dep_m = cc.find_library('m', required : false) +dep_png = dependency('libpng') + +executable( + 'xtsttopng', + ['xtsttopng.c'], + c_args : c_args, + dependencies : [dep_m, dep_png], + install : true, +) + +install_man('xtsttopng.1')
\ No newline at end of file |