Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

prepare for fcitx5-macos #1

Merged
merged 2 commits into from
Dec 25, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,10 @@ find_package(Gettext REQUIRED)
find_package(Fcitx5Core 5.0.0 REQUIRED)
find_package(Fcitx5Module REQUIRED COMPONENTS Spell TestFrontend)
find_package(PkgConfig REQUIRED)
find_package(fmt REQUIRED)

if (NOT TARGET fmt::fmt)
find_package(fmt REQUIRED)
endif()

if (NOT DEFINED MARISA_TARGET)
pkg_check_modules(Marisa REQUIRED IMPORTED_TARGET marisa)
Expand Down
2 changes: 1 addition & 1 deletion src/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
add_library(hallelujah MODULE hallelujah.cpp)
target_link_libraries(hallelujah Fcitx5::Core Fcitx5::Module::Spell fmt ${MARISA_TARGET} ${JSONC_TARGET})
target_link_libraries(hallelujah Fcitx5::Core Fcitx5::Module::Spell fmt::fmt ${MARISA_TARGET} ${JSONC_TARGET})
install(TARGETS hallelujah DESTINATION "${FCITX_INSTALL_LIBDIR}/fcitx5")
fcitx5_translate_desktop_file(hallelujah.conf.in hallelujah.conf)
configure_file(hallelujah-addon.conf.in.in hallelujah-addon.conf.in)
Expand Down
3 changes: 3 additions & 0 deletions src/hallelujah-addon.conf.in.in
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,6 @@ Version=@PROJECT_VERSION@
Library=libhallelujah
Type=SharedLibrary
OnDemand=True

[Addon/Dependencies]
0=spell
4 changes: 0 additions & 4 deletions src/hallelujah.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -234,10 +234,6 @@ HallelujahEngine::HallelujahEngine(Instance *instance)

HallelujahEngine::~HallelujahEngine() { factory_.unregister(); }

void HallelujahEngine::activate(const InputMethodEntry &, InputContextEvent &) {
spell();
}

void HallelujahEngine::reset(const InputMethodEntry &,
InputContextEvent &event) {
auto ic = event.inputContext();
Expand Down
2 changes: 0 additions & 2 deletions src/hallelujah.h
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,6 @@ class HallelujahEngine final : public InputMethodEngine {
HallelujahEngine(Instance *instance);
~HallelujahEngine();

void activate(const InputMethodEntry &entry,
InputContextEvent &event) override;
void keyEvent(const InputMethodEntry &entry, KeyEvent &keyEvent) override;
void reset(const InputMethodEntry &, InputContextEvent &event) override;
FCITX_ADDON_DEPENDENCY_LOADER(spell, instance_->addonManager());
Expand Down