forked from IvanPizhenko/blockhash
-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathwscript
36 lines (30 loc) · 1.04 KB
/
wscript
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
APPNAME = 'blockhash'
VERSION = '0.2'
top = '.'
out = 'build'
def options(opt):
opt.load('compiler_c')
opt.add_option('--debug', dest='debug', action='store_true', default=False, help='Set to debug to enable debug symbols')
def configure(conf):
conf.load('compiler_c')
conf.check_cc(lib='m')
conf.check_cfg(package='MagickWand', args=['--cflags', '--libs'])
conf.check_cfg(package='opencv', args=['--cflags', '--libs'])
def build(bld):
bld.stlib(source='blockhash.c', target='stblockhash')
if bld.options.debug:
cflags=['-g3', '-ggdb']
else:
cflags=['-O3']
bld.program(source='imagehash.c',
features='c cprogram',
target='blockhash',
use=['MAGICKWAND', 'M', 'stblockhash'],
cflags=cflags,
)
bld.program(source='videohash.c',
features='c cprogram',
target='blockhash_video',
use=['MAGICKWAND', 'M', 'stblockhash', 'OPENCV'],
cflags=cflags,
)