-
Notifications
You must be signed in to change notification settings - Fork 3
/
meson.build
61 lines (53 loc) · 951 Bytes
/
meson.build
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
project(
'imagequant',
'c',
version : '2.4.1',
license : 'BSD-2-Clause',
meson_version : '>=0.48',
default_options : [
'c_std=c99',
],
)
compiler = meson.get_compiler('c')
add_project_arguments(
'-DNDEBUG=1',
language : 'c',
)
if compiler.get_id() == 'gcc' or compiler.get_id() == 'clang'
add_project_arguments(
'-Wno-misleading-indentation',
'-Wno-attributes',
'-Wno-unknown-pragmas',
language : 'c',
)
endif
if host_machine.cpu_family() == 'x86_64'
add_project_arguments(
'-DUSE_SSE=1',
language : 'c',
)
endif
m = compiler.find_library(
'm',
required: false,
)
lib = library(
'imagequant',
'blur.c',
'libimagequant.c',
'mediancut.c',
'mempool.c',
'nearest.c',
'pam.c',
'viter.c',
install : true,
dependencies : [
m,
],
)
install_headers('libimagequant.h')
import('pkgconfig').generate(
lib,
name : 'imagequant',
description : 'Image quantisation',
)