From e3e9663abf0fa214cb0f237f052dddcea440793f Mon Sep 17 00:00:00 2001 From: Qijia Liu Date: Thu, 28 Nov 2024 17:34:24 -0500 Subject: [PATCH] reduce libime patch --- CMakeLists.txt | 4 +++- patches/libime.patch | 11 +---------- 2 files changed, 4 insertions(+), 11 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index a9383b7..8a48cc3 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -12,7 +12,7 @@ set(BUNDLE_IDENTIFIER "org.fcitx.Fcitx5") set(BUNDLE_NAME "Fcitx5") set(ICON_FILE "icon.icns") -set(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake" ${CMAKE_MODULE_PATH}) +list(PREPEND CMAKE_MODULE_PATH "${PROJECT_SOURCE_DIR}/cmake") if (IOS_PLATFORM STREQUAL "SIMULATOR") set(F5I_TARGET "${CMAKE_OSX_ARCHITECTURES}-apple-ios${CMAKE_OSX_DEPLOYMENT_TARGET}-simulator") @@ -110,6 +110,8 @@ if (CHINESE_ADDONS) set(HAS_STD_FILESYSTEM 1) set(BUILD_TOOLS OFF) add_subdirectory(engines/libime) + # suppress configure error + install(TARGETS kenlm EXPORT LibIMECoreTargets LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}" COMPONENT lib) add_subdirectory(engines/fcitx5-chinese-addons) list(APPEND ADDONS chttrans fullwidth pinyin pinyinhelper punctuation table) list(APPEND DEFAULT_INPUT_METHODS pinyin shuangpin wbx) diff --git a/patches/libime.patch b/patches/libime.patch index 737a36f..76781b5 100644 --- a/patches/libime.patch +++ b/patches/libime.patch @@ -1,5 +1,5 @@ diff --git a/src/libime/core/CMakeLists.txt b/src/libime/core/CMakeLists.txt -index 35ee954..b1ada6a 100644 +index 35ee954..e40a2dd 100644 --- a/src/libime/core/CMakeLists.txt +++ b/src/libime/core/CMakeLists.txt @@ -69,7 +69,7 @@ ecm_setup_version(PROJECT @@ -11,15 +11,6 @@ index 35ee954..b1ada6a 100644 set_target_properties(IMECore PROPERTIES VERSION ${IMECore_VERSION} SOVERSION ${IMECore_SOVERSION} -@@ -82,7 +82,7 @@ target_include_directories(IMECore PUBLIC - - target_link_libraries(IMECore PUBLIC Fcitx5::Utils Boost::boost PRIVATE kenlm Boost::iostreams PkgConfig::ZSTD) - --install(TARGETS IMECore EXPORT LibIMECoreTargets LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}" COMPONENT lib) -+install(TARGETS IMECore kenlm EXPORT LibIMECoreTargets LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}" COMPONENT lib) - install(FILES ${LIBIME_HDRS} DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/LibIME/libime/core" COMPONENT header) - - add_library(LibIME::Core ALIAS IMECore) diff --git a/src/libime/pinyin/CMakeLists.txt b/src/libime/pinyin/CMakeLists.txt index a5e6d35..601d559 100644 --- a/src/libime/pinyin/CMakeLists.txt