summaryrefslogtreecommitdiff
blob: d618f2f5e9fcf4051d33449b9d887e6aa0854d2b (plain)
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
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 9027f82..e67b0f0 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -8,6 +8,7 @@ set(LIBRIME_VERSION 0.9.2)
 set(LIBRIME_SOVERSION 0)
 
 option(BUILD_STATIC "Build static version of Rime" OFF)
+option(BUILD_DATA "Build data for Rime" OFF)
 
 if(WIN32)
   set(EXT ".exe")
@@ -107,12 +108,14 @@ if (NOT BUILD_STATIC)
   install(FILES ${PROJECT_BINARY_DIR}/rime.pc DESTINATION ${LIB_INSTALL_DIR}/pkgconfig)
   install(FILES cmake/RimeConfig.cmake DESTINATION share/cmake/rime)
   # data files
+  if (BUILD_DATA)
   install(FILES ${PROJECT_SOURCE_DIR}/data/default.yaml DESTINATION ${pkgdatadir})
   install(FILES ${PROJECT_SOURCE_DIR}/data/essay.kct DESTINATION ${pkgdatadir})
   file(GLOB preset_schema ${PROJECT_SOURCE_DIR}/data/preset/*.yaml)
   install(FILES ${preset_schema} DESTINATION ${pkgdatadir})
   file(GLOB supplement_schema ${PROJECT_SOURCE_DIR}/data/supplement/*.yaml)
   install(FILES ${supplement_schema} DESTINATION ${pkgdatadir})
+  endif(NOT BUILD_DATA)
 endif (NOT BUILD_STATIC)
 
 add_subdirectory(src)