diff --git a/CMakeLists.txt b/CMakeLists.txt index cb638c8..8887633 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,23 +1,21 @@ -cmake_minimum_required(VERSION 2.8) +cmake_minimum_required(VERSION 4.2) project(THULAC) -set(SOURCE_FILES - src/cb_decoder.h - src/cb_model.h - src/cb_ngram_feature.h - src/cb_tagging_decoder.h - src/cb_tagging_learner.h - src/dat.h - src/filter.h - src/negword.h - src/postprocess.h - src/preprocess.h - src/punctuation.h - src/thulac_base.h - src/thulac_character.h - src/thulac_raw.h - src/timeword.h - src/verbword.h) +file(GLOB SOURCE_FILES include/*.h) +include_directories(${PROJECT_SOURCE_DIR}/include) + +option(THULAC_BUILD_TARGET "Choose which target to build" "all") add_executable(thulac src/thulac.cc ${SOURCE_FILES}) -add_executable(train src/train_c.cc ${SOURCE_FILES}) \ No newline at end of file +add_executable(thulac_train src/train_c.cc ${SOURCE_FILES}) +add_executable(thulac_test_case test/test_case.cpp ${SOURCE_FILES}) +add_executable(thulac_test src/thulac_test.cc ${SOURCE_FILES}) + +install( + TARGETS thulac + RUNTIME DESTINATION bin/ + LIBRARY DESTINATION lib/ + ARCHIVE DESTINATION lib/) + + +