CMake: don't have multiple rules generating same targets.
There was a copy rule that copied the locale from the source to the binary directory, and also a regeneration rule that used the locale in the binary directory as a temporary file. Rename the target for the latter.
This commit is contained in:
parent
287bd98a3f
commit
5d67b42842
@ -229,11 +229,14 @@ if(HAVE_GETTEXT)
|
||||
file(GLOB locale_pos ${CMAKE_CURRENT_SOURCE_DIR}/../res/locales/*.po)
|
||||
|
||||
string(REPLACE ${CMAKE_SOURCE_DIR} ${CMAKE_BINARY_DIR}
|
||||
gen_output_pot ${output_pot})
|
||||
gen_output_pot ${output_pot}.gen)
|
||||
string(REPLACE ${CMAKE_SOURCE_DIR} ${CMAKE_BINARY_DIR}
|
||||
gen_output_po ${output_po})
|
||||
gen_output_po ${output_po}.gen)
|
||||
foreach(locale_po ${locale_pos})
|
||||
string(REPLACE ${CMAKE_SOURCE_DIR} ${CMAKE_BINARY_DIR}
|
||||
gen_locale_pos "${locale_pos}")
|
||||
gen_locale_po ${locale_po}.gen)
|
||||
list(APPEND gen_locale_pos ${gen_locale_po})
|
||||
endforeach()
|
||||
|
||||
add_custom_command(
|
||||
OUTPUT ${gen_output_pot}
|
||||
@ -271,7 +274,7 @@ if(HAVE_GETTEXT)
|
||||
|
||||
foreach(locale_po ${locale_pos})
|
||||
string(REPLACE ${CMAKE_SOURCE_DIR} ${CMAKE_BINARY_DIR}
|
||||
gen_locale_po ${locale_po})
|
||||
gen_locale_po ${locale_po}.gen)
|
||||
|
||||
get_filename_component(locale_name ${locale_po} NAME_WE)
|
||||
if(locale_name STREQUAL "en_US")
|
||||
|
Loading…
Reference in New Issue
Block a user