diff options
author | Peng Wu <alexepico@gmail.com> | 2012-07-31 13:56:30 +0800 |
---|---|---|
committer | Peng Wu <alexepico@gmail.com> | 2012-07-31 13:59:43 +0800 |
commit | 7fb3ef7d2e49e8d4928d66349b55154e4df03678 (patch) | |
tree | 11eba992d8832eab2410f09b44a3b2047c00689b | |
parent | 81b4c63ac28e61e7f655d0ee2d0c589f06805b94 (diff) | |
download | libpinyin-7fb3ef7d2e49e8d4928d66349b55154e4df03678.tar.gz libpinyin-7fb3ef7d2e49e8d4928d66349b55154e4df03678.tar.xz libpinyin-7fb3ef7d2e49e8d4928d66349b55154e4df03678.zip |
fixes cmake
-rw-r--r-- | CMakeLists.txt | 8 | ||||
-rw-r--r-- | data/CMakeLists.txt | 18 |
2 files changed, 21 insertions, 5 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 0fc0cc0..1cd357e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -24,9 +24,9 @@ enable_testing() set (PACKAGE_URL https://github.com/libpinyin/libpinyin) set (PACKAGE_BUGREPORT https://github.com/libpinyin/libpinyin/issues) set (LIBPINYIN_VERSION_MAJOR 0) -set (LIBPINYIN_VERSION_MINOR 2) -set (LIBPINYIN_VERSION_REVISION 99) -set (LIBPINYIN_BINARY_VERSION 0.3) +set (LIBPINYIN_VERSION_MINOR 7) +set (LIBPINYIN_VERSION_REVISION 0) +set (LIBPINYIN_BINARY_VERSION 2.0) if (CMAKE_BUILD_TYPE MATCHES Debug) set (version_suffix .Debug) @@ -137,7 +137,7 @@ include_directories( ######## Subdirectories -add_subdirectory(data) add_subdirectory(src) add_subdirectory(tests) add_subdirectory(utils) +add_subdirectory(data) 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 +) |