extlz4 0.2.5 → 0.3.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/HISTORY.ja.md +16 -1
- data/README.md +49 -51
- data/Rakefile +22 -0
- data/bin/extlz4 +1 -1
- data/contrib/lz4/LICENSE +2 -1
- data/contrib/lz4/Makefile.inc +111 -0
- data/contrib/lz4/NEWS +97 -0
- data/contrib/lz4/README.md +41 -36
- data/contrib/lz4/build/README.md +55 -0
- data/contrib/lz4/build/VS2010/datagen/datagen.vcxproj +169 -0
- data/contrib/lz4/build/VS2010/frametest/frametest.vcxproj +176 -0
- data/contrib/lz4/build/VS2010/fullbench/fullbench.vcxproj +176 -0
- data/contrib/lz4/build/VS2010/fullbench-dll/fullbench-dll.vcxproj +180 -0
- data/contrib/lz4/build/VS2010/fuzzer/fuzzer.vcxproj +173 -0
- data/contrib/lz4/build/VS2010/liblz4/liblz4.vcxproj +175 -0
- data/contrib/lz4/build/VS2010/liblz4-dll/liblz4-dll.rc +51 -0
- data/contrib/lz4/build/VS2010/liblz4-dll/liblz4-dll.vcxproj +179 -0
- data/contrib/lz4/build/VS2010/lz4/lz4.rc +51 -0
- data/contrib/lz4/build/VS2010/lz4/lz4.vcxproj +189 -0
- data/contrib/lz4/build/VS2010/lz4.sln +98 -0
- data/contrib/lz4/build/VS2017/datagen/datagen.vcxproj +173 -0
- data/contrib/lz4/build/VS2017/frametest/frametest.vcxproj +180 -0
- data/contrib/lz4/build/VS2017/fullbench/fullbench.vcxproj +180 -0
- data/contrib/lz4/build/VS2017/fullbench-dll/fullbench-dll.vcxproj +184 -0
- data/contrib/lz4/build/VS2017/fuzzer/fuzzer.vcxproj +177 -0
- data/contrib/lz4/build/VS2017/liblz4/liblz4.vcxproj +179 -0
- data/contrib/lz4/build/VS2017/liblz4-dll/liblz4-dll.rc +51 -0
- data/contrib/lz4/build/VS2017/liblz4-dll/liblz4-dll.vcxproj +183 -0
- data/contrib/lz4/build/VS2017/lz4/lz4.rc +51 -0
- data/contrib/lz4/build/VS2017/lz4/lz4.vcxproj +175 -0
- data/contrib/lz4/build/VS2017/lz4.sln +103 -0
- data/contrib/lz4/build/VS2022/datagen/datagen.vcxproj +173 -0
- data/contrib/lz4/build/VS2022/frametest/frametest.vcxproj +180 -0
- data/contrib/lz4/build/VS2022/fullbench/fullbench.vcxproj +180 -0
- data/contrib/lz4/build/VS2022/fullbench-dll/fullbench-dll.vcxproj +184 -0
- data/contrib/lz4/build/VS2022/fuzzer/fuzzer.vcxproj +177 -0
- data/contrib/lz4/build/VS2022/liblz4/liblz4.vcxproj +179 -0
- data/contrib/lz4/build/VS2022/liblz4-dll/liblz4-dll.rc +51 -0
- data/contrib/lz4/build/VS2022/liblz4-dll/liblz4-dll.vcxproj +183 -0
- data/contrib/lz4/build/VS2022/lz4.sln +103 -0
- data/contrib/lz4/build/cmake/CMakeLists.txt +273 -0
- data/contrib/lz4/build/cmake/lz4Config.cmake.in +2 -0
- data/contrib/lz4/lib/LICENSE +1 -1
- data/contrib/lz4/lib/README.md +111 -15
- data/contrib/lz4/lib/liblz4-dll.rc.in +35 -0
- data/contrib/lz4/lib/liblz4.pc.in +3 -3
- data/contrib/lz4/lib/lz4.c +1891 -733
- data/contrib/lz4/lib/lz4.h +597 -234
- data/contrib/lz4/lib/lz4file.c +311 -0
- data/contrib/lz4/lib/lz4file.h +93 -0
- data/contrib/lz4/lib/lz4frame.c +896 -493
- data/contrib/lz4/lib/lz4frame.h +408 -107
- data/contrib/lz4/lib/lz4frame_static.h +5 -112
- data/contrib/lz4/lib/lz4hc.c +1039 -301
- data/contrib/lz4/lib/lz4hc.h +264 -123
- data/contrib/lz4/lib/xxhash.c +376 -240
- data/contrib/lz4/lib/xxhash.h +128 -93
- data/contrib/lz4/ossfuzz/Makefile +79 -0
- data/contrib/lz4/ossfuzz/compress_frame_fuzzer.c +48 -0
- data/contrib/lz4/ossfuzz/compress_fuzzer.c +58 -0
- data/contrib/lz4/ossfuzz/compress_hc_fuzzer.c +64 -0
- data/contrib/lz4/ossfuzz/decompress_frame_fuzzer.c +75 -0
- data/contrib/lz4/ossfuzz/decompress_fuzzer.c +78 -0
- data/contrib/lz4/ossfuzz/fuzz.h +48 -0
- data/contrib/lz4/ossfuzz/fuzz_data_producer.c +77 -0
- data/contrib/lz4/ossfuzz/fuzz_data_producer.h +36 -0
- data/contrib/lz4/ossfuzz/fuzz_helpers.h +95 -0
- data/contrib/lz4/ossfuzz/lz4_helpers.c +51 -0
- data/contrib/lz4/ossfuzz/lz4_helpers.h +13 -0
- data/contrib/lz4/ossfuzz/ossfuzz.sh +23 -0
- data/contrib/lz4/ossfuzz/round_trip_frame_fuzzer.c +43 -0
- data/contrib/lz4/ossfuzz/round_trip_frame_uncompressed_fuzzer.c +134 -0
- data/contrib/lz4/ossfuzz/round_trip_fuzzer.c +117 -0
- data/contrib/lz4/ossfuzz/round_trip_hc_fuzzer.c +44 -0
- data/contrib/lz4/ossfuzz/round_trip_stream_fuzzer.c +302 -0
- data/contrib/lz4/ossfuzz/standaloneengine.c +74 -0
- data/contrib/lz4/ossfuzz/travisoss.sh +26 -0
- data/ext/blockapi.c +13 -48
- data/ext/extlz4.c +2 -0
- data/ext/extlz4.h +17 -0
- data/ext/frameapi.c +3 -14
- data/ext/hashargs.c +9 -3
- data/ext/hashargs.h +1 -1
- data/ext/lz4_amalgam.c +0 -23
- data/gemstub.rb +5 -16
- data/lib/extlz4/oldstream.rb +1 -1
- data/lib/extlz4.rb +51 -3
- data/test/common.rb +2 -2
- metadata +84 -16
- data/contrib/lz4/circle.yml +0 -38
- data/contrib/lz4/lib/lz4opt.h +0 -356
- data/lib/extlz4/version.rb +0 -3
@@ -0,0 +1,183 @@
|
|
1
|
+
<?xml version="1.0" encoding="utf-8"?>
|
2
|
+
<Project DefaultTargets="Build" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
3
|
+
<ItemGroup Label="ProjectConfigurations">
|
4
|
+
<ProjectConfiguration Include="Debug|Win32">
|
5
|
+
<Configuration>Debug</Configuration>
|
6
|
+
<Platform>Win32</Platform>
|
7
|
+
</ProjectConfiguration>
|
8
|
+
<ProjectConfiguration Include="Debug|x64">
|
9
|
+
<Configuration>Debug</Configuration>
|
10
|
+
<Platform>x64</Platform>
|
11
|
+
</ProjectConfiguration>
|
12
|
+
<ProjectConfiguration Include="Release|Win32">
|
13
|
+
<Configuration>Release</Configuration>
|
14
|
+
<Platform>Win32</Platform>
|
15
|
+
</ProjectConfiguration>
|
16
|
+
<ProjectConfiguration Include="Release|x64">
|
17
|
+
<Configuration>Release</Configuration>
|
18
|
+
<Platform>x64</Platform>
|
19
|
+
</ProjectConfiguration>
|
20
|
+
</ItemGroup>
|
21
|
+
<PropertyGroup Label="Globals">
|
22
|
+
<ProjectGuid>{9800039D-4AAA-43A4-BB78-FEF6F4836927}</ProjectGuid>
|
23
|
+
<Keyword>Win32Proj</Keyword>
|
24
|
+
<RootNamespace>liblz4-dll</RootNamespace>
|
25
|
+
<OutDir>$(SolutionDir)bin\$(Platform)_$(Configuration)\</OutDir>
|
26
|
+
<IntDir>$(SolutionDir)bin\obj\$(RootNamespace)_$(Platform)_$(Configuration)\</IntDir>
|
27
|
+
<ProjectName>liblz4-dll</ProjectName>
|
28
|
+
</PropertyGroup>
|
29
|
+
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
30
|
+
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
|
31
|
+
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
32
|
+
<UseDebugLibraries>true</UseDebugLibraries>
|
33
|
+
<CharacterSet>Unicode</CharacterSet>
|
34
|
+
<PlatformToolset>v143</PlatformToolset>
|
35
|
+
</PropertyGroup>
|
36
|
+
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
|
37
|
+
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
38
|
+
<UseDebugLibraries>true</UseDebugLibraries>
|
39
|
+
<CharacterSet>Unicode</CharacterSet>
|
40
|
+
<PlatformToolset>v143</PlatformToolset>
|
41
|
+
</PropertyGroup>
|
42
|
+
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
|
43
|
+
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
44
|
+
<UseDebugLibraries>false</UseDebugLibraries>
|
45
|
+
<CharacterSet>Unicode</CharacterSet>
|
46
|
+
<WholeProgramOptimization Condition="'$(EnableWholeProgramOptimization)'=='true'">true</WholeProgramOptimization>
|
47
|
+
<PlatformToolset>v143</PlatformToolset>
|
48
|
+
</PropertyGroup>
|
49
|
+
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
|
50
|
+
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
51
|
+
<UseDebugLibraries>false</UseDebugLibraries>
|
52
|
+
<CharacterSet>Unicode</CharacterSet>
|
53
|
+
<WholeProgramOptimization Condition="'$(EnableWholeProgramOptimization)'=='true'">true</WholeProgramOptimization>
|
54
|
+
<PlatformToolset>v143</PlatformToolset>
|
55
|
+
</PropertyGroup>
|
56
|
+
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
57
|
+
<ImportGroup Label="ExtensionSettings">
|
58
|
+
</ImportGroup>
|
59
|
+
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
60
|
+
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
61
|
+
</ImportGroup>
|
62
|
+
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
|
63
|
+
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
64
|
+
</ImportGroup>
|
65
|
+
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
66
|
+
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
67
|
+
</ImportGroup>
|
68
|
+
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
|
69
|
+
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
70
|
+
</ImportGroup>
|
71
|
+
<PropertyGroup Label="UserMacros" />
|
72
|
+
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
73
|
+
<LinkIncremental>true</LinkIncremental>
|
74
|
+
<TargetName>liblz4</TargetName>
|
75
|
+
<IncludePath>$(IncludePath);$(UniversalCRT_IncludePath);$(SolutionDir)..\..\lib;$(VCInstallDir)include;$(VCInstallDir)atlmfc\include;$(WindowsSDK_IncludePath);</IncludePath>
|
76
|
+
</PropertyGroup>
|
77
|
+
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
78
|
+
<LinkIncremental>true</LinkIncremental>
|
79
|
+
<TargetName>liblz4</TargetName>
|
80
|
+
<IncludePath>$(IncludePath);$(UniversalCRT_IncludePath);$(SolutionDir)..\..\lib;$(VCInstallDir)include;$(VCInstallDir)atlmfc\include;$(WindowsSDK_IncludePath);</IncludePath>
|
81
|
+
<RunCodeAnalysis>true</RunCodeAnalysis>
|
82
|
+
</PropertyGroup>
|
83
|
+
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
84
|
+
<LinkIncremental>false</LinkIncremental>
|
85
|
+
<TargetName>liblz4</TargetName>
|
86
|
+
<IncludePath>$(IncludePath);$(UniversalCRT_IncludePath);$(SolutionDir)..\..\lib;$(VCInstallDir)include;$(VCInstallDir)atlmfc\include;$(WindowsSDK_IncludePath);</IncludePath>
|
87
|
+
</PropertyGroup>
|
88
|
+
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
89
|
+
<LinkIncremental>false</LinkIncremental>
|
90
|
+
<TargetName>liblz4</TargetName>
|
91
|
+
<IncludePath>$(IncludePath);$(UniversalCRT_IncludePath);$(SolutionDir)..\..\lib;$(VCInstallDir)include;$(VCInstallDir)atlmfc\include;$(WindowsSDK_IncludePath);</IncludePath>
|
92
|
+
<RunCodeAnalysis>true</RunCodeAnalysis>
|
93
|
+
</PropertyGroup>
|
94
|
+
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
95
|
+
<ClCompile>
|
96
|
+
<PrecompiledHeader>
|
97
|
+
</PrecompiledHeader>
|
98
|
+
<WarningLevel>Level4</WarningLevel>
|
99
|
+
<Optimization>Disabled</Optimization>
|
100
|
+
<PreprocessorDefinitions>WIN32;_DEBUG;LZ4_DLL_EXPORT=1;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
101
|
+
<TreatWarningAsError>true</TreatWarningAsError>
|
102
|
+
<EnablePREfast>false</EnablePREfast>
|
103
|
+
<RuntimeLibrary Condition="'$(UseStaticCRT)'=='true'">MultiThreadedDebug</RuntimeLibrary>
|
104
|
+
</ClCompile>
|
105
|
+
<Link>
|
106
|
+
<GenerateDebugInformation>true</GenerateDebugInformation>
|
107
|
+
</Link>
|
108
|
+
</ItemDefinitionGroup>
|
109
|
+
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
110
|
+
<ClCompile>
|
111
|
+
<PrecompiledHeader>
|
112
|
+
</PrecompiledHeader>
|
113
|
+
<WarningLevel>Level4</WarningLevel>
|
114
|
+
<Optimization>Disabled</Optimization>
|
115
|
+
<PreprocessorDefinitions>WIN32;_DEBUG;LZ4_DLL_EXPORT=1;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
116
|
+
<TreatWarningAsError>true</TreatWarningAsError>
|
117
|
+
<EnablePREfast>true</EnablePREfast>
|
118
|
+
<AdditionalOptions>/analyze:stacksize295252 %(AdditionalOptions)</AdditionalOptions>
|
119
|
+
<RuntimeLibrary Condition="'$(UseStaticCRT)'=='true'">MultiThreadedDebug</RuntimeLibrary>
|
120
|
+
</ClCompile>
|
121
|
+
<Link>
|
122
|
+
<GenerateDebugInformation>true</GenerateDebugInformation>
|
123
|
+
</Link>
|
124
|
+
</ItemDefinitionGroup>
|
125
|
+
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
126
|
+
<ClCompile>
|
127
|
+
<WarningLevel>Level4</WarningLevel>
|
128
|
+
<PrecompiledHeader>
|
129
|
+
</PrecompiledHeader>
|
130
|
+
<Optimization>MaxSpeed</Optimization>
|
131
|
+
<FunctionLevelLinking>true</FunctionLevelLinking>
|
132
|
+
<IntrinsicFunctions>true</IntrinsicFunctions>
|
133
|
+
<PreprocessorDefinitions>WIN32;NDEBUG;LZ4_DLL_EXPORT=1;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
134
|
+
<TreatWarningAsError>false</TreatWarningAsError>
|
135
|
+
<EnablePREfast>false</EnablePREfast>
|
136
|
+
<RuntimeLibrary Condition="'$(UseStaticCRT)'=='true'">MultiThreaded</RuntimeLibrary>
|
137
|
+
</ClCompile>
|
138
|
+
<Link>
|
139
|
+
<GenerateDebugInformation>true</GenerateDebugInformation>
|
140
|
+
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
141
|
+
<OptimizeReferences>true</OptimizeReferences>
|
142
|
+
</Link>
|
143
|
+
</ItemDefinitionGroup>
|
144
|
+
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
145
|
+
<ClCompile>
|
146
|
+
<WarningLevel>Level4</WarningLevel>
|
147
|
+
<PrecompiledHeader>
|
148
|
+
</PrecompiledHeader>
|
149
|
+
<Optimization>MaxSpeed</Optimization>
|
150
|
+
<FunctionLevelLinking>true</FunctionLevelLinking>
|
151
|
+
<IntrinsicFunctions>true</IntrinsicFunctions>
|
152
|
+
<PreprocessorDefinitions>WIN32;NDEBUG;LZ4_DLL_EXPORT=1;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
153
|
+
<TreatWarningAsError>false</TreatWarningAsError>
|
154
|
+
<EnablePREfast>true</EnablePREfast>
|
155
|
+
<AdditionalOptions>/analyze:stacksize295252 %(AdditionalOptions)</AdditionalOptions>
|
156
|
+
<RuntimeLibrary Condition="'$(UseStaticCRT)'=='true'">MultiThreaded</RuntimeLibrary>
|
157
|
+
</ClCompile>
|
158
|
+
<Link>
|
159
|
+
<GenerateDebugInformation>true</GenerateDebugInformation>
|
160
|
+
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
161
|
+
<OptimizeReferences>true</OptimizeReferences>
|
162
|
+
</Link>
|
163
|
+
</ItemDefinitionGroup>
|
164
|
+
<ItemGroup>
|
165
|
+
<ClInclude Include="..\..\..\lib\lz4.h" />
|
166
|
+
<ClInclude Include="..\..\..\lib\lz4frame.h" />
|
167
|
+
<ClInclude Include="..\..\..\lib\lz4frame_static.h" />
|
168
|
+
<ClInclude Include="..\..\..\lib\lz4hc.h" />
|
169
|
+
<ClInclude Include="..\..\..\lib\xxhash.h" />
|
170
|
+
</ItemGroup>
|
171
|
+
<ItemGroup>
|
172
|
+
<ClCompile Include="..\..\..\lib\lz4.c" />
|
173
|
+
<ClCompile Include="..\..\..\lib\lz4frame.c" />
|
174
|
+
<ClCompile Include="..\..\..\lib\lz4hc.c" />
|
175
|
+
<ClCompile Include="..\..\..\lib\xxhash.c" />
|
176
|
+
</ItemGroup>
|
177
|
+
<ItemGroup>
|
178
|
+
<ResourceCompile Include="liblz4-dll.rc" />
|
179
|
+
</ItemGroup>
|
180
|
+
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
181
|
+
<ImportGroup Label="ExtensionTargets">
|
182
|
+
</ImportGroup>
|
183
|
+
</Project>
|
@@ -0,0 +1,103 @@
|
|
1
|
+
Microsoft Visual Studio Solution File, Format Version 12.00
|
2
|
+
# Visual Studio 15
|
3
|
+
VisualStudioVersion = 15.0.28307.271
|
4
|
+
MinimumVisualStudioVersion = 10.0.40219.1
|
5
|
+
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "liblz4-dll", "liblz4-dll\liblz4-dll.vcxproj", "{9800039D-4AAA-43A4-BB78-FEF6F4836927}"
|
6
|
+
EndProject
|
7
|
+
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "liblz4", "liblz4\liblz4.vcxproj", "{9092C5CC-3E71-41B3-BF68-4A7BDD8A5476}"
|
8
|
+
EndProject
|
9
|
+
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "fuzzer", "fuzzer\fuzzer.vcxproj", "{18B9F1A7-9C66-4352-898B-30804DADE0FD}"
|
10
|
+
EndProject
|
11
|
+
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "fullbench", "fullbench\fullbench.vcxproj", "{6A4DF4EF-C77F-43C6-8901-DDCD20879E4E}"
|
12
|
+
EndProject
|
13
|
+
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "frametest", "frametest\frametest.vcxproj", "{39AD6ECC-8BAD-4368-95E4-A1AA2F077BB7}"
|
14
|
+
EndProject
|
15
|
+
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "datagen", "datagen\datagen.vcxproj", "{D745AE2F-596A-403A-9B91-81A8C6779243}"
|
16
|
+
EndProject
|
17
|
+
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "fullbench-dll", "fullbench-dll\fullbench-dll.vcxproj", "{13992FD2-077E-4954-B065-A428198201A9}"
|
18
|
+
ProjectSection(ProjectDependencies) = postProject
|
19
|
+
{9800039D-4AAA-43A4-BB78-FEF6F4836927} = {9800039D-4AAA-43A4-BB78-FEF6F4836927}
|
20
|
+
EndProjectSection
|
21
|
+
EndProject
|
22
|
+
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "lz4", "lz4\lz4.vcxproj", "{60A3115E-B988-41EE-8815-F4D4F253D866}"
|
23
|
+
EndProject
|
24
|
+
Global
|
25
|
+
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
26
|
+
Debug|Win32 = Debug|Win32
|
27
|
+
Debug|x64 = Debug|x64
|
28
|
+
Release|Win32 = Release|Win32
|
29
|
+
Release|x64 = Release|x64
|
30
|
+
EndGlobalSection
|
31
|
+
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
32
|
+
{9800039D-4AAA-43A4-BB78-FEF6F4836927}.Debug|Win32.ActiveCfg = Debug|Win32
|
33
|
+
{9800039D-4AAA-43A4-BB78-FEF6F4836927}.Debug|Win32.Build.0 = Debug|Win32
|
34
|
+
{9800039D-4AAA-43A4-BB78-FEF6F4836927}.Debug|x64.ActiveCfg = Debug|x64
|
35
|
+
{9800039D-4AAA-43A4-BB78-FEF6F4836927}.Debug|x64.Build.0 = Debug|x64
|
36
|
+
{9800039D-4AAA-43A4-BB78-FEF6F4836927}.Release|Win32.ActiveCfg = Release|Win32
|
37
|
+
{9800039D-4AAA-43A4-BB78-FEF6F4836927}.Release|Win32.Build.0 = Release|Win32
|
38
|
+
{9800039D-4AAA-43A4-BB78-FEF6F4836927}.Release|x64.ActiveCfg = Release|x64
|
39
|
+
{9800039D-4AAA-43A4-BB78-FEF6F4836927}.Release|x64.Build.0 = Release|x64
|
40
|
+
{9092C5CC-3E71-41B3-BF68-4A7BDD8A5476}.Debug|Win32.ActiveCfg = Debug|Win32
|
41
|
+
{9092C5CC-3E71-41B3-BF68-4A7BDD8A5476}.Debug|Win32.Build.0 = Debug|Win32
|
42
|
+
{9092C5CC-3E71-41B3-BF68-4A7BDD8A5476}.Debug|x64.ActiveCfg = Debug|x64
|
43
|
+
{9092C5CC-3E71-41B3-BF68-4A7BDD8A5476}.Debug|x64.Build.0 = Debug|x64
|
44
|
+
{9092C5CC-3E71-41B3-BF68-4A7BDD8A5476}.Release|Win32.ActiveCfg = Release|Win32
|
45
|
+
{9092C5CC-3E71-41B3-BF68-4A7BDD8A5476}.Release|Win32.Build.0 = Release|Win32
|
46
|
+
{9092C5CC-3E71-41B3-BF68-4A7BDD8A5476}.Release|x64.ActiveCfg = Release|x64
|
47
|
+
{9092C5CC-3E71-41B3-BF68-4A7BDD8A5476}.Release|x64.Build.0 = Release|x64
|
48
|
+
{18B9F1A7-9C66-4352-898B-30804DADE0FD}.Debug|Win32.ActiveCfg = Debug|Win32
|
49
|
+
{18B9F1A7-9C66-4352-898B-30804DADE0FD}.Debug|Win32.Build.0 = Debug|Win32
|
50
|
+
{18B9F1A7-9C66-4352-898B-30804DADE0FD}.Debug|x64.ActiveCfg = Debug|x64
|
51
|
+
{18B9F1A7-9C66-4352-898B-30804DADE0FD}.Debug|x64.Build.0 = Debug|x64
|
52
|
+
{18B9F1A7-9C66-4352-898B-30804DADE0FD}.Release|Win32.ActiveCfg = Release|Win32
|
53
|
+
{18B9F1A7-9C66-4352-898B-30804DADE0FD}.Release|Win32.Build.0 = Release|Win32
|
54
|
+
{18B9F1A7-9C66-4352-898B-30804DADE0FD}.Release|x64.ActiveCfg = Release|x64
|
55
|
+
{18B9F1A7-9C66-4352-898B-30804DADE0FD}.Release|x64.Build.0 = Release|x64
|
56
|
+
{6A4DF4EF-C77F-43C6-8901-DDCD20879E4E}.Debug|Win32.ActiveCfg = Debug|Win32
|
57
|
+
{6A4DF4EF-C77F-43C6-8901-DDCD20879E4E}.Debug|Win32.Build.0 = Debug|Win32
|
58
|
+
{6A4DF4EF-C77F-43C6-8901-DDCD20879E4E}.Debug|x64.ActiveCfg = Debug|x64
|
59
|
+
{6A4DF4EF-C77F-43C6-8901-DDCD20879E4E}.Debug|x64.Build.0 = Debug|x64
|
60
|
+
{6A4DF4EF-C77F-43C6-8901-DDCD20879E4E}.Release|Win32.ActiveCfg = Release|Win32
|
61
|
+
{6A4DF4EF-C77F-43C6-8901-DDCD20879E4E}.Release|Win32.Build.0 = Release|Win32
|
62
|
+
{6A4DF4EF-C77F-43C6-8901-DDCD20879E4E}.Release|x64.ActiveCfg = Release|x64
|
63
|
+
{6A4DF4EF-C77F-43C6-8901-DDCD20879E4E}.Release|x64.Build.0 = Release|x64
|
64
|
+
{39AD6ECC-8BAD-4368-95E4-A1AA2F077BB7}.Debug|Win32.ActiveCfg = Debug|Win32
|
65
|
+
{39AD6ECC-8BAD-4368-95E4-A1AA2F077BB7}.Debug|Win32.Build.0 = Debug|Win32
|
66
|
+
{39AD6ECC-8BAD-4368-95E4-A1AA2F077BB7}.Debug|x64.ActiveCfg = Debug|x64
|
67
|
+
{39AD6ECC-8BAD-4368-95E4-A1AA2F077BB7}.Debug|x64.Build.0 = Debug|x64
|
68
|
+
{39AD6ECC-8BAD-4368-95E4-A1AA2F077BB7}.Release|Win32.ActiveCfg = Release|Win32
|
69
|
+
{39AD6ECC-8BAD-4368-95E4-A1AA2F077BB7}.Release|Win32.Build.0 = Release|Win32
|
70
|
+
{39AD6ECC-8BAD-4368-95E4-A1AA2F077BB7}.Release|x64.ActiveCfg = Release|x64
|
71
|
+
{39AD6ECC-8BAD-4368-95E4-A1AA2F077BB7}.Release|x64.Build.0 = Release|x64
|
72
|
+
{D745AE2F-596A-403A-9B91-81A8C6779243}.Debug|Win32.ActiveCfg = Debug|Win32
|
73
|
+
{D745AE2F-596A-403A-9B91-81A8C6779243}.Debug|Win32.Build.0 = Debug|Win32
|
74
|
+
{D745AE2F-596A-403A-9B91-81A8C6779243}.Debug|x64.ActiveCfg = Debug|x64
|
75
|
+
{D745AE2F-596A-403A-9B91-81A8C6779243}.Debug|x64.Build.0 = Debug|x64
|
76
|
+
{D745AE2F-596A-403A-9B91-81A8C6779243}.Release|Win32.ActiveCfg = Release|Win32
|
77
|
+
{D745AE2F-596A-403A-9B91-81A8C6779243}.Release|Win32.Build.0 = Release|Win32
|
78
|
+
{D745AE2F-596A-403A-9B91-81A8C6779243}.Release|x64.ActiveCfg = Release|x64
|
79
|
+
{D745AE2F-596A-403A-9B91-81A8C6779243}.Release|x64.Build.0 = Release|x64
|
80
|
+
{13992FD2-077E-4954-B065-A428198201A9}.Debug|Win32.ActiveCfg = Debug|Win32
|
81
|
+
{13992FD2-077E-4954-B065-A428198201A9}.Debug|Win32.Build.0 = Debug|Win32
|
82
|
+
{13992FD2-077E-4954-B065-A428198201A9}.Debug|x64.ActiveCfg = Debug|x64
|
83
|
+
{13992FD2-077E-4954-B065-A428198201A9}.Debug|x64.Build.0 = Debug|x64
|
84
|
+
{13992FD2-077E-4954-B065-A428198201A9}.Release|Win32.ActiveCfg = Release|Win32
|
85
|
+
{13992FD2-077E-4954-B065-A428198201A9}.Release|Win32.Build.0 = Release|Win32
|
86
|
+
{13992FD2-077E-4954-B065-A428198201A9}.Release|x64.ActiveCfg = Release|x64
|
87
|
+
{13992FD2-077E-4954-B065-A428198201A9}.Release|x64.Build.0 = Release|x64
|
88
|
+
{60A3115E-B988-41EE-8815-F4D4F253D866}.Debug|Win32.ActiveCfg = Debug|Win32
|
89
|
+
{60A3115E-B988-41EE-8815-F4D4F253D866}.Debug|Win32.Build.0 = Debug|Win32
|
90
|
+
{60A3115E-B988-41EE-8815-F4D4F253D866}.Debug|x64.ActiveCfg = Debug|x64
|
91
|
+
{60A3115E-B988-41EE-8815-F4D4F253D866}.Debug|x64.Build.0 = Debug|x64
|
92
|
+
{60A3115E-B988-41EE-8815-F4D4F253D866}.Release|Win32.ActiveCfg = Release|Win32
|
93
|
+
{60A3115E-B988-41EE-8815-F4D4F253D866}.Release|Win32.Build.0 = Release|Win32
|
94
|
+
{60A3115E-B988-41EE-8815-F4D4F253D866}.Release|x64.ActiveCfg = Release|x64
|
95
|
+
{60A3115E-B988-41EE-8815-F4D4F253D866}.Release|x64.Build.0 = Release|x64
|
96
|
+
EndGlobalSection
|
97
|
+
GlobalSection(SolutionProperties) = preSolution
|
98
|
+
HideSolutionNode = FALSE
|
99
|
+
EndGlobalSection
|
100
|
+
GlobalSection(ExtensibilityGlobals) = postSolution
|
101
|
+
SolutionGuid = {BBC259B2-BABF-47CD-8A6A-7B8318A803AC}
|
102
|
+
EndGlobalSection
|
103
|
+
EndGlobal
|
@@ -0,0 +1,273 @@
|
|
1
|
+
# CMake support for LZ4
|
2
|
+
#
|
3
|
+
# To the extent possible under law, the author(s) have dedicated all
|
4
|
+
# copyright and related and neighboring rights to this software to
|
5
|
+
# the public domain worldwide. This software is distributed without
|
6
|
+
# any warranty.
|
7
|
+
#
|
8
|
+
# For details, see <http://creativecommons.org/publicdomain/zero/1.0/>.
|
9
|
+
#
|
10
|
+
# LZ4's CMake support is maintained by Evan Nemerson; when filing
|
11
|
+
# bugs please mention @nemequ to make sure I see it.
|
12
|
+
|
13
|
+
cmake_minimum_required(VERSION 2.8.12)
|
14
|
+
|
15
|
+
set(LZ4_TOP_SOURCE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/../..")
|
16
|
+
|
17
|
+
# Parse version information
|
18
|
+
file(STRINGS "${LZ4_TOP_SOURCE_DIR}/lib/lz4.h" LZ4_VERSION_MAJOR REGEX "^#define LZ4_VERSION_MAJOR +([0-9]+) +.*$")
|
19
|
+
string(REGEX REPLACE "^#define LZ4_VERSION_MAJOR +([0-9]+) +.*$" "\\1" LZ4_VERSION_MAJOR "${LZ4_VERSION_MAJOR}")
|
20
|
+
file(STRINGS "${LZ4_TOP_SOURCE_DIR}/lib/lz4.h" LZ4_VERSION_MINOR REGEX "^#define LZ4_VERSION_MINOR +([0-9]+) +.*$")
|
21
|
+
string(REGEX REPLACE "^#define LZ4_VERSION_MINOR +([0-9]+) +.*$" "\\1" LZ4_VERSION_MINOR "${LZ4_VERSION_MINOR}")
|
22
|
+
file(STRINGS "${LZ4_TOP_SOURCE_DIR}/lib/lz4.h" LZ4_VERSION_RELEASE REGEX "^#define LZ4_VERSION_RELEASE +([0-9]+) +.*$")
|
23
|
+
string(REGEX REPLACE "^#define LZ4_VERSION_RELEASE +([0-9]+) +.*$" "\\1" LZ4_VERSION_RELEASE "${LZ4_VERSION_RELEASE}")
|
24
|
+
set(LZ4_VERSION_STRING "${LZ4_VERSION_MAJOR}.${LZ4_VERSION_MINOR}.${LZ4_VERSION_RELEASE}")
|
25
|
+
mark_as_advanced(LZ4_VERSION_STRING LZ4_VERSION_MAJOR LZ4_VERSION_MINOR LZ4_VERSION_RELEASE)
|
26
|
+
|
27
|
+
if("${CMAKE_VERSION}" VERSION_LESS "3.0")
|
28
|
+
project(LZ4 C)
|
29
|
+
else()
|
30
|
+
cmake_policy (SET CMP0048 NEW)
|
31
|
+
project(LZ4
|
32
|
+
VERSION ${LZ4_VERSION_STRING}
|
33
|
+
LANGUAGES C)
|
34
|
+
endif()
|
35
|
+
|
36
|
+
option(LZ4_BUILD_CLI "Build lz4 program" ON)
|
37
|
+
option(LZ4_BUILD_LEGACY_LZ4C "Build lz4c program with legacy argument support" ON)
|
38
|
+
|
39
|
+
# If LZ4 is being bundled in another project, we don't want to
|
40
|
+
# install anything. However, we want to let people override this, so
|
41
|
+
# we'll use the LZ4_BUNDLED_MODE variable to let them do that; just
|
42
|
+
# set it to OFF in your project before you add_subdirectory(lz4/contrib/cmake_unofficial).
|
43
|
+
get_directory_property(LZ4_PARENT_DIRECTORY PARENT_DIRECTORY)
|
44
|
+
if("${LZ4_BUNDLED_MODE}" STREQUAL "")
|
45
|
+
# Bundled mode hasn't been set one way or the other, set the default
|
46
|
+
# depending on whether or not we are the top-level project.
|
47
|
+
if("${LZ4_PARENT_DIRECTORY}" STREQUAL "")
|
48
|
+
set(LZ4_BUNDLED_MODE OFF)
|
49
|
+
else()
|
50
|
+
set(LZ4_BUNDLED_MODE ON)
|
51
|
+
endif()
|
52
|
+
endif()
|
53
|
+
mark_as_advanced(LZ4_BUNDLED_MODE)
|
54
|
+
|
55
|
+
# CPack
|
56
|
+
if(NOT LZ4_BUNDLED_MODE AND NOT CPack_CMake_INCLUDED)
|
57
|
+
set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "LZ4 compression library")
|
58
|
+
set(CPACK_PACKAGE_DESCRIPTION_FILE "${LZ4_TOP_SOURCE_DIR}/README.md")
|
59
|
+
set(CPACK_RESOURCE_FILE_LICENSE "${LZ4_TOP_SOURCE_DIR}/LICENSE")
|
60
|
+
set(CPACK_PACKAGE_VERSION_MAJOR ${LZ4_VERSION_MAJOR})
|
61
|
+
set(CPACK_PACKAGE_VERSION_MINOR ${LZ4_VERSION_MINOR})
|
62
|
+
set(CPACK_PACKAGE_VERSION_PATCH ${LZ4_VERSION_RELEASE})
|
63
|
+
include(CPack)
|
64
|
+
endif(NOT LZ4_BUNDLED_MODE AND NOT CPack_CMake_INCLUDED)
|
65
|
+
|
66
|
+
# Allow people to choose whether to build shared or static libraries
|
67
|
+
# via the BUILD_SHARED_LIBS option unless we are in bundled mode, in
|
68
|
+
# which case we always use static libraries.
|
69
|
+
include(CMakeDependentOption)
|
70
|
+
CMAKE_DEPENDENT_OPTION(BUILD_SHARED_LIBS "Build shared libraries" ON "NOT LZ4_BUNDLED_MODE" OFF)
|
71
|
+
CMAKE_DEPENDENT_OPTION(BUILD_STATIC_LIBS "Build static libraries" OFF "BUILD_SHARED_LIBS" ON)
|
72
|
+
|
73
|
+
if(NOT BUILD_SHARED_LIBS AND NOT BUILD_STATIC_LIBS)
|
74
|
+
message(FATAL_ERROR "Both BUILD_SHARED_LIBS and BUILD_STATIC_LIBS have been disabled")
|
75
|
+
endif()
|
76
|
+
|
77
|
+
set(LZ4_LIB_SOURCE_DIR "${LZ4_TOP_SOURCE_DIR}/lib")
|
78
|
+
set(LZ4_PROG_SOURCE_DIR "${LZ4_TOP_SOURCE_DIR}/programs")
|
79
|
+
|
80
|
+
include_directories("${LZ4_LIB_SOURCE_DIR}")
|
81
|
+
|
82
|
+
# CLI sources
|
83
|
+
set(LZ4_SOURCES
|
84
|
+
"${LZ4_LIB_SOURCE_DIR}/lz4.c"
|
85
|
+
"${LZ4_LIB_SOURCE_DIR}/lz4hc.c"
|
86
|
+
"${LZ4_LIB_SOURCE_DIR}/lz4.h"
|
87
|
+
"${LZ4_LIB_SOURCE_DIR}/lz4hc.h"
|
88
|
+
"${LZ4_LIB_SOURCE_DIR}/lz4frame.c"
|
89
|
+
"${LZ4_LIB_SOURCE_DIR}/lz4frame.h"
|
90
|
+
"${LZ4_LIB_SOURCE_DIR}/xxhash.c")
|
91
|
+
set(LZ4_CLI_SOURCES
|
92
|
+
"${LZ4_PROG_SOURCE_DIR}/bench.c"
|
93
|
+
"${LZ4_PROG_SOURCE_DIR}/lz4cli.c"
|
94
|
+
"${LZ4_PROG_SOURCE_DIR}/lz4io.c"
|
95
|
+
"${LZ4_PROG_SOURCE_DIR}/datagen.c")
|
96
|
+
|
97
|
+
# Whether to use position independent code for the static library. If
|
98
|
+
# we're building a shared library this is ignored and PIC is always
|
99
|
+
# used.
|
100
|
+
option(LZ4_POSITION_INDEPENDENT_LIB "Use position independent code for static library (if applicable)" ON)
|
101
|
+
|
102
|
+
# liblz4
|
103
|
+
set(LZ4_LIBRARIES_BUILT)
|
104
|
+
if(BUILD_SHARED_LIBS)
|
105
|
+
add_library(lz4_shared SHARED ${LZ4_SOURCES})
|
106
|
+
target_include_directories(lz4_shared
|
107
|
+
PUBLIC $<BUILD_INTERFACE:${LZ4_LIB_SOURCE_DIR}>
|
108
|
+
INTERFACE $<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>)
|
109
|
+
set_target_properties(lz4_shared PROPERTIES
|
110
|
+
OUTPUT_NAME lz4
|
111
|
+
SOVERSION "${LZ4_VERSION_MAJOR}"
|
112
|
+
VERSION "${LZ4_VERSION_STRING}")
|
113
|
+
if(MSVC)
|
114
|
+
target_compile_definitions(lz4_shared PRIVATE
|
115
|
+
LZ4_DLL_EXPORT=1)
|
116
|
+
endif()
|
117
|
+
list(APPEND LZ4_LIBRARIES_BUILT lz4_shared)
|
118
|
+
endif()
|
119
|
+
if(BUILD_STATIC_LIBS)
|
120
|
+
set(STATIC_LIB_NAME lz4)
|
121
|
+
if (MSVC AND BUILD_SHARED_LIBS)
|
122
|
+
set(STATIC_LIB_NAME lz4_static)
|
123
|
+
endif()
|
124
|
+
add_library(lz4_static STATIC ${LZ4_SOURCES})
|
125
|
+
target_include_directories(lz4_static
|
126
|
+
PUBLIC $<BUILD_INTERFACE:${LZ4_LIB_SOURCE_DIR}>
|
127
|
+
INTERFACE $<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>)
|
128
|
+
set_target_properties(lz4_static PROPERTIES
|
129
|
+
OUTPUT_NAME ${STATIC_LIB_NAME}
|
130
|
+
POSITION_INDEPENDENT_CODE ${LZ4_POSITION_INDEPENDENT_LIB})
|
131
|
+
list(APPEND LZ4_LIBRARIES_BUILT lz4_static)
|
132
|
+
endif()
|
133
|
+
|
134
|
+
if(BUILD_STATIC_LIBS)
|
135
|
+
set(LZ4_LINK_LIBRARY lz4_static)
|
136
|
+
else()
|
137
|
+
list(APPEND LZ4_CLI_SOURCES ${LZ4_SOURCES})
|
138
|
+
endif()
|
139
|
+
|
140
|
+
# lz4
|
141
|
+
if (LZ4_BUILD_CLI)
|
142
|
+
set(LZ4_PROGRAMS_BUILT lz4cli)
|
143
|
+
add_executable(lz4cli ${LZ4_CLI_SOURCES})
|
144
|
+
set_target_properties(lz4cli PROPERTIES OUTPUT_NAME lz4)
|
145
|
+
if (BUILD_STATIC_LIBS)
|
146
|
+
target_link_libraries(lz4cli ${LZ4_LINK_LIBRARY})
|
147
|
+
endif()
|
148
|
+
endif()
|
149
|
+
|
150
|
+
# lz4c
|
151
|
+
if (LZ4_BUILD_LEGACY_LZ4C)
|
152
|
+
list(APPEND LZ4_PROGRAMS_BUILT lz4c)
|
153
|
+
add_executable(lz4c ${LZ4_CLI_SOURCES})
|
154
|
+
set_target_properties(lz4c PROPERTIES COMPILE_DEFINITIONS "ENABLE_LZ4C_LEGACY_OPTIONS")
|
155
|
+
if (BUILD_STATIC_LIBS)
|
156
|
+
target_link_libraries(lz4c ${LZ4_LINK_LIBRARY})
|
157
|
+
endif()
|
158
|
+
endif()
|
159
|
+
|
160
|
+
# Extra warning flags
|
161
|
+
include (CheckCCompilerFlag)
|
162
|
+
foreach (flag
|
163
|
+
# GCC-style
|
164
|
+
-Wall
|
165
|
+
-Wextra
|
166
|
+
-Wundef
|
167
|
+
-Wcast-qual
|
168
|
+
-Wcast-align
|
169
|
+
-Wshadow
|
170
|
+
-Wswitch-enum
|
171
|
+
-Wdeclaration-after-statement
|
172
|
+
-Wstrict-prototypes
|
173
|
+
-Wpointer-arith
|
174
|
+
|
175
|
+
# MSVC-style
|
176
|
+
/W4)
|
177
|
+
# Because https://gcc.gnu.org/wiki/FAQ#wnowarning
|
178
|
+
string(REGEX REPLACE "\\-Wno\\-(.+)" "-W\\1" flag_to_test "${flag}")
|
179
|
+
string(REGEX REPLACE "[^a-zA-Z0-9]+" "_" test_name "CFLAG_${flag_to_test}")
|
180
|
+
|
181
|
+
check_c_compiler_flag("${ADD_COMPILER_FLAGS_PREPEND} ${flag_to_test}" ${test_name})
|
182
|
+
|
183
|
+
if(${test_name})
|
184
|
+
set(CMAKE_C_FLAGS "${flag} ${CMAKE_C_FLAGS}")
|
185
|
+
endif()
|
186
|
+
|
187
|
+
unset(test_name)
|
188
|
+
unset(flag_to_test)
|
189
|
+
endforeach (flag)
|
190
|
+
|
191
|
+
if(NOT LZ4_BUNDLED_MODE)
|
192
|
+
include(GNUInstallDirs)
|
193
|
+
|
194
|
+
install(TARGETS ${LZ4_PROGRAMS_BUILT}
|
195
|
+
BUNDLE DESTINATION "${CMAKE_INSTALL_BINDIR}"
|
196
|
+
RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}")
|
197
|
+
install(TARGETS ${LZ4_LIBRARIES_BUILT}
|
198
|
+
EXPORT lz4Targets
|
199
|
+
LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}"
|
200
|
+
ARCHIVE DESTINATION "${CMAKE_INSTALL_LIBDIR}"
|
201
|
+
RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}")
|
202
|
+
install(FILES
|
203
|
+
"${LZ4_LIB_SOURCE_DIR}/lz4.h"
|
204
|
+
"${LZ4_LIB_SOURCE_DIR}/lz4frame.h"
|
205
|
+
"${LZ4_LIB_SOURCE_DIR}/lz4hc.h"
|
206
|
+
DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}")
|
207
|
+
install(FILES "${LZ4_PROG_SOURCE_DIR}/lz4.1"
|
208
|
+
DESTINATION "${CMAKE_INSTALL_MANDIR}/man1")
|
209
|
+
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/liblz4.pc"
|
210
|
+
DESTINATION "${CMAKE_INSTALL_LIBDIR}/pkgconfig")
|
211
|
+
|
212
|
+
include(CMakePackageConfigHelpers)
|
213
|
+
write_basic_package_version_file(
|
214
|
+
"${CMAKE_CURRENT_BINARY_DIR}/lz4ConfigVersion.cmake"
|
215
|
+
VERSION ${LZ4_VERSION_STRING}
|
216
|
+
COMPATIBILITY SameMajorVersion)
|
217
|
+
|
218
|
+
set(LZ4_PKG_INSTALLDIR "${CMAKE_INSTALL_LIBDIR}/cmake/lz4")
|
219
|
+
configure_package_config_file(
|
220
|
+
"${CMAKE_CURRENT_LIST_DIR}/lz4Config.cmake.in"
|
221
|
+
"${CMAKE_CURRENT_BINARY_DIR}/lz4Config.cmake"
|
222
|
+
INSTALL_DESTINATION ${LZ4_PKG_INSTALLDIR})
|
223
|
+
export(EXPORT lz4Targets
|
224
|
+
FILE ${CMAKE_CURRENT_BINARY_DIR}/lz4Targets.cmake
|
225
|
+
NAMESPACE LZ4::)
|
226
|
+
|
227
|
+
install(EXPORT lz4Targets
|
228
|
+
FILE lz4Targets.cmake
|
229
|
+
NAMESPACE LZ4::
|
230
|
+
DESTINATION ${LZ4_PKG_INSTALLDIR})
|
231
|
+
install(FILES
|
232
|
+
${CMAKE_CURRENT_BINARY_DIR}/lz4Config.cmake
|
233
|
+
${CMAKE_CURRENT_BINARY_DIR}/lz4ConfigVersion.cmake
|
234
|
+
DESTINATION ${LZ4_PKG_INSTALLDIR})
|
235
|
+
|
236
|
+
# install lz4cat and unlz4 symlinks on *nix
|
237
|
+
if(UNIX AND LZ4_BUILD_CLI)
|
238
|
+
install(CODE "
|
239
|
+
foreach(f lz4cat unlz4)
|
240
|
+
set(dest \"\$ENV{DESTDIR}${CMAKE_INSTALL_FULL_BINDIR}/\${f}\")
|
241
|
+
message(STATUS \"Symlinking: \${dest} -> lz4\")
|
242
|
+
execute_process(
|
243
|
+
COMMAND \"${CMAKE_COMMAND}\" -E create_symlink lz4 \"\${dest}\")
|
244
|
+
endforeach()
|
245
|
+
")
|
246
|
+
|
247
|
+
# create manpage aliases
|
248
|
+
foreach(f lz4cat unlz4)
|
249
|
+
file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/${f}.1" ".so man1/lz4.1\n")
|
250
|
+
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/${f}.1"
|
251
|
+
DESTINATION "${CMAKE_INSTALL_MANDIR}/man1")
|
252
|
+
endforeach()
|
253
|
+
endif(UNIX AND LZ4_BUILD_CLI)
|
254
|
+
endif(NOT LZ4_BUNDLED_MODE)
|
255
|
+
|
256
|
+
# pkg-config
|
257
|
+
set(PREFIX "${CMAKE_INSTALL_PREFIX}")
|
258
|
+
|
259
|
+
if("${CMAKE_INSTALL_FULL_LIBDIR}" STREQUAL "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}")
|
260
|
+
set(LIBDIR "\${prefix}/${CMAKE_INSTALL_LIBDIR}")
|
261
|
+
else()
|
262
|
+
set(LIBDIR "${CMAKE_INSTALL_FULL_LIBDIR}")
|
263
|
+
endif()
|
264
|
+
|
265
|
+
if("${CMAKE_INSTALL_FULL_INCLUDEDIR}" STREQUAL "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_INCLUDEDIR}")
|
266
|
+
set(INCLUDEDIR "\${prefix}/${CMAKE_INSTALL_INCLUDEDIR}")
|
267
|
+
else()
|
268
|
+
set(INCLUDEDIR "${CMAKE_INSTALL_FULL_INCLUDEDIR}")
|
269
|
+
endif()
|
270
|
+
|
271
|
+
# for liblz4.pc substitution
|
272
|
+
set(VERSION ${LZ4_VERSION_STRING})
|
273
|
+
configure_file(${LZ4_LIB_SOURCE_DIR}/liblz4.pc.in liblz4.pc @ONLY)
|
data/contrib/lz4/lib/LICENSE
CHANGED