-
-
Notifications
You must be signed in to change notification settings - Fork 5
/
CMake.props
61 lines (53 loc) · 2.66 KB
/
CMake.props
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
<Project>
<PropertyGroup>
<RlVersion>a8240722c61d216d96c3f2cab27426ee7b7a3919</RlVersion>
</PropertyGroup>
<PropertyGroup Condition="$([MSBuild]::IsOSPlatform('Windows'))">
<RlName>$(Configuration)/raylib.dll</RlName>
</PropertyGroup>
<PropertyGroup Condition="$([MSBuild]::IsOSPlatform('Linux'))">
<RlName>libraylib.so</RlName>
</PropertyGroup>
<PropertyGroup Condition="$([MSBuild]::IsOSPlatform('OSX'))">
<RlName>libraylib.dylib</RlName>
</PropertyGroup>
<!-- Todo: When "dev-5.1" release move back to "Tags" instead of "commits": "https://github.com/raysan5/raylib/archive/refs/tags/$(RlVersion).zip" -->
<!-- Download Raylib -->
<Target Name="DownloadRaylib" BeforeTargets="UnZipRaylib">
<DownloadFile DestinationFolder="$(IntermediateOutputPath)"
SourceUrl="https://github.com/raysan5/raylib/archive/$(RlVersion).zip"
DestinationFileName="raylib-$(RlVersion).zip"
Condition="!Exists('$(IntermediateOutputPath)raylib-$(RlVersion).zip')" />
</Target>
<!-- UnZip Raylib -->
<Target Name="UnZipRaylib" BeforeTargets="BuildRaylib">
<Unzip DestinationFolder="$(IntermediateOutputPath)"
SourceFiles="$(IntermediateOutputPath)raylib-$(RlVersion).zip"
OverwriteReadOnlyFiles="true"
Condition="!Exists('$(IntermediateOutputPath)raylib-$(RlVersion)')" />
</Target>
<!-- Configure Args -->
<ItemGroup>
<ConfigureArgs Include="-S $(IntermediateOutputPath)raylib-$(RlVersion)" />
<ConfigureArgs Include="-B $(IntermediateOutputPath)native" />
<ConfigureArgs Include="-D CMAKE_BUILD_TYPE=$(Configuration)" />
<ConfigureArgs Include="-D BUILD_SHARED_LIBS=ON" />
<ConfigureArgs Include="-D BUILD_EXAMPLES=OFF" />
<ConfigureArgs Include="-D CUSTOMIZE_BUILD=ON" />
<ConfigureArgs Include="-D SUPPORT_GIF_RECORDING=OFF" />
<ConfigureArgs Include="-D SUPPORT_SCREEN_CAPTURE=OFF" />
<ConfigureArgs Include="-D GRAPHICS=GRAPHICS_API_OPENGL_43" />
</ItemGroup>
<!-- Build Raylib -->
<Target Name="BuildRaylib" BeforeTargets="BeforeBuild">
<Exec Command="cmake @(ConfigureArgs, ' ')" />
<Exec Command="cmake --build $(IntermediateOutputPath)native --config $(Configuration)" />
</Target>
<!-- Store .dll into the project -->
<ItemGroup>
<Content Include="$(IntermediateOutputPath)native/raylib/$(RlName)">
<Link>%(Filename)%(Extension)</Link>
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
</ItemGroup>
</Project>