This repository has been archived on 2020-05-16. You can view files and clone it, but cannot push or open issues or pull requests.
xdgcfg/README.md

36 lines
902 B
Markdown
Raw Normal View History

2018-08-10 02:22:06 +02:00
**xdgcfg** is a very simple wrapper around libconfig written in C++. It reads
2018-08-10 03:02:57 +02:00
and writes files in `${XDG_CONFIG_HOME}`. It creates subdirectories if
2018-08-10 02:22:06 +02:00
necessary.
2019-07-22 02:43:19 +02:00
## Dependencies
2018-08-10 02:22:06 +02:00
2019-07-21 22:37:02 +02:00
* C++ compiler (Tested: g++ 5/8)
2019-07-22 02:43:19 +02:00
* [cmake](https://cmake.org/) (at least: 3.1)
2018-08-10 02:22:06 +02:00
* [pkgconfig](https://pkgconfig.freedesktop.org/wiki/)
* [libconfig++](https://github.com/hyperrealm/libconfig)
* [libxdg-basedir](http://repo.or.cz/w/libxdg-basedir.git)
2019-07-22 02:43:19 +02:00
## Install
2018-08-10 02:22:06 +02:00
2019-07-21 22:37:02 +02:00
Copy `xdgcfg.hpp` into a folder where your project can find it.
2018-08-10 02:22:06 +02:00
2019-07-21 22:37:02 +02:00
``` shell
2018-08-10 02:22:06 +02:00
mkdir build
cd build
cmake ..
make
make install
```
2019-07-22 02:43:19 +02:00
### CMake options
2018-08-10 02:22:06 +02:00
2019-07-22 02:43:19 +02:00
* `-DWITH_TESTS=YES` to compile the tests.
* `-DWITH_EXAMPLES=YES` to compile the example.
## Documentation
2018-08-10 02:22:06 +02:00
`xdgcfg.hpp` has explanatory comments in it and there is an
2018-08-10 02:44:56 +02:00
[example](src/example.cpp). The reference is also available at
[doc.schlomp.space/xdgcfg/](https://doc.schlomp.space/xdgcfg/classxdgcfg.html).