You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
3 years ago | |
---|---|---|
cmake | 3 years ago | |
examples | 3 years ago | |
include | 3 years ago | |
pkg-config | 3 years ago | |
src | 3 years ago | |
tests | 3 years ago | |
.drone.yml | 3 years ago | |
.gitignore | 4 years ago | |
CMakeLists.txt | 3 years ago | |
Doxyfile | 3 years ago | |
LICENSE | 3 years ago | |
README.md | 3 years ago | |
build_doc.sh | 3 years ago |
README.md
xdgcfg is a very simple wrapper around libconfig written in C++. It reads
and writes files in ${XDG_CONFIG_HOME}
. It creates subdirectories if
necessary.
Usage
xdgcfg.hpp
has explanatory comments in it and there is an
example. The reference is also available at
doc.schlomp.space/xdgcfg/.
Use it in your CMake project like this:
find_package(xdgcfg CONFIG REQUIRED)
target_link_libraries(MyProject xdgcfg::xdgcfg)
If you don't use CMake, you can get the compile-flags with pkg-config:
pkg-config --libs --cflags xdgcfg
Install
Gentoo
Add my repository and install it from there.
eselect repository enable tastytea
echo "dev-cpp/xdgcfg" >> /etc/portage/package.accept_keywords/xdgcfg
emaint sync -r tastytea
emerge -a dev-cpp/xdgcfg
From source
Dependencies
- C++ compiler (Tested: g++ 5/8/9)
- cmake (at least: 3.1)
- pkgconfig (tested: 0.29)
- libconfig++ (tested: 1.5)
- libxdg-basedir (tested: 1.2)
Compile
mkdir build
cd build
cmake ..
cmake --build .
make install
CMake options
-DWITH_TESTS=YES
to compile the tests.-DWITH_EXAMPLES=YES
to compile the example.-DBUILD_SHARED_LIBS=NO
to build a static library.