From 8696a30979374db704aec8e7251489a821be111e Mon Sep 17 00:00:00 2001 From: Peng Wu Date: Tue, 29 Nov 2016 16:18:41 +0800 Subject: fixes cmake files --- CMakeLists.txt | 4 ++++ data/CMakeLists.txt | 7 +++++-- 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 -- cgit