fix release build and update docs

This commit is contained in:
PancakeTAS 2025-07-05 11:46:12 +02:00
parent b2e0f2cf11
commit c2aeb2cbaa
No known key found for this signature in database
4 changed files with 11 additions and 27 deletions

View file

@ -2,9 +2,12 @@ cmake_minimum_required(VERSION 3.29)
# cmake options
set(CMAKE_CXX_COMPILER clang++)
set(CMAKE_CXX_CLANG_TIDY clang-tidy)
set(CMAKE_CXX_STANDARD 20)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_SKIP_RPATH ON)
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
# subprojects
@ -31,8 +34,6 @@ target_include_directories(lsfg-vk
PRIVATE include)
target_link_libraries(lsfg-vk
PRIVATE lsfg-vk-gen vulkan)
set_target_properties(lsfg-vk
PROPERTIES CXX_CLANG_TIDY clang-tidy)
target_compile_options(lsfg-vk PRIVATE
-Weverything
# disable compat c++ flags

View file

@ -7,7 +7,7 @@ By specifying an `LD_PRELOAD`, lsfg-vk can place itself inbetween your game and
## Building, Installing and Running
In order to compile LSFG, make sure you have the following components installed on your system:
- Traditional build tools (+ bash, sed, git)
- Traditional build tools (+ sed, git)
- Clang compiler (this project does NOT compile easily with GCC)
- Vulkan header files
- CMake build system
@ -16,13 +16,15 @@ In order to compile LSFG, make sure you have the following components installed
Compiling lsfg-vk is relatively straight forward, as everything is neatly integrated into CMake:
```bash
$ CC=clang CXX=clang++ cmake -B build -G Ninja \
$ cmake -B build -G Ninja \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_PREFIX=absolute-install-path-here
-DCMAKE_INSTALL_PREFIX=$PWD/release \
-DCMAKE_INTERPROCEDURAL_OPTIMIZATION=ON \
-DCMAKE_CXX_CLANG_TIDY=""
$ cmake --build build
$ cmake --install build
```
(Make sure you change `absolute-install-path-here` to the path you'd like to install this project to)
(Make sure you change `$PWD/release` to the path you'd like to install this project to)
Next, you'll need to download Lossless Scaling from Steam. Switch to the `legacy_2.13` branch or download the corresponding depot.
Copy or note down the path of "Lossless.dll" from the game files.

View file

@ -31,26 +31,9 @@ ExternalProject_Add(dxvk_git
ninja -C build install &&
mv build/src/dxvk/libdxvk.a build/src/dxvk/libldxvk.a &&
cd build/src/dxgi/libdxvk_dxgi.so.0.20602.p &&
ar rcs -o ../libdxgi.a
dxgi_adapter.cpp.o dxgi_enums.cpp.o dxgi_factory.cpp.o
dxgi_format.cpp.o dxgi_main.cpp.o dxgi_monitor.cpp.o
dxgi_options.cpp.o dxgi_output.cpp.o dxgi_surface.cpp.o
dxgi_swapchain.cpp.o &&
bash -c "ar rcs -o ../libdxgi.a *.o" &&
cd ../../d3d11/libdxvk_d3d11.so.0.20602.p &&
ar rcs -o ../libd3d11.a
d3d11_annotation.cpp.o d3d11_blend.cpp.o d3d11_buffer.cpp.o
d3d11_class_linkage.cpp.o d3d11_cmdlist.cpp.o d3d11_context.cpp.o
d3d11_context_def.cpp.o d3d11_context_ext.cpp.o d3d11_context_imm.cpp.o
d3d11_cuda.cpp.o d3d11_depth_stencil.cpp.o d3d11_device.cpp.o
d3d11_enums.cpp.o d3d11_features.cpp.o d3d11_fence.cpp.o
d3d11_gdi.cpp.o d3d11_initializer.cpp.o d3d11_input_layout.cpp.o
d3d11_interop.cpp.o d3d11_main.cpp.o d3d11_on_12.cpp.o
d3d11_options.cpp.o d3d11_query.cpp.o d3d11_rasterizer.cpp.o
d3d11_resource.cpp.o d3d11_sampler.cpp.o d3d11_shader.cpp.o
d3d11_state.cpp.o d3d11_state_object.cpp.o d3d11_swapchain.cpp.o
d3d11_texture.cpp.o d3d11_util.cpp.o d3d11_video.cpp.o
d3d11_view_dsv.cpp.o d3d11_view_rtv.cpp.o d3d11_view_srv.cpp.o
d3d11_view_uav.cpp.o
bash -c "ar rcs -o ../libd3d11.a *.o .*.o"
INSTALL_COMMAND ""
)

View file

@ -14,8 +14,6 @@ target_include_directories(lsfg-vk-gen
PUBLIC public)
target_link_libraries(lsfg-vk-gen
PUBLIC vulkan peparse dxvk)
set_target_properties(lsfg-vk-gen
PROPERTIES CXX_CLANG_TIDY clang-tidy)
target_compile_options(lsfg-vk-gen PRIVATE
-Weverything -fPIC
# disable compat c++ flags