diff --git a/.gitignore b/.gitignore index 98f4d631..79076069 100644 --- a/.gitignore +++ b/.gitignore @@ -49,3 +49,6 @@ build_* # gutentags tags + +# subprojects +subprojects/radio_tool diff --git a/meson.build b/meson.build index 9a8a8228..b9cbae68 100644 --- a/meson.build +++ b/meson.build @@ -434,8 +434,8 @@ targets = [ 'load_addr': '0x0800C000'}, ] +radio_tool = find_program('radio_tool') objcopy = find_program('objcopy', required:false, disabler:true) -radio_tool = find_program('radio_tool', required:false, disabler:true) bin2sgl = find_program('scripts/bin2sgl.Linux', required:false, disabler:true) gd77_loader = find_program('scripts/gd-77_firmware_loader.py', required:false, disabler:true) diff --git a/subprojects/packagefiles/radio_tool/meson.build b/subprojects/packagefiles/radio_tool/meson.build new file mode 100644 index 00000000..e8b6a7eb --- /dev/null +++ b/subprojects/packagefiles/radio_tool/meson.build @@ -0,0 +1,35 @@ +project('radio_tool', 'cpp') + +# Building radio_tool natively in meson will be possible when native +# subproject building will be implemented. + +#usb = dependency('libusb-1.0', version : '>=1.0.0') +# +#conf_data = configuration_data() +#conf_data.set('GIT_SHA1', '58ff5701466a6dc651e0d04778c4abec780f4643') +#conf_data.set('GIT_SHA1_SHORT', '58ff570') +#conf_data.set('PROJECT_VERSION', '0.1.0') +#conf_data.set('PROJECT_NAME', 'radio_tool') +#version_file = configure_file(input : 'src/version.cpp.in', +# output : 'version.cpp', +# configuration : conf_data) +# +#src = ['src/radio_tool.cpp', +# 'src/dfu.cpp', +# 'src/radio_factory.cpp', +# 'src/tyt_radio.cpp', +# 'src/tyt_dfu.cpp', +# 'src/tyt_fw.cpp', +# 'src/cs_fw.cpp', +# 'src/rdt.cpp', +# version_file] +# +#inc = include_directories('include') + +run_command('mkdir', 'build') +run_command('cmake', '.') +run_command('make', '-j4') + +radio_tool = find_program('./radio_tool') + +meson.override_find_program('radio_tool', radio_tool) diff --git a/subprojects/radio_tool.wrap b/subprojects/radio_tool.wrap new file mode 100644 index 00000000..2f403641 --- /dev/null +++ b/subprojects/radio_tool.wrap @@ -0,0 +1,7 @@ +[wrap-git] +url = https://github.com/v0l/radio_tool +revision = 58ff5701466a6dc651e0d04778c4abec780f4643 +patch_directory = radio_tool + +[provide] +program_names = radio_tool