Memory leak in MultiFormatReader fixed and a better fix for the memory leak in Monoch...
[zxing.git] / cpp / SConscript
1 Decider('MD5')\r
2 \r
3 env = Environment()\r
4 \r
5 debug = True\r
6 compile_options = {}\r
7 flags = []\r
8 if debug:\r
9         #compile_options['CPPDEFINES'] = "-DDEBUG"\r
10         flags.append("-O0 -g3 -Wall")\r
11 compile_options['CXXFLAGS'] = ' '.join(flags)\r
12 \r
13 \r
14 def all_files(dir, ext='.cpp', level=5):\r
15         files = []\r
16         for i in range(1, level):\r
17                 files += Glob(dir + ('/*' * i) + ext) \r
18         return files\r
19 \r
20 \r
21 \r
22 magick_include = ['/usr/include/ImageMagick/']\r
23 magick_libs = ['Magick++', 'MagickWand', 'MagickCore']\r
24 \r
25 cppunit_libs = ['cppunit']\r
26 \r
27 zxing_files = all_files('core/src')\r
28 \r
29 zxing_include = ['core/src']\r
30 zxing_libs = env.Library('zxing', source=zxing_files, CPPPATH=zxing_include, **compile_options)\r
31 \r
32 app_files = ['magick/src/MagickBitmapSource.cpp', 'magick/src/main.cpp']\r
33 app_executable = env.Program('zxing', app_files, CPPPATH=magick_include + zxing_include, LIBS=magick_libs + zxing_libs, **compile_options)\r
34 \r
35 test_files = all_files('core/tests/src')\r
36 test_executable = env.Program('testrunner', test_files, CPPPATH=zxing_include, LIBS=zxing_libs + cppunit_libs, **compile_options)\r
37 \r
38 \r
39 Alias('lib', zxing_libs)\r
40 Alias('tests', test_executable)\r
41 Alias('zxing', app_executable)\r
42 \r