api: conditionalize quasi expensive prelinkevent

It would be better to do this only if either nci.def or nci.h are newer
than nci.lib, but who knows if msbuild is expressive enough for this.

Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
This commit is contained in:
Jason A. Donenfeld 2020-11-03 11:17:50 +01:00
parent bf0f0d27df
commit 04437fd668

View File

@ -115,7 +115,7 @@
<PreprocessorDefinitions Condition="'$(Platform)'=='ARM'">_M_ARM=7;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PreprocessorDefinitions Condition="'$(Platform)'=='ARM64'">_M_ARM64=1;%(PreprocessorDefinitions)</PreprocessorDefinitions>
</ResourceCompile>
<PreLinkEvent>
<PreLinkEvent Condition="!exists('$(IntDir)nci.lib')">
<Command>cl.exe /nologo /DGENERATE_LIB /Ob0 /c /Fo"$(IntDir)nci.obj" /Tc nci.h
lib.exe /def:nci.def /out:"$(IntDir)nci.lib" /machine:$(PlatformTarget) /nologo "$(IntDir)nci.obj"</Command>
</PreLinkEvent>