mirror of
https://github.com/ToruNiina/toml11.git
synced 2025-09-16 08:27:31 +08:00
doc: explain a macro to link pre-built lib
This commit is contained in:
10
README.md
10
README.md
@@ -8,7 +8,7 @@
|
||||
|
||||
[日本語版](https://github.com/ToruNiina/toml11/blob/main/README_ja.md)
|
||||
|
||||
toml11 is a feature-rich TOML language library for C++.
|
||||
toml11 is a feature-rich TOML language library for C++11/14/17/20.
|
||||
|
||||
- It complies with [the latest TOML language specification](https://toml.io/en/v1.0.0).
|
||||
- It passes all the standard TOML language [test cases](https://github.com/toml-lang/toml-test).
|
||||
@@ -124,6 +124,14 @@ $ cmake -B ./build/ -DTOML11_PRECOMPILE=ON -DCMAKE_CXX_STANDARD=11/14/17/20
|
||||
$ cmake --build ./build/
|
||||
```
|
||||
|
||||
When linking the library, use `target_link_libraries` in CMake
|
||||
|
||||
```cmake
|
||||
target_link_libraries(your_target PUBLIC toml11::toml11)
|
||||
```
|
||||
|
||||
or pass `-DTOML11_COMPILE_SOURCES` to the compiler.
|
||||
|
||||
### Building Example
|
||||
|
||||
To compile the examples in the `examples/` directory, set `-DTOML11_BUILD_EXAMPLES=ON`.
|
||||
|
Reference in New Issue
Block a user