summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthias Vogelgesang <matthias.vogelgesang@kit.edu>2017-06-07 12:15:12 +0200
committerMatthias Vogelgesang <matthias.vogelgesang@kit.edu>2017-06-20 09:27:48 +0200
commitcdebe61f4b419295012e7de2b33081c9aa48cd73 (patch)
treef3d9c5974693df897780be02c4ad7ade82df5032
parentd276bc6a82fb2285eccd49ad3665988a0a19040b (diff)
downloadlibufodecode-cdebe61f4b419295012e7de2b33081c9aa48cd73.tar.gz
libufodecode-cdebe61f4b419295012e7de2b33081c9aa48cd73.tar.bz2
libufodecode-cdebe61f4b419295012e7de2b33081c9aa48cd73.tar.xz
libufodecode-cdebe61f4b419295012e7de2b33081c9aa48cd73.zip
Use alternative meson build system
-rw-r--r--config.h.meson.in2
-rw-r--r--meson.build45
2 files changed, 47 insertions, 0 deletions
diff --git a/config.h.meson.in b/config.h.meson.in
new file mode 100644
index 0000000..e6671c4
--- /dev/null
+++ b/config.h.meson.in
@@ -0,0 +1,2 @@
+#mesondefine DEBUG
+#mesondefine HAVE_SSE
diff --git a/meson.build b/meson.build
new file mode 100644
index 0000000..6d18f84
--- /dev/null
+++ b/meson.build
@@ -0,0 +1,45 @@
+project('libufodecode', 'c')
+
+version = '0.3'
+so_version = '0'
+
+cc = meson.get_compiler('c')
+
+have_sse = cc.has_argument('-msse') and cc.has_argument('-msse2')
+
+conf = configuration_data()
+
+conf.set('DEBUG', get_option('buildtype') == 'debug')
+conf.set('HAVE_SSE', have_sse)
+
+configure_file(
+ input: 'config.h.meson.in',
+ output: 'config.h',
+ configuration: conf
+)
+
+lib = shared_library('ufodecode',
+ 'src/ufodecode.c',
+ version: version,
+ soversion: so_version,
+ install: true
+)
+
+install_headers('src/ufodecode.h')
+
+ipedec = executable('ipedec',
+ [ 'test/ipedec.c',
+ 'test/timer.c' ],
+ link_with: lib,
+ include_directories: include_directories('src'),
+ install: true
+)
+
+pkg = import('pkgconfig')
+
+pkg.generate(
+ libraries: [lib],
+ version: version,
+ name: 'libufodecode',
+ description: 'Decoding routines for the UFO camera'
+)