git clone https://github.com/microsoft/vcpkg.git
cd vcpkg
bootstrap-vcpkg.bat
vcpkg install --x-manifest-root=../scripts/vcpkg-manifest --x-install-root=./installed
git clone https://github.com/microsoft/vcpkg.git
cd vcpkg
./bootstrap-vcpkg.sh
./vcpkg install \
--x-manifest-root=../scripts/vcpkg-manifest \
--x-install-root=./installed
Default configuration (no CUDA support):
cd third-party && cmake -P ../scripts/setup-onnxruntime.cmake
With CUDA 11.x support:
cd third-party && cmake -Dep=cuda11 -P ../scripts/setup-onnxruntime.cmake
With CUDA 12.x support:
cd third-party && cmake -Dep=cuda12 -P ../scripts/setup-onnxruntime.cmake
The buildsystem is able to deploy the shared libraries to build directory and install directory automatically.
cmake -B build -G Ninja \
-DCMAKE_INSTALL_PREFIX=<dir> \ # install directory
-DCMAKE_TOOLCHAIN_FILE=vcpkg/scripts/buildsystems/vcpkg.cmake \
-DQMSETUP_APPLOCAL_DEPS_PATHS_DEBUG=vcpkg/installed/<triplet>/debug/<runtime> \
-DQMSETUP_APPLOCAL_DEPS_PATHS_RELEASE=vcpkg/installed/<triplet>/<runtime> \
-DCMAKE_BUILD_TYPE=Release
cmake --build build --target all
cmake --build build --target install
- CMakeLists.txt
cmake_minimum_required(VERSION 3.16)
project(example)
find_package(dsinfer CONFIG REQUIRED)
add_executable(example main.cpp)
target_link_libraries(example dsinfer::dsinfer)
- CMake Configure & Build
cmake -B build -G Ninja \
-DCMAKE_PREFIX_PATH=<dir> \ # `synthrt` install directory
-DCMAKE_TOOLCHAIN_FILE=vcpkg/scripts/buildsystems/vcpkg.cmake \
-DCMAKE_BUILD_TYPE=Release
cmake --build build --target all
- Logging
- Documentation
- Unit Tests