-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathCMakeLists.txt
More file actions
65 lines (53 loc) · 1.79 KB
/
Copy pathCMakeLists.txt
File metadata and controls
65 lines (53 loc) · 1.79 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
cmake_minimum_required(VERSION 3.22)
project(fcitx5-mozc)
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
option(BUILD_MOZC_ADDON "Build Mozc Fcitx5 Addon" ON)
include(GNUInstallDirs)
set(CMAKE_CXX_STANDARD 20)
add_compile_options(-fPIC)
set(MOZC_SRC_DIR "${PROJECT_SOURCE_DIR}/mozc/src")
if (NOT DEFINED MOZC_TARGET)
add_subdirectory(abseil-cpp)
# Not installing as we'll regenerate libabsl.a
set(protobuf_INSTALL OFF)
set(protobuf_BUILD_TESTS OFF)
set(protobuf_BUILD_LIBUPB OFF) # No binary for iOS.
add_subdirectory("protobuf")
install(TARGETS utf8_validity DESTINATION "${CMAKE_INSTALL_LIBDIR}")
install(TARGETS libprotobuf DESTINATION "${CMAKE_INSTALL_LIBDIR}")
include(cmake/protobuf.cmake)
include(cmake/base.cmake)
include(cmake/composer.cmake)
include(cmake/config.cmake)
include(cmake/converter.cmake)
include(cmake/data_manager.cmake)
include(cmake/dictionary.cmake)
include(cmake/engine.cmake)
include(cmake/prediction.cmake)
include(cmake/rewriter.cmake)
include(cmake/session.cmake)
include(cmake/storage.cmake)
include(cmake/transliteration.cmake)
include(cmake/mozc-static.cmake)
set(MOZC_TARGET
libprotobuf
mozc-static
absl::flags_parse
absl::log_flags
)
# Force data generation before binary build
add_dependencies(gen
gen_config_file_stream_data
gen_pos_matcher_code
gen_pos_matcher_impl_inc
gen_version_def
gen_pos_cost_map
)
endif()
if (BUILD_MOZC_ADDON)
find_package(Gettext REQUIRED)
find_package(Fcitx5Core 5.1.12 REQUIRED)
find_package(Fcitx5Module REQUIRED COMPONENTS Clipboard)
include("${FCITX_INSTALL_CMAKECONFIG_DIR}/Fcitx5Utils/Fcitx5CompilerSettings.cmake")
add_subdirectory(src/unix/fcitx5)
endif()