Skip to content
This repository has been archived by the owner on Jan 12, 2022. It is now read-only.

Emscripten support for Visual Studio 2012/2013 #40

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added 2010 DLL/vs-android.Build.CPPTasks.Android.dll
Binary file not shown.
Binary file added 2012 DLL/vs-android.Build.CPPTasks.Android.dll
Binary file not shown.
Binary file added 2013 DLL/vs-android.Build.CPPTasks.Android.dll
Binary file not shown.
11 changes: 11 additions & 0 deletions Emscripten/Emscripten.CppBuild.targets
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,12 @@
<UseDefaultGeneralPropertyPageSchema>false</UseDefaultGeneralPropertyPageSchema>
</PropertyGroup>

<!-- VS2012 fix - Proper 'general' properties page for vs-android -->
<PropertyGroup Condition="$(VisualStudioVersion) != '10.0'">
<ToolsetTargetsFound>true</ToolsetTargetsFound>
</PropertyGroup>


<!-- *******************************************************************************************
Property pages
******************************************************************************************* -->
Expand Down Expand Up @@ -37,6 +43,11 @@
<Context>PropertySheet</Context>
</PropertyPageSchema>

<!-- VS2012 fix - Singular C/C++ files can now have their properties edited -->
<PropertyPageSchema Condition="$(VisualStudioVersion) != '10.0'" Include="$(VCTargetsPath)$(LangID)\general_file.xml">
<Context>File</Context>
</PropertyPageSchema>

<!-- Switch view between project property based directories and environment variables -->
<PropertyPageSchema Include="$(VCTargetsPath)\Platforms\Emscripten\Props\sys_dirs.xml" />

Expand Down
4 changes: 4 additions & 0 deletions Emscripten/Emscripten.EnvVars.props
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,9 @@
<PropertyGroup>
<SixtyFourBit Condition="'$(ProgramW6432)' != ''">true</SixtyFourBit>
<SixtyFourBit Condition="'$(ProgramW6432)' == ''">false</SixtyFourBit>

<!-- Visual Studio version. A lone install of VS2010 doesn't provide this variable. -->
<VisualStudioVersion Condition="'$(VisualStudioVersion)' == ''">10.0</VisualStudioVersion>

</PropertyGroup>
</Project>
46 changes: 34 additions & 12 deletions Emscripten/Emscripten.ToolDefaults.props
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemDefinitionGroup>
<ClCompile>

<ObjectFileName>$(IntDir)%(FileName).o</ObjectFileName>

<PreprocessorDefinitions Condition="'%(ClCompile.PreprocessorDefinitions)' == ''"></PreprocessorDefinitions>
<Warnings Condition="'%(ClCompile.Warnings)' == ''">NormalWarnings</Warnings>
<WarningsAsErrors Condition="'%(ClCompile.WarningsAsErrors)' == ''">false</WarningsAsErrors>
<WarnSystemHeaders Condition="'%(ClCompile.WarnSystemHeaders)' == ''">false</WarnSystemHeaders>
<EchoCommandLines Condition="'%(ClCompile.EchoCommandLines)' == ''">false</EchoCommandLines>

<ObjectFileName Condition="'%(ClCompile.ObjectFileName)' == ''">$(IntDir)%(Filename).o</ObjectFileName>
<ObjectFileName>$(IntDir)%(Filename).o</ObjectFileName>
<EchoCommandLines Condition="'%(ClCompile.EchoCommandLines)' == ''">true</EchoCommandLines>

<CompileAs Condition="'%(ClCompile.CompileAs)' == ''">Default</CompileAs>

Expand All @@ -32,17 +32,28 @@
<SystemIncludeDirectories Condition="'%(ClCompile.SystemIncludeDirectories)' == ''">$(IncludePath)</SystemIncludeDirectories>
<SystemPreprocessorDefinitions Condition="'%(ClCompile.SystemPreprocessorDefinitions)' == '' and '$(PlatformToolset)' == 'emcc'">EMSCRIPTEN;__STDC__</SystemPreprocessorDefinitions>
<SystemPreprocessorUndefinitions Condition="'%(ClCompile.SystemPreprocessorUndefinitions)' == '' and '$(PlatformToolset)' == 'emcc'">_WIN32;WIN32;__i386__;__x86_64__;__i386;__x86_64;__SSE__;__SSE2__;__MMX__;X87_DOUBLE_ROUNDING;HAVE_GCC_ASM_FOR_X87;__STRICT_ANSI__;__CYGWIN__;__APPLE__</SystemPreprocessorUndefinitions>
<PrecompiledHeader Condition="'%(ClCompile.PrecompiledHeader)' == ''">NotUsing</PrecompiledHeader>
<PrecompiledHeaderOutputFile Condition="'%(ClCompile.PrecompiledHeaderOutputFile)' == ''">$(IntDir)$(TargetName).pch.h</PrecompiledHeaderOutputFile>

<GenerateDependencyFile>true</GenerateDependencyFile>
<DependencyFileName>"$(IntDir)%(FileName).d"</DependencyFileName>
<!-- <EmscriptenCompileFlags Condition="'%(ClCompile.EmscriptenCompileFlags)' == '' and '$(PlatformToolset)' == 'emcc'">-c -m32 -Xclang -triple=i386-pc-linux-gnu -nostdinc -Xclang -nobuiltininc -Xclang -nostdinc++ -Xclang -nostdsysteminc -emit-llvm</EmscriptenCompileFlags> -->
<DependencyFileName>$(IntDir)%(FileName).d</DependencyFileName>
<EmscriptenCompileFlags Condition="'%(ClCompile.EmscriptenCompileFlags)' == '' and '$(PlatformToolset)' == 'emcc'">-c -m32 -Xclang -triple=i386-pc-linux-gnu -nostdinc -Xclang -nobuiltininc -Xclang -nostdinc++ -Xclang -nostdsysteminc -emit-llvm</EmscriptenCompileFlags>
<TargetArchitecture Condition="'%(ClCompile.TargetArchitecture)' == ''">NotSet</TargetArchitecture>
</ClCompile>
</ItemDefinitionGroup>

<!-- Compiler defaults. Additions for Visual Studio 2012 -->
<ItemDefinitionGroup Condition="$(VisualStudioVersion) != '10.0'">
<ClCompile>
<ProgramDataBaseFileName Condition="'%(ClCompile.ProgramDataBaseFileName)' == ''">$(IntDir)$(TargetName).pdb</ProgramDataBaseFileName>
<TrackerLogDirectory Condition="'%(ClCompile.TrackerLogDirectory)' == ''">$(TLogLocation)</TrackerLogDirectory>
</ClCompile>
</ItemDefinitionGroup>

<ItemDefinitionGroup Condition="'$(PlatformToolset)' == 'emcc'">
<ClCompile>
<GenerateLLVMByteCode Condition="'%(ClCompile.GenerateLLVMByteCode)' == ''">true</GenerateLLVMByteCode>
<ObjectFileName Condition="'%(ClCompile.ObjectFileName)' == ''">$(IntDir)%(Filename).o</ObjectFileName>
<GenerateLLVMByteCode Condition="'%(ClCompile.GenerateLLVMByteCode)' == ''">true</GenerateLLVMByteCode>
<ObjectFileName Condition="'%(ClCompile.ObjectFileName)' == ''">$(IntDir)%(FileName).o</ObjectFileName>
</ClCompile>
</ItemDefinitionGroup>

Expand Down Expand Up @@ -79,20 +90,31 @@
<OutputFile Condition="'%(Link.OutputFile)' == ''">$(OutDir)$(TargetName)$(TargetExt)</OutputFile>
<AdditionalLibraryDirectories Condition="'%(Link.AdditionalLibraryDirectories)' == ''"></AdditionalLibraryDirectories>
<EchoCommandLines Condition="'%(Link.EchoCommandLines)' == ''">false</EchoCommandLines>

<AdditionalDependencies Condition="'%(Link.AdditionalDependencies)' == ''"></AdditionalDependencies>

<TypedArrays Condition="'%(Link.TypedArrays)' == ''">NotSet</TypedArrays>
<IgnoreDynamicLinking Condition="'%(Link.IgnoreDynamicLinking)' == ''">false</IgnoreDynamicLinking>

<SystemLibraryDirectories Condition="'%(Link.SystemLibraryDirectories)' == ''">$(LibraryPath)</SystemLibraryDirectories>
</Link>
</ItemDefinitionGroup>

<!-- Linker defaults. Additions for Visual Studio 2012 -->
<ItemDefinitionGroup Condition="$(VisualStudioVersion) != '10.0'">
<Link>
<TrackerLogDirectory Condition="'%(Link.TrackerLogDirectory)' == ''">$(TLogLocation)</TrackerLogDirectory>
</Link>
</ItemDefinitionGroup>

<ItemDefinitionGroup>
<Lib>
<OutputFile Condition="'%(Lib.OutputFile)' == ''">$(OutDir)$(TargetName)$(TargetExt)</OutputFile>
<EchoCommandLines Condition="'%(Lib.EchoCommandLines)' == ''">false</EchoCommandLines>
<EchoCommandLines Condition="'%(Lib.EchoCommandLines)' == ''">false</EchoCommandLines>
</Lib>
</ItemDefinitionGroup>

<!-- Librarian defaults. Additions for Visual Studio 2012 -->
<ItemDefinitionGroup Condition="$(VisualStudioVersion) != '10.0'">
<Lib>
<TrackerLogDirectory Condition="'%(Lib.TrackerLogDirectory)' == ''">$(TLogLocation)</TrackerLogDirectory>
</Lib>
</ItemDefinitionGroup>
</Project>
52 changes: 39 additions & 13 deletions Emscripten/Emscripten.ToolPaths.props
Original file line number Diff line number Diff line change
@@ -1,31 +1,57 @@
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<!-- Present in ALL Emscripten builds, and use the '-Xclang -isystem' prefix. -->
<EmscriptenIncludeDir>$(EMSCRIPTEN)\system\local\include;$(EMSCRIPTEN)\system\include\compat;$(EMSCRIPTEN)\system\include\libcxx;$(EMSCRIPTEN)\system\include;$(EMSCRIPTEN)\system\include\emscripten;$(EMSCRIPTEN)\system\include\bsd;$(EMSCRIPTEN)\system\include\libc;$(EMSCRIPTEN)\system\include\gfx;$(EMSCRIPTEN)\system\include\net;$(EMSCRIPTEN)\system\include\SDL</EmscriptenIncludeDir>
<ClangPath Condition="'$(ClangPath)' == ''">$(CLANG_BIN)</ClangPath>
<MinGWPath Condition="'$(MinGWPath)' == ''">$(MINGW_BIN)</MinGWPath>
<EmccPath Condition="'$(EmccPath)' == ''">$(EMSCRIPTEN)</EmccPath>
<NaclPath Condition="'$(NaclPath)' == ''">$(NACL_BIN)</NaclPath>
<ExecutablePath Condition="'$(ExecutablePath)' == '' and '$(PlatformToolset)' == 'emcc' ">$(ClangPath);$(EmccPath);$(PATH)</ExecutablePath>
<ExecutablePath Condition="'$(ExecutablePath)' == '' and '$(PlatformToolset)' == 'clang' ">$(ClangPath);$(PATH)</ExecutablePath>
<ExecutablePath Condition="'$(ExecutablePath)' == '' and '$(PlatformToolset)' == 'mingw'">$(MinGWPath);$(PATH)</ExecutablePath>
<ExecutablePath Condition="'$(ExecutablePath)' == '' and '$(PlatformToolset)' == 'nacl'">$(NaclPath);$(PATH)</ExecutablePath>
<IncludePath Condition="'$(IncludePath)' == '' and '$(PlatformToolset)' == 'emcc'">$(EmscriptenIncludeDir)</IncludePath>
</PropertyGroup>

<PropertyGroup Condition="$(VisualStudioVersion) == '12.0'">
<VSInstallDir>$(Registry:HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio\12.0\Setup\VS@ProductDir)</VSInstallDir>
<VSInstallDir Condition="'$(VSInstallDir)' == ''">$(Registry:HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\VisualStudio\12.0\Setup\VS@ProductDir)</VSInstallDir>
<VSInstallDir Condition="'$(VSInstallDir)' == ''">$(Registry:HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VCExpress\12.0\Setup\VS@ProductDir)</VSInstallDir>
<VSInstallDir Condition="'$(VSInstallDir)' == ''">$(Registry:HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\VCExpress\12.0\Setup\VS@ProductDir)</VSInstallDir>

<VCInstallDir>$(Registry:HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio\12.0\Setup\VC@ProductDir)</VCInstallDir>
<VCInstallDir Condition="'$(VCInstallDir)' == ''">$(Registry:HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\VisualStudio\12.0\Setup\VC@ProductDir)</VCInstallDir>
<VCInstallDir Condition="'$(VCInstallDir)' == ''">$(Registry:HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VCExpress\12.0\Setup\VC@ProductDir)</VCInstallDir>
<VCInstallDir Condition="'$(VCInstallDir)' == ''">$(Registry:HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\VCExpress\12.0\Setup\VC@ProductDir)</VCInstallDir>

<WindowsSdkDir Condition="'$(UseEnv)' != 'true'">$(Registry:HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SDKs\Windows\v8.1A@InstallationFolder)</WindowsSdkDir>
<WindowsSdkDir Condition="'$(WindowsSdkDir)' == ''">$(Registry:HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Microsoft SDKs\Windows\v8.1A@InstallationFolder)</WindowsSdkDir>

<FrameworkDir Condition="'$(UseEnv)' != 'true'">$(Registry:HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\.NETFramework@InstallRoot)</FrameworkDir>
<FrameworkDir Condition="'$(FrameworkDir)' == ''">$(Registry:HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\.NETFramework@InstallRoot)</FrameworkDir>

<FrameworkSdkDir Condition="'$(UseEnv)' != 'true'">$(Registry:HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SDKs\Windows\v8.1A@InstallationFolder)</FrameworkSdkDir>
<FrameworkSdkDir Condition="'$(FrameworkSdkDir)' == ''">$(Registry:HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Microsoft SDKs\Windows\v8.1A@InstallationFolder)</FrameworkSdkDir>
</PropertyGroup>

<PropertyGroup Condition="$(VisualStudioVersion) != '12.0'">
<VCInstallDir>$(Registry:HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio\10.0\Setup\VC@ProductDir)</VCInstallDir>
<VCInstallDir Condition="'$(VCInstallDir)' == ''">$(Registry:HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\VisualStudio\10.0\Setup\VC@ProductDir)</VCInstallDir>
<VCInstallDir Condition="'$(VCInstallDir)' == ''">$(Registry:HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VCExpress\10.0\Setup\VC@ProductDir)</VCInstallDir>
<VCInstallDir Condition="'$(VCInstallDir)' == ''">$(Registry:HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\VCExpress\10.0\Setup\VC@ProductDir)</VCInstallDir>

<VSInstallDir>$(Registry:HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio\10.0\Setup\VS@ProductDir)</VSInstallDir>
<VSInstallDir Condition="'$(VSInstallDir)' == ''">$(Registry:HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\VisualStudio\10.0\Setup\VS@ProductDir)</VSInstallDir>
<VSInstallDir Condition="'$(VSInstallDir)' == ''">$(Registry:HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VCExpress\10.0\Setup\VS@ProductDir)</VSInstallDir>
<VSInstallDir Condition="'$(VSInstallDir)' == ''">$(Registry:HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\VCExpress\10.0\Setup\VS@ProductDir)</VSInstallDir>

<WindowsSdkDir Condition="'$(UseEnv)' != 'true'">$(Registry:HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SDKs\Windows\v7.0A@InstallationFolder)</WindowsSdkDir>
<WindowsSdkDir Condition="'$(WindowsSdkDir)' == ''">$(Registry:HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Microsoft SDKs\Windows\v7.0A@InstallationFolder)</WindowsSdkDir>

<FrameworkDir Condition="'$(UseEnv)' != 'true'">$(Registry:HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\.NETFramework@InstallRoot)</FrameworkDir>
<FrameworkDir Condition="'$(FrameworkDir)' == ''">$(Registry:HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\.NETFramework@InstallRoot)</FrameworkDir>

<FrameworkSdkDir Condition="'$(UseEnv)' != 'true'">$(Registry:HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SDKs\Windows\v7.0A@InstallationFolder)</FrameworkSdkDir>
<FrameworkSdkDir Condition="'$(FrameworkSdkDir)' == ''">$(Registry:HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Microsoft SDKs\Windows\v7.0A@InstallationFolder)</FrameworkSdkDir>

<!-- Present in ALL Emscripten builds, and use the '-Xclang -isystem' prefix. -->
<EmscriptenIncludeDir>$(EMSCRIPTEN)\system\local\include;$(EMSCRIPTEN)\system\include\compat;$(EMSCRIPTEN)\system\include\libcxx;$(EMSCRIPTEN)\system\include;$(EMSCRIPTEN)\system\include\emscripten;$(EMSCRIPTEN)\system\include\bsd;$(EMSCRIPTEN)\system\include\libc;$(EMSCRIPTEN)\system\include\gfx;$(EMSCRIPTEN)\system\include\net;$(EMSCRIPTEN)\system\include\SDL</EmscriptenIncludeDir>

<ClangPath Condition="'$(ClangPath)' == ''">$(CLANG_BIN)</ClangPath>
<MinGWPath Condition="'$(MinGWPath)' == ''">$(MINGW_BIN)</MinGWPath>
<EmccPath Condition="'$(EmccPath)' == ''">$(EMSCRIPTEN)</EmccPath>
<NaclPath Condition="'$(NaclPath)' == ''">$(NACL_BIN)</NaclPath>
<ExecutablePath Condition="'$(ExecutablePath)' == '' and '$(PlatformToolset)' == 'emcc' ">$(ClangPath);$(EmccPath);$(PATH)</ExecutablePath>
<ExecutablePath Condition="'$(ExecutablePath)' == '' and '$(PlatformToolset)' == 'clang' ">$(ClangPath);$(PATH)</ExecutablePath>
<ExecutablePath Condition="'$(ExecutablePath)' == '' and '$(PlatformToolset)' == 'mingw'">$(MinGWPath);$(PATH)</ExecutablePath>
<ExecutablePath Condition="'$(ExecutablePath)' == '' and '$(PlatformToolset)' == 'nacl'">$(NaclPath);$(PATH)</ExecutablePath>
<IncludePath Condition="'$(IncludePath)' == '' and '$(PlatformToolset)' == 'emcc'">$(EmscriptenIncludeDir)</IncludePath>
</PropertyGroup>
</Project>
10 changes: 8 additions & 2 deletions Emscripten/Microsoft.Cpp.Emscripten.default.props
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,12 @@
<IntDir Condition="'$(IntDir)'=='' AND '$(IntermediateOutputPath)'!=''">$(IntermediateOutputPath)</IntDir>
<IntDir Condition="'$(IntDir)'=='' AND '$(IntermediateOutputPath)'==''">$(Platform)\$(Configuration)\</IntDir>
<OutDir Condition="'$(OutDir)'=='' AND '$(SolutionDir)' != ''">$(SolutionDir)$(Platform)\$(Configuration)\</OutDir>
<OutDir Condition="'$(OutDir)'=='' AND '$(SolutionDir)' == ''">$(IntDir)</OutDir>
</PropertyGroup>
<OutDir Condition="'$(OutDir)'=='' AND '$(SolutionDir)' == ''">$(IntDir)</OutDir>
</PropertyGroup>

<!-- VS2012 additions to the defaults. -->
<PropertyGroup Condition="$(VisualStudioVersion) != '10.0'">
<TargetName Condition="'$(TargetName)' == ''">$(ProjectName)</TargetName>
<WindowsAppContainer>false</WindowsAppContainer>
</PropertyGroup>
</Project>
Loading