modify cmakelists.txt

This commit is contained in:
wyy 2013-11-03 08:47:50 -08:00
parent 6f15f1398c
commit 1f4eae5bbc
6 changed files with 30 additions and 22 deletions

View File

@ -1,5 +1,5 @@
PROJECT(CPPJIEBA)
ADD_SUBDIRECTORY(cppjieba)
ADD_SUBDIRECTORY(husky)
ADD_SUBDIRECTORY(limonp)
ADD_SUBDIRECTORY(demo)
ADD_SUBDIRECTORY(src)
ADD_SUBDIRECTORY(src/husky)
ADD_SUBDIRECTORY(src/limonp)
ADD_SUBDIRECTORY(dicts)

1
dicts/CMakeLists.txt Normal file
View File

@ -0,0 +1 @@
INSTALL(FILES hmm_model.gbk hmm_model.utf8 jieba.dict.gbk jieba.dict.utf8 DESTINATION include/CppJieba/Dicts)

View File

@ -1,18 +1,22 @@
ADD_EXECUTABLE(segment.demo segment.cpp)
ADD_EXECUTABLE(server.demo server.cpp)
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 pthread)
SET(EXECUTABLE_OUTPUT_PATH ${PROJECT_BINARY_DIR}/bin)
SET(LIBRARY_OUTPUT_PATH ${PROJECT_BINARY_DIR}/lib)
INCLUDE_DIRECTORIES(./limonp ./husky)
SET(LIBCPPJIEBA_SRC HMMSegment.cpp MixSegment.cpp MPSegment.cpp Trie.cpp)
INCLUDE_DIRECTORIES(../limonp)
ADD_LIBRARY(cppjieba SHARED ${LIBCPPJIEBA_SRC})
ADD_EXECUTABLE(segment segment.cpp)
ADD_EXECUTABLE(server server.cpp)
LINK_DIRECTORIES(husky)
TARGET_LINK_LIBRARIES(segment cppjieba)
TARGET_LINK_LIBRARIES(server cppjieba husky pthread)
SET_TARGET_PROPERTIES(cppjieba PROPERTIES VERSION 1.2 SOVERSION 1)
INSTALL(TARGETS cppjieba LIBRARY DESTINATION lib/CppJieba)
INSTALL(TARGETS segment RUNTIME DESTINATION bin/CppJieba)
INSTALL(TARGETS server RUNTIME DESTINATION bin/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)

View File

@ -1,3 +1,6 @@
SET(LIBRARY_OUTPUT_PATH ${PROJECT_BINARY_DIR}/lib)
SET(LIBHUSKY_SRC Daemon.cpp ServerFrame.cpp)
INCLUDE_DIRECTORIES(../limonp)
ADD_LIBRARY(husky SHARED ${LIBHUSKY_SRC})

View File

@ -1,9 +1,9 @@
#include <iostream>
#include <fstream>
#include <ArgvContext.hpp>
#include "../cppjieba/MPSegment.h"
#include "../cppjieba/HMMSegment.h"
#include "../cppjieba/MixSegment.h"
#include "MPSegment.h"
#include "HMMSegment.h"
#include "MixSegment.h"
using namespace CppJieba;

View File

@ -4,11 +4,11 @@
#include <ctype.h>
#include <string.h>
#include <ArgvContext.hpp>
#include "../husky/Daemon.h"
#include "../husky/ServerFrame.h"
#include "../cppjieba/MPSegment.h"
#include "../cppjieba/HMMSegment.h"
#include "../cppjieba/MixSegment.h"
#include <Daemon.h>
#include <ServerFrame.h>
#include "MPSegment.h"
#include "HMMSegment.h"
#include "MixSegment.h"
using namespace Husky;
using namespace CppJieba;