Lora-net / picoGW_hal

Host driver/HAL to build a LoRa Picocell Gateway which communicates through USB with a concentrator board based on Semtech SX1308 multi-channel modem and SX1257/SX1255 RF transceivers.
Other
45 stars 47 forks source link

add CMake support #7

Closed xueliu closed 4 years ago

xueliu commented 5 years ago

In this patch CMake is introduced

Signed-off-by: Xue Liu liuxuenetmail@gmail.com

brainstorm commented 5 years ago

You are awesome @xueliu, thanks for this :)

xueliu commented 5 years ago

You are awesome @xueliu, thanks for this :)

Thanks. Please have a try to check whether it is working.

brainstorm commented 5 years ago

@mcoracin @Lora-net, for context, this PR is relevant and useful to properly package/include this software in OpenWRT:

https://github.com/openwrt/packages/pull/8264#issuecomment-465978336

Please consider merging this work if you want higher uptake/use of this Semtech software stack :)

xueliu commented 5 years ago

@xueliu Everything builds like a charm, although some object conventions are a bit... unconventional:

$ find . -iname *.c.o
./libloragw/CMakeFiles/test_loragw_cal.dir/tst/test_loragw_cal.c.o
./libloragw/CMakeFiles/test_loragw_hal.dir/tst/test_loragw_hal.c.o
./libloragw/CMakeFiles/test_loragw_reg.dir/tst/test_loragw_reg.c.o
./libloragw/CMakeFiles/loragw.dir/src/loragw_aux.c.o
./libloragw/CMakeFiles/loragw.dir/src/loragw_radio.c.o
./libloragw/CMakeFiles/loragw.dir/src/loragw_reg.c.o

Typically the objects should be named .o, not .c.o? Just that tiny detail, the rest is great work indeed 👍

I think CMake use this name convention internally. We don't need to take care of it.