BastilleResearch / gr-lora

GNU Radio OOT module implementing the LoRa PHY, based on https://github.com/matt-knight/research/tree/master/2016_05_20_jailbreak
GNU General Public License v3.0
470 stars 92 forks source link

Build succeeds even if SWIG is not found, breaking examples. #20

Open pgorczak opened 6 years ago

pgorczak commented 6 years ago

Building without SWIG seems to work fine but it breaks the examples, resulting e.g. in #11.

Is SWIG always required for gr-lora to work? If it is, we should make the build fail if it can't be found, by changing CMakeLists.txt line 31 to

find_package(SWIG REQUIRED)

If there are cases where you want to just skip the Python bindings, we could instead add a warning before CMakeLists.txt line 34 like

message(WARNING "SWIG or Python-libs not found. Skipping Python bindings.")
message(WARNING "Note that examples won't work!")

Since I'm a total GNUradio noob, I can't tell which one is right, so not opening a PR yet ¯\_(ツ)_/¯

matt-knight commented 6 years ago

Hi @pgorczak,

Thanks for noting this. While technically one can use GNU Radio without the Python layer (thus not requiring SWIG), I don't know a single person who does this. So I am of the opinion that your first solution mandating the use of SWIG is the way to go.

I'm happy to handle this, unless you'd rather do the honors.

Best, Matt

pgorczak commented 6 years ago

Hey I just opened #21 after seeing how easy minor edits are from the website :)