| 1 |
set(TABLE_SOURCES |
| 2 |
engine.cpp |
| 3 |
state.cpp |
| 4 |
ime.cpp |
| 5 |
context.cpp |
| 6 |
candidate.cpp |
| 7 |
factory.cpp |
| 8 |
) |
| 9 |
add_fcitx5_addon(table ${TABLE_SOURCES}) |
| 10 |
target_link_libraries(table Fcitx5::Core Fcitx5::Config LibIME::Table LibIME::Pinyin Fcitx5::Module::Punctuation Fcitx5::Module::QuickPhrase Fcitx5::Module::PinyinHelper) |
| 11 |
target_compile_definitions(table PRIVATE FCITX_STRINGUTILS_ENABLE_BOOST_STRING_VIEW) |
| 12 |
install(TARGETS table DESTINATION "${CMAKE_INSTALL_LIBDIR}/fcitx5") |
| 13 |
configure_file(table.conf.in.in table.conf.in) |
| 14 |
fcitx5_translate_desktop_file("${CMAKE_CURRENT_BINARY_DIR}/table.conf.in" table.conf) |
| 15 |
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/table.conf" DESTINATION "${CMAKE_INSTALL_DATADIR}/fcitx5/addon" |
| 16 |
COMPONENT config) |
| 17 |
|
| 18 |
file(GLOB TABLE_FILES RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} *.conf.in.in) |
| 19 |
list(REMOVE_ITEM TABLE_FILES table.conf.in.in) |
| 20 |
foreach(TABLE_ORIG ${TABLE_FILES}) |
| 21 |
get_filename_component(TABLE_NAME "${TABLE_ORIG}" NAME_WE) |
| 22 |
configure_file(${TABLE_NAME}.conf.in.in "${CMAKE_CURRENT_BINARY_DIR}/${TABLE_NAME}.conf.in" @ONLY) |
| 23 |
fcitx5_translate_desktop_file("${CMAKE_CURRENT_BINARY_DIR}/${TABLE_NAME}.conf.in" ${TABLE_NAME}.conf) |
| 24 |
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/${TABLE_NAME}.conf" DESTINATION "${CMAKE_INSTALL_DATADIR}/fcitx5/inputmethod" |
| 25 |
COMPONENT config) |
| 26 |
endforeach() |