diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 8cd1fc2..22615bb 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -4,5 +4,15 @@ ADD_EXECUTABLE(keywordext.demo keywordext.cpp) INCLUDE_DIRECTORIES(../limonp ../cppjieba ../husky) LINK_DIRECTORIES(../cppjieba ../husky) TARGET_LINK_LIBRARIES(segment.demo cppjieba) -TARGET_LINK_LIBRARIES(server.demo cppjieba husky -lpthread) -TARGET_LINK_LIBRARIES(keywordext.demo cppjieba) +TARGET_LINK_LIBRARIES(server.demo cppjieba husky pthread) + +SET(LIBCPPJIEBA_SRC HMMSegment.cpp MixSegment.cpp MPSegment.cpp Trie.cpp) + +INCLUDE_DIRECTORIES(../limonp) + +ADD_LIBRARY(cppjieba SHARED ${LIBCPPJIEBA_SRC}) + +SET_TARGET_PROPERTIES(cppjieba PROPERTIES VERSION 1.2 SOVERSION 1) + +INSTALL(TARGETS cppjieba LIBRARY DESTINATION lib/CppJieba) +INSTALL(FILES ChineseFilter.hpp HMMSegment.h MPSegment.h structs.h Trie.h globals.h ISegment.hpp MixSegment.h SegmentBase.hpp TransCode.hpp DESTINATION include/CppJieba) diff --git a/src/cppjieba/ChineseFilter.hpp b/src/ChineseFilter.hpp similarity index 100% rename from src/cppjieba/ChineseFilter.hpp rename to src/ChineseFilter.hpp diff --git a/src/cppjieba/HMMSegment.cpp b/src/HMMSegment.cpp similarity index 100% rename from src/cppjieba/HMMSegment.cpp rename to src/HMMSegment.cpp diff --git a/src/cppjieba/HMMSegment.h b/src/HMMSegment.h similarity index 100% rename from src/cppjieba/HMMSegment.h rename to src/HMMSegment.h diff --git a/src/cppjieba/ISegment.hpp b/src/ISegment.hpp similarity index 100% rename from src/cppjieba/ISegment.hpp rename to src/ISegment.hpp diff --git a/src/cppjieba/MPSegment.cpp b/src/MPSegment.cpp similarity index 100% rename from src/cppjieba/MPSegment.cpp rename to src/MPSegment.cpp diff --git a/src/cppjieba/MPSegment.h b/src/MPSegment.h similarity index 100% rename from src/cppjieba/MPSegment.h rename to src/MPSegment.h diff --git a/src/cppjieba/MixSegment.cpp b/src/MixSegment.cpp similarity index 100% rename from src/cppjieba/MixSegment.cpp rename to src/MixSegment.cpp diff --git a/src/cppjieba/MixSegment.h b/src/MixSegment.h similarity index 100% rename from src/cppjieba/MixSegment.h rename to src/MixSegment.h diff --git a/src/cppjieba/SegmentBase.hpp b/src/SegmentBase.hpp similarity index 100% rename from src/cppjieba/SegmentBase.hpp rename to src/SegmentBase.hpp diff --git a/src/cppjieba/TransCode.hpp b/src/TransCode.hpp similarity index 100% rename from src/cppjieba/TransCode.hpp rename to src/TransCode.hpp diff --git a/src/cppjieba/Trie.cpp b/src/Trie.cpp similarity index 100% rename from src/cppjieba/Trie.cpp rename to src/Trie.cpp diff --git a/src/cppjieba/Trie.h b/src/Trie.h similarity index 100% rename from src/cppjieba/Trie.h rename to src/Trie.h diff --git a/src/cppjieba/CMakeLists.txt b/src/cppjieba/CMakeLists.txt deleted file mode 100644 index ec98370..0000000 --- a/src/cppjieba/CMakeLists.txt +++ /dev/null @@ -1,10 +0,0 @@ -SET(LIBCPPJIEBA_SRC HMMSegment.cpp MixSegment.cpp MPSegment.cpp Trie.cpp) - -INCLUDE_DIRECTORIES(../limonp) - -ADD_LIBRARY(cppjieba SHARED ${LIBCPPJIEBA_SRC}) - -SET_TARGET_PROPERTIES(cppjieba PROPERTIES VERSION 1.2 SOVERSION 1) - -INSTALL(TARGETS cppjieba LIBRARY DESTINATION lib/CppJieba) -INSTALL(FILES ChineseFilter.hpp HMMSegment.h MPSegment.h structs.h Trie.h globals.h ISegment.hpp MixSegment.h SegmentBase.hpp TransCode.hpp DESTINATION include/CppJieba) diff --git a/src/cppjieba/globals.h b/src/globals.h similarity index 100% rename from src/cppjieba/globals.h rename to src/globals.h diff --git a/src/cppjieba/structs.h b/src/structs.h similarity index 100% rename from src/cppjieba/structs.h rename to src/structs.h