# 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 . project( 'xtsttopng', ['c'], version : '1.0', meson_version : '>= 0.43', default_options : ['c_std=c99', 'buildtype=debugoptimized', 'b_ndebug=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')