Fix no locales being generated when APPLY_LOCALE_BLACKLIST=0

* backported from 6caed7073c
stable-5.2-namespace
Герхард PICCORO Lenz McKAY 2021-11-30 17:44:33 -04:00
parent bbd624535b
commit 8ccf85df69
1 changed files with 3 additions and 1 deletions

View File

@ -653,7 +653,7 @@ set(GETTEXT_BLACKLISTED_LOCALES
ky
)
option(APPLY_LOCALE_BLACKLIST "Use a blacklist to avoid broken locales" TRUE)
option(APPLY_LOCALE_BLACKLIST "Use a blacklist to avoid known broken locales" TRUE)
if (GETTEXTLIB_FOUND AND APPLY_LOCALE_BLACKLIST)
set(GETTEXT_USED_LOCALES "")
@ -663,6 +663,8 @@ if (GETTEXTLIB_FOUND AND APPLY_LOCALE_BLACKLIST)
endif()
endforeach()
message(STATUS "Locale blacklist applied; Locales used: ${GETTEXT_USED_LOCALES}")
elseif (GETTEXTLIB_FOUND)
set(GETTEXT_USED_LOCALES ${GETTEXT_AVAILABLE_LOCALES})
endif()
# Set some optimizations and tweaks