diff --git a/cmake/scripts/Baseset.cmake b/cmake/scripts/Baseset.cmake --- a/cmake/scripts/Baseset.cmake +++ b/cmake/scripts/Baseset.cmake @@ -12,13 +12,13 @@ set(ARG_READ NO) while(ARGC LESS CMAKE_ARGC) set(ARG ${CMAKE_ARGV${ARGC}}) - if (ARG_READ) + if(ARG_READ) list(APPEND LANG_SOURCE_FILES "${ARG}") - endif (ARG_READ) + endif() - if (ARG STREQUAL "--") + if(ARG STREQUAL "--") set(ARG_READ YES) - endif (ARG STREQUAL "--") + endif() math(EXPR ARGC "${ARGC} + 1") endwhile() @@ -33,17 +33,17 @@ string(REGEX REPLACE "@(.*)@" "\\1" PLAC foreach(LANGFILE IN LISTS LANG_SOURCE_FILES) file(STRINGS "${LANGFILE}" LANGLINES REGEX "^(##isocode|${STR_ID})" ENCODING UTF-8) string(FIND "${LANGLINES}" "${STR_ID}" HAS_STR_ID) - if (HAS_STR_ID LESS 0) + if(HAS_STR_ID LESS 0) continue() - endif (HAS_STR_ID LESS 0) + endif() string(REGEX REPLACE "##isocode ([^;]+).*" "\\1" ISOCODE "${LANGLINES}") - if ("${ISOCODE}" STREQUAL "en_GB") + if("${ISOCODE}" STREQUAL "en_GB") string(REGEX REPLACE "[^:]*:(.*)" "${INI_KEY} = \\1" LANGLINES "${LANGLINES}") else() string(REGEX REPLACE "[^:]*:(.*)" "${INI_KEY}.${ISOCODE} = \\1" LANGLINES "${LANGLINES}") endif() list(APPEND ${PLACE_HOLDER} ${LANGLINES}) -endforeach(LANGFILE) +endforeach() list(SORT ${PLACE_HOLDER}) string(REPLACE ";" "\n" ${PLACE_HOLDER} "${${PLACE_HOLDER}}")