|
| 1 | +diff --git a/CMakeLists.txt b/CMakeLists.txt |
| 2 | +index a835346..b1585f7 100644 |
| 3 | +--- a/CMakeLists.txt |
| 4 | ++++ b/CMakeLists.txt |
| 5 | +@@ -32,9 +32,9 @@ find_package(PkgConfig REQUIRED) |
| 6 | + pkg_check_modules(ZSTD REQUIRED IMPORTED_TARGET "libzstd") |
| 7 | + |
| 8 | + find_package(Fcitx5Utils REQUIRED) |
| 9 | +-include("${FCITX_INSTALL_CMAKECONFIG_DIR}/Fcitx5Utils/Fcitx5CompilerSettings.cmake") |
| 10 | ++include("../build/sysroot${FCITX_INSTALL_CMAKECONFIG_DIR}/Fcitx5Utils/Fcitx5CompilerSettings.cmake") |
| 11 | + |
| 12 | +-find_package(Boost 1.61 REQUIRED COMPONENTS iostreams filesystem) |
| 13 | ++find_package(Boost 1.61 REQUIRED COMPONENTS iostreams) |
| 14 | + set(LIBIME_INSTALL_PKGDATADIR "${CMAKE_INSTALL_FULL_DATADIR}/libime") |
| 15 | + set(LIBIME_INSTALL_LIBDATADIR "${CMAKE_INSTALL_FULL_LIBDIR}/libime") |
| 16 | + |
| 17 | +@@ -56,7 +56,6 @@ if(ENABLE_TEST) |
| 18 | + endif() |
| 19 | + |
| 20 | + add_subdirectory(src) |
| 21 | +-add_subdirectory(tools) |
| 22 | + |
| 23 | + if (ENABLE_DATA) |
| 24 | + add_subdirectory(data) |
| 25 | +diff --git a/src/libime/core/CMakeLists.txt b/src/libime/core/CMakeLists.txt |
| 26 | +index 89dd191..ed3f1b5 100644 |
| 27 | +--- a/src/libime/core/CMakeLists.txt |
| 28 | ++++ b/src/libime/core/CMakeLists.txt |
| 29 | +@@ -68,7 +68,7 @@ ecm_setup_version(PROJECT |
| 30 | + # the cmake if will |
| 31 | + set(IMECore_SOVERSION 0) |
| 32 | + |
| 33 | +-add_library(IMECore SHARED ${LIBIME_SRCS}) |
| 34 | ++add_library(IMECore STATIC ${LIBIME_SRCS}) |
| 35 | + set_target_properties(IMECore |
| 36 | + PROPERTIES VERSION ${IMECore_VERSION} |
| 37 | + SOVERSION ${IMECore_SOVERSION} |
| 38 | +@@ -81,7 +81,7 @@ target_include_directories(IMECore PUBLIC |
| 39 | + |
| 40 | + target_link_libraries(IMECore PUBLIC Fcitx5::Utils Boost::boost PRIVATE kenlm Boost::iostreams PkgConfig::ZSTD) |
| 41 | + |
| 42 | +-install(TARGETS IMECore EXPORT LibIMECoreTargets LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}" COMPONENT lib) |
| 43 | ++install(TARGETS IMECore kenlm EXPORT LibIMECoreTargets LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}" COMPONENT lib) |
| 44 | + install(FILES ${LIBIME_HDRS} DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/LibIME/libime/core" COMPONENT header) |
| 45 | + |
| 46 | + add_library(LibIME::Core ALIAS IMECore) |
| 47 | +diff --git a/src/libime/core/utils_p.h b/src/libime/core/utils_p.h |
| 48 | +index 5915fd0..d9ad2d8 100644 |
| 49 | +--- a/src/libime/core/utils_p.h |
| 50 | ++++ b/src/libime/core/utils_p.h |
| 51 | +@@ -12,7 +12,7 @@ |
| 52 | + #include <utility> |
| 53 | + #include <vector> |
| 54 | + |
| 55 | +-#if defined(__linux__) || defined(__GLIBC__) |
| 56 | ++#if defined(__linux__) || defined(__GLIBC__) || defined(__EMSCRIPTEN__) |
| 57 | + #include <endian.h> |
| 58 | + #elif defined(__APPLE__) |
| 59 | + #include <libkern/OSByteOrder.h> |
| 60 | +diff --git a/src/libime/pinyin/CMakeLists.txt b/src/libime/pinyin/CMakeLists.txt |
| 61 | +index a5e6d35..601d559 100644 |
| 62 | +--- a/src/libime/pinyin/CMakeLists.txt |
| 63 | ++++ b/src/libime/pinyin/CMakeLists.txt |
| 64 | +@@ -32,7 +32,7 @@ ecm_setup_version(PROJECT |
| 65 | + PACKAGE_VERSION_FILE "${CMAKE_CURRENT_BINARY_DIR}/LibIMEPinyinConfigVersion.cmake") |
| 66 | + set(IMEPinyin_SOVERSION 0) |
| 67 | + |
| 68 | +-add_library(IMEPinyin SHARED ${LIBIME_PINYIN_SRCS}) |
| 69 | ++add_library(IMEPinyin STATIC ${LIBIME_PINYIN_SRCS}) |
| 70 | + set_target_properties(IMEPinyin PROPERTIES |
| 71 | + VERSION ${IMEPinyin_VERSION} |
| 72 | + SOVERSION ${IMEPinyin_SOVERSION} |
| 73 | +diff --git a/src/libime/table/CMakeLists.txt b/src/libime/table/CMakeLists.txt |
| 74 | +index 62317bd..dd47d0b 100644 |
| 75 | +--- a/src/libime/table/CMakeLists.txt |
| 76 | ++++ b/src/libime/table/CMakeLists.txt |
| 77 | +@@ -23,7 +23,7 @@ ecm_setup_version(PROJECT |
| 78 | + PACKAGE_VERSION_FILE "${CMAKE_CURRENT_BINARY_DIR}/LibIMETableConfigVersion.cmake") |
| 79 | + set(IMETable_SOVERSION 0) |
| 80 | + |
| 81 | +-add_library(IMETable SHARED ${LIBIME_TABLE_SRCS}) |
| 82 | ++add_library(IMETable STATIC ${LIBIME_TABLE_SRCS}) |
| 83 | + set_target_properties(IMETable |
| 84 | + PROPERTIES VERSION ${IMETable_VERSION} |
| 85 | + SOVERSION ${IMETable_SOVERSION} |
0 commit comments