Skip to content

Commit cc2b984

Browse files
committed
Update documentation for conditions
1 parent 56a88c4 commit cc2b984

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

docs/cmake-toml.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,15 @@ arch64 = "CMAKE_SIZEOF_VOID_P EQUALS 8"
4747
arch32 = "CMAKE_SIZEOF_VOID_P EQUALS 4"
4848
```
4949

50+
You can also prefix most keys with `condition.` to represent a conditional:
51+
52+
```toml
53+
[target]
54+
type = "executable"
55+
sources = ["src/main.cpp"]
56+
windows.sources = ["src/windows_specific.cpp"]
57+
```
58+
5059
This will make the `arch64` and `arch32` conditions available with their respective CMake expressions. The following conditions are predefined (you can override them if you desire):
5160

5261
```toml

0 commit comments

Comments
 (0)