2015-11-05 14:32:31 +00:00
|
|
|
cmake_minimum_required(VERSION 3.0 FATAL_ERROR)
|
2015-11-11 19:24:10 +00:00
|
|
|
project(dindexer VERSION 0.1.0 LANGUAGES CXX C)
|
2015-11-05 14:32:31 +00:00
|
|
|
|
2015-11-11 17:08:17 +00:00
|
|
|
list (APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake/Modules)
|
2015-11-11 19:24:10 +00:00
|
|
|
set(PROJECT_VERSION_BETA "1")
|
2015-11-05 14:32:31 +00:00
|
|
|
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -std=c++11")
|
|
|
|
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -std=c++11")
|
|
|
|
|
2015-11-11 19:24:10 +00:00
|
|
|
find_package(Boost 1.53.0 REQUIRED COMPONENTS program_options)
|
2015-11-11 02:01:37 +00:00
|
|
|
find_package(PostgreSQL REQUIRED)
|
2015-11-11 19:24:10 +00:00
|
|
|
find_package(YamlCpp 0.5.1 REQUIRED)
|
|
|
|
|
|
|
|
configure_file(
|
|
|
|
"${PROJECT_SOURCE_DIR}/src/${PROJECT_NAME}Config.h.in"
|
|
|
|
"${PROJECT_BINARY_DIR}/${PROJECT_NAME}Config.h"
|
|
|
|
)
|
2015-11-05 16:22:34 +00:00
|
|
|
|
2015-11-05 14:32:31 +00:00
|
|
|
add_executable(${PROJECT_NAME}
|
|
|
|
src/main.cpp
|
|
|
|
src/filesearcher.cpp
|
|
|
|
src/pathname.cpp
|
2015-11-06 19:48:38 +00:00
|
|
|
src/indexer.cpp
|
2015-11-09 16:50:56 +00:00
|
|
|
src/tiger.c
|
|
|
|
src/tiger.cpp
|
2015-11-11 02:01:37 +00:00
|
|
|
src/pq/connection.cpp
|
|
|
|
src/pq/databaseexception.cpp
|
|
|
|
src/pq/resultset.cpp
|
|
|
|
src/dbbackend.cpp
|
2015-11-11 17:08:17 +00:00
|
|
|
src/settings.cpp
|
2015-11-11 19:24:10 +00:00
|
|
|
src/commandline.cpp
|
2015-11-05 14:32:31 +00:00
|
|
|
)
|
2015-11-05 16:22:34 +00:00
|
|
|
|
|
|
|
target_include_directories(${PROJECT_NAME} SYSTEM
|
2015-11-11 19:24:10 +00:00
|
|
|
INTERFACE ${Boost_INCLUDE_DIRS}
|
2015-11-11 02:01:37 +00:00
|
|
|
PRIVATE ${PostgreSQL_INCLUDE_DIRS}
|
2015-11-11 17:08:17 +00:00
|
|
|
PRIVATE ${YAMLCPP_INCLUDE_DIR}
|
2015-11-11 02:01:37 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
target_include_directories(${PROJECT_NAME}
|
|
|
|
PRIVATE src
|
|
|
|
PRIVATE include
|
2015-11-11 19:24:10 +00:00
|
|
|
PRIVATE ${PROJECT_BINARY_DIR}
|
2015-11-11 02:01:37 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
target_link_libraries(${PROJECT_NAME}
|
|
|
|
${PostgreSQL_LIBRARIES}
|
2015-11-11 17:08:17 +00:00
|
|
|
${YAMLCPP_LIBRARY}
|
2015-11-11 19:24:10 +00:00
|
|
|
${Boost_LIBRARIES}
|
2015-11-05 16:22:34 +00:00
|
|
|
)
|
2015-11-12 14:07:26 +00:00
|
|
|
|
|
|
|
target_compile_definitions(${PROJECT_NAME}
|
|
|
|
PUBLIC WITH_PROGRESS_FEEDBACK
|
|
|
|
)
|