diff --git a/.gitignore b/.gitignore index 4ce3357..f69d6e9 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ .idea/ cmake-build-*/ +build/ diff --git a/CMakeLists.txt b/CMakeLists.txt index f9529c8..93694f0 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -11,8 +11,8 @@ add_library( ini_config STATIC ini-config.c ini-config.h - ini-config/types/int.c - ini-config/types/int.h - ini-config/types/string.c - ini-config/types/string.h + types/int.c + types/int.h + types/string.c + types/string.h ) diff --git a/README.md b/README.md index 67ad110..8e14e4f 100644 --- a/README.md +++ b/README.md @@ -1,10 +1,9 @@ -## Procedure +# `ini-config` -Subsystem calls its initialize method. +## Building -1. Subsystem copies hardcoded default values to its in-memory state container. -2. Subsystem defines the available config items it has, and how it is connected to various config sources (i.e. specify its section and key in the config file, as well as supplying command line options connected to this config item). -3. Subsystem binds the config items with their respective sections and keys in the config file (i.e. correctly point the values to the respective internal state container of the app). -4. Subsystem retrieves the config file values as well as command line arguments (higher priority) supplied to the app upon invocation. -5. Subsystem checks if there are some volatile state data to retrieve and syncs it with the state. -6. Subsystem saves the state to the config file. +```shell +mkdir build +cmake "-DCMAKE_MT=%CMAKE_MT%" -G Ninja -S . -B build +cmake --build build -t ini_config +``` diff --git a/types/int.h b/types/int.h index 5180713..05eea65 100644 --- a/types/int.h +++ b/types/int.h @@ -1,7 +1,7 @@ #ifndef INI_CONFIG_TYPES_INT_H #define INI_CONFIG_TYPES_INT_H -#include "ini-config.h" +#include "../ini-config.h" INI_CONFIG_DECLARE_TYPE(U8); #define INI_CONFIG_TYPE_U8 (INI_ConfigType) { \ diff --git a/types/string.h b/types/string.h index 82cbaf7..7147317 100644 --- a/types/string.h +++ b/types/string.h @@ -1,7 +1,7 @@ #ifndef INI_CONFIG_TYPES_STRING_H #define INI_CONFIG_TYPES_STRING_H -#include "ini-config.h" +#include "../ini-config.h" INI_CONFIG_DECLARE_TYPE(String); #define INI_CONFIG_TYPE_STRING(X) (INI_ConfigType) { \