-
Notifications
You must be signed in to change notification settings - Fork 42
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
SDK: Refactor compiler bundle producing, add docs
- Add docs about MSBuild SDK - Add info about SDK tests - Use NUKE in tests docs - Rename compiler pack -> compiler bundle - Introduce CI-friendly single pack and publish compiler bundle targets
- Loading branch information
Showing
11 changed files
with
184 additions
and
70 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -20,4 +20,4 @@ runs: | |
|
||
- name: 🔄 Restore Nuget Packages 🔄 | ||
shell: bash | ||
run: dotnet restore | ||
run: dotnet nuke RestoreAll |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
Cesium MSBuild Project SDK | ||
-------------------------- | ||
|
||
Cesium provides it's own project SDK that could be used to simplify building of Cesium programs and libraries. | ||
|
||
Cesium MSBuild SDK inherits default behavior from a `Microsoft.NET.Sdk` SDK and tries to integrate with it the same way as C# does. | ||
|
||
Cesium MSBuild SDK only supports SDK-style projects. | ||
|
||
> Note: Some of the common MSBuild properties and items those are not stated in this document could be also used in Cesium project files. Not all of them are tested so something may not work as expected. | ||
### Source files | ||
Source files are defined with `<Compile>` items, very similar to other .NET languages: | ||
```xml | ||
<ItemGroup> | ||
<Compile Include="hello.c" /> | ||
<Compile Include="example.c" /> | ||
</ItemGroup> | ||
``` | ||
> Note: In the current SDK implementation, compile units should be defined explicitly, in opposite to C# `<Compile>` items. | ||
### References | ||
|
||
#### Packages | ||
Not supported yet. | ||
|
||
#### Projects | ||
Not supported yet. | ||
|
||
#### Assemblies | ||
Not supported yet. | ||
|
||
### Preprocessor directives | ||
`<DefineConstants>` property is directly mapped to a list of preprocessor items. So, you could define such constants in .csproj: | ||
```xml | ||
<PropertyGroup> | ||
<DefineConstants>$(DefineConstants);FOO;BAR</DefineConstants> | ||
</PropertyGroup> | ||
``` | ||
|
||
And then use it in your .c code: | ||
```c++ | ||
#ifdef FOO | ||
int foo() { return 0; } | ||
#endif | ||
|
||
#ifdef BAR | ||
int bar() { return 1; } | ||
#endif | ||
``` | ||
|
||
### Output files | ||
Output assembly and additional artifacts will be placed in `bin` folder. Depending on the target framework, output type and a platform you're compiling on, `.runtimeconfig.json` and `.deps.json` files will also be generated. | ||
|
||
### Properties | ||
- `SkipCesiumCompilerInstallation`: if set to `true`, doesn't automatically install a compiler bundle package. In that case it should be explicitly provided by `CesiumCompilerPackageName` and `CesiumCompilerPackageVersion` properties. Default: `false` | ||
- `SkipCesiumRuntimeInstallation`: if set to `true`, doesn't automatically install a `Cesium.Runtime` package. In that case it should be explicitly installed. Default: `false` | ||
- `CesiumCompilerPackageName`: an optional platform-specific compiler bundle package name. Should be specified if `SkipCesiumCompilerInstallation` set to `true`. Default: `Cesium.Compiler.Pack.{RID}` | ||
- `CesiumCompilerPackageName`: an optional platform-specific compiler bundle package version. Should be specified if `SkipCesiumCompilerInstallation` set to `true`. Default: Cesium SDK version | ||
- `CesiumCompilerPath`: an optional path to compiler executable. Use this property to specify a path to the compiler not coming from a compiler package. | ||
- `CesiumCoreLibAssemblyPath`: an optional path to .NET runtime assembly: `System.Runtime` or `mscorlib`, depending on the target framework. | ||
|
||
### Items | ||
- `Compile`: a C source file to be included into compiler execution command |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters