Wrapper around libconfig that writes and reads files in XDG_CONFIG_HOME.
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.
This repo is archived. You can view files and clone it, but cannot push or open issues/pull-requests.
tastytea 9337964266
Install headers more elegantly.
11 months ago
cmake Replaced ${PROJECT_NAME} with @PROJECT_NAME@. 11 months ago
examples License change to BSD-3-Clause. 11 months ago
include Install headers more elegantly. 11 months ago
pkg-config Rearranged the file structure and rewrote the CMake recipes. 11 months ago
src Install headers more elegantly. 11 months ago
tests Rearranged the file structure and rewrote the CMake recipes. 11 months ago
.drone.yml Added gcc-9 to CI. 11 months ago
.gitignore Added documentation generation 1 year ago
CMakeLists.txt Install headers more elegantly. 11 months ago
Doxyfile Fixed paths in Doxyfile. 11 months ago
LICENSE License change to BSD-3-Clause. 11 months ago
README.md Fixed example location in readme. 11 months ago
build_doc.sh Updated Doxygen generation. 11 months 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

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.