More build fixes.
[dcpomatic.git] / test / wscript
1 #
2 #    Copyright (C) 2012-2015 Carl Hetherington <cth@carlh.net>
3 #
4 #    This program is free software; you can redistribute it and/or modify
5 #    it under the terms of the GNU General Public License as published by
6 #    the Free Software Foundation; either version 2 of the License, or
7 #    (at your option) any later version.
8 #
9 #    This program is distributed in the hope that it will be useful,
10 #    but WITHOUT ANY WARRANTY; without even the implied warranty of
11 #    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12 #    GNU General Public License for more details.
13 #
14 #    You should have received a copy of the GNU General Public License
15 #    along with this program; if not, write to the Free Software
16 #    Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
17 #
18
19 def configure(conf):
20     boost_test_suffix=''
21     if conf.env.TARGET_WINDOWS:
22         boost_test_suffix='-mt'
23
24     conf.check_cxx(fragment = """
25                               #define BOOST_TEST_MODULE Config test\n
26                               #include <boost/test/unit_test.hpp>\n
27                               int main() {}
28                               """, msg = 'Checking for boost unit testing library', lib = 'boost_unit_test_framework%s' % boost_test_suffix, uselib_store = 'BOOST_TEST')
29
30 def build(bld):
31     obj = bld(features='cxx cxxprogram')
32     obj.name   = 'unit-tests'
33     obj.uselib =  'BOOST_TEST BOOST_THREAD BOOST_FILESYSTEM BOOST_DATETIME SNDFILE DCP OPENJPEG FONTCONFIG CAIROMM PANGOMM XMLPP '
34     obj.uselib += 'AVFORMAT AVFILTER AVCODEC AVUTIL SWSCALE POSTPROC CXML MAGICK SUB GLIB CURL SSH XMLSEC BOOST_REGEX '
35     if bld.env.TARGET_WINDOWS:
36         obj.uselib += 'WINSOCK2'
37     obj.use    = 'libdcpomatic2'
38     obj.source = """
39                  4k_test.cc
40                  audio_analysis_test.cc
41                  audio_buffers_test.cc
42                  audio_delay_test.cc
43                  audio_decoder_test.cc
44                  audio_filter_test.cc
45                  audio_mapping_test.cc
46                  black_fill_test.cc
47                  client_server_test.cc
48                  colour_conversion_test.cc
49                  dcp_subtitle_test.cc
50                  dcpomatic_time_test.cc
51                  ffmpeg_audio_test.cc
52                  ffmpeg_dcp_test.cc
53                  ffmpeg_decoder_seek_test.cc
54                  ffmpeg_decoder_sequential_test.cc
55                  ffmpeg_examiner_test.cc
56                  ffmpeg_pts_offset_test.cc
57                  file_group_test.cc
58                  file_log_test.cc
59                  film_metadata_test.cc
60                  frame_rate_test.cc
61                  image_filename_sorter_test.cc
62                  image_test.cc
63                  import_dcp_test.cc
64                  isdcf_name_test.cc
65                  job_test.cc
66                  make_black_test.cc
67                  player_test.cc
68                  pixel_formats_test.cc
69                  ratio_test.cc
70                  repeat_frame_test.cc
71                  recover_test.cc
72                  resampler_test.cc
73                  scaling_test.cc
74                  seek_zero_test.cc
75                  silence_padding_test.cc
76                  skip_frame_test.cc
77                  srt_subtitle_test.cc
78                  stream_test.cc
79                  test.cc
80                  threed_test.cc
81                  time_calculation_test.cc
82                  update_checker_test.cc
83                  upmixer_a_test.cc
84                  util_test.cc
85                  video_content_scale_test.cc
86                  video_decoder_fill_test.cc
87                  xml_subtitle_test.cc
88                  """
89
90     # Disabled tests: some difference in font rendering between the test machine
91     # and others...
92     # subrip_test.cc burnt_subtitle_test.cc
93
94     obj.target = 'unit-tests'
95     obj.install_path = ''