aboutsummaryrefslogtreecommitdiff
path: root/meson.build
diff options
context:
space:
mode:
authorMasanori Kakura <kakurasan@gmail.com>2020-10-05 21:24:24 +0900
committerJan <sentrycraft123@gmail.com>2020-10-05 17:12:38 +0200
commita65cd5add177b4a883b308dc3b9504e93abeeca7 (patch)
treea3a476409a303464166c756af233171614cbf9d2 /meson.build
parentd07122673c9c66b41cf311ff4c9d1abed49fc669 (diff)
downloadpolecat-a65cd5add177b4a883b308dc3b9504e93abeeca7.tar.gz
polecat-a65cd5add177b4a883b308dc3b9504e93abeeca7.zip
Use Meson build system
Diffstat (limited to 'meson.build')
-rw-r--r--meson.build39
1 files changed, 39 insertions, 0 deletions
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')