C and C++ integration with the XDG Basedir specification is provided, when compiling on Unix platforms, by the UntitledXDGBasedir library.

Enabling

To enable it, simply change the source code of the CMakeLists.txt file to this:

option(ENABLE_XDG_BASEDIR "Compile in the UntitledXDGBasedir library for an implementation of the XDG Basedir specification" ON)

Otherwise, simply add the following argument through the cmake CLI: -DENABLE_XDG_BASEDIR=ON and don’t forget to also enable the OS module!

Finally, update your uvproj.yaml so that the xdg key under enabled-modules is set to true like this:

name: "MyProject"
version: "1.0.0.0"
engine-version: "1.0.0.0"
enabled-modules:
  os: true
  xdg: true

Event safety

The entire module is flagged as event safe at Any time

Using the library

Check out the UntitledXDGBasedir wiki. Initial installation instructions can be skipped, as they are not relevant. All compile options are turned on

Checking for the module

To check for the module at compile time, use the UIMGUI_XDG_BASEDIR_SUBMODULE_ENABLED macro.

Runtime checking can be done using the xdg member of the ModuleSettings struct. More info can be found here.