qskinny/inputcontext/CMakeLists.txt

49 lines
1.5 KiB
CMake
Raw Normal View History

2023-04-01 15:34:43 +00:00
############################################################################
# QSkinny - Copyright (C) 2016 Uwe Rathmann
# This file may be used under the terms of the QSkinny License, Version 1.0
############################################################################
2023-03-31 15:10:06 +00:00
if(NOT LINUX AND ENABLE_HUNSPELL)
message(WARNING "Feature 'hunspell' only available for UNIX!")
unset(ENABLE_HUNSPELL CACHE)
endif()
if(NOT LINUX AND ENABLE_PINYIN)
message(WARNING "Feature 'pinyin' only available for UNIX!")
unset(ENABLE_PINYIN CACHE)
endif()
2023-04-01 15:34:43 +00:00
set(SOURCES QskInputContextGlobal.h QskInputContextPlugin.cpp)
if(ENABLE_PINYIN)
2023-03-31 15:10:06 +00:00
include("QSkinnyOptionalPinyin")
list(APPEND SOURCES
2023-04-01 15:34:43 +00:00
${CMAKE_SOURCE_DIR}/src/inputpanel/QskPinyinTextPredictor.h
${CMAKE_SOURCE_DIR}/src/inputpanel/QskPinyinTextPredictor.cpp
)
endif()
if(ENABLE_HUNSPELL)
2023-03-31 15:10:06 +00:00
include("QSkinnyOptionalHunspell")
list(APPEND SOURCES
2023-04-01 15:34:43 +00:00
${CMAKE_SOURCE_DIR}/src/inputpanel/QskHunspellTextPredictor.h
${CMAKE_SOURCE_DIR}/src/inputpanel/QskHunspellTextPredictor.cpp
)
endif()
2023-04-01 15:34:43 +00:00
qsk_add_plugin(qskinputcontext
platforminputcontexts QskInputContextPlugin ${SOURCES})
2022-09-28 22:06:44 +00:00
2022-11-03 15:48:04 +00:00
if(ENABLE_PINYIN)
target_link_libraries(qskinputcontext PRIVATE pinyin Fcitx5::Utils)
2022-11-03 15:48:04 +00:00
endif()
if(ENABLE_HUNSPELL)
target_link_libraries(qskinputcontext PRIVATE hunspell)
2022-11-03 15:48:04 +00:00
endif()
target_compile_definitions(qskinputcontext PRIVATE QSK_INPUTCONTEXT_MAKEDLL)
target_link_libraries(qskinputcontext PRIVATE qskinny Qt::GuiPrivate)