Skip to content

Commit 8ccf532

Browse files
committed
refactor(cmake): drop redundant locale copy/install steps
1 parent bca3f9e commit 8ccf532

1 file changed

Lines changed: 0 additions & 17 deletions

File tree

CMakeLists.txt

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ option(OGS_HARDENED_BUILD "Enable compiler/linker hardening flags." OFF)
1212
set(OGS_I18N_DOMAIN "opengothicstarter")
1313
set(OGS_I18N_SOURCE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/i18n")
1414
set(OGS_I18N_LOCALE_OUTPUT_DIR "${CMAKE_CURRENT_BINARY_DIR}/locale")
15-
set(OGS_I18N_INSTALL_DIR "share/locale")
1615

1716
# Find wxWidgets
1817
find_package(wxWidgets REQUIRED COMPONENTS core base)
@@ -226,22 +225,6 @@ if(OGS_I18N_PO_FILES)
226225
list(APPEND OGS_EMBEDDED_LOCALE_DEPENDS "${OGS_EMBEDDED_LOCALE_ZIP}")
227226
endif()
228227

229-
foreach(LOCALE_NAME IN LISTS OGS_I18N_LOCALES)
230-
set(MO_FILE "${OGS_I18N_LOCALE_OUTPUT_DIR}/${LOCALE_NAME}/LC_MESSAGES/${OGS_I18N_DOMAIN}.mo")
231-
232-
add_custom_command(TARGET ${PROJECT_NAME} POST_BUILD
233-
COMMAND ${CMAKE_COMMAND} -E make_directory
234-
"$<TARGET_FILE_DIR:${PROJECT_NAME}>/locale/${LOCALE_NAME}/LC_MESSAGES"
235-
COMMAND ${CMAKE_COMMAND} -E copy_if_different
236-
"${MO_FILE}"
237-
"$<TARGET_FILE_DIR:${PROJECT_NAME}>/locale/${LOCALE_NAME}/LC_MESSAGES/${OGS_I18N_DOMAIN}.mo"
238-
VERBATIM
239-
)
240-
241-
install(FILES "${MO_FILE}" OPTIONAL
242-
DESTINATION "${OGS_I18N_INSTALL_DIR}/${LOCALE_NAME}/LC_MESSAGES"
243-
)
244-
endforeach()
245228
else()
246229
message(FATAL_ERROR
247230
"Found i18n .po files but 'msgfmt' is not available. "

0 commit comments

Comments
 (0)