Skip to content
Permalink
Browse files

meson.build: added to repository

Playing around with the Meson/Ninja setup. Seems pretty good so far.

Signed-off-by: Steven Noonan <steven@uplinklabs.net>
  • Loading branch information...
tycho committed Feb 20, 2018
1 parent 5bf41cf commit 04222b8ff13f09b7342a965f37afa0fd106f1791
Showing with 23 additions and 0 deletions.
  1. +23 −0 meson.build
@@ -0,0 +1,23 @@
project('cpuid', 'c')

compiler = meson.get_compiler('c')


gen_build_h = custom_target('build.h',
input : [],
output : ['build.h'],
command : [meson.current_source_dir() + '/tools/build.pl', '@OUTPUT@'])

gen_license_h = custom_target('license.h',
input : ['COPYING'],
output : ['license.h'],
command : [meson.current_source_dir() + '/tools/license.pl', '@INPUT@', '@OUTPUT@'])

src = ['cache.c', 'clock.c', 'cpuid.c', 'feature.c', 'handlers.c', 'main.c', 'sanity.c', 'threads.c', 'util.c', 'version.c']

incdirs = include_directories('.')
lm = compiler.find_library('m')
threads = dependency('threads')
executable('cpuid', src, gen_build_h, gen_license_h, include_directories : incdirs, link_args : '-pthread', dependencies : [lm, threads])

# vim: set ts=4 sts=4 sw=4 et:

0 comments on commit 04222b8

Please sign in to comment.
You can’t perform that action at this time.