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

make shared library loader optional #1174

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
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: 5 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ option(ENABLE_EMOJI "Enable emoji module" On)
option(ENABLE_LIBUUID "Use libuuid for uuid generation" On)
option(BUILD_SPELL_DICT "Build en_dict.fscd for English spell check" On)
option(BUILD_SHARED_LIBS "Build library as shared libs" On)
option(ENABLE_DL "Enable dynamic loading addons" On)
set(NO_PREEDIT_APPS "gvim.*,wps.*,wpp.*,et.*" CACHE STRING "Disable preedit for follwing app by default.")
set(EVENT_LOOP_BACKEND "auto" CACHE STRING "Set the underlying event loop implementation, valid values are auto,systemd,libuv,none")

Expand Down Expand Up @@ -118,6 +119,10 @@ if(${CMAKE_SYSTEM_NAME} MATCHES "BSD|DragonFly")
endif()
find_package(DL REQUIRED)

if(NOT ENABLE_DL)
add_definitions("-DFCITX_NO_DL")
endif()

if (NOT TARGET LibIntl::LibIntl)
find_package(LibIntl REQUIRED)
endif()
Expand Down
2 changes: 2 additions & 0 deletions src/lib/fcitx/addonmanager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,9 @@ void AddonManager::unregisterLoader(const std::string &name) {
}

void AddonManager::registerDefaultLoader(StaticAddonRegistry *registry) {
#ifndef FCITX_NO_DL
registerLoader(std::make_unique<SharedLibraryLoader>());
#endif
if (registry) {
registerLoader(std::make_unique<StaticLibraryLoader>(registry));
}
Expand Down
Loading