concordia-library/examples/CMakeLists.txt
2015-05-04 20:40:44 +02:00

45 lines
1.5 KiB
CMake

# Tutorial: http://www.cmake.org/cmake/help/cmake_tutorial.html
cmake_minimum_required(VERSION 2.6)
project(examples CXX)
# Put the path to the examples folder in config.hpp
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/config.hpp.in ${CMAKE_CURRENT_SOURCE_DIR}/config.hpp @ONLY)
# Find boost libraries
find_package(Boost COMPONENTS
serialization unit_test_framework system filesystem program_options iostreams regex locale REQUIRED)
# 1. example - minimal program
add_executable(first first.cpp)
target_link_libraries(first concordia)
target_link_libraries(first config++)
target_link_libraries(first log4cpp)
target_link_libraries(first ${Boost_LIBRARIES})
target_link_libraries(first divsufsort)
target_link_libraries(first utf8case)
# 2. example - simple substring lookup
add_executable(simple_search simple_search.cpp)
target_link_libraries(simple_search concordia)
target_link_libraries(simple_search config++)
target_link_libraries(simple_search log4cpp)
target_link_libraries(simple_search ${Boost_LIBRARIES})
target_link_libraries(simple_search divsufsort)
target_link_libraries(simple_search utf8case)
# 3. example - concordia search
add_executable(concordia_search concordia_search.cpp)
target_link_libraries(concordia_search concordia)
target_link_libraries(concordia_search config++)
target_link_libraries(concordia_search log4cpp)
target_link_libraries(concordia_search ${Boost_LIBRARIES})
target_link_libraries(concordia_search divsufsort)
target_link_libraries(concordia_search utf8case)