2013-10-24 17:08:58 +02:00
|
|
|
set(ALL_DIRECTORIES common)
|
|
|
|
|
|
|
|
foreach(dir ${ALL_DIRECTORIES})
|
|
|
|
link_directories("${concordia_BINARY_DIR}/${dir}")
|
|
|
|
add_subdirectory(${dir})
|
|
|
|
endforeach(dir)
|
|
|
|
|
|
|
|
add_library(concordia SHARED
|
2013-11-28 16:47:57 +01:00
|
|
|
index_searcher.cpp
|
2013-11-14 20:36:34 +01:00
|
|
|
concordia_index.cpp
|
2013-11-12 22:08:37 +01:00
|
|
|
word_map.cpp
|
2013-11-12 16:58:18 +01:00
|
|
|
hash_generator.cpp
|
2013-10-24 17:08:58 +02:00
|
|
|
concordia.cpp
|
|
|
|
concordia_config.cpp
|
|
|
|
concordia_exception.cpp
|
|
|
|
common/logging.cpp
|
2013-12-06 22:29:25 +01:00
|
|
|
common/utils.cpp
|
2013-10-24 17:08:58 +02:00
|
|
|
)
|
|
|
|
|
|
|
|
add_subdirectory(t)
|
|
|
|
# =====================================
|
|
|
|
|
|
|
|
install(TARGETS concordia DESTINATION lib/)
|
|
|
|
install(FILES concordia.hpp DESTINATION include/concordia/)
|
|
|
|
|
2013-12-06 22:29:25 +01:00
|
|
|
# ----------------------------------------------------
|
|
|
|
# libconfig
|
|
|
|
# ----------------------------------------------------
|
|
|
|
find_library(LIBCONFIG_LIB NAMES config++ REQUIRED)
|
|
|
|
find_path(LIBCONFIG_INCLUDE libconfig.h++)
|
|
|
|
|
|
|
|
if(EXISTS ${LIBCONFIG_LIB} AND EXISTS ${LIBCONFIG_INCLUDE})
|
|
|
|
message(STATUS "Found Libconfig")
|
|
|
|
include_directories(${LIBCONFIG_INCLUDE})
|
|
|
|
link_directories(${LIBCONFIG_LIB})
|
|
|
|
endif(EXISTS ${LIBCONFIG_LIB} AND EXISTS ${LIBCONFIG_INCLUDE})
|
|
|
|
|
2013-10-24 17:08:58 +02:00
|
|
|
target_link_libraries(concordia log4cpp)
|
|
|
|
target_link_libraries(concordia ${LIBSTEMMER_LIB})
|
|
|
|
target_link_libraries(concordia ${Boost_LIBRARIES})
|
2013-11-20 17:43:29 +01:00
|
|
|
target_link_libraries(concordia divsufsort)
|
2013-10-24 17:08:58 +02:00
|
|
|
|
|
|
|
if (WITH_RE2)
|
|
|
|
target_link_libraries(concordia re2)
|
|
|
|
if (WITH_PCRE)
|
|
|
|
target_link_libraries(concordia pcrecpp)
|
|
|
|
endif(WITH_PCRE)
|
|
|
|
else(WITH_RE2)
|
|
|
|
if (WITH_PCRE)
|
|
|
|
target_link_libraries(concordia pcrecpp)
|
|
|
|
endif(WITH_PCRE)
|
|
|
|
endif(WITH_RE2)
|
|
|
|
|