xref: /aosp_15_r20/external/lz4/build/README.md (revision 27162e4e17433d5aa7cb38e7b6a433a09405fc7f)
1*27162e4eSAndroid Build Coastguard WorkerProjects for various integrated development environments (IDE)
2*27162e4eSAndroid Build Coastguard Worker==============================================================
3*27162e4eSAndroid Build Coastguard Worker
4*27162e4eSAndroid Build Coastguard Worker#### Included projects
5*27162e4eSAndroid Build Coastguard Worker
6*27162e4eSAndroid Build Coastguard WorkerThe following projects are included with the lz4 distribution:
7*27162e4eSAndroid Build Coastguard Worker- `cmake` - CMake project
8*27162e4eSAndroid Build Coastguard Worker- `meson` - Meson project
9*27162e4eSAndroid Build Coastguard Worker- `visual` - scripts to generate Visual Studio solutions from `cmake` script
10*27162e4eSAndroid Build Coastguard Worker- `VS2022` - Visual Studio 2022 solution - will soon be deprecated, prefer `visual` generators
11*27162e4eSAndroid Build Coastguard Worker
12*27162e4eSAndroid Build Coastguard Worker
13*27162e4eSAndroid Build Coastguard Worker#### Projects available within VS2022\lz4.sln
14*27162e4eSAndroid Build Coastguard Worker
15*27162e4eSAndroid Build Coastguard WorkerThe Visual Studio solution file `lz4.sln` contains many projects that will be compiled to the
16*27162e4eSAndroid Build Coastguard Worker`build\VS2010\bin\$(Platform)_$(Configuration)` directory. For example `lz4` set to `x64` and
17*27162e4eSAndroid Build Coastguard Worker`Release` will be compiled to `build\VS2010\bin\x64_Release\lz4.exe`. The solution file contains the
18*27162e4eSAndroid Build Coastguard Workerfollowing projects:
19*27162e4eSAndroid Build Coastguard Worker
20*27162e4eSAndroid Build Coastguard Worker- `lz4` : Command Line Utility, supporting gzip-like arguments
21*27162e4eSAndroid Build Coastguard Worker- `datagen` : Synthetic and parametrable data generator, for tests
22*27162e4eSAndroid Build Coastguard Worker- `frametest` : Test tool that checks lz4frame integrity on target platform
23*27162e4eSAndroid Build Coastguard Worker- `fullbench`  : Precisely measure speed for each lz4 inner functions
24*27162e4eSAndroid Build Coastguard Worker- `fuzzer` : Test tool, to check lz4 integrity on target platform
25*27162e4eSAndroid Build Coastguard Worker- `liblz4` : A static LZ4 library compiled to `liblz4_static.lib`
26*27162e4eSAndroid Build Coastguard Worker- `liblz4-dll` : A dynamic LZ4 library (DLL) compiled to `liblz4.dll` with the import library `liblz4.lib`
27*27162e4eSAndroid Build Coastguard Worker- `fullbench-dll` : The fullbench program compiled with the import library; the executable requires LZ4 DLL
28*27162e4eSAndroid Build Coastguard Worker
29*27162e4eSAndroid Build Coastguard Worker
30*27162e4eSAndroid Build Coastguard Worker#### Using LZ4 DLL with Microsoft Visual C++ project
31*27162e4eSAndroid Build Coastguard Worker
32*27162e4eSAndroid Build Coastguard WorkerThe header files `lib\lz4.h`, `lib\lz4hc.h`, `lib\lz4frame.h` and the import library
33*27162e4eSAndroid Build Coastguard Worker`build\VS2010\bin\$(Platform)_$(Configuration)\liblz4.lib` are required to
34*27162e4eSAndroid Build Coastguard Workercompile a project using Visual C++.
35*27162e4eSAndroid Build Coastguard Worker
36*27162e4eSAndroid Build Coastguard Worker1. The path to header files should be added to `Additional Include Directories` that can
37*27162e4eSAndroid Build Coastguard Worker   be found in Project Properties of Visual Studio IDE in the `C/C++` Property Pages on the `General` page.
38*27162e4eSAndroid Build Coastguard Worker2. The import library has to be added to `Additional Dependencies` that can
39*27162e4eSAndroid Build Coastguard Worker   be found in Project Properties in the `Linker` Property Pages on the `Input` page.
40*27162e4eSAndroid Build Coastguard Worker   If one will provide only the name `liblz4.lib` without a full path to the library
41*27162e4eSAndroid Build Coastguard Worker   then the directory has to be added to `Linker\General\Additional Library Directories`.
42*27162e4eSAndroid Build Coastguard Worker
43*27162e4eSAndroid Build Coastguard WorkerThe compiled executable will require LZ4 DLL which is available at
44*27162e4eSAndroid Build Coastguard Worker`build\VS2010\bin\$(Platform)_$(Configuration)\liblz4.dll`.
45