build/CMake: use CMake-2.8.7-compatible list-check (#8220)

Tested with:
    make CMAKE_EXTRA_FLAGS='-DLANGUAGES="en_GB;ja;sk"'

closes #8219
This commit is contained in:
Justin M. Keyes
2018-04-02 12:40:31 +02:00
committed by GitHub
parent 0c59ac1a2c
commit cb5cde6e2b
2 changed files with 4 additions and 8 deletions

View File

@@ -5,10 +5,6 @@ if(POLICY CMP0059)
cmake_policy(SET CMP0059 OLD) # Needed until cmake 2.8.12. #4389
endif()
if(POLICY CMP0057)
cmake_policy(SET CMP0057 NEW)
endif()
# Point CMake at any custom modules we may ship
list(APPEND CMAKE_MODULE_PATH "${PROJECT_SOURCE_DIR}/cmake")

View File

@@ -139,17 +139,17 @@ if(HAVE_WORKING_LIBINTL AND GETTEXT_FOUND AND XGETTEXT_PRG AND ICONV_PRG)
endmacro()
# Create some translations from others.
if("ja" IN_LIST LANGUAGES)
if(";${LANGUAGES};" MATCHES ";ja;")
BuildPoIconv(ja utf-8 euc-jp)
BuildMo(ja.euc-jp)
endif()
if("cs" IN_LIST LANGUAGES)
if(";${LANGUAGES};" MATCHES ";cs;")
BuildPoIconv(cs ISO-8859-2 cp1250)
BuildMo(cs.cp1250)
endif()
if("sk" IN_LIST LANGUAGES)
if(";${LANGUAGES};" MATCHES ";sk;")
BuildPoIconv(sk ISO-8859-2 cp1250)
BuildMo(sk.cp1250)
endif()
@@ -159,7 +159,7 @@ if(HAVE_WORKING_LIBINTL AND GETTEXT_FOUND AND XGETTEXT_PRG AND ICONV_PRG)
${CMAKE_CURRENT_SOURCE_DIR}/no.po ${CMAKE_CURRENT_SOURCE_DIR}/nb.po
DEPENDS no.po)
list(APPEND UPDATE_PO_TARGETS update-po-nb)
if("nb" IN_LIST LANGUAGES)
if(";${LANGUAGES};" MATCHES ";no;")
CheckPo(nb)
BuildMo(nb)
endif()