-
Notifications
You must be signed in to change notification settings - Fork 33
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Instead of building with a patched meson version, make use of custom targets and generated csproj files so we can used upstream meson normally. This avoids digging into "non official" dotnet stuff like calling the CSC.dll directly that the patched meson tried to do. To enable, run meson with `-Ddotnet=true`. Regarding source file dependencies, Meson has a limitation[1] about generated artifacts being placed in subdirectories. In order to correctly track these generated artifacts for dotnet, we generated them in the same folder as the csproj file through `dotnet build -o`. Instead of installing the dll like we do for mono, a nupkg is generated and installed in the same folder as the dll would be (<prefix>/lib/x86_64-linux-gnu/efl-mono-1) To avoid messing around with Nupkg caches, we reference the source project for the library directly instead of the nupkg when building the test suite. [1] mesonbuild/meson#2320 Fixes T8168 Differential Revision: https://phab.enlightenment.org/D9717
- Loading branch information
1 parent
6108ea0
commit f7f616c
Showing
7 changed files
with
257 additions
and
97 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
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,39 @@ | ||
<Project Sdk="Microsoft.NET.Sdk"> | ||
|
||
<PropertyGroup> | ||
<OutputType>Library</OutputType> | ||
<TargetFramework>netstandard@NETSTANDARD_VERSION@</TargetFramework> | ||
</PropertyGroup> | ||
|
||
<PropertyGroup> | ||
<PackageId>Efl.Csharp</PackageId> | ||
<Version>@EFL_VERSION@</Version> | ||
<Authors>EFL Team</Authors> | ||
<PackageLicenseExpression>Apache-2.0</PackageLicenseExpression> | ||
</PropertyGroup> | ||
|
||
<!-- <PropertyGroup Condition="'$(BuildType)'=='Beta'"> --> | ||
<!-- <DefineConstants>EFL_BETA</DefineConstants> --> | ||
<!-- </PropertyGroup> --> | ||
<PropertyGroup> | ||
<DefineConstants>@EFL_BETA@</DefineConstants> | ||
</PropertyGroup> | ||
|
||
<ItemGroup> | ||
<Compile Include="@BINDING_SRC@/efl_mono/*.cs" /> | ||
<!-- FIXME Windows support --> | ||
<Compile Include="@BINDING_SRC@/eo_mono/*.cs" Exclude="@BINDING_SRC@/eo_mono/*Windows.cs" /> | ||
<Compile Include="@BINDING_SRC@/eina_mono/*.cs" /> | ||
<Compile Include="@BINDING_SRC@/eolian_mono/*.cs" /> | ||
<Compile Include="@BINDING_SRC@/eldbus_mono/*.cs" /> | ||
</ItemGroup> | ||
|
||
<!-- Calling `dotnet build` from a different folder seems to mess up the automatic source file discovery. | ||
But we want them to be included only when building the lib itself. | ||
--> | ||
<ItemGroup Condition="'$(BuildingLib)'=='Yes'"> | ||
<Compile Include="./efl_mono/*.cs" /> | ||
<Compile Include="./*.cs" /> | ||
</ItemGroup> | ||
|
||
</Project> |
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,36 @@ | ||
<Project Sdk="Microsoft.NET.Sdk"> | ||
|
||
<PropertyGroup> | ||
<OutputType>Exe</OutputType> | ||
<TargetFramework>netcoreapp@NETCOREAPP_VERSION@</TargetFramework> | ||
</PropertyGroup> | ||
|
||
<PropertyGroup> | ||
<PackageId>Efl.Csharp.Test.Suite</PackageId> | ||
<Version>@EFL_VERSION@</Version> | ||
<Authors>EFL Team</Authors> | ||
<PackageLicenseExpression>Apache-2.0</PackageLicenseExpression> | ||
</PropertyGroup> | ||
|
||
<PropertyGroup> | ||
<DefineConstants>@EFL_BETA@</DefineConstants> | ||
</PropertyGroup> | ||
|
||
<ItemGroup> | ||
<ProjectReference Include="../../bindings/mono/efl_sharp.csproj" /> | ||
</ItemGroup> | ||
|
||
<ItemGroup> | ||
<Compile Include="@BINDING_TEST_SRC@/*.cs" /> | ||
<!-- Somehow dotnet build -o DIR seems to miss the genenerated files despite | ||
them being in the same folder as the csproj file. The line below makes | ||
sure we include them. | ||
|
||
The side effect is that invoking directly `dotnet build` will raise "source file FOO | ||
already included" warnings. | ||
--> | ||
<Compile Include="./*.cs" /> | ||
</ItemGroup> | ||
|
||
</Project> | ||
|
Oops, something went wrong.