Closed dominicgs closed 9 years ago
This is going to take some doing under cmake. Possible solution:
https://github.com/rpavlik/cmake-modules/tree/master/cmake-2.8.12-modules
I was thinking that we'd use the same method as we do for pkg-config files: https://github.com/dominicgs/USBProxy/blob/master/src/lib/usbproxy.pc.in https://github.com/dominicgs/USBProxy/blob/master/src/lib/CMakeLists.txt
Added some initial support in commit 00b38e6. A couple of questions: Should we version the tools separately from the lib? Should we also version libbtbb and print it at the same time? The formatting looks a bit strange, better ideas are welcome.
00b38e6 breaks the build for me:
CMakeFiles/ubertooth-btle.dir/ubertooth-btle.c.o: In function `main':
ubertooth-btle.c:(.text+0x48a): undefined reference to `h_pcap_le'
ubertooth-btle.c:(.text+0x49b): undefined reference to `h_pcap_le'
ubertooth-btle.c:(.text+0x4e5): undefined reference to `h_pcap_le'
ubertooth-btle.c:(.text+0x4f6): undefined reference to `h_pcap_le'
collect2: error: ld returned 1 exit status
Yes, known issue, already fixed on master.
Where did MAJOR and MINOR come from? If we include those, they should be in sync with YYYY.MMRN format.
I think it would be wise to add the same functionality to libbtbb. A simple char *btbb_version(void)
that we can call from Ubertooth utilities would be sufficient.
MAJOR and MINOR come from the library version number, they're set in a higher level CMakeLists.txt file. They aren't in sync with the release number because we don't always bump the library version with a release.
My ideal format:
ubertooth git-00f80d5*, libbtbb git-1234567, libUbertooth 0.2
For releases it would look like:
ubertooth 2014-11-R1, libbtbb 2014-11-R1, libUbertooth 0.2
Be sure to update the release procedure wiki page so that the releases have symbolic names instead of git commits.
Done - in a number of commits because it's sort of required for testing.
It would be nice to have version numbers added to the tools in the same way that we add them to the firmware. Running
ubertooth-rx -v
would give the output for Ubertooth and probably libbtbb, e.g.Ubertooth 2014-02-R2, libbtbb 2014-02-R2
orUbertooth git-ae7923f, libbtbb git-83b7ca6
.