# The typing logic, shared by every input method framework shell. It must not use fcitx5: the
# library gets no fcitx5 include path, so an fcitx5 include here fails the build.
add_library(ngosen_core STATIC
    ngosen-state.cpp
    ngosen-state-check.cpp
    ngosen-state-emoji.cpp
    ngosen-state-focus.cpp
    ngosen-state-macro.cpp
    ngosen-state-replace.cpp
    ngosen-state-retone.cpp
    ngosen-state-retype.cpp
    ngosen-state-wait.cpp
    ngosen-app-quirks.cpp
    ngosen-flatpak-names.cpp
    ngosen-globals.cpp
    ngosen-gnome-apps.cpp
    ngosen-pointer.cpp
    ngosen-recorder.cpp
    ngosen-strings.cpp
    ngosen-surrounding-check.cpp
    ngosen-surrounding-count.cpp
    ngosen-utf8.cpp
    ngosen-xtest.cpp
)
set_target_properties(ngosen_core PROPERTIES POSITION_INDEPENDENT_CODE ON)
target_include_directories(ngosen_core PUBLIC ${CMAKE_CURRENT_SOURCE_DIR})
# The shell provides ngosen::writeLog and ngosen::logEnabled (ngosen-log.h).
target_link_libraries(ngosen_core PUBLIC
    Bamboo::Core
    Pthread::Pthread
    ${CMAKE_DL_LIBS}
)
