Skip to content

Commit

Permalink
Update bindgen
Browse files Browse the repository at this point in the history
  • Loading branch information
lithiumtoast committed Aug 6, 2023
1 parent b528cf2 commit 949689f
Show file tree
Hide file tree
Showing 6 changed files with 24 additions and 47 deletions.
4 changes: 3 additions & 1 deletion bindgen/config-build-c-library.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,7 @@
"cMakeDirectoryPath": "../ext/cimgui",
"outputDirectoryPath": "../lib",
"deleteBuildFiles": true,
"cMakeArguments": []
"cMakeArguments": [
"-DCMAKE_OSX_ARCHITECTURES=\"x86_64;arm64\""
]
}
4 changes: 2 additions & 2 deletions bindgen/config-generate-cs.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"inputFilePath": "./x-ast/ast-cross-platform.json",
"outputFilePath": "./../src/cs/production/ImGui/PInvoke.gen.cs",
"namespaceName": "bottlenoselabs.ImGui",
"outputFilePath": "./../src/cs/production/Interop.ImGui/PInvoke.gen.cs",
"namespaceName": "bottlenoselabs.Interop.ImGui",
"className": "PInvoke",
"libraryName": "cimgui",
"headerCodeRegionFilePath": "./header.cs",
Expand Down
55 changes: 14 additions & 41 deletions src/cs/Directory.Build.props
Original file line number Diff line number Diff line change
@@ -1,47 +1,20 @@
<Project>

<!-- Variables -->
<PropertyGroup>
<GitRepositoryPath>$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildProjectDirectory), .gitignore))/</GitRepositoryPath>
<IsWindows Condition=" '$([System.Runtime.InteropServices.RuntimeInformation]::IsOSPlatform($([System.Runtime.InteropServices.OSPlatform]::Windows)))' == 'true' ">true</IsWindows>
<IsMacOS Condition=" '$([System.Runtime.InteropServices.RuntimeInformation]::IsOSPlatform($([System.Runtime.InteropServices.OSPlatform]::OSX)))' == 'true' ">true</IsMacOS>
<IsLinux Condition=" '$([System.Runtime.InteropServices.RuntimeInformation]::IsOSPlatform($([System.Runtime.InteropServices.OSPlatform]::Linux)))' == 'true' ">true</IsLinux>
<UseArtifactsOutput>true</UseArtifactsOutput>
<ArtifactsPath>$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildProjectDirectory), .gitignore))/artifacts</ArtifactsPath>
</PropertyGroup>

<!-- Change obj/ and bin/ folders -->
<PropertyGroup>
<!-- `BaseIntermediateOutputPath`, `MSBuildProjectExtensionsPath`, and `RestoreOutputPath` must all be the same -->
<BaseIntermediateOutputPath>$(GitRepositoryPath)obj/$(MSBuildProjectName)/$(Configuration)</BaseIntermediateOutputPath>
<MSBuildProjectExtensionsPath>$(BaseIntermediateOutputPath)</MSBuildProjectExtensionsPath>
<RestoreOutputPath>$(BaseIntermediateOutputPath)</RestoreOutputPath>
<OutputPath>$(GitRepositoryPath)bin/$(MSBuildProjectName)/$(Configuration)</OutputPath>
</PropertyGroup>

<!-- NuGet -->
<PropertyGroup>
<IsPackable>false</IsPackable>
</PropertyGroup>

<!-- Code analysis settings -->
<PropertyGroup>
<EnforceCodeStyleInBuild>true</EnforceCodeStyleInBuild>
<EnableNETAnalyzers>true</EnableNETAnalyzers>
<AnalysisMode>all</AnalysisMode>
<AnalysisLevel>latest</AnalysisLevel>
<RunAnalyzersDuringBuild>true</RunAnalyzersDuringBuild>
<RunAnalyzersDuringLiveAnalysis>true</RunAnalyzersDuringLiveAnalysis>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
<NoWarn>$(NoWarn);CS1591;CA1050;CA1051;CA1062;CA1711;CA1716;CA1720;CA1822;CA5392</NoWarn>
</PropertyGroup>

<!-- StyleCop -->

<ItemGroup>
<PackageReference Include="StyleCop.Analyzers" Version="1.2.0-beta.435">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<GlobalAnalyzerConfigFiles Include="$(MSBuildThisFileDirectory)StyleCop.globalconfig" />
<AdditionalFiles Include="$(MSBuildThisFileDirectory)StyleCop.json" Link="StyleCop.json" Visible="false" />
<PackageReference Include="bottlenoselabs.Common.Tools" Version="*">
<PrivateAssets>all</PrivateAssets>
</PackageReference>

<PackageReference Include="StyleCop.Analyzers.Unstable" Version="*">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
</ItemGroup>

</Project>

</Project>

2 changes: 1 addition & 1 deletion src/cs/Directory.Build.targets
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
<Project>

</Project>
</Project>
2 changes: 1 addition & 1 deletion src/cs/ImGui.sln
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
Microsoft Visual Studio Solution File, Format Version 12.00
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Production", "Production", "{081F91DD-336C-4BB1-B619-ED0DD3ED32D0}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ImGui", "production\ImGui\ImGui.csproj", "{A97E11AB-6FC5-43C1-9F2D-456A5E63DA0E}"
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Interop.ImGui", "production\Interop.ImGui\Interop.ImGui.csproj", "{A97E11AB-6FC5-43C1-9F2D-456A5E63DA0E}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@
<PropertyGroup>
<TargetFramework>net7.0</TargetFramework>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<RootNamespace />
</PropertyGroup>
<ItemGroup>
<PackageReference Include="bottlenoselabs.C2CS.Runtime" Version="6.1.3" />
</ItemGroup>

</Project>

0 comments on commit 949689f

Please sign in to comment.