some build system tweaks for linux building on windows

This commit is contained in:
Glatzemann 2012-11-28 20:17:59 +00:00 committed by Konstantin Koch
parent 1570d270d3
commit dbd391217c
8 changed files with 69 additions and 60 deletions

View File

@ -1,5 +1,5 @@
Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 2010
# Visual Studio 2012
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ANX.Framework", "ANX.Framework\ANX.Framework.csproj", "{6899F0C9-70B9-4EB0-9DD3-E598D4BE3E35}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ANX.Framework.TestCenter", "ANX.Framework.TestCenter\ANX.Framework.TestCenter.csproj", "{7344BBEB-A1C7-43A8-B68E-D42B81973DA9}"
@ -83,6 +83,7 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "build", "build", "{82CDEC51
ProjectSection(SolutionItems) = preProject
build\ANX.Framework.build = build\ANX.Framework.build
build\ANX.InputSystem.build = build\ANX.InputSystem.build
build\ANX.PlatformSystem.build = build\ANX.PlatformSystem.build
build\ANX.RenderSystem.build = build\ANX.RenderSystem.build
build\ANX.SoundSystem.build = build\ANX.SoundSystem.build
build\create_shaders.bat = build\create_shaders.bat

View File

@ -17,7 +17,7 @@
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<OutputPath>..\..\bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
@ -25,7 +25,7 @@
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<OutputPath>..\..\bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>

View File

@ -17,7 +17,7 @@
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<OutputPath>..\..\bin\Debug\</OutputPath>
<DefineConstants>TRACE;DEBUG;LINUX;</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
@ -25,7 +25,7 @@
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<OutputPath>..\..\bin\Release\</OutputPath>
<DefineConstants>TRACE;LINUX;</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>

View File

@ -64,6 +64,8 @@
<property name="project.anx.linux" value="true" />
<property name="project.anx.platform" value="Linux" />
<property name="build.dir.base" value="${build.dir}/${project.anx.platform}" />
<call target="generate_project_files" />
</target>
@ -223,58 +225,10 @@
<include buildfile="ANX.InputSystem.build" />
<include buildfile="ANX.SoundSystem.build" />
<target name="platformsystem" description="Build ANX.Framework PlatformSystems">
<!-- default windows fileset -->
<fileset id="platformsystem_files" basedir="../PlatformSystems/">
<include name="**/*.csproj" />
<exclude name="**/*PSVita*.csproj" />
<exclude name="**/*Metro*.csproj" />
<exclude name="**/*Linux*.csproj" />
</fileset>
<if test="${project.anx.linux}">
<fileset id="platformsystem_files" basedir="../PlatformSystems/">
<include name="**/*Linux*_Linux.csproj" />
</fileset>
</if>
<include buildfile="ANX.PlatformSystem.build" />
<if test="${project.anx.psvita}">
<fileset id="platformsystem_files" basedir="../PlatformSystems/">
<include name="**/*PsVita*_PsVita.csproj" />
</fileset>
</if>
<if test="${project.anx.metro}">
<fileset id="platformsystem_files" basedir="../PlatformSystems/">
<include name="**/*Metro*_WindowsMetro.csproj" />
</fileset>
</if>
<foreach item="File" property="projectFile">
<in>
<items refid="platformsystem_files" />
</in>
<do>
<echo message="building: ${path::get-file-name-without-extension(projectFile)}" />
<exec program="msbuild.exe" >
<arg value="/t:Build"/>
<arg value="/p:Configuration=${build.configuration}"/>
<arg value='/p:Platform="${build.platform}"'/>
<arg value="/p:OutputPath=${build.dir}/${build.configuration}" />
<arg value="/p:AllowUnsafeBlocks=true" />
<arg value="/p:SolutionDir=${build.solution_dir}" />
<arg value='/p:DefineConstants="${project.anx.directives}"' />
<arg value="/clp:ErrorsOnly" />
<arg value="/nologo" />
<arg value="${projectFile}" />
</exec>
</do>
</foreach>
</target>
<target name="generate_stock_shaders" description="Generate code for stock shaders" depends="tools">
<target name="generate_stock_shaders" description="Generate code for stock shaders" depends="build_tools">
<!-- default windows fileset -->
<fileset id="stock_shaders" basedir="../shader/">
<include name="**/build.xml" />
@ -306,7 +260,7 @@
<do>
<echo message="generating: ${path::get-file-name(path::get-directory-name(buildFile))}" />
<exec program="../bin/${build.configuration}/sscg.exe" >
<exec program="${build.dir.tools}/sscg.exe" >
<arg value='\"${buildFile}\"' />
<arg value="/silent" />
</exec>
@ -331,7 +285,9 @@
<if test="${project.anx.linux}">
<fileset id="sample_files" basedir="../Samples/">
<include name="**/*_Linux.csproj" />
<include name="**/*_Linux.csproj" unless="${not xnasdk.installed}" />
<include name="**/SimpleNoContent_Linux.csproj" />
</fileset>
</if>
@ -379,6 +335,7 @@
<in>
<items basedir="../Tools/">
<include name="**/ProjectConverter.csproj" />
<include name="**/StockShaderCodeGenerator.csproj" />
</items>
</in>
<do>

View File

@ -59,7 +59,7 @@
<arg value="/t:Build"/>
<arg value="/p:Configuration=${build.configuration}"/>
<arg value='/p:Platform="${build.platform}"'/>
<arg value="/p:OutputPath=${build.dir}/${build.configuration}" />
<arg value="/p:OutputPath=${build.dir.base}/${build.configuration}" />
<arg value="/p:AllowUnsafeBlocks=true" />
<arg value="/p:SolutionDir=${build.solution_dir}" />
<arg value='/p:DefineConstants="${project.anx.directives}"' />

View File

@ -0,0 +1,51 @@
<project name="ANX.Framework PlatformSystem" default="platformsystem" basedir="./">
<target name="platformsystem" description="Build ANX.Framework PlatformSystems">
<!-- default windows fileset -->
<fileset id="platformsystem_files" basedir="../PlatformSystems/">
<include name="**/*.csproj" />
<exclude name="**/*PSVita*.csproj" />
<exclude name="**/*Metro*.csproj" />
<exclude name="**/*Linux*.csproj" />
</fileset>
<if test="${project.anx.linux}">
<fileset id="platformsystem_files" basedir="../PlatformSystems/">
<include name="**/*Linux*_Linux.csproj" />
</fileset>
</if>
<if test="${project.anx.psvita}">
<fileset id="platformsystem_files" basedir="../PlatformSystems/">
<include name="**/*PsVita*_PsVita.csproj" />
</fileset>
</if>
<if test="${project.anx.metro}">
<fileset id="platformsystem_files" basedir="../PlatformSystems/">
<include name="**/*Metro*_WindowsMetro.csproj" />
</fileset>
</if>
<foreach item="File" property="projectFile">
<in>
<items refid="platformsystem_files" />
</in>
<do>
<echo message="building: ${path::get-file-name-without-extension(projectFile)}" />
<exec program="msbuild.exe" >
<arg value="/t:Build"/>
<arg value="/p:Configuration=${build.configuration}"/>
<arg value='/p:Platform="${build.platform}"'/>
<arg value="/p:OutputPath=${build.dir.base}/${build.configuration}" />
<arg value="/p:AllowUnsafeBlocks=true" />
<arg value="/p:SolutionDir=${build.solution_dir}" />
<arg value='/p:DefineConstants="${project.anx.directives}"' />
<arg value="/clp:ErrorsOnly" />
<arg value="/nologo" />
<arg value="${projectFile}" />
</exec>
</do>
</foreach>
</target>
</project>

View File

@ -41,7 +41,7 @@
<arg value="/t:Build"/>
<arg value="/p:Configuration=${build.configuration}"/>
<arg value='/p:Platform="${build.platform}"'/>
<arg value="/p:OutputPath=${build.dir}/${build.configuration}" />
<arg value="/p:OutputPath=${build.dir.base}/${build.configuration}" />
<arg value="/p:AllowUnsafeBlocks=true" />
<arg value="/p:SolutionDir=${build.solution_dir}" />
<arg value='/p:DefineConstants="${project.anx.directives} ${additional_directives}"' />

View File

@ -47,7 +47,7 @@
<arg value="/t:Build"/>
<arg value="/p:Configuration=${build.configuration}"/>
<arg value='/p:Platform="${build.platform}"'/>
<arg value="/p:OutputPath=${build.dir}/${build.configuration}" />
<arg value="/p:OutputPath=${build.dir.base}/${build.configuration}" />
<arg value="/p:AllowUnsafeBlocks=true" />
<arg value="/p:SolutionDir=${build.solution_dir}" />
<arg value='/p:DefineConstants="${project.anx.directives}"' />