From 43564d413058c44b7ea3f5c9326765f65814111d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Joshua=20Vanda=C3=ABle?= Date: Thu, 11 Dec 2025 03:18:34 +0100 Subject: [PATCH] CMake: Only copy build_info.txt if autoupdate is enabled --- Source/Core/Common/CMakeLists.txt | 2 +- Source/Core/DolphinQt/CMakeLists.txt | 7 +++++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/Source/Core/Common/CMakeLists.txt b/Source/Core/Common/CMakeLists.txt index 2447d1ed40..c901e2ab6c 100644 --- a/Source/Core/Common/CMakeLists.txt +++ b/Source/Core/Common/CMakeLists.txt @@ -390,7 +390,7 @@ elseif(WIN32) ) configure_file( "${CMAKE_CURRENT_SOURCE_DIR}/build_info.txt.in" - "${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/build_info.txt" + "${CMAKE_BINARY_DIR}/build_info.txt" ) target_link_libraries(common PRIVATE "-INCLUDE:enableCompatPatches") diff --git a/Source/Core/DolphinQt/CMakeLists.txt b/Source/Core/DolphinQt/CMakeLists.txt index cd49f7f108..0a14ee11d7 100644 --- a/Source/Core/DolphinQt/CMakeLists.txt +++ b/Source/Core/DolphinQt/CMakeLists.txt @@ -522,6 +522,13 @@ if(WIN32) COMMAND ${CMAKE_COMMAND} -E copy_if_different "${CMAKE_CURRENT_SOURCE_DIR}/qt.conf.win" "${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/qt.conf" ) + if (ENABLE_AUTOUPDATE) + # Copy build_info.txt + add_custom_command(TARGET dolphin-emu POST_BUILD + COMMAND ${CMAKE_COMMAND} -E copy_if_different "${CMAKE_BINARY_DIR}/build_info.txt" "${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/build_info.txt" + ) + endif() + # Delegate to Qt's official deployment binary on Windows to copy over the necessary Qt-specific libraries, etc. get_target_property(MOC_EXECUTABLE_LOCATION Qt6::moc IMPORTED_LOCATION) get_filename_component(QT_BINARY_DIRECTORY "${MOC_EXECUTABLE_LOCATION}" DIRECTORY)