-
Notifications
You must be signed in to change notification settings - Fork 177
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-release install-prefix=/usr/local
-
create dynamically linked release version and install to default system location '/usr/local'):
sudo make install install-prefix=/usr/local
-
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 --build build/release-static -j
-
install (locally by using release static build type):
cmake -S . -B build/release-static -DCMAKE_BUILD_TYPE=Release
cmake --build build/release-static -j
cmake --build build/release-static --target install
-
install into system (by using release shared build to destination /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 -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_INSTALL_FULLFEATURE_APP | install-ffapp | Off | enable build and install of full feature app (vvencFFapp) |
VVENC_ENABLE_LINK_TIME_OPT | disable-lto | LTO is On | enable link time optimization |
VVENC_OPT_TARGET_ARCH | enable-arch | - | set architecture name for optimization |
VVENC_ENABLE_BUILD_TYPE_POSTFIX | enable-build-type-postfix | Off | set build type postfix for apps and libs |
VVENC_ENABLE_THIRDPARTY_JSON | disable-json | JSON is On | enable JSON support (3rd-party lib.) |
VVENC_ENABLE_TRACING | enable-tracing | Off | enable symbol tracing (debugging) |
VVENC_USE_ADDRESS_SANITIZER | address-sanitizer | Off | enable address sanitizer in the build |
VVENC_OVERRIDE_COMPILER_CHECK | override-compiler-check | Off | build the project even if a problematic compiler is detected (using performance impacting workarounds) |
VVENC_ENABLE_WERROR | enable-werror | On | instructs the build process to fail if any warning are encountered |
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
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.
SIMDe is a fast and portable implementation of SIMD intrinsics on hardware which doesn't natively support them, such as calling SSE functions on ARM.
The external library is available under MIT license at https://github.com/simd-everywhere/simde.
Please see COPYING for the terms of use of the contents of this library.