diff --git a/src/common/CMakeLists.txt b/src/common/CMakeLists.txt index 665143900a..e514ef056d 100644 --- a/src/common/CMakeLists.txt +++ b/src/common/CMakeLists.txt @@ -279,4 +279,8 @@ if(YUZU_USE_PRECOMPILED_HEADERS) target_precompile_headers(common PRIVATE precompiled_headers.h) endif() +if (YUZU_ENABLE_LTO) + set_property(TARGET common PROPERTY INTERPROCEDURAL_OPTIMIZATION TRUE) +endif() + create_target_directory_groups(common) diff --git a/src/shader_recompiler/CMakeLists.txt b/src/shader_recompiler/CMakeLists.txt index 55cdc17c1f..46ae0ce058 100644 --- a/src/shader_recompiler/CMakeLists.txt +++ b/src/shader_recompiler/CMakeLists.txt @@ -270,3 +270,7 @@ create_target_directory_groups(shader_recompiler) if (YUZU_USE_PRECOMPILED_HEADERS) target_precompile_headers(shader_recompiler PRIVATE precompiled_headers.h) endif() + +if (YUZU_ENABLE_LTO) + set_property(TARGET shader_recompiler PROPERTY INTERPROCEDURAL_OPTIMIZATION TRUE) +endif() diff --git a/src/yuzu/CMakeLists.txt b/src/yuzu/CMakeLists.txt index b16c1d99ce..4433fb9690 100644 --- a/src/yuzu/CMakeLists.txt +++ b/src/yuzu/CMakeLists.txt @@ -492,4 +492,8 @@ if (YUZU_ROOM) target_link_libraries(yuzu PRIVATE yuzu-room) endif() +if (YUZU_ENABLE_LTO) + set_property(TARGET yuzu PROPERTY INTERPROCEDURAL_OPTIMIZATION TRUE) +endif() + create_target_directory_groups(yuzu)