-
Notifications
You must be signed in to change notification settings - Fork 180
Build
The software is hosted at GitHub under: https://github.com/fraunhoferhhi/vvenc
To clone the project use:
git clone https://github.com/fraunhoferhhi/vvenc
The software uses CMake to create platform-specific build files. A working CMake installation is required for building the software. Download CMake from http://www.cmake.org/ and install it.
The following targets are supported: Windows (Visual Studio), Linux (gcc) and MacOS (clang).
In order to compile the software the following software is needed to build VVEnC:
- CMake 3.13 or higher
- Linux: gcc-5.0 or higher
- MacOS: Xcode
- Windows: Visual Studio 15 2017 or higher
- Windows: gnuwin32 ( to provide make for Windows)
To simplify the build process a Makefile with predefined targets is available.
Please be aware of that the Makefile is only a frontend to CMake.
To build the VVenC encoder applications open a terminal and change into the project directory.
-
build statically linked release version:
make release
-
build statically linked debug version:
make debug
-
build dynamically linked debug version:
make debug-shared
-
create statically linked release version and install local to 'install':
make install-release
ormake install-r
-
create statically linked release version and install to default system location '/usr/local'):
sudo make install-prefix=/usr/local install
-
clean all build files:
make realclean
To see all available commands and aliases check the Makefile
Open a command prompt on your system and change into the root directory of this project.
Use one of the following CMake commands to configure the project. Feel free to change the commands to satisfy your needs
-
Linux Release static sample:
cmake -S . -B build/release-static -DCMAKE_BUILD_TYPE=Release
-
Linux Debug static sample:
cmake -S . -B build/debug-static -DCMAKE_BUILD_TYPE=Debug
-
MacOS-X Xcode sample:
cmake -S . -B build/release-static -DCMAKE_BUILD_TYPE=Release -G "Xcode"
-
Windows sample:
'cmake -S . -B build/release-static -DCMAKE_BUILD_TYPE=Release -G "Visual Studio 15 2017 Win64"'
After the configure step build the project:
-
build release:
cmake -B build -DCMAKE_BUILD_TYPE=Release
-
install (locally):
cmake -S . -B build -DCMAKE_BUILD_TYPE=Release
cmake --build build/release-shared -j
cmake --build build/release-static --target install
-
install into system( e.g. /usr/local):
cmake -S . -B build/release-shared -DCMAKE_INSTALL_PREFIX=/usr/local -DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS=1
cmake --build build/release-shared -j
cmake --build build/release-shared --target install
-
clean project:
rm -f -rf build bin lib install
The top-level CMakeLists.txt contains some special build options that can be used for the build process. Some of the major options for makefile or plain cmake can be found in the following table:
CMake option | Makefile option | Default | Description |
---|---|---|---|
CMAKE_VERBOSE_MAKEFILE | verbose | Off | set cmake verbose mode |
CMAKE_INSTALL_PREFIX | install-prefix | - | set install location |
CMAKE_TOOLCHAIN_FILE | toolchainfile | - | set special toolchain file (e.g. minGW) |
VVENC_ENABLE_LINK_TIME_OPT | disable-lto | On | set link time optimization |
VVENC_ENABLE_THIRDPARTY_JSON | disable-json | Off | set Json (Third party tool) |
VVENC_ENABLE_TRACING | enable-tracing | Off | set tracing (debugging) |
Example using Makefile:
make release verbose=1 disable-lto=1 toolchainfile=cmake/toolchains/x86_64-w64-mingw32-gcc-posix-ubuntu2004.cmake
Example using CMake:
cmake -S . -B build/release-static -DCMAKE_VERBOSE_MAKEFILE=ON -DVVENC_ENABLE_LINK_TIME_OPT=OFF -DCMAKE_TOOLCHAIN_FILE=cmake/toolchains/x86_64-w64-mingw32-gcc-posix-ubuntu2004.cmake -DCMAKE_BUILD_TYPE=Release
Feel free to contribute. To do so:
- Fork the current-most state of the master branch
- Apply the desired changes
- Create a pull-request to the upstream repository
JSON serialization is used for writing / reading rate control statistics.
The external library is available under MIT license at https://github.com/nlohmann/json. Please see LICENSE.MIT for the terms of use of the contents of this library.