From ae67a9382bd35d248610774ff6e8f38db7e15f9f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9o=20Lam?= Date: Sun, 25 Apr 2021 01:15:14 +0200 Subject: [PATCH] CMake: Put the *.mo files directly in the correct output dir Avoids the need to copy the *.mo files manually *and* more importantly this ensures that the mo files are always recreated if the build output directory is cleared. --- Source/Core/DolphinQt/CMakeLists.txt | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/Source/Core/DolphinQt/CMakeLists.txt b/Source/Core/DolphinQt/CMakeLists.txt index d9752fc519..13c9a3d79a 100644 --- a/Source/Core/DolphinQt/CMakeLists.txt +++ b/Source/Core/DolphinQt/CMakeLists.txt @@ -431,7 +431,11 @@ if(GETTEXT_MSGFMT_EXECUTABLE) foreach(po ${LINGUAS}) get_filename_component(lang ${po} NAME_WE) - set(mo_dir ${CMAKE_CURRENT_BINARY_DIR}/${lang}) + if(WIN32) + set(mo_dir ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/Languages/${lang}) + else() + set(mo_dir ${CMAKE_CURRENT_BINARY_DIR}/${lang}) + endif() set(mo ${mo_dir}/dolphin-emu.mo) target_sources(dolphin-emu PRIVATE ${mo}) @@ -447,7 +451,6 @@ if(GETTEXT_MSGFMT_EXECUTABLE) add_custom_command(OUTPUT ${mo} COMMAND ${CMAKE_COMMAND} -E make_directory ${mo_dir} COMMAND ${GETTEXT_MSGFMT_EXECUTABLE} -o ${mo} ${po} - COMMAND ${CMAKE_COMMAND} -E copy ${mo} ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/Languages/${lang}/dolphin-emu.mo DEPENDS ${po} ) else()