##// END OF EJS Templates
Fixes meson build
Alexandre Leroux -
r796:e429ce511147
parent child
Show More
@@ -1,45 +1,46
1
1
2 mockplugin_moc_headers = [
2 mockplugin_moc_headers = [
3 'include/MockPlugin.h'
3 'include/MockPlugin.h'
4 ]
4 ]
5
5
6 mockplugin_sources = [
6 mockplugin_sources = [
7 'src/MockDefs.cpp',
7 'src/CosinusProvider.cpp',
8 'src/CosinusProvider.cpp',
8 'src/MockPlugin.cpp'
9 'src/MockPlugin.cpp'
9 ]
10 ]
10
11
11 mockplugin_inc = include_directories(['include', '../../plugin/include'])
12 mockplugin_inc = include_directories(['include', '../../plugin/include'])
12
13
13
14
14 gen = generator(moc,
15 gen = generator(moc,
15 output : 'moc_@BASENAME@.cpp',
16 output : 'moc_@BASENAME@.cpp',
16 arguments : ['@INPUT@',
17 arguments : ['@INPUT@',
17 '-DPLUGIN_JSON_FILE_PATH="'+meson.source_root()+'/plugins/mockplugin/resources/mockplugin.json"',
18 '-DPLUGIN_JSON_FILE_PATH="'+meson.source_root()+'/plugins/mockplugin/resources/mockplugin.json"',
18 '-I', meson.current_source_dir()+'/include',
19 '-I', meson.current_source_dir()+'/include',
19 '-I', meson.current_source_dir()+'/../../plugin/include',
20 '-I', meson.current_source_dir()+'/../../plugin/include',
20 '-o', '@OUTPUT@'])
21 '-o', '@OUTPUT@'])
21
22
22 mockplugin_moc_files = gen.process(mockplugin_moc_headers)
23 mockplugin_moc_files = gen.process(mockplugin_moc_headers)
23
24
24 sciqlop_mockplugin = library('mockplugin',
25 sciqlop_mockplugin = library('mockplugin',
25 mockplugin_sources,
26 mockplugin_sources,
26 mockplugin_moc_files,
27 mockplugin_moc_files,
27 cpp_args : '-DMOCKPLUGIN_LIB',
28 cpp_args : '-DMOCKPLUGIN_LIB',
28 include_directories : [mockplugin_inc],
29 include_directories : [mockplugin_inc],
29 dependencies : [sciqlop_core, sciqlop_gui],
30 dependencies : [sciqlop_core, sciqlop_gui],
30 install : true
31 install : true
31 )
32 )
32
33
33 tests = [
34 tests = [
34 [['tests/TestCosinusAcquisition.cpp'],'test_cosinus_acquisition','Cosinus Acquisition test']
35 [['tests/TestCosinusAcquisition.cpp'],'test_cosinus_acquisition','Cosinus Acquisition test']
35 ]
36 ]
36
37
37 foreach unit_test : tests
38 foreach unit_test : tests
38 test_moc_files = qt5.preprocess(moc_sources : unit_test[0])
39 test_moc_files = qt5.preprocess(moc_sources : unit_test[0])
39 test_exe = executable(unit_test[1],unit_test[0] , test_moc_files,
40 test_exe = executable(unit_test[1],unit_test[0] , test_moc_files,
40 link_with : [sciqlop_mockplugin],
41 link_with : [sciqlop_mockplugin],
41 include_directories : [mockplugin_inc],
42 include_directories : [mockplugin_inc],
42 cpp_args : ['-DMOCKPLUGIN_TESTS_RESOURCES_DIR="'+meson.current_source_dir()+'/tests-resources"'],
43 cpp_args : ['-DMOCKPLUGIN_TESTS_RESOURCES_DIR="'+meson.current_source_dir()+'/tests-resources"'],
43 dependencies : [sciqlop_core, sciqlop_gui, qt5test])
44 dependencies : [sciqlop_core, sciqlop_gui, qt5test])
44 test(unit_test[2], test_exe, args: ['-teamcity', '-o', '@0@.teamcity.txt'.format(unit_test[1])], timeout: 3 * 60)
45 test(unit_test[2], test_exe, args: ['-teamcity', '-o', '@0@.teamcity.txt'.format(unit_test[1])], timeout: 3 * 60)
45 endforeach No newline at end of file
46 endforeach
General Comments 0
You need to be logged in to leave comments. Login now