-
Notifications
You must be signed in to change notification settings - Fork 89
/
CMakeLists.txt
45 lines (34 loc) · 1.29 KB
/
CMakeLists.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
cmake_minimum_required (VERSION 2.8.0)
project ("ltp4j")
set (LTP_HOME "/users1/bhan/ggwp/ltp4j/ltp/")
set (LIBRARY_OUTPUT_PATH ${PROJECT_SOURCE_DIR}/libs)
set (JNI_SOURCE_DIR ${PROJECT_SOURCE_DIR}/jni)
include_directories (
${JNI_SOURCE_DIR}
${LTP_HOME}/include
$ENV{JAVA_HOME}/include)
if(WIN32)
include_directories ($ENV{JAVA_HOME}/include/win32)
else(WIN32)
include_directories ($ENV{JAVA_HOME}/include/linux)
endif(WIN32)
if(WIN32)
link_directories (${LTP_HOME}/lib/Debug)
else(WIN32)
link_directories (${LTP_HOME}/lib)
endif(WIN32)
add_library (split_sentence_jni SHARED
${JNI_SOURCE_DIR}/split_sentence_jni.cpp)
target_link_libraries (split_sentence_jni splitsnt)
add_library (segmentor_jni SHARED ${JNI_SOURCE_DIR}/segment_jni.cpp)
target_link_libraries (segmentor_jni segmentor)
add_library(postagger_jni SHARED ${JNI_SOURCE_DIR}/postag_jni.cpp)
target_link_libraries (postagger_jni postagger)
add_library (ner_jni SHARED ${JNI_SOURCE_DIR}/ner_jni.cpp)
target_link_libraries (ner_jni ner)
add_library (parser_jni SHARED ${JNI_SOURCE_DIR}/parser_jni.cpp)
target_link_libraries (parser_jni parser)
add_library (srl_jni SHARED ${JNI_SOURCE_DIR}/srl_jni.cpp)
target_link_libraries (srl_jni srl)
# -----------------------------------------------
# TOOLKIT