Embed shader cache to the executable.

This commit is contained in:
Skyth
2024-10-20 00:53:16 +03:00
parent 99906bfddc
commit 018b32062e
9 changed files with 56 additions and 45 deletions
+10 -3
View File
@@ -5,10 +5,17 @@ add_compile_options(
"-march=sandybridge"
"-fno-strict-aliasing")
file(GLOB SWA_RECOMPILED_SOURCES "ppc/*.cpp")
add_library(UnleashedRecompLib "main.cpp" ${SWA_RECOMPILED_SOURCES})
file(GLOB SWA_PPC_RECOMPILED_SOURCES "ppc/*.cpp")
file(GLOB SWA_SHADER_RECOMPILED_SOURCES "shader/*.cpp")
add_library(UnleashedRecompLib "main.cpp" ${SWA_PPC_RECOMPILED_SOURCES} "shader/shader_cache.h" ${SWA_SHADER_RECOMPILED_SOURCES})
target_include_directories(UnleashedRecompLib PUBLIC ${CMAKE_CURRENT_SOURCE_DIR})
target_precompile_headers(UnleashedRecompLib PUBLIC ppc/ppc_recomp_shared.h)
target_compile_definitions(PowerRecomp PRIVATE CONFIG_FILE_PATH=\"${CMAKE_CURRENT_SOURCE_DIR}/config/SWA.toml\")
target_compile_definitions(PowerRecomp PRIVATE
CONFIG_FILE_PATH=\"${CMAKE_CURRENT_SOURCE_DIR}/config/SWA.toml\")
target_compile_definitions(ShaderRecomp PRIVATE
SHADER_RECOMP_INPUT=\"${CMAKE_CURRENT_SOURCE_DIR}/private\"
SHADER_RECOMP_OUTPUT=\"${CMAKE_CURRENT_SOURCE_DIR}/shader/shader_cache.cpp\")