On 2022-08-18 Olivier B. wrote:
> I am trying to build 5.2.6 on windows, but, presumably after
> 352ba2d69af2136bc814aa1df1a132559d445616, he build using the MSVC 2013
> project file fails.

Thanks! So the fix for one thing broke another situation. :-(

I cannot test but it seems the same addition is needed in six places,
not just in "Debug|Win32" case, right?

diff --git a/windows/vs2013/liblzma_dll.vcxproj 
b/windows/vs2013/liblzma_dll.vcxproj
index 2bf3e41..f24cd6f 100644
--- a/windows/vs2013/liblzma_dll.vcxproj
+++ b/windows/vs2013/liblzma_dll.vcxproj
@@ -137,6 +137,7 @@
     </Link>
     <ResourceCompile>
       
<AdditionalIncludeDirectories>./;../../src/liblzma/common;../../src/common;../../src/liblzma/api;</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions>HAVE_CONFIG_H</PreprocessorDefinitions>
     </ResourceCompile>
   </ItemDefinitionGroup>
   <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
@@ -154,6 +155,7 @@
     </Link>
     <ResourceCompile>
       
<AdditionalIncludeDirectories>./;../../src/liblzma/common;../../src/common;../../src/liblzma/api;</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions>HAVE_CONFIG_H</PreprocessorDefinitions>
     </ResourceCompile>
   </ItemDefinitionGroup>
   <ItemDefinitionGroup 
Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
@@ -173,6 +175,7 @@
     </Link>
     <ResourceCompile>
       
<AdditionalIncludeDirectories>./;../../src/liblzma/common;../../src/common;../../src/liblzma/api;</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions>HAVE_CONFIG_H</PreprocessorDefinitions>
     </ResourceCompile>
   </ItemDefinitionGroup>
   <ItemDefinitionGroup 
Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
@@ -191,6 +194,7 @@
     </Link>
     <ResourceCompile>
       
<AdditionalIncludeDirectories>./;../../src/liblzma/common;../../src/common;../../src/liblzma/api;</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions>HAVE_CONFIG_H</PreprocessorDefinitions>
     </ResourceCompile>
   </ItemDefinitionGroup>
   <ItemDefinitionGroup 
Condition="'$(Configuration)|$(Platform)'=='ReleaseMT|Win32'">
@@ -210,6 +214,7 @@
     </Link>
     <ResourceCompile>
       
<AdditionalIncludeDirectories>./;../../src/liblzma/common;../../src/common;../../src/liblzma/api;</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions>HAVE_CONFIG_H</PreprocessorDefinitions>
     </ResourceCompile>
   </ItemDefinitionGroup>
   <ItemDefinitionGroup 
Condition="'$(Configuration)|$(Platform)'=='ReleaseMT|x64'">
@@ -228,6 +233,7 @@
     </Link>
     <ResourceCompile>
       
<AdditionalIncludeDirectories>./;../../src/liblzma/common;../../src/common;../../src/liblzma/api;</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions>HAVE_CONFIG_H</PreprocessorDefinitions>
     </ResourceCompile>
   </ItemDefinitionGroup>
   <ItemGroup>

I will commit the above to all VS project files if you think it's good.

Does it work with CMake for you? I'm hoping that the VS project files
can be removed in the near-future and CMake used for building with VS.
That way there are fewer build files to maintain.

-- 
Lasse Collin

Reply via email to