diff --git a/CMakeLists.txt b/CMakeLists.txt index e77f471c72455c2ed65440c6d714c36e9f7ed9f4..3552d64c3caa2fcf374341f0ae3e63bbc5e79433 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -11,6 +11,16 @@ find_package(Boost REQUIRED COMPONENTS program_options) find_package(fasttext REQUIRED) find_package(Doxygen REQUIRED) +include_directories(${DYNET_INCLUDE_DIR}) +include_directories(${FASTTEXT_INCLUDE_DIR}) + +add_library(Boost SHARED IMPORTED) +set_target_properties(Boost PROPERTIES IMPORTED_LOCATION ${Boost_PROGRAM_OPTIONS_LIBRARY_RELEASE}) +add_library(dynet SHARED IMPORTED) +set_target_properties(dynet PROPERTIES IMPORTED_LOCATION ${DYNET_LIBRARY}) +add_library(fasttext SHARED IMPORTED) +set_target_properties(fasttext PROPERTIES IMPORTED_LOCATION ${FASTTEXT_LIBRARY}) + set(CMAKE_VERBOSE_MAKEFILE 0) set(CMAKE_CXX_STANDARD 11) diff --git a/decoder/CMakeLists.txt b/decoder/CMakeLists.txt index e93aa501c037ca13b0d0cf845617cf8aaf07861b..61021d7d5f2f6854848b290337bb941a0b9b0bb7 100644 --- a/decoder/CMakeLists.txt +++ b/decoder/CMakeLists.txt @@ -3,7 +3,7 @@ FILE(GLOB SOURCES src/*.cpp) add_executable(macaon_decode src/macaon_decode.cpp) target_link_libraries(macaon_decode transition_machine) target_link_libraries(macaon_decode decoder) -target_link_libraries(macaon_decode ${Boost_PROGRAM_OPTIONS_LIBRARY}) +target_link_libraries(macaon_decode Boost) target_link_libraries(macaon_decode errors) install(TARGETS macaon_decode DESTINATION bin) diff --git a/maca_common/CMakeLists.txt b/maca_common/CMakeLists.txt index 80ff9b5f51cf853010f5fdbe573ca0ee30ec1cab..1f66e6ecf8628e6e1b442c2ad3b482b25853f05b 100644 --- a/maca_common/CMakeLists.txt +++ b/maca_common/CMakeLists.txt @@ -1,12 +1,12 @@ FILE(GLOB SOURCES src/*.cpp) add_executable(macaon_compute_l_rules src/macaon_compute_l_rules.cpp) -target_link_libraries(macaon_compute_l_rules ${Boost_PROGRAM_OPTIONS_LIBRARY}) +target_link_libraries(macaon_compute_l_rules Boost) target_link_libraries(macaon_compute_l_rules maca_common) install(TARGETS macaon_compute_l_rules DESTINATION bin) add_executable(macaon_convert_embeddings src/macaon_convert_embeddings.cpp) -target_link_libraries(macaon_convert_embeddings ${Boost_PROGRAM_OPTIONS_LIBRARY}) +target_link_libraries(macaon_convert_embeddings Boost) target_link_libraries(macaon_convert_embeddings maca_common) target_link_libraries(macaon_convert_embeddings dynet) install(TARGETS macaon_convert_embeddings DESTINATION bin) diff --git a/trainer/CMakeLists.txt b/trainer/CMakeLists.txt index 51bcc455c8b55c22a42eb65390eab0cd99b76e13..67d665248e2cdbbda71183a2129e2af603ff75ad 100644 --- a/trainer/CMakeLists.txt +++ b/trainer/CMakeLists.txt @@ -3,7 +3,7 @@ FILE(GLOB SOURCES src/*.cpp) add_executable(macaon_train src/macaon_train.cpp) target_link_libraries(macaon_train transition_machine) target_link_libraries(macaon_train trainer) -target_link_libraries(macaon_train ${Boost_PROGRAM_OPTIONS_LIBRARY}) +target_link_libraries(macaon_train Boost) install(TARGETS macaon_train DESTINATION bin) #compiling library