1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71
|
set(DEPRECATED_TABLE_NAMES
bn/bengali-inscript # can be deprecated by m17n and keyboard layout
bn/bengali-probhat # can be deprecated by m17n and keyboard layout
gu/gujarati-inscript # can be deprecated by m17n
gu/gujarati-phonetic # can be deprecated by m17n
hi/hindi-inscript # can be deprecated by m17n
hi/hindi-phonetic # can be deprecated by m17n
kn/kannada-inscript # can be deprecated by m17n
kn/kannada-kgp # can be deprecated by m17n
ml/malayalam-inscript # can be deprecated by m17n
ne/nepali-rom # can be deprecated by m17n
ne/nepali-trad # can be deprecated by m17n
pa/punjabi-inscript # can be deprecated by m17n
pa/punjabi-jhelum # can be deprecated by m17n
pa/punjabi-phonetic # can be deprecated by m17n
ta/tamil-inscript # can be deprecated by m17n
ta/tamil-phonetic # can be deprecated by m17n
te/telugu-inscript # can be deprecated by m17n
)
set(TABLE_NAMES
am/amharic
ar/arabic
ml/malayalam-phonetic
ta/tamil-remington
other/cns11643
other/compose
other/emoji
other/ipa-x-sampa
other/latex
uk/translit-ua
ru/rustrad
ru/translit
ru/yawerty
th/thai
vi/viqr
)
foreach(table ${TABLE_NAMES} ${DEPRECATED_TABLE_NAMES})
fcitx_translate_add_sources("${table}.conf.in")
endforeach()
if(ENABLE_DEPRECATED)
set(TABLE_NAMES ${TABLE_NAMES} ${DEPRECATED_TABLE_NAMES})
endif()
set(MB_FILES)
set(CONF_FILES)
foreach(table ${TABLE_NAMES})
get_filename_component(table_name "${table}" NAME)
set(mb_file "${CMAKE_CURRENT_BINARY_DIR}/${table_name}.mb")
set(conf_file "${CMAKE_CURRENT_BINARY_DIR}/${table_name}.conf")
fcitx_translate_add_apply_source("${table}.conf.in"
"${conf_file}")
get_filename_component(out_dir
"${CMAKE_CURRENT_BINARY_DIR}/${table}.mb" PATH)
add_custom_command(OUTPUT "${mb_file}"
DEPENDS "${table}.txt" "${TXT2MB}"
COMMAND "${CMAKE_COMMAND}" -E make_directory "${out_dir}"
COMMAND "${TXT2MB}" ARGS "${CMAKE_CURRENT_SOURCE_DIR}/${table}.txt"
"${CMAKE_CURRENT_BINARY_DIR}/${table_name}.mb")
set(MB_FILES ${MB_FILES} "${mb_file}")
set(CONF_FILES ${CONF_FILES} "${conf_file}")
endforeach()
add_custom_target(table_data ALL DEPENDS ${MB_FILES})
install(FILES ${CONF_FILES} DESTINATION "${FCITX4_PREFIX}/share/fcitx/table")
install(FILES ${MB_FILES} DESTINATION "${FCITX4_PREFIX}/share/fcitx/table")
|