mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-01-24 06:51:17 +01:00
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.
This commit is contained in:
parent
e71aef6768
commit
ae67a9382b
@ -431,7 +431,11 @@ if(GETTEXT_MSGFMT_EXECUTABLE)
|
|||||||
|
|
||||||
foreach(po ${LINGUAS})
|
foreach(po ${LINGUAS})
|
||||||
get_filename_component(lang ${po} NAME_WE)
|
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)
|
set(mo ${mo_dir}/dolphin-emu.mo)
|
||||||
|
|
||||||
target_sources(dolphin-emu PRIVATE ${mo})
|
target_sources(dolphin-emu PRIVATE ${mo})
|
||||||
@ -447,7 +451,6 @@ if(GETTEXT_MSGFMT_EXECUTABLE)
|
|||||||
add_custom_command(OUTPUT ${mo}
|
add_custom_command(OUTPUT ${mo}
|
||||||
COMMAND ${CMAKE_COMMAND} -E make_directory ${mo_dir}
|
COMMAND ${CMAKE_COMMAND} -E make_directory ${mo_dir}
|
||||||
COMMAND ${GETTEXT_MSGFMT_EXECUTABLE} -o ${mo} ${po}
|
COMMAND ${GETTEXT_MSGFMT_EXECUTABLE} -o ${mo} ${po}
|
||||||
COMMAND ${CMAKE_COMMAND} -E copy ${mo} ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/Languages/${lang}/dolphin-emu.mo
|
|
||||||
DEPENDS ${po}
|
DEPENDS ${po}
|
||||||
)
|
)
|
||||||
else()
|
else()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user