Welcome to mirror list, hosted at ThFree Co, Russian Federation.

StaticLibrary.csproj « StaticLibrary « Simple « src « tests - github.com/mono/corert.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 591b8644b35437088f2db55683b480a42762ef20 (plain)
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
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">

  <PropertyGroup>
    <OutputType>Library</OutputType>
    <NativeLib>Static</NativeLib>
  </PropertyGroup>

  <ItemGroup>
    <Compile Include="*.cs" />
  </ItemGroup>

  <Target Name="NativeRunnerCompile" AfterTargets="LinkNative">
    <PropertyGroup>
      <NativeRunnerBinary>$(NativeOutputPath)StaticLibrary</NativeRunnerBinary>
    </PropertyGroup>

    <ItemGroup>
      <CppCompile Include="StaticLibrary.cpp" />
    </ItemGroup>

    <ItemGroup>
      <NativeRunnerCompilerArg Include="@(CppCompile)" />
      <NativeRunnerCompilerArg Include="-o $(NativeRunnerBinary)" Condition="'$(OS)' != 'Windows_NT'" />
      <NativeRunnerCompilerArg Include="/Fo$(NativeRunnerBinary)" Condition="'$(OS)' == 'Windows_NT'" />
      <NativeRunnerCompilerArg Include="/Fe$(NativeRunnerBinary)" Condition="'$(OS)' == 'Windows_NT'" />
      <NativeRunnerCompilerArg Include="$(NativeBinary)" Condition="'$(OS)' == 'Windows_NT'" />
      <NativeRunnerCompilerArg Include="@(NativeLibrary)" Condition="'$(OS)' == 'Windows_NT'" />
      <NativeRunnerCompilerArg Include="/MTd" Condition="'$(OS)' == 'Windows_NT' and '$(Configuration)' == 'Debug'" />
      <NativeRunnerCompilerArg Include="/MT" Condition="'$(OS)' == 'Windows_NT' and '$(Configuration)' != 'Debug'" />
    </ItemGroup>

    <ItemGroup>
      <NativeRunnerLinkerArg Include="@(NativeLibrary)" />
      <NativeRunnerLinkerArg Include="-g" />
      <NativeRunnerLinkerArg Include="-Wl,-rpath,'$ORIGIN'" />
      <NativeRunnerLinkerArg Include="-pthread" />
      <NativeRunnerLinkerArg Include="-lstdc++" />
      <NativeRunnerLinkerArg Include="-ldl" />
      <NativeRunnerLinkerArg Include="-lm" />
      <NativeRunnerLinkerArg Include="-lcurl" />
      <NativeRunnerLinkerArg Include="-lz" />
      <NativeRunnerLinkerArg Include="-lrt" Condition="'$(TargetOS)' != 'OSX'" />
      <NativeRunnerLinkerArg Include="-licucore" Condition="'$(TargetOS)' == 'OSX'" />
    </ItemGroup>

    <Exec Command="$(CppCompiler) @(NativeRunnerCompilerArg, ' ') $(NativeBinary) @(NativeRunnerLinkerArg, ' ')" Condition="'$(OS)' != 'Windows_NT'" />
    <WriteLinesToFile File="$(NativeIntermediateOutputPath)SharedLibrary.cl.rsp" Lines="@(NativeRunnerCompilerArg)" Overwrite="true"  Condition="'$(OS)' == 'Windows_NT'"/>
    <Exec Command="$(CppCompiler) @&quot;$(NativeIntermediateOutputPath)SharedLibrary.cl.rsp&quot;" Condition="'$(OS)' == 'Windows_NT'" />
  </Target>

  <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), SimpleTest.targets))\SimpleTest.targets" />

</Project>