3
##### cmake settings #####
5
cmake_minimum_required(VERSION 2.6)
6
set(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake")
7
#include(MacroCheckGccVisibility)
8
#include(MacroFindOptionalDep)
12
##### global variables #####
13
# Set up RPATH handling, so the libs are found if they are installed to a non-standard location.
14
# By default cmake builds the targets with full RPATH to everything in the build directory,
15
# but then removes the RPATH when installing.
16
# These two options below make it set the RPATH of the installed targets to all
17
# RPATH directories outside the current CMAKE_BINARY_DIR and also the library
18
# install directory. Alex
19
set(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE)
20
set(CMAKE_INSTALL_RPATH ${LIB_DESTINATION} )
23
##### environment inspection #####
25
if(${CMAKE_SOURCE_DIR} STREQUAL ${CMAKE_CURRENT_SOURCE_DIR})
26
find_package(LibStreams REQUIRED)
27
find_package(LibStreamAnalyzer REQUIRED)
29
set(LIBSTREAMS_INCLUDE_DIRS
30
${libstreams_SOURCE_DIR}/include
31
${libstreams_BINARY_DIR}/include
33
set(LIBSTREAMANALYZER_INCLUDE_DIRS
34
${libstreamanalyzer_SOURCE_DIR}/include
35
${libstreamanalyzer_BINARY_DIR}/include
37
set(LIBSTREAMS_LIBRARIES streams)
38
set(LIBSTREAMANALYZER_LIBRARIES streamanalyzer)
41
# check for required packages
42
include(ConfigureChecks.cmake)
44
##### building and testing #####
45
include_directories(${LIBSTREAMS_INCLUDE_DIRS})
46
include_directories(${LIBSTREAMANALYZER_INCLUDE_DIRS})
47
link_directories(${LIBSTREAMANALYZER_LIBRARY_DIRS})
52
##### installing #####
53
file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/dummy.cpp "")
55
add_executable(deepfind dummy.cpp)
56
target_link_libraries(deepfind libdeepfind)
57
install(TARGETS deepfind RUNTIME DESTINATION bin)
58
add_executable(deepgrep dummy.cpp)
59
target_link_libraries(deepgrep libdeepgrep)
60
install(TARGETS deepgrep RUNTIME DESTINATION bin)
63
add_executable(xmlindexer dummy.cpp)
64
target_link_libraries(xmlindexer libxmlindexer)
65
install(TARGETS xmlindexer RUNTIME DESTINATION bin)
66
add_executable(rdfindexer dummy.cpp)
67
target_link_libraries(rdfindexer librdfindexer)
68
install(TARGETS rdfindexer RUNTIME DESTINATION bin)