@@ -1067,19 +1067,46 @@ The build system is a table that can contain the following fields:
10671067
10681068- ` source ` : specifies the location of the source code for the package. Default: manifest directory. Currently supported options:
10691069 - ` path ` : a string representing a relative or absolute path to the source code.
1070+ - ` git ` : a string representing URL to the source repository.
1071+ - ` rev ` : a string representing SHA revision to checkout.
1072+ - ` subdirectory ` : a string representing path to subdirectory to use.
10701073- ` channels ` : specifies the channels to get the build backend from.
10711074- ` backend ` : specifies the build backend to use. This is a table that can contain the following fields:
10721075 - ` name ` : the name of the build backend to use. This will also be the executable name.
10731076 - ` version ` : the version of the build backend to use.
1074- - ` configuration ` : a table that contains the configuration options for the build backend.
1077+ - ` config ` : a table that contains the configuration options for the build backend.
10751078- ` target ` : a table that can contain target specific build configuration.
1079+ - Each target can have its own ` config ` table to override or extend the base configuration for specific platforms.
10761080
10771081More documentation on the backends can be found in the [ build backend documentation] ( ../build/backends.md ) .
10781082
1083+ #### Basic build configuration example
1084+
10791085``` toml
10801086--8<-- "docs/source_files/pixi_tomls/pixi-package-manifest.toml:build-system"
10811087```
10821088
1089+ #### Target-specific build configuration example
1090+
1091+ For platform-specific build configuration, use the ` [package.build.target.<platform>] ` table:
1092+
1093+ ``` toml
1094+ [package .build ]
1095+ backend = { name = " pixi-build-cmake" , version = " 0.3.*" }
1096+
1097+ [package .build .config ]
1098+ # Base configuration applied to all platforms
1099+ extra-args = [" -DCMAKE_BUILD_TYPE=Release" ]
1100+
1101+ [package .build .target .linux-64 .config ]
1102+ # Linux-specific configuration
1103+ extra-args = [" -DCMAKE_BUILD_TYPE=Debug" , " -DLINUX_FLAG=ON" ]
1104+
1105+ [package .build .target .win-64 .config ]
1106+ # Windows-specific configuration
1107+ extra-args = [" -DCMAKE_BUILD_TYPE=Debug" , " -DWIN_FLAG=ON" ]
1108+ ```
1109+
10831110
10841111### The ` build ` ` host ` and ` run ` dependencies tables
10851112The dependencies of a package are split into three tables.
0 commit comments