diff --git a/CMakeLists.txt b/CMakeLists.txt index c53a8c10b189a89a2658c7ffad2911f7282c2bd9..c15d237cd320dcf25c1fa8e2755e4c80fdd7b544 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -47,4 +47,28 @@ if(MACA_EXPORT) add_subdirectory(maca_export) endif() +#create macaon library target +set(MACAON_LIBRARY_SOURCES + $<TARGET_OBJECTS:maca_common_obj> + $<TARGET_OBJECTS:maca_lemmatizer_obj> + $<TARGET_OBJECTS:maca_tokenizer_obj> + $<TARGET_OBJECTS:maca_lexer_obj> + $<TARGET_OBJECTS:transparse_obj> + $<TARGET_OBJECTS:maca_crf_tagger_obj> +) + +## $<TARGET_OBJECTS:maca_chunker_obj> +## $<TARGET_OBJECTS:maca_tagger_obj> + +#set(CMAKE_SHARED_LINKER_FLAGS "-Wl,--export-all-symbols") +add_library(macaon SHARED ${MACAON_LIBRARY_SOURCES}) +#add_library(macaon_static STATIC ${MACAON_LIBRARY_SOURCES}) +#target_link_libraries(macaon ${LIBM_C_FLAGS} ${GFSM_LIBRARY} ${FST_LIBRARY} ${LIBXML2_LIBRARIES} ${GLIB2_LIBRARIES} ${MINGW_LIBRARIES}) +#set_target_properties(macaon PROPERTIES SOVERSION "${MACAON_VERSION}") +#target_compile_definitions(macaon PUBLIC MACAON_VERSION=${MACAON_VERSION}) +#set(MACAON_LIB_TARGETS ${MACAON_LIB_TARGETS} macaon) +#set_target_properties(macaon_static PROPERTIES OUTPUT_NAME "macaon") +#set(MACAON_STATIC_LIB_TARGETS ${MACAON_STATIC_LIB_TARGETS} macaon_static) + + #set(CMAKE_INSTALL_PREFIX ../) diff --git a/maca_common/CMakeLists.txt b/maca_common/CMakeLists.txt index f54ad51c84a92ad918ecc7d9e855605fa83e5238..4ab7c0e4c1bb0e71215d11dc612199f14fb1814d 100644 --- a/maca_common/CMakeLists.txt +++ b/maca_common/CMakeLists.txt @@ -1,4 +1,4 @@ -set(SOURCES src/util.c +set(SOURCES src/util.c src/hash.c src/dico.c src/word_emb.c @@ -19,6 +19,7 @@ set(SOURCES src/util.c #compiling library add_library(maca_common STATIC ${SOURCES}) +add_library(maca_common_obj OBJECT ${SOURCES}) #compiling, linking and installing executables diff --git a/maca_crf_tagger/CMakeLists.txt b/maca_crf_tagger/CMakeLists.txt index 6df7df6ef265f3d1eafcd632372b032d8aa19344..7b8fa6bc6e72e498a9a7e9113c2d2ee70f798254 100644 --- a/maca_crf_tagger/CMakeLists.txt +++ b/maca_crf_tagger/CMakeLists.txt @@ -1,8 +1,10 @@ include_directories(src) #compiling, linking and installing executables +add_library(maca_crf_tagger_obj OBJECT ./src/simple_tagger.cc) add_executable(crf_barebones_decoder ./src/crf_barebones_decoder.cc) + target_compile_options(crf_barebones_decoder PRIVATE -std=c++11) install (TARGETS crf_barebones_decoder DESTINATION bin) diff --git a/maca_lemmatizer/CMakeLists.txt b/maca_lemmatizer/CMakeLists.txt index a4f7e9da1fccafb07525ef1d29add9ffeb7a5a6f..0e188f87bc802846ed1d261e98479b07b354f18f 100644 --- a/maca_lemmatizer/CMakeLists.txt +++ b/maca_lemmatizer/CMakeLists.txt @@ -3,6 +3,7 @@ set(SOURCES src/context.c) ##compiling library include_directories(src) add_library(maca_lemmatizer_lib STATIC ${SOURCES}) +add_library(maca_lemmatizer_obj OBJECT ${SOURCES}) #compiling, linking and installing executables diff --git a/maca_lexer/CMakeLists.txt b/maca_lexer/CMakeLists.txt index 8c42bcff7ba6efe6b2aa6f55411ce1cee5dd230d..345b376d772c264d8c8e363a74c103e64499b880 100644 --- a/maca_lexer/CMakeLists.txt +++ b/maca_lexer/CMakeLists.txt @@ -3,6 +3,7 @@ set(SOURCES src/context.c) ##compiling library include_directories(src) add_library(maca_lexer_lib STATIC ${SOURCES}) +add_library(maca_lexer_obj OBJECT ${SOURCES}) #compiling, linking and installing executables diff --git a/maca_tokenizer/CMakeLists.txt b/maca_tokenizer/CMakeLists.txt index 0952a2b1400718b74b095ef9aeb76e18976c014a..5a900fe40b7512d46721c203e9725f6eb78695b1 100644 --- a/maca_tokenizer/CMakeLists.txt +++ b/maca_tokenizer/CMakeLists.txt @@ -10,6 +10,7 @@ set(SOURCES ./src/context.c include_directories(./src) add_library(maca_tokenizer_lib STATIC ${SOURCES}) +add_library(maca_tokenizer_obj OBJECT ${SOURCES}) #compiling, linking and installing executables diff --git a/maca_trans_parser/CMakeLists.txt b/maca_trans_parser/CMakeLists.txt index a3cded9233f9abdf656a33a4ba577e004ad525ef..b65e6650f296b87a70d1c6fd6c49a7f5b93404ef 100644 --- a/maca_trans_parser/CMakeLists.txt +++ b/maca_trans_parser/CMakeLists.txt @@ -34,6 +34,7 @@ set(SOURCES src/context.c #compiling library include_directories(src) add_library(transparse STATIC ${SOURCES}) +add_library(transparse_obj OBJECT ${SOURCES}) target_link_libraries(transparse perceptron) #compiling, linking and installing executables