From cc2b984aa57af97e1d458c23be26249486ddc1b4 Mon Sep 17 00:00:00 2001 From: Duncan Ogilvie Date: Wed, 22 Dec 2021 18:28:38 +0100 Subject: [PATCH] Update documentation for conditions --- docs/cmake-toml.md | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/docs/cmake-toml.md b/docs/cmake-toml.md index da65839..4788256 100644 --- a/docs/cmake-toml.md +++ b/docs/cmake-toml.md @@ -47,6 +47,15 @@ arch64 = "CMAKE_SIZEOF_VOID_P EQUALS 8" arch32 = "CMAKE_SIZEOF_VOID_P EQUALS 4" ``` +You can also prefix most keys with `condition.` to represent a conditional: + +```toml +[target] +type = "executable" +sources = ["src/main.cpp"] +windows.sources = ["src/windows_specific.cpp"] +``` + 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): ```toml