Skip to content
This repository has been archived by the owner on Aug 23, 2023. It is now read-only.

Commit

Permalink
[build] fix windows 10 build errors. (kaldi-asr#4111)
Browse files Browse the repository at this point in the history
  • Loading branch information
whaozl authored Jun 17, 2020
1 parent 8910533 commit 97438b0
Show file tree
Hide file tree
Showing 4 changed files with 47 additions and 9 deletions.
20 changes: 12 additions & 8 deletions windows/generate_solution.pl
Original file line number Diff line number Diff line change
Expand Up @@ -35,17 +35,20 @@

my %TOOLS=( default=> "14.1",
vs2015 => "14.0",
vs2017 => "14.1"
vs2017 => "14.1",
vs2019 => "v14.2"
);

my %FORMAT=( default=> "14.10",
vs2015 => "14.00",
vs2017 => "14.10"
vs2017 => "14.10",
vs2019 => "v14.20"
);

my %TOOLSET=( default=> "v141",
vs2015 => "v140",
vs2017 => "v141"
vs2017 => "v141",
vs2019 => "v142"
);


Expand Down Expand Up @@ -85,7 +88,8 @@
"$Bin/openfstwin_release.props",
"$Bin/openfstwin_debug_win32.props",
"$Bin/openfstwin_release_win32.props",
"$Bin/portaudio.props",
"$Bin/portaudio_release.props",
"$Bin/portaudio_debug.props"
);

my %optionalProps = (
Expand Down Expand Up @@ -535,7 +539,7 @@ sub writeProjectFiles {
print PROJ
" <Import Project=\"..\\kaldiwin_win32.props\" />
<Import Project=\"..\\openfstwin_debug_win32.props\" />
<Import Project=\"..\\portaudio.props\" />
<Import Project=\"..\\portaudio_debug.props\" />
</ImportGroup>
<ImportGroup Condition=\"'\$(Configuration)|\$(Platform)'=='Debug|x64'\" Label=\"PropertySheets\">
<Import Project=\"..\\variables.props\" />
Expand All @@ -549,7 +553,7 @@ sub writeProjectFiles {
print PROJ
" <Import Project=\"..\\kaldiwin.props\" />
<Import Project=\"..\\openfstwin_debug.props\" />
<Import Project=\"..\\portaudio.props\" />
<Import Project=\"..\\portaudio_debug.props\" />
</ImportGroup>
<ImportGroup Condition=\"'\$(Configuration)|\$(Platform)'=='Release|Win32'\" Label=\"PropertySheets\">
<Import Project=\"..\\variables.props\" />
Expand All @@ -563,7 +567,7 @@ sub writeProjectFiles {
print PROJ
" <Import Project=\"..\\kaldiwin_win32.props\" />
<Import Project=\"..\\openfstwin_release_win32.props\" />
<Import Project=\"..\\portaudio.props\" />
<Import Project=\"..\\portaudio_release.props\" />
</ImportGroup>
<ImportGroup Condition=\"'\$(Configuration)|\$(Platform)'=='Release|x64'\" Label=\"PropertySheets\">
<Import Project=\"..\\variables.props\" />
Expand All @@ -577,7 +581,7 @@ sub writeProjectFiles {
print PROJ
" <Import Project=\"..\\kaldiwin.props\" />
<Import Project=\"..\\openfstwin_release.props\" />
<Import Project=\"..\\portaudio.props\" />
<Import Project=\"..\\portaudio_release.props\" />
</ImportGroup>
";

Expand Down
17 changes: 17 additions & 0 deletions windows/portaudio_debug.props
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
<LinkIncremental>
</LinkIncremental>
</PropertyGroup>
<ItemDefinitionGroup>
<ClCompile>
<AdditionalIncludeDirectories>$(PORTAUDIO)\src\common;$(PORTAUDIO)\src\os\win;$(PORTAUDIO)\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
</ClCompile>
<Link>
<AdditionalLibraryDirectories>$(PORTAUDIOLIB)\Debug;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<AdditionalDependencies>portaudio_static_x64.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Link>
</ItemDefinitionGroup>
</Project>
17 changes: 17 additions & 0 deletions windows/portaudio_release.props
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
<LinkIncremental>
</LinkIncremental>
</PropertyGroup>
<ItemDefinitionGroup>
<ClCompile>
<AdditionalIncludeDirectories>$(PORTAUDIO)\src\common;$(PORTAUDIO)\src\os\win;$(PORTAUDIO)\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
</ClCompile>
<Link>
<AdditionalLibraryDirectories>$(PORTAUDIOLIB)\Release;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<AdditionalDependencies>portaudio_static_x64.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Link>
</ItemDefinitionGroup>
</Project>
2 changes: 1 addition & 1 deletion windows/variables.props.dev
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
<OPENFSTLIB>C:\Users\jtrmal\Documents\openfst\build64</OPENFSTLIB>
<CUBDIR>c:\Users\jtrmal\Documents\cub\</CUBDIR>
<PORTAUDIO>W:\kaldi-build\portaudio_src_double</PORTAUDIO>
<PORTAUDIOLIB>W:\kaldi-build\portaudio_src_double\Debug</PORTAUDIOLIB>
<PORTAUDIOLIB>W:\kaldi-build\portaudio_src_double</PORTAUDIOLIB>
<NVTOOLSDIR>C:\Program FIles\NVIDIA Corporation\NvToolsExt\</NVTOOLSDIR>
<!-- Do not modify anything after this line -->
</PropertyGroup>
Expand Down

0 comments on commit 97438b0

Please sign in to comment.