I'm using CMake to build linux module mode, so I'm retrieving header files on ubuntu, currently I'm running ubuntu in docker and it has:
/lib/modules/4.15.0-76-generic
Well, several days later if I build a new image, it will become updated value:
/lib/modules/4.15.0-78-generic
So this number is changing, but there's only one directory under /lib/module, and it's not 'uname -a' output.
Linux 0a08e87c0a18 4.15.0-50-generic
So I wish to know if there's a convenient way in CMake just like shell ls /lib/module
, and then I can use command line output as a parameter for header/library root directory?
Thanks a lot.