Commit 2f9770185cc57b012df34d1f474cb49d9b23f5d6
- Diff rendering mode:
- inline
- side by side
libstreamanalyzer/CMakeLists.txt
(11 / 19)
|   | |||
| 12 | 12 | ||
| 13 | 13 | ##### global variables ##### | |
| 14 | 14 | ||
| 15 | set(LIBSTREAMANALYZER_VERSION 0.7.1) | ||
| 16 | set(LIBSTREAMANALYZER_SOVERSION 0.7) | ||
| 15 | 17 | option(BUILD_UTILS "build luceneindexer, xmlindexer, rdfindexer, ontoprint utilities" ON) | |
| 16 | 18 | option(BUILD_DEEPTOOLS "build deep find and deepgrep tools" ON) | |
| 17 | 19 | option(ENABLE_EXIV2 | |
| … | … | ||
| 21 | 21 | set(CLUCENE_MIN_VERSION "0.9.21") | |
| 22 | 22 | option(ENABLE_CLUCENE "enable CLucene support (recommended)" ON) | |
| 23 | 23 | ||
| 24 | # definition of LIB_DESTINATION which is the path where the lib is installed | ||
| 25 | set (LIB_SUFFIX "" CACHE STRING "Define suffix of directory name (32/64)" ) | ||
| 26 | set (LIB_DESTINATION "${CMAKE_INSTALL_PREFIX}/lib${LIB_SUFFIX}" CACHE STRING "Library directory name" FORCE) | ||
| 27 | |||
| 24 | 28 | if(NOT MSVC AND NOT CMAKE_SYSTEM MATCHES "SunOS-5*.") | |
| 25 | 29 | add_definitions(-fPIC) | |
| 26 | 30 | endif(NOT MSVC AND NOT CMAKE_SYSTEM MATCHES "SunOS-5*.") | |
| … | … | ||
| 38 | 38 | # check for required packages | |
| 39 | 39 | if(STRIGI_VERSION_STRING) | |
| 40 | 40 | # libstreams is being compiled now too | |
| 41 | set(LIBSTREAMS_INCLUDES ../libstreams/include | ||
| 41 | set(LIBSTREAMS_INCLUDEDIR ../libstreams/include | ||
| 42 | 42 | ${CMAKE_CURRENT_BINARY_DIR}/../libstreams/include | |
| 43 | # ${CMAKE_CURRENT_BINARY_DIR}/../libstreams/lib # REMOVE lib !!! | ||
| 44 | # ${CMAKE_CURRENT_SOURCE_DIR}/../libstreams/lib # REMOVE lib !!! | ||
| 45 | 43 | ) | |
| 46 | #ADD_DEFINITIONS(-DHAVE_CONFIG_H) # REMOVE !!! | ||
| 47 | 44 | else(STRIGI_VERSION_STRING) | |
| 48 | find_package(libstreams REQUIRED) | ||
| 45 | find_package(LibStreams REQUIRED) | ||
| 49 | 46 | endif(STRIGI_VERSION_STRING) | |
| 50 | 47 | find_package(Threads REQUIRED) | |
| 51 | 48 | find_package(LibXml2 REQUIRED) | |
| … | … | ||
| 56 | 56 | ${libstreamanalyzer_BINARY_DIR}/include/strigi/strigi_thread.h) | |
| 57 | 57 | ||
| 58 | 58 | # every directory needs the headers that will be installed | |
| 59 | include_directories(${LIBSTREAMS_INCLUDES}) | ||
| 59 | include_directories(${LIBSTREAMS_INCLUDEDIR}) | ||
| 60 | 60 | include_directories(${libstreamanalyzer_SOURCE_DIR}/include) | |
| 61 | 61 | include_directories(${libstreamanalyzer_BINARY_DIR}/include) | |
| 62 | link_directories(${LIBSTREAMS_LIBRARY_DIRS}) | ||
| 62 | 63 | ||
| 63 | 64 | add_subdirectory(lib) | |
| 64 | 65 | add_subdirectory(plugins) | |
| … | … | ||
| 73 | 73 | file(GLOB STRIGI_HEADERS include/strigi/*.h) | |
| 74 | 74 | install(FILES | |
| 75 | 75 | ${STRIGI_HEADERS} | |
| 76 | ${libstreamanalyzer_BINARY_DIR}/include/strigi/strigi_thread.h | ||
| 76 | 77 | DESTINATION include/strigi | |
| 77 | 78 | ) | |
| 78 | 79 | # ontologies | |
| … | … | ||
| 83 | 83 | DESTINATION share/strigi/fieldproperties/ | |
| 84 | 84 | ) | |
| 85 | 85 | # library | |
| 86 | file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/dummy.cpp "") | ||
| 87 | add_library(streamanalyzer SHARED ${CMAKE_CURRENT_BINARY_DIR}/dummy.cpp) | ||
| 88 | set_target_properties(streamanalyzer PROPERTIES | ||
| 89 | VERSION ${STRIGI_VERSION_STRING} | ||
| 90 | SOVERSION ${STRIGI_VERSION_MAJOR} | ||
| 91 | DEFINE_SYMBOL MAKE_STREAMANALYZER_LIB | ||
| 92 | ) | ||
| 93 | target_link_libraries(streamanalyzer streamanalyzerstatic) | ||
| 94 | install(TARGETS streamanalyzer | ||
| 95 | LIBRARY DESTINATION ${LIB_DESTINATION} | ||
| 96 | RUNTIME DESTINATION bin | ||
| 97 | ARCHIVE DESTINATION ${LIB_DESTINATION} | ||
| 98 | ) | ||
| 99 | 86 | if(NOT WIN32) | |
| 100 | 87 | install(FILES ${CMAKE_CURRENT_BINARY_DIR}/lib/libstreamanalyzer.pc | |
| 101 | 88 | DESTINATION ${LIB_DESTINATION}/pkgconfig) |
|   | |||
| 1 | # | ||
| 2 | # This module looks for libstreams | ||
| 3 | # It will define the following values | ||
| 4 | # | ||
| 5 | # LIBSTREAMS_FOUND | ||
| 6 | # LIBSTREAMS_INCLUDEDIR | ||
| 7 | # LIBSTREAMS_LIBDIR | ||
| 8 | # LIBSTREAMS_LIBS | ||
| 9 | # LIBSTREAMS_VERSION | ||
| 10 | |||
| 11 | if(WIN32) | ||
| 12 | |||
| 13 | file(TO_CMAKE_PATH "$ENV{PROGRAMFILES}" _program_FILES_DIR) | ||
| 14 | find_path(LIBSTREAMS_INCLUDEDIR strigi/strigiconfig.h | ||
| 15 | ${_program_FILES_DIR}/libstreams/include | ||
| 16 | ${CMAKE_INSTALL_PREFIX}/include | ||
| 17 | ${CMAKE_INCLUDE_PATH} | ||
| 18 | ) | ||
| 19 | set(LIBSTREAMS_LIBDIR ${_program_FILES_DIR}/dbus/lib) | ||
| 20 | find_library(LIBSTREAMS_LIBS NAMES streams | ||
| 21 | PATHS | ||
| 22 | ${LIBSTREAMS_LIBDIR} | ||
| 23 | ${CMAKE_INSTALL_PREFIX}/lib | ||
| 24 | ${CMAKE_LIBRARY_PATH} | ||
| 25 | ) | ||
| 26 | |||
| 27 | else(WIN32) | ||
| 28 | |||
| 29 | find_package(PkgConfig REQUIRED) | ||
| 30 | pkg_check_modules(LIBSTREAMS libstreams) | ||
| 31 | |||
| 32 | endif(WIN32) | ||
| 33 | |||
| 34 | if (LibStreams_FIND_REQUIRED) | ||
| 35 | if (NOT LIBSTREAMS_FOUND) | ||
| 36 | message(FATAL_ERROR "Could NOT find libstreams") | ||
| 37 | endif (NOT LIBSTREAMS_FOUND) | ||
| 38 | endif (LibStreams_FIND_REQUIRED) |
|   | |||
| 5 | 5 | #add_subdirectory(tests) | |
| 6 | 6 | #add_subdirectory(fieldproperties) | |
| 7 | 7 | #add_subdirectory(xesam) | |
| 8 | add_definitions(-DMAKE_STREAMANALYZER_LIB) | ||
| 8 | 9 | include_directories( | |
| 9 | 10 | ${LIBXML2_INCLUDE_DIR} | |
| 10 | 11 | ${libstreamanalyzer_SOURCE_DIR}/lib | |
| … | … | ||
| 74 | 74 | ||
| 75 | 75 | add_library(streamanalyzerstatic STATIC ${streamanalyzer_SRCS}) | |
| 76 | 76 | ||
| 77 | set(streamanalyzer_libs streams ${LIBXML2_LIBRARIES} ) | ||
| 77 | set(streamanalyzer_libs ${LIBSTREAMS_LIBRARIES} ${LIBXML2_LIBRARIES} ) | ||
| 78 | 78 | if(HAVE_LIBDL) | |
| 79 | 79 | set(streamanalyzer_libs ${streamanalyzer_libs} ${LIBDL} ) | |
| 80 | 80 | endif(HAVE_LIBDL) | |
| 81 | 81 | target_link_libraries(streamanalyzerstatic ${streamanalyzer_libs} | |
| 82 | 82 | ${CMAKE_THREAD_LIBS_INIT}) | |
| 83 | |||
| 84 | add_library(streamanalyzer SHARED ${streamanalyzer_SRCS}) | ||
| 85 | set_target_properties(streamanalyzer PROPERTIES | ||
| 86 | VERSION ${LIBSTREAMANALYZER_VERSION} | ||
| 87 | SOVERSION ${LIBSTREAMANALYZER_SOVERSION} | ||
| 88 | DEFINE_SYMBOL MAKE_STREAMANALYZER_LIB | ||
| 89 | ) | ||
| 90 | target_link_libraries(streamanalyzer streamanalyzerstatic) | ||
| 91 | install(TARGETS streamanalyzer | ||
| 92 | LIBRARY DESTINATION ${LIB_DESTINATION} | ||
| 93 | RUNTIME DESTINATION bin | ||
| 94 | ARCHIVE DESTINATION ${LIB_DESTINATION} | ||
| 95 | ) | ||
| 83 | 96 | ||
| 84 | 97 | if(NOT WIN32) | |
| 85 | 98 | configure_file(${CMAKE_CURRENT_SOURCE_DIR}/libstreamanalyzer.pc.cmake |
|   | |||
| 6 | 6 | Name: libstreamanalyzer | |
| 7 | 7 | Description: C++ library for extracting text and metadata from files and streams | |
| 8 | 8 | Requires: libstreams | |
| 9 | Version: ${STRIGI_VERSION_MAJOR}.${STRIGI_VERSION_MINOR}.${STRIGI_VERSION_PATCH} | ||
| 9 | Version: ${LIBSTREAMANALYZER_VERSION} | ||
| 10 | 10 | Libs: -L${LIB_DESTINATION} -lstreamanalyzer | |
| 11 | 11 | Cflags: -I${CMAKE_INSTALL_PREFIX}/include |
libstreams/CMakeLists.txt
(5 / 13)
|   | |||
| 5 | 5 | ||
| 6 | 6 | cmake_minimum_required(VERSION 2.6) | |
| 7 | 7 | set(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake") | |
| 8 | include(MacroCheckGccVisibility) | ||
| 8 | 9 | enable_testing() | |
| 9 | 10 | ||
| 10 | 11 | ||
| … | … | ||
| 16 | 16 | set(STRIGI_VERSION_MINOR 7 CACHE INT "Minor Strigi version number" FORCE) | |
| 17 | 17 | set(STRIGI_VERSION_PATCH 1 CACHE INT "Release Strigi version number" FORCE) | |
| 18 | 18 | set(STRIGI_VERSION_STRING "${STRIGI_VERSION_MAJOR}.${STRIGI_VERSION_MINOR}.${STRIGI_VERSION_PATCH}" CACHE STRING "Strigi version string" FORCE) | |
| 19 | set(LIBSTREAMS_VERSION ${STRIGI_VERSION_STRING}) | ||
| 19 | 20 | ||
| 20 | 21 | # definition of LIB_DESTINATION which is the path where the lib is installed | |
| 21 | 22 | set (LIB_SUFFIX "" CACHE STRING "Define suffix of directory name (32/64)" ) | |
| … | … | ||
| 28 | 28 | ||
| 29 | 29 | ##### environment inspection ##### | |
| 30 | 30 | ||
| 31 | # check for visibility support | ||
| 32 | macro_check_gcc_visibility(__STRIGI_HAVE_GCC_VISIBILITY) | ||
| 33 | |||
| 31 | 34 | # check for required packages | |
| 32 | 35 | find_package(ZLIB REQUIRED) | |
| 33 | 36 | find_package(BZip2 REQUIRED) | |
| … | … | ||
| 67 | 67 | DESTINATION ${LIB_DESTINATION}/strigi) | |
| 68 | 68 | ||
| 69 | 69 | # library | |
| 70 | file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/dummy.cpp "") | ||
| 71 | add_library(streams SHARED ${CMAKE_CURRENT_BINARY_DIR}/dummy.cpp) | ||
| 72 | set_target_properties(streams PROPERTIES | ||
| 73 | VERSION ${STRIGI_VERSION_STRING} | ||
| 74 | SOVERSION ${STRIGI_VERSION_MAJOR} | ||
| 75 | DEFINE_SYMBOL MAKE_STREAMS_LIB | ||
| 76 | ) | ||
| 77 | target_link_libraries(streams streamsstatic) | ||
| 78 | install(TARGETS streams | ||
| 79 | LIBRARY DESTINATION ${LIB_DESTINATION} | ||
| 80 | RUNTIME DESTINATION bin | ||
| 81 | ARCHIVE DESTINATION ${LIB_DESTINATION} | ||
| 82 | ) | ||
| 83 | 70 | if(NOT WIN32) | |
| 84 | 71 | install(FILES ${CMAKE_CURRENT_BINARY_DIR}/lib/libstreams.pc | |
| 85 | 72 | DESTINATION ${LIB_DESTINATION}/pkgconfig) |
|   | |||
| 1 | # | ||
| 2 | # Copyright (c) 2006, Alexander Neundorf <neundorf@kde.org> | ||
| 3 | # Copyright (c) 2006, Laurent Montel, <montel@kde.org> | ||
| 4 | # | ||
| 5 | # Redistribution and use is allowed according to the terms of the BSD license. | ||
| 6 | # For details see the accompanying COPYING-CMAKE-SCRIPTS file. | ||
| 7 | |||
| 8 | macro(MACRO_CHECK_GCC_VISIBILITY GccVisibility) | ||
| 9 | if (CMAKE_COMPILER_IS_GNUCXX) | ||
| 10 | include(CheckCXXCompilerFlag) | ||
| 11 | include(MacroEnsureVersion) | ||
| 12 | # visibility support | ||
| 13 | check_cxx_compiler_flag(-fvisibility=hidden ${GccVisibility}) | ||
| 14 | |||
| 15 | # get the gcc version | ||
| 16 | exec_program(${CMAKE_C_COMPILER} ARGS --version OUTPUT_VARIABLE _gcc_version_info) | ||
| 17 | |||
| 18 | string (REGEX MATCH "[345]\\.[0-9]\\.[0-9]" _gcc_version "${_gcc_version_info}") | ||
| 19 | # gcc on mac just reports: "gcc (GCC) 3.3 20030304 ..." without the patch level, handle this here: | ||
| 20 | if (NOT _gcc_version) | ||
| 21 | string (REGEX REPLACE ".*\\(GCC\\).* ([34]\\.[0-9]) .*" "\\1.0" _gcc_version "${_gcc_version_info}") | ||
| 22 | endif (NOT _gcc_version) | ||
| 23 | |||
| 24 | macro_ensure_version("4.1.0" "${_gcc_version}" GCC_IS_NEWER_THAN_4_1) | ||
| 25 | macro_ensure_version("4.2.0" "${_gcc_version}" GCC_IS_NEWER_THAN_4_2) | ||
| 26 | |||
| 27 | set(_GCC_COMPILED_WITH_BAD_ALLOCATOR FALSE) | ||
| 28 | if (GCC_IS_NEWER_THAN_4_1) | ||
| 29 | exec_program(${CMAKE_C_COMPILER} ARGS -v OUTPUT_VARIABLE _gcc_alloc_info) | ||
| 30 | string(REGEX MATCH "(--enable-libstdcxx-allocator=mt)" _GCC_COMPILED_WITH_BAD_ALLOCATOR "${_gcc_alloc_info}") | ||
| 31 | endif (GCC_IS_NEWER_THAN_4_1) | ||
| 32 | |||
| 33 | if (${GccVisibility} AND GCC_IS_NEWER_THAN_4_1 AND NOT _GCC_COMPILED_WITH_BAD_ALLOCATOR AND NOT WIN32) | ||
| 34 | set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fvisibility=hidden") | ||
| 35 | set (KDE4_C_FLAGS "${KDE4_C_FLAGS}" "-fvisibility=hidden") | ||
| 36 | |||
| 37 | if (GCC_IS_NEWER_THAN_4_2) | ||
| 38 | set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fvisibility-inlines-hidden") | ||
| 39 | endif (GCC_IS_NEWER_THAN_4_2) | ||
| 40 | else (${GccVisibility} AND GCC_IS_NEWER_THAN_4_1 AND NOT _GCC_COMPILED_WITH_BAD_ALLOCATOR AND NOT WIN32) | ||
| 41 | set (${GccVisibility} 0) | ||
| 42 | endif (${GccVisibility} AND GCC_IS_NEWER_THAN_4_1 AND NOT _GCC_COMPILED_WITH_BAD_ALLOCATOR AND NOT WIN32) | ||
| 43 | |||
| 44 | else (CMAKE_COMPILER_IS_GNUCXX) | ||
| 45 | set(${GccVisibility} FALSE) | ||
| 46 | endif (CMAKE_COMPILER_IS_GNUCXX) | ||
| 47 | endmacro(MACRO_CHECK_GCC_VISIBILITY) |
|   | |||
| 1 | # This macro compares version numbers of the form "x.y.z" | ||
| 2 | # MACRO_ENSURE_VERSION( FOO_MIN_VERSION FOO_VERSION_FOUND FOO_VERSION_OK) | ||
| 3 | # will set FOO_VERSIN_OK to true if FOO_VERSION_FOUND >= FOO_MIN_VERSION | ||
| 4 | # where both have to be in a 3-part-version format, leading and trailing | ||
| 5 | # text is ok, e.g. | ||
| 6 | # MACRO_ENSURE_VERSION( "2.5.31" "flex 2.5.4a" VERSION_OK) | ||
| 7 | # which means 2.5.31 is required and "flex 2.5.4a" is what was found on the system | ||
| 8 | |||
| 9 | # Copyright (c) 2006, David Faure, <faure@kde.org> | ||
| 10 | # | ||
| 11 | # Redistribution and use is allowed according to the terms of the BSD license. | ||
| 12 | # For details see the accompanying COPYING-CMAKE-SCRIPTS file. | ||
| 13 | |||
| 14 | MACRO(MACRO_ENSURE_VERSION requested_version found_version var_too_old) | ||
| 15 | |||
| 16 | # parse the parts of the version string | ||
| 17 | STRING(REGEX REPLACE "([0-9]+)\\.[0-9]+\\.[0-9]+" "\\1" req_major_vers "${requested_version}") | ||
| 18 | STRING(REGEX REPLACE "[0-9]+\\.([0-9]+)\\.[0-9]+" "\\1" req_minor_vers "${requested_version}") | ||
| 19 | STRING(REGEX REPLACE "[0-9]+\\.[0-9]+\\.([0-9]+)" "\\1" req_patch_vers "${requested_version}") | ||
| 20 | |||
| 21 | STRING(REGEX REPLACE "[^0-9]*([0-9]+)\\.[0-9]+\\.[0-9]+.*" "\\1" found_major_vers "${found_version}") | ||
| 22 | STRING(REGEX REPLACE "[^0-9]*[0-9]+\\.([0-9]+)\\.[0-9]+.*" "\\1" found_minor_vers "${found_version}") | ||
| 23 | STRING(REGEX REPLACE "[^0-9]*[0-9]+\\.[0-9]+\\.([0-9]+).*" "\\1" found_patch_vers "${found_version}") | ||
| 24 | |||
| 25 | # compute an overall version number which can be compared at once | ||
| 26 | MATH(EXPR req_vers_num "${req_major_vers}*10000 + ${req_minor_vers}*100 + ${req_patch_vers}") | ||
| 27 | MATH(EXPR found_vers_num "${found_major_vers}*10000 + ${found_minor_vers}*100 + ${found_patch_vers}") | ||
| 28 | |||
| 29 | if (found_vers_num LESS req_vers_num) | ||
| 30 | set( ${var_too_old} FALSE ) | ||
| 31 | else (found_vers_num LESS req_vers_num) | ||
| 32 | set( ${var_too_old} TRUE ) | ||
| 33 | endif (found_vers_num LESS req_vers_num) | ||
| 34 | |||
| 35 | ENDMACRO(MACRO_ENSURE_VERSION) | ||
| 36 | |||
| 37 | |||
| 38 | # This macro compares version numbers of the form "x.y" | ||
| 39 | # MACRO_ENSURE_VERSION( FOO_MIN_VERSION FOO_VERSION_FOUND FOO_VERSION_OK) | ||
| 40 | # will set FOO_VERSIN_OK to true if FOO_VERSION_FOUND >= FOO_MIN_VERSION | ||
| 41 | # where both have to be in a 2-part-version format, leading and trailing | ||
| 42 | # text is ok, e.g. | ||
| 43 | # MACRO_ENSURE_VERSION( "0.5" "foo 0.6" VERSION_OK) | ||
| 44 | # which means 0.5 is required and "foo 0.6" is what was found on the system | ||
| 45 | |||
| 46 | # Copyright (c) 2006, David Faure, <faure@kde.org> | ||
| 47 | # Copyright (c) 2007, Pino Toscano, <pino@kde.org> | ||
| 48 | # | ||
| 49 | # Redistribution and use is allowed according to the terms of the BSD license. | ||
| 50 | # For details see the accompanying COPYING-CMAKE-SCRIPTS file. | ||
| 51 | |||
| 52 | MACRO(MACRO_ENSURE_VERSION2 requested_version found_version var_too_old) | ||
| 53 | |||
| 54 | # parse the parts of the version string | ||
| 55 | STRING(REGEX REPLACE "([0-9]+)\\.[0-9]+" "\\1" req_major_vers "${requested_version}") | ||
| 56 | STRING(REGEX REPLACE "[0-9]+\\.([0-9]+)" "\\1" req_minor_vers "${requested_version}") | ||
| 57 | |||
| 58 | STRING(REGEX REPLACE "[^0-9]*([0-9]+)\\.[0-9]+.*" "\\1" found_major_vers "${found_version}") | ||
| 59 | STRING(REGEX REPLACE "[^0-9]*[0-9]+\\.([0-9]+).*" "\\1" found_minor_vers "${found_version}") | ||
| 60 | |||
| 61 | # compute an overall version number which can be compared at once | ||
| 62 | MATH(EXPR req_vers_num "${req_major_vers}*100 + ${req_minor_vers}") | ||
| 63 | MATH(EXPR found_vers_num "${found_major_vers}*100 + ${found_minor_vers}") | ||
| 64 | |||
| 65 | if (found_vers_num LESS req_vers_num) | ||
| 66 | set( ${var_too_old} FALSE ) | ||
| 67 | else (found_vers_num LESS req_vers_num) | ||
| 68 | set( ${var_too_old} TRUE ) | ||
| 69 | endif (found_vers_num LESS req_vers_num) | ||
| 70 | |||
| 71 | ENDMACRO(MACRO_ENSURE_VERSION2) |
libstreams/lib/CMakeLists.txt
(15 / 0)
|   | |||
| 1 | 1 | # This directory builds only the library libstreams | |
| 2 | add_definitions(-DMAKE_STREAMS_LIB) | ||
| 2 | 3 | ||
| 3 | 4 | include_directories( | |
| 4 | 5 | ${ZLIB_INCLUDE_DIR} | |
| … | … | ||
| 54 | 54 | set(streams_SRCS ${streams_SRCS} compat.cpp) | |
| 55 | 55 | ||
| 56 | 56 | add_library(streamsstatic STATIC ${streams_SRCS}) | |
| 57 | set_target_properties(streamsstatic PROPERTIES DEFINE_SYMBOL MAKE_STREAMS_LIB) | ||
| 58 | |||
| 59 | add_library(streams SHARED ${streams_SRCS}) | ||
| 60 | set_target_properties(streams PROPERTIES | ||
| 61 | VERSION ${STRIGI_VERSION_STRING} | ||
| 62 | SOVERSION ${STRIGI_VERSION_MAJOR} | ||
| 63 | DEFINE_SYMBOL MAKE_STREAMS_LIB | ||
| 64 | ) | ||
| 65 | target_link_libraries(streams streamsstatic) | ||
| 66 | install(TARGETS streams | ||
| 67 | LIBRARY DESTINATION ${LIB_DESTINATION} | ||
| 68 | RUNTIME DESTINATION bin | ||
| 69 | ARCHIVE DESTINATION ${LIB_DESTINATION} | ||
| 70 | ) | ||
| 57 | 71 | ||
| 58 | 72 | ||
| 59 | 73 | target_link_libraries(streamsstatic ${ZLIB_LIBRARIES} ${BZIP2_LIBRARIES} ${ICONV_LIBRARIES}) |
|   | |||
| 5 | 5 | ||
| 6 | 6 | Name: libstreams | |
| 7 | 7 | Description: C++ streams for reading data as streams from various file formats | |
| 8 | Version: ${STRIGI_VERSION_MAJOR}.${STRIGI_VERSION_MINOR}.${STRIGI_VERSION_PATCH} | ||
| 8 | Version: ${LIBSTREAMS_VERSION} | ||
| 9 | 9 | Libs: -L${LIB_DESTINATION} -lstreams | |
| 10 | 10 | Cflags: -I${CMAKE_INSTALL_PREFIX}/include |
strigiutils/CMakeLists.txt
(8 / 6)
|   | |||
| 17 | 17 | # check for required packages | |
| 18 | 18 | if(STRIGI_VERSION_STRING) | |
| 19 | 19 | # if STRIGI_VERSION_STRING is defined, we are compiling the meta-package | |
| 20 | set(LIBSTREAMS_INCLUDES | ||
| 20 | set(LIBSTREAMS_INCLUDEDIR | ||
| 21 | 21 | ../libstreams/include | |
| 22 | 22 | ${CMAKE_CURRENT_BINARY_DIR}/../libstreams/include) | |
| 23 | set(LIBSTREAMANALYZER_INCLUDES | ||
| 23 | set(LIBSTREAMANALYZER_INCLUDEDIR | ||
| 24 | 24 | ../libstreamanalyzer/include | |
| 25 | 25 | ${CMAKE_CURRENT_BINARY_DIR}/../libstreamanalyzer/include) | |
| 26 | 26 | else(STRIGI_VERSION_STRING) | |
| 27 | find_package(libstreams REQUIRED) | ||
| 28 | find_package(libstreamanalyzer REQUIRED) | ||
| 27 | find_package(LibStreams REQUIRED) | ||
| 28 | find_package(LibStreamAnalyzer REQUIRED) | ||
| 29 | 29 | endif(STRIGI_VERSION_STRING) | |
| 30 | include(ConfigureChecks.cmake) | ||
| 30 | 31 | ||
| 31 | 32 | ##### building and testing ##### | |
| 32 | include_directories(${LIBSTREAMS_INCLUDES}) | ||
| 33 | include_directories(${LIBSTREAMANALYZER_INCLUDES}) | ||
| 33 | include_directories(${LIBSTREAMS_INCLUDEDIR}) | ||
| 34 | include_directories(${LIBSTREAMANALYZER_INCLUDEDIR}) | ||
| 35 | link_directories(${LIBSTREAMANALYZER_LIBRARY_DIRS}) | ||
| 34 | 36 | ||
| 35 | 37 | add_subdirectory(bin) | |
| 36 | 38 |
|   | |||
| 1 | #need to find a few default headers: | ||
| 2 | INCLUDE(CheckIncludeFileCXX) | ||
| 3 | CHECK_INCLUDE_FILE_CXX(regex.h HAVE_REGEX_H) # src/dummyindexer/* |
|   | |||
| 4 | 4 | # TODO: install copyright file ! | |
| 5 | 5 | endif(NOT HAVE_REGEX_H) | |
| 6 | 6 | ||
| 7 | include_directories( | ||
| 8 | ../streamanalyzer | ||
| 9 | ../streams | ||
| 10 | ${REGEX_INCLUDE_DIR} | ||
| 11 | ${strigi_BINARY_DIR}/src/streams | ||
| 12 | ) | ||
| 13 | |||
| 14 | 7 | add_executable(dummyindexer dummyindexer.cpp) | |
| 15 | target_link_libraries(dummyindexer streamanalyzer) | ||
| 8 | target_link_libraries(dummyindexer ${LIBSTREAMANALYZER_LIBRARIES}) | ||
| 16 | 9 | ||
| 17 | 10 | add_library(libdeepfind STATIC deepfind.cpp) | |
| 18 | target_link_libraries(libdeepfind streamanalyzer) | ||
| 11 | target_link_libraries(libdeepfind ${LIBSTREAMANALYZER_LIBRARIES}) | ||
| 19 | 12 | ||
| 20 | 13 | add_library(grepindexer STATIC grepindexreader.cpp grepindexmanager.cpp | |
| 21 | 14 | grepindexwriter.cpp ${REGEX_SOURCES}) | |
| 22 | 15 | ||
| 23 | 16 | add_library(libdeepgrep STATIC deepgrep.cpp) | |
| 24 | target_link_libraries(libdeepgrep grepindexer streamanalyzer ${REGEX_LIBRARIES}) | ||
| 17 | target_link_libraries(libdeepgrep grepindexer ${LIBSTREAMANALYZER_LIBRARIES} ${REGEX_LIBRARIES}) | ||
| 25 | 18 | ||
| 26 | 19 | add_executable(greptest grepindexreader.cpp) | |
| 27 | 20 | target_link_libraries(greptest streamanalyzer) | |
| 28 | 21 | ||
| 29 | 22 | if(NOT MSVC) | |
| 30 | 23 | add_executable(analyzerlatencytester analyzerlatencytester.cpp) | |
| 31 | target_link_libraries(analyzerlatencytester streamanalyzer) | ||
| 24 | target_link_libraries(analyzerlatencytester ${LIBSTREAMANALYZER_LIBRARIES}) | ||
| 32 | 25 | endif(NOT MSVC) | |
| 33 | 26 | ||
| 34 | 27 | add_library(grepindex STATIC grepindexmanager.cpp) |
|   | |||
| 1 | # | ||
| 2 | # This module looks for libstreamanalyzer | ||
| 3 | # It will define the following values | ||
| 4 | # | ||
| 5 | # LIBSTREAMANALYZER_FOUND | ||
| 6 | # LIBSTREAMANALYZER_INCLUDEDIR | ||
| 7 | # LIBSTREAMANALYZER_LIBDIR | ||
| 8 | # LIBSTREAMANALYZER_LIBS | ||
| 9 | |||
| 10 | if(WIN32) | ||
| 11 | |||
| 12 | file(TO_CMAKE_PATH "$ENV{PROGRAMFILES}" _program_FILES_DIR) | ||
| 13 | find_path(LIBSTREAMANALYZER_INCLUDEDIR strigi/strigiconfig.h | ||
| 14 | ${_program_FILES_DIR}/libstreamanalyzer/include | ||
| 15 | ${CMAKE_INSTALL_PREFIX}/include | ||
| 16 | ${CMAKE_INCLUDE_PATH} | ||
| 17 | ) | ||
| 18 | set(LIBSTREAMANALYZER_LIBDIR ${_program_FILES_DIR}/dbus/lib) | ||
| 19 | find_library(LIBSTREAMANALYZER_LIBS NAMES streams | ||
| 20 | PATHS | ||
| 21 | ${LIBSTREAMANALYZER_LIBDIR} | ||
| 22 | ${CMAKE_INSTALL_PREFIX}/lib | ||
| 23 | ${CMAKE_LIBRARY_PATH} | ||
| 24 | ) | ||
| 25 | |||
| 26 | else(WIN32) | ||
| 27 | |||
| 28 | find_package(PkgConfig REQUIRED) | ||
| 29 | pkg_check_modules(LIBSTREAMANALYZER libstreamanalyzer) | ||
| 30 | |||
| 31 | endif(WIN32) | ||
| 32 | |||
| 33 | if (LibStreamAnalyzer_FIND_REQUIRED) | ||
| 34 | if (NOT LIBSTREAMANALYZER_FOUND) | ||
| 35 | message(FATAL_ERROR "Could NOT find libstreamanalyzer") | ||
| 36 | endif (NOT LIBSTREAMANALYZER_FOUND) | ||
| 37 | endif (LibStreamAnalyzer_FIND_REQUIRED) |
|   | |||
| 1 | # | ||
| 2 | # This module looks for libstreams | ||
| 3 | # It will define the following values | ||
| 4 | # | ||
| 5 | # LIBSTREAMS_FOUND | ||
| 6 | # LIBSTREAMS_INCLUDEDIR | ||
| 7 | # LIBSTREAMS_LIBDIR | ||
| 8 | # LIBSTREAMS_LIBS | ||
| 9 | # LIBSTREAMS_VERSION | ||
| 10 | |||
| 11 | if(WIN32) | ||
| 12 | |||
| 13 | file(TO_CMAKE_PATH "$ENV{PROGRAMFILES}" _program_FILES_DIR) | ||
| 14 | find_path(LIBSTREAMS_INCLUDEDIR strigi/strigiconfig.h | ||
| 15 | ${_program_FILES_DIR}/libstreams/include | ||
| 16 | ${CMAKE_INSTALL_PREFIX}/include | ||
| 17 | ${CMAKE_INCLUDE_PATH} | ||
| 18 | ) | ||
| 19 | set(LIBSTREAMS_LIBDIR ${_program_FILES_DIR}/dbus/lib) | ||
| 20 | find_library(LIBSTREAMS_LIBS NAMES streams | ||
| 21 | PATHS | ||
| 22 | ${LIBSTREAMS_LIBDIR} | ||
| 23 | ${CMAKE_INSTALL_PREFIX}/lib | ||
| 24 | ${CMAKE_LIBRARY_PATH} | ||
| 25 | ) | ||
| 26 | |||
| 27 | else(WIN32) | ||
| 28 | |||
| 29 | find_package(PkgConfig REQUIRED) | ||
| 30 | pkg_check_modules(LIBSTREAMS libstreams) | ||
| 31 | |||
| 32 | endif(WIN32) | ||
| 33 | |||
| 34 | if (LibStreams_FIND_REQUIRED) | ||
| 35 | if (NOT LIBSTREAMS_FOUND) | ||
| 36 | message(FATAL_ERROR "Could NOT find libstreams") | ||
| 37 | endif (NOT LIBSTREAMS_FOUND) | ||
| 38 | endif (LibStreams_FIND_REQUIRED) |

