initial commit

Signed-off-by: Peter Siegmund <mars3142@noreply.mars3142.dev>
This commit is contained in:
2025-10-31 23:37:30 +01:00
commit bf6b52fd94
9654 changed files with 4035664 additions and 0 deletions

View File

@@ -0,0 +1,36 @@
if(wxBUILD_LOCALES STREQUAL "AUTO")
find_package(Gettext QUIET)
elseif(wxBUILD_LOCALES)
find_package(Gettext REQUIRED)
endif()
mark_as_advanced(GETTEXT_MSGMERGE_EXECUTABLE)
mark_as_advanced(GETTEXT_MSGFMT_EXECUTABLE)
if(NOT GETTEXT_FOUND OR wxBUILD_LOCALES STREQUAL "OFF")
return()
endif()
# list and process the po files
file(GLOB _po_files "${wxSOURCE_DIR}/locale/*.po")
foreach(_po_file ${_po_files})
get_filename_component(name "${_po_file}" NAME)
string(REGEX REPLACE "\\.[^.]*$" "" lang ${name})
gettext_process_po_files(${lang} ALL PO_FILES "${_po_file}")
wx_install(FILES "${CMAKE_CURRENT_BINARY_DIR}/${lang}.gmo"
DESTINATION "share/locale/${lang}/LC_MESSAGES"
RENAME "wxstd-${wxMAJOR_VERSION}.${wxMINOR_VERSION}.mo"
)
endforeach()
# put all pofiles targets in a group to not clutter visual studio
set(base_name "pofiles")
set(target_index 0)
set(target_name ${base_name})
while(TARGET ${target_name})
set_target_properties(${target_name} PROPERTIES FOLDER "Locales")
math(EXPR target_index "${target_index}+1")
set(target_name "${base_name}_${target_index}")
endwhile()