| 1 |
set(PINYINHELPER_SOURCES |
| 2 |
pinyinhelper.cpp |
| 3 |
pinyinlookup.cpp |
| 4 |
stroke.cpp |
| 5 |
) |
| 6 |
add_fcitx5_addon(pinyinhelper ${PINYINHELPER_SOURCES}) |
| 7 |
target_link_libraries(pinyinhelper |
| 8 |
Fcitx5::Core |
| 9 |
Fcitx5::Config |
| 10 |
LibIME::Core |
| 11 |
Fcitx5::Module::QuickPhrase |
| 12 |
Fcitx5::Module::Clipboard |
| 13 |
Pthread::Pthread) |
| 14 |
install(TARGETS pinyinhelper DESTINATION "${CMAKE_INSTALL_LIBDIR}/fcitx5") |
| 15 |
configure_file(pinyinhelper.conf.in.in pinyinhelper.conf.in) |
| 16 |
fcitx5_translate_desktop_file("${CMAKE_CURRENT_BINARY_DIR}/pinyinhelper.conf.in" pinyinhelper.conf) |
| 17 |
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/pinyinhelper.conf" DESTINATION "${FCITX_INSTALL_PKGDATADIR}/addon" |
| 18 |
COMPONENT config) |
| 19 |
|
| 20 |
fcitx5_export_module(PinyinHelper TARGET pinyinhelper BUILD_INCLUDE_DIRECTORIES "${CMAKE_CURRENT_SOURCE_DIR}" HEADERS pinyinhelper_public.h INSTALL) |
| 21 |
|
| 22 |
set(PY_STROKE_VER 20250329) |
| 23 |
set(PY_STROKE_TGT "${CMAKE_CURRENT_BINARY_DIR}/py_stroke.mb") |
| 24 |
set(PY_STROKE_TAR "py_stroke-${PY_STROKE_VER}.tar.gz") |
| 25 |
set(PY_STROKE_URL |
| 26 |
"http://download.fcitx-im.org/data/py_stroke-${PY_STROKE_VER}.tar.gz") |
| 27 |
fcitx5_download(py-stroke-download "${PY_STROKE_URL}" "${PY_STROKE_TAR}" |
| 28 |
c1a7ca7225d3614ab83353fc827503006a980447762018f53760425d7b5303a6) |
| 29 |
fcitx5_extract(py-stroke-extract "${PY_STROKE_TAR}" DEPENDS py-stroke-download |
| 30 |
OUTPUT ${PY_STROKE_TGT}) |
| 31 |
install(FILES "${PY_STROKE_TGT}" DESTINATION "${FCITX_INSTALL_PKGDATADIR}/pinyinhelper") |
| 32 |
|
| 33 |
set(PY_TABLE_VER 20121124) |
| 34 |
set(PY_TABLE_TGT "${CMAKE_CURRENT_BINARY_DIR}/py_table.mb") |
| 35 |
set(PY_TABLE_TAR "py_table-${PY_TABLE_VER}.tar.gz") |
| 36 |
set(PY_TABLE_URL |
| 37 |
"http://download.fcitx-im.org/data/py_table-${PY_TABLE_VER}.tar.gz") |
| 38 |
fcitx5_download(py-table-download "${PY_TABLE_URL}" "${PY_TABLE_TAR}" |
| 39 |
42146ac97de6c13d55f9e99ed873915f4c66739e9c11532a34556badf9792c04) |
| 40 |
fcitx5_extract(py-table-extract "${PY_TABLE_TAR}" DEPENDS py-table-download |
| 41 |
OUTPUT ${PY_TABLE_TGT}) |
| 42 |
install(FILES "${PY_TABLE_TGT}" DESTINATION "${FCITX_INSTALL_PKGDATADIR}/pinyinhelper") |