-
Microsoft Visual Studio C++ 2019 compiler (or later)
-
CMake, make sure it is in your PATH
-
- Make sure to install the additional debug libraries when prompted during the install process
- Make sure VULKAN_SDK is set accordingly in your environment
-
C++20 compiler (GCC / Clang)
-
git
-
CMake
-
- Make sure VULKAN_SDK is set accordingly in your environment
- Note: We recommend installing the Vulkan SDK directly from LunarG rather than relying on your distribution packages as those might not provide all of the tools and Vulkan layers commonly needed.
-
C++20 compiler (GCC / Clang)
-
git
-
CMake
Anything that supports Vulkan 1.2 or later
Mandatory dependencies will be automatically fetched and downloaded during the configuration process.
If you wish to build the documentation locally, you'll need to install the following dependencies
KDGpu builds with CMake. Unpack or clone the KDGpu sources in the directory of your choosing.
mkdir build
cd build
cmake -DKDGPU_BUILD_EXAMPLES=ON -DCMAKE_INSTALL_PREFIX=/path/to/install/location/ ..
cmake --build . --config Release
cmake --install .
- KDGPU_BUILD_KDXR=ON to enable building of the KDXr library and OpenXR backend
- KDGPU_BUILD_EXAMPLES=ON to enable building of the examples
- KDGPU_BUILD_TESTS=ON to enable building of the tests
- KDGPU_HLSL_SUPPORT=OFF to look for the dxc compiler and build an example using HLSL shaders
- KDGPU_DOCS=ON to build the documentation
- CMAKE_INSTALL_PREFIX=/path/to/install to override the default installation path
find_package(KDGpu REQUIRED)
set(SOURCES main.cpp ...)
add_executable(${PROJECT_NAME} ${SOURCES})
target_compile_features(${PROJECT_NAME} PUBLIC cxx_std_20)
target_link_libraries(${PROJECT_NAME} PRIVATE KDGpu::KDGpu)
CMake will looks for a file named KDGpuConfig.cmake. This file is located in <kdgpu_install_dir>/lib/cmake/KDGpu. If KDGpu was installed into a user defined location, you might have to set the CMAKE_PREFIX_PATH variable to contain the KDGpu install path:
cmake -DCMAKE_PREFIX_PATH=<kdgpu_install_dir> ..
In case cmake is unable to locate the KDGpu CMake package, you could try to set CMAKE_FIND_DEBUG_MODE=ON to get more insight about where CMake is looking for.
cmake -DCMAKE_PREFIX_PATH=<kdgpu_install_dir> -DCMAKE_FIND_DEBUG_MODE=ON ..