Add Meson build file

This commit is contained in:
Lucien Cartier-Tilet 2020-10-26 21:37:58 +01:00
parent 988420a27c
commit c55c2707ca
Signed by: phundrak
GPG Key ID: BD7789E705CB8DCA
1 changed files with 29 additions and 0 deletions

29
meson.build Normal file
View File

@ -0,0 +1,29 @@
project('cvector', 'c',
version: '0.1.0',
default_options: ['c_std=c99', 'warning_level=3', 'optimization=3',
'buildtype=release'])
srcfiles = ['./vector.c']
headerfiles = ['./vector.h']
lib_args = [
'-fstack-protector-all',
'-Wstack-protector',
'-Wall',
'-Wextra',
'-Wnonnull',
'-ftree-vectorize',
'-pedantic',
'-pipe'
]
cc = meson.get_compiler('c')
shlib = shared_library('cvector', srcfiles,
install: true,
c_args: lib_args)
pkg_mod = import('pkgconfig')
pkg_mod.generate(name: 'cvector',
filebase: 'cvector',
description: 'Simple C implementation of C++ and Rust inspired vectors',
libraries: shlib,
version: '0.1.0')