diff options
author | Peng Wu <alexepico@gmail.com> | 2016-11-29 15:32:38 +0800 |
---|---|---|
committer | Peng Wu <alexepico@gmail.com> | 2016-11-29 15:32:38 +0800 |
commit | abed0b59cbeb3e129082b40df844bf148b8b96db (patch) | |
tree | c625d1d2d658a9f23ec10c666580f15080b9d900 /CMakeLists.txt | |
parent | 710b68d071ee95a58421acbdfca8154ba56502ac (diff) | |
download | libpinyin-abed0b59cbeb3e129082b40df844bf148b8b96db.tar.gz libpinyin-abed0b59cbeb3e129082b40df844bf148b8b96db.tar.xz libpinyin-abed0b59cbeb3e129082b40df844bf148b8b96db.zip |
update cmake files
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 25 |
1 files changed, 24 insertions, 1 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 09421f6..5c49d2f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -58,13 +58,30 @@ check_function_exists(memset HAVE_MEMSET) check_function_exists(realloc HAVE_REALLOC) check_function_exists(setlocale HAVE_SETLOCALE) check_function_exists(stat HAVE_STAT) +check_function_exists(mmap HAVE_MMAP) include(CheckTypeSize) check_type_size(size_t SIZE_OF_SIZE_T) set(CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/cmake) find_package(GLIB2 REQUIRED) -find_package(BerkeleyDB REQUIRED) + +# DBM: BerkeleyDB +find_package(BerkeleyDB) +if (DB_FOUND) + include_directories ( ${DB_INCLUDE_DIR} ) + SET (LIBS ${LIBS} ${DB_LIBRARIES}) + 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) + ######## Windows @@ -117,6 +134,12 @@ configure_file( @ONLY ) +configure_file( + config.h.cmake + config.h + @ONLY +) + install( FILES ${CMAKE_BINARY_DIR}/libpinyin.pc |