summaryrefslogtreecommitdiffstats
path: root/data/CMakeLists.txt
diff options
context:
space:
mode:
authorPeng Wu <alexepico@gmail.com>2012-07-31 13:56:30 +0800
committerPeng Wu <alexepico@gmail.com>2012-07-31 13:59:43 +0800
commit7fb3ef7d2e49e8d4928d66349b55154e4df03678 (patch)
tree11eba992d8832eab2410f09b44a3b2047c00689b /data/CMakeLists.txt
parent81b4c63ac28e61e7f655d0ee2d0c589f06805b94 (diff)
downloadlibpinyin-7fb3ef7d2e49e8d4928d66349b55154e4df03678.tar.gz
libpinyin-7fb3ef7d2e49e8d4928d66349b55154e4df03678.tar.xz
libpinyin-7fb3ef7d2e49e8d4928d66349b55154e4df03678.zip
fixes cmake
Diffstat (limited to 'data/CMakeLists.txt')
-rw-r--r--data/CMakeLists.txt18
1 files changed, 17 insertions, 1 deletions
diff --git a/data/CMakeLists.txt b/data/CMakeLists.txt
index 90375e6..467f226 100644
--- a/data/CMakeLists.txt
+++ b/data/CMakeLists.txt
@@ -35,6 +35,19 @@ add_custom_target(
add_custom_command(
OUTPUT
+ ${CMAKE_SOURCE_DIR}/data/gb_char.table
+ ${CMAKE_SOURCE_DIR}/data/gbk_char.table
+ ${CMAKE_SOURCE_DIR}/data/interpolation.text
+ COMMENT
+ "Downloading textual model data..."
+ COMMAND
+ wget https://github.com/downloads/libpinyin/libpinyin/model.text.tar.gz
+ COMMAND
+ tar xvf model.text.tar.gz -C ${CMAKE_SOURCE_DIR}/data
+)
+
+add_custom_command(
+ OUTPUT
gb_char.bin
gbk_char.bin
phrase_index.bin
@@ -45,6 +58,8 @@ add_custom_command(
${gen_binary_files_BIN} --table-dir ${CMAKE_SOURCE_DIR}/data
DEPENDS
gen_binary_files
+ ${CMAKE_SOURCE_DIR}/data/gb_char.table
+ ${CMAKE_SOURCE_DIR}/data/gbk_char.table
)
add_custom_command(
@@ -56,6 +71,7 @@ add_custom_command(
${import_interpolation_BIN} < ${CMAKE_SOURCE_DIR}/data/interpolation.text
DEPENDS
import_interpolation
+ ${CMAKE_SOURCE_DIR}/data/interpolation.text
)
install(
@@ -69,4 +85,4 @@ set_directory_properties(
PROPERTIES
ADDITIONAL_MAKE_CLEAN_FILES
${BINARY_MODEL_DATA_FILES}
-) \ No newline at end of file
+)