summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeng Wu <alexepico@gmail.com>2016-11-29 16:18:41 +0800
committerPeng Wu <alexepico@gmail.com>2016-11-29 16:18:41 +0800
commit8696a30979374db704aec8e7251489a821be111e (patch)
treef998a5b28caf1dac0be0911500b331d048b7c26c
parente71cc7443ff93e00bb34ce01bbd3440531b542ed (diff)
downloadlibpinyin-8696a30979374db704aec8e7251489a821be111e.tar.gz
fixes cmake files
-rw-r--r--CMakeLists.txt4
-rw-r--r--data/CMakeLists.txt7
2 files changed, 9 insertions, 2 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index feff90f..be6dc11 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -72,6 +72,8 @@ if (DB_FOUND)
include_directories ( ${DB_INCLUDE_DIR} )
SET (LIBS ${LIBS} ${DB_LIBRARIES})
SET (HAVE_BERKELEY_DB 1)
+ SET (CMAKE_CXX_LINK_EXECUTABLE
+ "${CMAKE_CXX_LINK_EXECUTABLE} ${LIBS}")
endif (DB_FOUND)
if (NOT HAVE_BERKELEY_DB)
@@ -81,6 +83,8 @@ if (NOT HAVE_BERKELEY_DB)
include_directories ( ${KyotoCabinet_INCLUDE_PATH} )
SET (LIBS ${LIBS} ${KyotoCabinet_LIBRARY})
SET (HAVE_KYOTO_CABINET 1)
+ SET (CMAKE_CXX_LINK_EXECUTABLE
+ "${CMAKE_CXX_LINK_EXECUTABLE} ${LIBS}")
endif (KyotoCabinet_FOUND)
endif (NOT HAVE_BERKELEY_DB)
diff --git a/data/CMakeLists.txt b/data/CMakeLists.txt
index 05a2fd9..d6d232b 100644
--- a/data/CMakeLists.txt
+++ b/data/CMakeLists.txt
@@ -59,6 +59,8 @@ add_custom_command(
gbk_char.bin
phrase_index.bin
pinyin_index.bin
+ addon_phrase_index.bin
+ addon_pinyin_index.bin
COMMENT
"Building binary model data..."
COMMAND
@@ -67,6 +69,7 @@ add_custom_command(
gen_binary_files
${CMAKE_SOURCE_DIR}/data/gb_char.table
${CMAKE_SOURCE_DIR}/data/gbk_char.table
+ ${CMAKE_SOURCE_DIR}/data/table.conf
)
add_custom_command(
@@ -75,9 +78,9 @@ add_custom_command(
COMMENT
"Building binary bigram data..."
COMMAND
- ${import_interpolation_BIN} < ${CMAKE_SOURCE_DIR}/data/interpolation2.text
+ ${import_interpolation_BIN} --table-dir ${CMAKE_SOURCE_DIR}/data < ${CMAKE_SOURCE_DIR}/data/interpolation2.text
COMMAND
- ${gen_unigram_BIN}
+ ${gen_unigram_BIN} --table-dir ${CMAKE_SOURCE_DIR}/data
DEPENDS
import_interpolation
${CMAKE_SOURCE_DIR}/data/interpolation2.text