From a65cd5add177b4a883b308dc3b9504e93abeeca7 Mon Sep 17 00:00:00 2001 From: Masanori Kakura Date: Mon, 5 Oct 2020 21:24:24 +0900 Subject: Use Meson build system --- meson.build | 39 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 meson.build (limited to 'meson.build') diff --git a/meson.build b/meson.build new file mode 100644 index 0000000..c4d1bff --- /dev/null +++ b/meson.build @@ -0,0 +1,39 @@ +project( + 'polecat', + 'c', + default_options : [ + 'buildtype=debugoptimized', + ], + license : 'MIT', + version : '0.1.5', +) + +libarchive_dep = dependency('libarchive') +libcurl_dep = dependency('libcurl') +libjson_c_dep = dependency('json-c') + +conf_data = configuration_data() +conf_data.set_quoted('NAME', meson.project_name()) +conf_data.set_quoted('VERSION', meson.project_version()) +if get_option('release') + conf_data.set('NDEBUG', true) +else + conf_data.set('DEBUG', true) +endif +configure_file(output : 'polecat-config.h', configuration : conf_data) + +conf_inc = include_directories('.') + +run_target( + 'loc', + command : [ + 'sh', + '-c', + 'find src' + + ' -type f' + + ' -name "*.cpp" -o -name "*.c" -o -name "*.h" -o -name "*.hpp"' + + ' | xargs wc -l', + ], +) + +subdir('src') -- cgit v1.2.3