Skip to content

dimitry-ishenko-cpp/udev

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

74 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

udev++ – a udev Library for C++

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++.

Installation

Prerequisites

Binary

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++-dev

RaspberryPi:

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++-dev

From source

Stable 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 install

Latest 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 install

Usage

To 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.

Description

TODO

For now check the example directory for usage examples.

Authors

  • Dimitry Ishenko - dimitry (dot) ishenko (at) (gee) mail (dot) com

License

This project is distributed under the GNU GPL license. See the LICENSE.md file for details.