Skip to content

Commit

Permalink
Updating bzip and minizip to support VS2015 and Qt 5.9
Browse files Browse the repository at this point in the history
  • Loading branch information
philliphounslow committed Jul 10, 2017
1 parent ab40828 commit a0e402e
Show file tree
Hide file tree
Showing 6 changed files with 183 additions and 4 deletions.
7 changes: 4 additions & 3 deletions CMakeLists.txt
@@ -1,4 +1,4 @@


# Set the deployment target
# According to
# https://cmake.org/cmake/help/v3.0/variable/CMAKE_OSX_DEPLOYMENT_TARGET.html
Expand Down Expand Up @@ -45,8 +45,9 @@ if (WIN32)
# type rather than setting it in the CMAKE_(C|CXX)_FLAGS vars
# because otherwise they are overridden by the /MT switch in the
# default flags for CMAKE_(C|CXX)_FLAGS_(DEBUG|RELWITHDEBINFO)
set(CMAKE_CXX_FLAGS_DEBUG "/MT")
set(CMAKE_C_FLAGS_DEBUG "/MT")

set(CMAKE_CXX_FLAGS_DEBUG "/MTd")
set(CMAKE_C_FLAGS_DEBUG "/MTd")

set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "/MT")
set(CMAKE_C_FLAGS_RELWITHDEBINFO "/MT")
Expand Down
22 changes: 22 additions & 0 deletions external/bzip2/libbz2.sln
@@ -0,0 +1,22 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 14
VisualStudioVersion = 14.0.25420.1
MinimumVisualStudioVersion = 10.0.40219.1
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libbz2", "libbz2.vcxproj", "{02188029-096A-4B3C-B0B8-507FEF75820D}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|x86 = Debug|x86
Release|x86 = Release|x86
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{02188029-096A-4B3C-B0B8-507FEF75820D}.Debug|x86.ActiveCfg = Debug|Win32
{02188029-096A-4B3C-B0B8-507FEF75820D}.Debug|x86.Build.0 = Debug|Win32
{02188029-096A-4B3C-B0B8-507FEF75820D}.Release|x86.ActiveCfg = Release|Win32
{02188029-096A-4B3C-B0B8-507FEF75820D}.Release|x86.Build.0 = Release|Win32
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
EndGlobal
153 changes: 153 additions & 0 deletions external/bzip2/libbz2.vcxproj
@@ -0,0 +1,153 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|Win32">
<Configuration>Debug</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|Win32">
<Configuration>Release</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
</ItemGroup>
<PropertyGroup Label="Globals">
<SccProjectName />
<SccLocalPath />
<ProjectGuid>{02188029-096A-4B3C-B0B8-507FEF75820D}</ProjectGuid>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<PlatformToolset>v140</PlatformToolset>
<UseOfMfc>false</UseOfMfc>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<PlatformToolset>v140</PlatformToolset>
<UseOfMfc>false</UseOfMfc>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="$(VCTargetsPath)Microsoft.Cpp.UpgradeFromVC60.props" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="$(VCTargetsPath)Microsoft.Cpp.UpgradeFromVC60.props" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<OutDir>.\Release\</OutDir>
<IntDir>.\Release\</IntDir>
<LinkIncremental>false</LinkIncremental>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<OutDir>.\Debug\</OutDir>
<IntDir>.\Debug\</IntDir>
<LinkIncremental>true</LinkIncremental>
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<ClCompile>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
<InlineFunctionExpansion>Default</InlineFunctionExpansion>
<StringPooling>true</StringPooling>
<FunctionLevelLinking>true</FunctionLevelLinking>
<Optimization>MaxSpeed</Optimization>
<SuppressStartupBanner>true</SuppressStartupBanner>
<WarningLevel>Level3</WarningLevel>
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<AssemblerListingLocation>.\Release\</AssemblerListingLocation>
<PrecompiledHeaderOutputFile>.\Release\libbz2.pch</PrecompiledHeaderOutputFile>
<ObjectFileName>.\Release\</ObjectFileName>
<ProgramDataBaseFileName>.\Release\</ProgramDataBaseFileName>
</ClCompile>
<Midl>
<SuppressStartupBanner>true</SuppressStartupBanner>
<PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<TypeLibraryName>.\Release\libbz2.tlb</TypeLibraryName>
<MkTypLibCompatible>true</MkTypLibCompatible>
<RedirectOutputAndErrors>NUL</RedirectOutputAndErrors>
<TargetEnvironment>Win32</TargetEnvironment>
</Midl>
<ResourceCompile>
<Culture>0x0411</Culture>
<PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
</ResourceCompile>
<Bscmake>
<SuppressStartupBanner>true</SuppressStartupBanner>
<OutputFile>.\Release\libbz2.bsc</OutputFile>
</Bscmake>
<Link>
<SuppressStartupBanner>true</SuppressStartupBanner>
<LinkDLL>true</LinkDLL>
<SubSystem>Windows</SubSystem>
<OutputFile>libbz2.dll</OutputFile>
<ImportLibrary>.\Release\libbz2.lib</ImportLibrary>
<AdditionalDependencies>odbc32.lib;odbccp32.lib;%(AdditionalDependencies)</AdditionalDependencies>
<ModuleDefinitionFile>.\libbz2.def</ModuleDefinitionFile>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<ClCompile>
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
<InlineFunctionExpansion>Default</InlineFunctionExpansion>
<Optimization>Disabled</Optimization>
<SuppressStartupBanner>true</SuppressStartupBanner>
<WarningLevel>Level3</WarningLevel>
<MinimalRebuild>true</MinimalRebuild>
<DebugInformationFormat>EditAndContinue</DebugInformationFormat>
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<AssemblerListingLocation>.\Debug\</AssemblerListingLocation>
<PrecompiledHeaderOutputFile>.\Debug\libbz2.pch</PrecompiledHeaderOutputFile>
<ObjectFileName>.\Debug\</ObjectFileName>
<ProgramDataBaseFileName>.\Debug\</ProgramDataBaseFileName>
</ClCompile>
<Midl>
<SuppressStartupBanner>true</SuppressStartupBanner>
<PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<TypeLibraryName>.\Debug\libbz2.tlb</TypeLibraryName>
<MkTypLibCompatible>true</MkTypLibCompatible>
<RedirectOutputAndErrors>NUL</RedirectOutputAndErrors>
<TargetEnvironment>Win32</TargetEnvironment>
</Midl>
<ResourceCompile>
<Culture>0x0411</Culture>
<PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
</ResourceCompile>
<Bscmake>
<SuppressStartupBanner>true</SuppressStartupBanner>
<OutputFile>.\Debug\libbz2.bsc</OutputFile>
</Bscmake>
<Link>
<SuppressStartupBanner>true</SuppressStartupBanner>
<LinkDLL>true</LinkDLL>
<GenerateDebugInformation>true</GenerateDebugInformation>
<SubSystem>Windows</SubSystem>
<OutputFile>libbz2.dll</OutputFile>
<ImportLibrary>.\Debug\libbz2.lib</ImportLibrary>
<AdditionalDependencies>odbc32.lib;odbccp32.lib;%(AdditionalDependencies)</AdditionalDependencies>
<ModuleDefinitionFile>.\libbz2.def</ModuleDefinitionFile>
</Link>
</ItemDefinitionGroup>
<ItemGroup>
<ClCompile Include="blocksort.c" />
<ClCompile Include="bzlib.c" />
<ClCompile Include="compress.c" />
<ClCompile Include="crctable.c" />
<ClCompile Include="decompress.c" />
<ClCompile Include="huffman.c" />
<ClCompile Include="randtable.c" />
</ItemGroup>
<ItemGroup>
<ClInclude Include="bzlib.h" />
<ClInclude Include="bzlib_private.h" />
</ItemGroup>
<ItemGroup>
<CustomBuild Include="libbz2.def" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
</Project>
Binary file added external/bzip2/libbz2d.lib
Binary file not shown.
Binary file added external/bzip2/libbz2d.pdb
Binary file not shown.
5 changes: 4 additions & 1 deletion external/minizip/CMakeLists.txt
Expand Up @@ -49,9 +49,12 @@ if (UNIX)

target_link_libraries(minizip z ${BZ2_LIB_NAME})
else()

set(BZ2_LIB_NAME "${CMAKE_CURRENT_SOURCE_DIR}/../bzip2/libbz2d.lib")

target_link_libraries(minizip
"${CMAKE_CURRENT_SOURCE_DIR}/../zlib/prebuilt/zlib_static.lib"
"${CMAKE_CURRENT_SOURCE_DIR}/../bzip2/libbz2_static.lib"
${BZ2_LIB_NAME}
)
endif()

Expand Down

0 comments on commit a0e402e

Please sign in to comment.