diff options
author | Peng Wu <alexepico@gmail.com> | 2016-11-29 15:54:21 +0800 |
---|---|---|
committer | Peng Wu <alexepico@gmail.com> | 2016-11-29 15:55:23 +0800 |
commit | e71cc7443ff93e00bb34ce01bbd3440531b542ed (patch) | |
tree | 92bfb22b48d6ec620f46e179b401bac126f366ab | |
parent | 01a316ede141e931b871e066c9b87f5af3a3368f (diff) | |
download | libpinyin-e71cc7443ff93e00bb34ce01bbd3440531b542ed.tar.gz libpinyin-e71cc7443ff93e00bb34ce01bbd3440531b542ed.tar.xz libpinyin-e71cc7443ff93e00bb34ce01bbd3440531b542ed.zip |
update cmake files
-rw-r--r-- | CMakeLists.txt | 16 | ||||
-rw-r--r-- | src/CMakeLists.txt | 6 | ||||
-rw-r--r-- | src/storage/CMakeLists.txt | 27 |
3 files changed, 38 insertions, 11 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index d681ddf..feff90f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -74,13 +74,15 @@ if (DB_FOUND) SET (HAVE_BERKELEY_DB 1) endif (DB_FOUND) -# DBM: Kyoto Cabinet -find_package(KyotoCabinet) -if (KyotoCabinet_FOUND) - include_directories ( ${KyotoCabinet_INCLUDE_PATH} ) - SET (LIBS ${LIBS} ${KyotoCabinet_LIBRARY}) - SET (HAVE_KYOTO_CABINET 1) -endif (KyotoCabinet_FOUND) +if (NOT HAVE_BERKELEY_DB) + # DBM: Kyoto Cabinet + find_package(KyotoCabinet) + if (KyotoCabinet_FOUND) + include_directories ( ${KyotoCabinet_INCLUDE_PATH} ) + SET (LIBS ${LIBS} ${KyotoCabinet_LIBRARY}) + SET (HAVE_KYOTO_CABINET 1) + endif (KyotoCabinet_FOUND) +endif (NOT HAVE_BERKELEY_DB) ######## Windows diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 4e0b09f..070218d 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -24,11 +24,11 @@ set_target_properties( libpinyin PROPERTIES OUTPUT_NAME - pinyin + libpinyin VERSION - 0.0.0 + 10.0.0 SOVERSION - 0 + 10 ) install( diff --git a/src/storage/CMakeLists.txt b/src/storage/CMakeLists.txt index e33e213..26330e0 100644 --- a/src/storage/CMakeLists.txt +++ b/src/storage/CMakeLists.txt @@ -4,7 +4,6 @@ set( set( LIBSTORAGE_HEADERS - chewing_key.h pinyin_custom2.h ) @@ -12,12 +11,38 @@ set( LIBSTORAGE_SOURCES phrase_index.cpp phrase_large_table2.cpp + phrase_large_table3.cpp ngram.cpp tag_utility.cpp + chewing_key.cpp pinyin_parser2.cpp + zhuyin_parser2.cpp + phonetic_key_matrix.cpp chewing_large_table.cpp + chewing_large_table2.cpp + table_info.cpp ) +if (HAVE_BERKELEY_DB) + set( + LIBSTORAGE_SOURCES + ${LIBSTORAGE_SOURCES} + chewing_large_table2_bdb.cpp + ngram_bdb.cpp + phrase_large_table3_bdb.cpp + ) +endif (HAVE_BERKELEY_DB) + +if (HAVE_KYOTO_CABINET) + set( + LIBSTORAGE_SOURCES + ${LIBSTORAGE_SOURCES} + chewing_large_table2_kyotodb.cpp + ngram_kyotodb.cpp + phrase_large_table3_kyotodb.cpp + ) +endif (HAVE_KYOTO_CABINET) + add_library( storage STATIC |