127b27ec6Sopenharmony_ciProjects for various integrated development environments (IDE)
227b27ec6Sopenharmony_ci==============================================================
327b27ec6Sopenharmony_ci
427b27ec6Sopenharmony_ci#### Included projects
527b27ec6Sopenharmony_ci
627b27ec6Sopenharmony_ciThe following projects are included with the lz4 distribution:
727b27ec6Sopenharmony_ci- `cmake` - CMake project
827b27ec6Sopenharmony_ci- `VS2010` - Visual Studio 2010 project (which also works well with Visual Studio 2012, 2013, 2015)
927b27ec6Sopenharmony_ci- `VS2017` - Visual Studio 2017 project
1027b27ec6Sopenharmony_ci
1127b27ec6Sopenharmony_ci
1227b27ec6Sopenharmony_ci#### How to compile lz4 with Visual Studio
1327b27ec6Sopenharmony_ci
1427b27ec6Sopenharmony_ci1. Install Visual Studio e.g. VS 2015 Community Edition (it's free).
1527b27ec6Sopenharmony_ci2. Download the latest version of lz4 from https://github.com/lz4/lz4/releases
1627b27ec6Sopenharmony_ci3. Decompress ZIP archive.
1727b27ec6Sopenharmony_ci4. Go to decompressed directory then to `build` then `VS2010` and open `lz4.sln`
1827b27ec6Sopenharmony_ci5. Visual Studio will ask about converting VS2010 project to VS2015 and you should agree.
1927b27ec6Sopenharmony_ci6. Change `Debug` to `Release` and if you have 64-bit Windows change also `Win32` to `x64`.
2027b27ec6Sopenharmony_ci7. Press F7 on keyboard or select `BUILD` from the menu bar and choose `Build Solution`.
2127b27ec6Sopenharmony_ci8. If compilation will be fine a compiled executable will be in `build\VS2010\bin\x64_Release\lz4.exe`
2227b27ec6Sopenharmony_ci
2327b27ec6Sopenharmony_ci
2427b27ec6Sopenharmony_ci#### Projects available within lz4.sln
2527b27ec6Sopenharmony_ci
2627b27ec6Sopenharmony_ciThe Visual Studio solution file `lz4.sln` contains many projects that will be compiled to the
2727b27ec6Sopenharmony_ci`build\VS2010\bin\$(Platform)_$(Configuration)` directory. For example `lz4` set to `x64` and
2827b27ec6Sopenharmony_ci`Release` will be compiled to `build\VS2010\bin\x64_Release\lz4.exe`. The solution file contains the
2927b27ec6Sopenharmony_cifollowing projects:
3027b27ec6Sopenharmony_ci
3127b27ec6Sopenharmony_ci- `lz4` : Command Line Utility, supporting gzip-like arguments
3227b27ec6Sopenharmony_ci- `datagen` : Synthetic and parametrable data generator, for tests
3327b27ec6Sopenharmony_ci- `frametest` : Test tool that checks lz4frame integrity on target platform
3427b27ec6Sopenharmony_ci- `fullbench`  : Precisely measure speed for each lz4 inner functions
3527b27ec6Sopenharmony_ci- `fuzzer` : Test tool, to check lz4 integrity on target platform
3627b27ec6Sopenharmony_ci- `liblz4` : A static LZ4 library compiled to `liblz4_static.lib`
3727b27ec6Sopenharmony_ci- `liblz4-dll` : A dynamic LZ4 library (DLL) compiled to `liblz4.dll` with the import library `liblz4.lib`
3827b27ec6Sopenharmony_ci- `fullbench-dll` : The fullbench program compiled with the import library; the executable requires LZ4 DLL
3927b27ec6Sopenharmony_ci
4027b27ec6Sopenharmony_ci
4127b27ec6Sopenharmony_ci#### Using LZ4 DLL with Microsoft Visual C++ project
4227b27ec6Sopenharmony_ci
4327b27ec6Sopenharmony_ciThe header files `lib\lz4.h`, `lib\lz4hc.h`, `lib\lz4frame.h` and the import library
4427b27ec6Sopenharmony_ci`build\VS2010\bin\$(Platform)_$(Configuration)\liblz4.lib` are required to
4527b27ec6Sopenharmony_cicompile a project using Visual C++.
4627b27ec6Sopenharmony_ci
4727b27ec6Sopenharmony_ci1. The path to header files should be added to `Additional Include Directories` that can
4827b27ec6Sopenharmony_ci   be found in Project Properties of Visual Studio IDE in the `C/C++` Property Pages on the `General` page.
4927b27ec6Sopenharmony_ci2. The import library has to be added to `Additional Dependencies` that can
5027b27ec6Sopenharmony_ci   be found in Project Properties in the `Linker` Property Pages on the `Input` page.
5127b27ec6Sopenharmony_ci   If one will provide only the name `liblz4.lib` without a full path to the library
5227b27ec6Sopenharmony_ci   then the directory has to be added to `Linker\General\Additional Library Directories`.
5327b27ec6Sopenharmony_ci
5427b27ec6Sopenharmony_ciThe compiled executable will require LZ4 DLL which is available at
5527b27ec6Sopenharmony_ci`build\VS2010\bin\$(Platform)_$(Configuration)\liblz4.dll`.
56