The udev++ library is a lightweight C++ wrapper for libudev. It allows one to enumerate, monitor and introspect devices on the local system.
See the Usage section below if you are planning to develop applications with udev++.
Debian/Ubuntu/etc:
sudo add-apt-repository ppa:ppa-verse/public
sudo apt install libudev++Install the development package, if you are planning to develop applications with udev++:
sudo apt install libudev++-devRaspberryPi:
sudo add-apt-repository -S deb https://ppa.launchpadcontent.net/ppa-verse/public/ubuntu jammy main
sudo apt install libudev++Install the development package, if you are planning to develop applications with udev++:
sudo apt install libudev++-devStable version (requires CMake >= 3.16):
p=udev v=4.0.1
wget https://github.com/dimitry-ishenko-cpp/${p}/archive/v${v}.tar.gz
tar xzf v${v}.tar.gz
mkdir ${p}-${v}/build
cd ${p}-${v}/build
cmake ..
make
sudo make installLatest master (requires git and CMake >= 3.16):
p=udev
git clone --recursive https://github.com/dimitry-ishenko-cpp/${p}.git
mkdir ${p}/build
cd ${p}/build
cmake ..
make
sudo make installTo use udev++ in your application simply add:
#include <udev++.hpp>to your file(s) and link with -ludev++. For CMake-based projects use:
find_package(udev++ REQUIRED)
...
target_link_libraries(marvin PRIVATE udev++::udev++)to find the library and link with it.
udev++ additionally exports udev++::udev++_static and udev++::udev++_shared targets, which you can use to explicitly link with the static and shared versions of the library respectively.
TODO
For now check the example directory for usage examples.
- Dimitry Ishenko - dimitry (dot) ishenko (at) (gee) mail (dot) com
This project is distributed under the GNU GPL license. See the LICENSE.md file for details.