From e351760d2ab7b60861aea4f8afcf92b183d60358 2017-08-26 20:09:00 From: Alexis Jeandet Date: 2017-08-26 20:09:00 Subject: [PATCH] Added workaround for meson's rcc call with plugins. Signed-off-by: Alexis Jeandet --- diff --git a/meson.build b/meson.build index 5550f31..1963dfa 100644 --- a/meson.build +++ b/meson.build @@ -10,7 +10,8 @@ qt5network = dependency('qt5', modules : 'Network') qt5printsupport = dependency('qt5', modules : 'PrintSupport') qt5test = dependency('qt5', modules : 'Test') -moc = find_program('moc','moc-qt5') +moc = find_program('moc-qt5','moc') +rcc = find_program('rcc-qt5','rcc') subdir('core') subdir('gui') diff --git a/plugins/amda/meson.build b/plugins/amda/meson.build index 489770a..51b18fd 100644 --- a/plugins/amda/meson.build +++ b/plugins/amda/meson.build @@ -18,7 +18,7 @@ amdaplugin_resources_files = [ amdaplugin_inc = include_directories(['include', '../../plugin/include']) -gen = generator(moc, +moc_gen = generator(moc, output : 'moc_@BASENAME@.cpp', arguments : ['@INPUT@', '-DPLUGIN_JSON_FILE_PATH="'+meson.source_root()+'/plugins/amda/resources/amda.json"', @@ -26,15 +26,24 @@ gen = generator(moc, '-I', meson.current_source_dir()+'/../../plugin/include', '-o', '@OUTPUT@']) -amdaplugin_moc_plugin_files = gen.process(amdaplugin_moc_headers) +rcc_gen = generator(rcc, + output : 'qrc_@BASENAME@.cpp', + arguments : ['--name=@BASENAME@"', + '--output', + '@OUTPUT@', + '@INPUT@']) + +amdaplugin_moc_plugin_files = moc_gen.process(amdaplugin_moc_headers) + +amdaplugin_rcc_plugin_files = rcc_gen.process(amdaplugin_resources_files) amdaplugin_moc_files = qt5.preprocess( - ui_files : amdaplugin_ui_files, - qresources : amdaplugin_resources_files) + ui_files : amdaplugin_ui_files) sciqlop_amdaplugin = library('amdaplugin', amdaplugin_sources, amdaplugin_moc_files, + amdaplugin_rcc_plugin_files, amdaplugin_moc_plugin_files, cpp_args : '-DAMDA_LIB', link_with : [sciqlop_core, sciqlop_gui],