Merge pull request #225 from kfirgollan/kfir/add_install_instructions

Add installation example with checkinstall and cmake
This commit is contained in:
Toru Niina 2023-07-31 01:22:32 +09:00 committed by GitHub
commit 087408a8fb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -115,6 +115,37 @@ it in your system by CMake.
Note for MSVC: We recommend to set `/Zc:__cplusplus` to detect C++ version correctly.
### Example installation
For local installation build & use the provided install target
```bash
git clone https://github.com/ToruNiina/toml11.git
mkdir -p toml11/build
cd toml11/build
cmake .. -DCMAKE_CXX_STANDARD=11
sudo make install
```
In case you want to create a `.deb` you can use `checkinstall`.
```bash
sudo checkinstall
[[ .. skipping for clarity ]]
**********************************************************************
Done. The new package has been installed and saved to
/home/user/toml11/build/build_20230728-1_amd64.deb
You can remove it from your system anytime using:
dpkg -r build
**********************************************************************
```
You should get a package that you can install with `dpkg -i <myfile>.deb` and remove with `dpkg -r <myfile>.deb`
## Decoding a toml file
To parse a toml file, the only thing you have to do is