This repository allows you to install the LiteFX engine using vcpkg.
First, setup vcpkg as described here. Idealy, you can use it as a git submodule. Then, create a vcpkg manifest file in the same directory as your top-level CMakeLists.txt
file. Add a dependency to litefx
within this file:
{
"name": "my-litefx-app",
"version-string": "1.0",
"supports": "windows & !arm",
"dependencies":
[
{
"name": "litefx",
"features": [ "glm", "dx-math" ]
}
]
}
Since LiteFX has no official port yet, create a registry vcpkg-configuration.json
file in the same directory as your top-level CMakeLists.txt
and manifest vcpkg.json
files. Inside, you can declare this repository as a registry:
{
"registries":
[
{
"kind": "git",
"repository": "https://github.com/crud89/LiteFX-Registry",
"baseline": "",
"packages": [ "litefx" ]
}
]
}
When you try to run vcpkg install
on your project now, you will receive a warning similar to:
$.registries[0] (a git registry): missing required field 'baseline' (a baseline)
To fix this, copy the full 40 byte SHA of the latest commit of this repository into the baseline
property of your registry file. Alternatively, run the following command to acquire the 40 byte SHA:
git ls-remote https://github.com/crud89/LiteFX-Registry.git main
If you follow the project setup guide guide, the CMakeLists.txt
file now is more simple:
CMAKE_MINIMUM_REQUIRED(VERSION 3.20)
SET(CMAKE_TOOLCHAIN_FILE "<path_to_vcpkg>/scripts/buildsystems/vcpkg.cmake")
PROJECT(MyLiteFXApp LANGUAGES CXX)
SET(CMAKE_CXX_STANDARD 23)
FIND_PACKAGE(LiteFX 0.3 CONFIG REQUIRED)
ADD_EXECUTABLE(MyLiteFXApp "main.h" "main.cpp")
TARGET_LINK_LIBRARIES(MyLiteFXApp PRIVATE LiteFX.Backends.Vulkan) # For the DirectX 12 target use: LiteFX.Backends.DirectX12. You can also add both targets here.
The contents of this repository are licensed under the MIT license.