added libtinfo dependency
required on aarch64 debian bookworm. While libreadline requires e.g. tputs it does not link against libtinfo itself.
Fixes #32
The CI for this failed on osx, can you add a check that just scopes the addition to the platform that needs it? Also what triplet/toolchain/sysroot are you using? I’d like to add a cross compile check (maybe emulated run of test suite if I can get that to work) before merging. I’ll take care of updating the ci, just need to know what your env is to match.
Sure, will do. I wrote a small blog post demystifying cross compilation. It is basically that setup, just that i use bookworm instead of buster. The checks passed within the chroot.
TL/DR: debian bookworm installed via debootstrap with the libreadline-dev package installed and emulated via qemu-aarch64-static.
The triple is arm64-linux-gnu. If that does not work aarch64-linux-gnu may work.
the changes are inspired by this post.
- changed detection method for readline to CHECK_LIBRARY_EXISTS. This solves detection issues on my system as the not all types used by the readline.h header have been defined (further includes missing) - arch linux
- added detection of tinfo via CHECK_LIBRARY_EXISTS. If it does exist it is also used in the detection of readline to prevent the same issue as #32
on a different note: I updated the blog post as library detection was not working. See cmake guide