Commit 303e832373c8c8612e23ab13fc53194604f14326
- Diff rendering mode:
- inline
- side by side
|   | |||
| 38 | 38 | # check for required packages | |
| 39 | 39 | if(STRIGI_VERSION_STRING) | |
| 40 | 40 | # libstreams is being compiled now too | |
| 41 | set(LIBSTREAMS_INCLUDEDIR ../libstreams/include | ||
| 42 | ${CMAKE_CURRENT_BINARY_DIR}/../libstreams/include | ||
| 43 | ) | ||
| 41 | set(LIBSTREAMS_INCLUDE_DIRS | ||
| 42 | ../libstreams/include | ||
| 43 | ${CMAKE_CURRENT_BINARY_DIR}/../libstreams/include) | ||
| 44 | set(LIBSTREAMS_LIBRARIES streams) | ||
| 44 | 45 | else(STRIGI_VERSION_STRING) | |
| 45 | 46 | find_package(LibStreams REQUIRED) | |
| 46 | 47 | endif(STRIGI_VERSION_STRING) | |
| … | … | ||
| 50 | 50 | find_optional_dep(CLucene ENABLE_CLUCENE CLucene_FOUND "CLucene backend") | |
| 51 | 51 | find_optional_dep(Exiv2 ENABLE_EXIV2 EXIV2_FOUND "indexing of EXIF/IPTC metadata") | |
| 52 | 52 | include(ConfigureChecks.cmake) | |
| 53 | configure_file(LibStreamAnalyzer.cmake.in ${CMAKE_CURRENT_BINARY_DIR}/LibStreamAnalyzerConfig.cmake @ONLY ) | ||
| 53 | 54 | ||
| 54 | 55 | ##### building and testing ##### | |
| 55 | 56 | ||
| … | … | ||
| 58 | 58 | ${libstreamanalyzer_BINARY_DIR}/include/strigi/strigi_thread.h) | |
| 59 | 59 | ||
| 60 | 60 | # every directory needs the headers that will be installed | |
| 61 | include_directories(${LIBSTREAMS_INCLUDEDIR}) | ||
| 61 | include_directories(${LIBSTREAMS_INCLUDE_DIRS}) | ||
| 62 | 62 | include_directories(${libstreamanalyzer_SOURCE_DIR}/include) | |
| 63 | 63 | include_directories(${libstreamanalyzer_BINARY_DIR}/include) | |
| 64 | 64 | link_directories(${LIBSTREAMS_LIBRARY_DIRS}) | |
| … | … | ||
| 78 | 78 | ${libstreamanalyzer_BINARY_DIR}/include/strigi/strigi_thread.h | |
| 79 | 79 | DESTINATION include/strigi | |
| 80 | 80 | ) | |
| 81 | install(FILES ${CMAKE_CURRENT_BINARY_DIR}/LibStreamAnalyzerConfig.cmake | ||
| 82 | DESTINATION ${LIB_DESTINATION}/libstreamanalyzer) | ||
| 81 | 83 | # ontologies | |
| 82 | 84 | file (GLOB STRIGI_ONTOLOGIES share/strigi/fieldproperties/*.rdfs) | |
| 83 | 85 | install(FILES |
|   | |||
| 1 | set(LIBSTREAMANALYZER_FOUND TRUE) | ||
| 2 | set(LIBSTREAMANALYZER_VERSION @LIBSTREAMANALYZER_VERSION@) | ||
| 3 | set(LIBSTREAMANALYZER_INCLUDE_DIRS @CMAKE_INSTALL_PREFIX@/include) | ||
| 4 | set(LIBSTREAMANALYZER_LIBRARY_DIRS @LIB_DESTINATION@) | ||
| 5 | set(LIBSTREAMANALYZER_LIBRARIES streamanalyzer) |
|   | |||
| 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) |
libstreams/CMakeLists.txt
(3 / 0)
|   | |||
| 40 | 40 | # generate the config file include/strigi/strigi-config.h and lib/config.h | |
| 41 | 41 | include(ConfigureChecks.cmake) | |
| 42 | 42 | configure_file(StrigiConfig.cmake.in ${CMAKE_CURRENT_BINARY_DIR}/StrigiConfig.cmake @ONLY ) | |
| 43 | configure_file(LibStreamsConfig.cmake.in ${CMAKE_CURRENT_BINARY_DIR}/LibStreamsConfig.cmake @ONLY ) | ||
| 43 | 44 | ||
| 44 | 45 | ||
| 45 | 46 | ##### building and testing ##### | |
| … | … | ||
| 66 | 66 | ) | |
| 67 | 67 | install(FILES ${CMAKE_CURRENT_BINARY_DIR}/StrigiConfig.cmake | |
| 68 | 68 | DESTINATION ${LIB_DESTINATION}/strigi) | |
| 69 | install(FILES ${CMAKE_CURRENT_BINARY_DIR}/LibStreamsConfig.cmake | ||
| 70 | DESTINATION ${LIB_DESTINATION}/libstreams) | ||
| 69 | 71 | ||
| 70 | 72 | # library | |
| 71 | 73 | if(NOT WIN32) |
|   | |||
| 1 | set(LIBSTREAMS_FOUND TRUE) | ||
| 2 | set(LIBSTREAMS_VERSION @LIBSTREAMS_VERSION@) | ||
| 3 | set(LIBSTREAMS_INCLUDE_DIRS @CMAKE_INSTALL_PREFIX@/include) | ||
| 4 | set(LIBSTREAMS_LIBRARY_DIRS @LIB_DESTINATION@) | ||
| 5 | set(LIBSTREAMS_LIBRARIES streams) |
strigiclient/CMakeLists.txt
(18 / 10)
|   | |||
| 5 | 5 | ||
| 6 | 6 | cmake_minimum_required(VERSION 2.6) | |
| 7 | 7 | set(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake") | |
| 8 | #include(MacroCheckGccVisibility) | ||
| 9 | #include(MacroFindOptionalDep) | ||
| 8 | include(MacroFindOptionalDep) | ||
| 10 | 9 | enable_testing() | |
| 11 | 10 | ||
| 12 | 11 | ||
| … | … | ||
| 13 | 13 | option(ENABLE_QT4 "enable Qt4 GUI" ON) | |
| 14 | 14 | set(QT_MIN_VERSION "4.3.0") | |
| 15 | 15 | ||
| 16 | # definition of LIB_DESTINATION which is the path where the lib is installed | ||
| 17 | set (LIB_SUFFIX "" CACHE STRING "Define suffix of directory name (32/64)" ) | ||
| 18 | set (LIB_DESTINATION "${CMAKE_INSTALL_PREFIX}/lib${LIB_SUFFIX}" CACHE STRING "Library directory name" FORCE) | ||
| 16 | 19 | ||
| 20 | |||
| 17 | 21 | ##### environment inspection ##### | |
| 18 | 22 | find_optional_dep(Qt4 ENABLE_QT4 QT4_FOUND "Qt4 GUI client") | |
| 19 | 23 | if(QT4_FOUND) | |
| … | … | ||
| 28 | 28 | # check for required packages | |
| 29 | 29 | if(STRIGI_VERSION_STRING) | |
| 30 | 30 | # if STRIGI_VERSION_STRING is defined, we are compiling the meta-package | |
| 31 | set(LIBSTREAMS_INCLUDES | ||
| 31 | set(LIBSTREAMS_INCLUDE_DIRS | ||
| 32 | 32 | ../libstreams/include | |
| 33 | 33 | ${CMAKE_CURRENT_BINARY_DIR}/../libstreams/include) | |
| 34 | set(LIBSTREAMANALYZER_INCLUDES | ||
| 34 | set(LIBSTREAMANALYZER_INCLUDE_DIRS | ||
| 35 | 35 | ../libstreamanalyzer/include | |
| 36 | 36 | ${CMAKE_CURRENT_BINARY_DIR}/../libstreamanalyzer/include) | |
| 37 | set(STRIGIDAEMON_INCLUDES | ||
| 37 | set(LIBSEARCHCLIENT_INCLUDE_DIRS | ||
| 38 | 38 | ../strigidaemon/include) | |
| 39 | set(LIBSTREAMS_LIBRARIES streams) | ||
| 40 | set(LIBSTREAMANALYZER_LIBRARIES streamanalyzer) | ||
| 39 | 41 | else(STRIGI_VERSION_STRING) | |
| 40 | find_package(libstreams REQUIRED) | ||
| 41 | find_package(libstreamanalyzer REQUIRED) | ||
| 42 | find_package(LibStreams REQUIRED) | ||
| 43 | find_package(LibStreamAnalyzer REQUIRED) | ||
| 44 | find_package(LibSearchClient REQUIRED) | ||
| 42 | 45 | endif(STRIGI_VERSION_STRING) | |
| 43 | 46 | ||
| 44 | 47 | ##### building and testing ##### | |
| 45 | 48 | ||
| 46 | 49 | ||
| 47 | 50 | # every directory needs the headers that will be installed | |
| 48 | include_directories(${LIBSTREAMS_INCLUDES}) | ||
| 49 | include_directories(${LIBSTREAMANALYZER_INCLUDES}) | ||
| 50 | include_directories(${STRIGIDAEMON_INCLUDES}) | ||
| 51 | include_directories(${LIBSTREAMS_INCLUDE_DIRS}) | ||
| 52 | include_directories(${LIBSTREAMANALYZER_INCLUDE_DIRS}) | ||
| 53 | include_directories(${LIBSEARCHCLIENT_INCLUDE_DIRS}) | ||
| 54 | link_directories(${LIBSTREAMANALYZER_LIBRARY_DIRS}) | ||
| 55 | link_directories(${LIBSEARCHCLIENT_LIBRARY_DIRS}) | ||
| 51 | 56 | ||
| 52 | 57 | add_subdirectory(lib) | |
| 53 | 58 | add_subdirectory(bin) |
|   | |||
| 1 | # FIND_OPTIONAL_DEP macro implements two typical optional dependency handling | ||
| 2 | # approaches: | ||
| 3 | # | ||
| 4 | # Best-effort approach(FORCE_DEPS=OFF): | ||
| 5 | # Link to all enabled optional dependencies if found. Turn off not found | ||
| 6 | # ones, and keep compiling. This greatly benefits hand-compiling from source | ||
| 7 | # if all suggested dependencies are turned on by default. Newly installed | ||
| 8 | # software conveniently integrates with whatever environment it's compiled in. | ||
| 9 | # | ||
| 10 | # Strict dependencies approach(FORCE_DEPS=ON): | ||
| 11 | # All enabled optional dependencies must be found, or compilation aborts. | ||
| 12 | # This approach lets request and ensure specific functionality. The compilation | ||
| 13 | # is deterministic in the sense that everything that's requested is provided | ||
| 14 | # or the process fails. This is the preferred behaviour for automated building | ||
| 15 | # by package managers/distro maintainers. | ||
| 16 | # | ||
| 17 | # Parameters: | ||
| 18 | # _package: the package to load | ||
| 19 | # _found: the name of *_FOUND variable which is set by find_package() | ||
| 20 | # if ${_package} is found. | ||
| 21 | # _enabled: option/variable name which along with FORCE_DEPS options | ||
| 22 | # controls macro behaviour: | ||
| 23 | # ${_enabled} FORCE_DEPS Behaviour | ||
| 24 | # OFF any ${_package} is not loaded | ||
| 25 | # ON ON Try loading ${_package}. If package is | ||
| 26 | # not found, abort(fatal error). | ||
| 27 | # ON OFF Try loading ${_package}. If package is | ||
| 28 | # not found, continue. | ||
| 29 | # _description: a short description of features provided by ${_package}. | ||
| 30 | # Used to display human-readable diagnostic messages | ||
| 31 | |||
| 32 | # macro name changed from FIND_OPTIONAL_PACKAGE to FIND_OPTIONAL_DEP due to | ||
| 33 | # clash with a macro from KDE4 | ||
| 34 | |||
| 35 | # if ON, requested optional deps become required | ||
| 36 | # if OFF, requested optional deps are linked to if found | ||
| 37 | |||
| 38 | OPTION(FORCE_DEPS "Enforce strict dependencies" OFF) | ||
| 39 | |||
| 40 | macro(FIND_OPTIONAL_DEP _package _enabled _found _description) | ||
| 41 | |||
| 42 | if(${_enabled}) | ||
| 43 | if(FORCE_DEPS) | ||
| 44 | find_package(${_package} REQUIRED) | ||
| 45 | else(FORCE_DEPS) | ||
| 46 | find_package(${_package}) | ||
| 47 | endif(FORCE_DEPS) | ||
| 48 | endif(${_enabled}) | ||
| 49 | |||
| 50 | REPORT_OPTIONAL_PACKAGE_STATUS(${_package} ${_enabled} ${_found} ${_description}) | ||
| 51 | |||
| 52 | endmacro(FIND_OPTIONAL_DEP) | ||
| 53 | |||
| 54 | |||
| 55 | macro(REPORT_OPTIONAL_PACKAGE_STATUS _package _enabled _found _description) | ||
| 56 | |||
| 57 | if(${_enabled}) | ||
| 58 | if(${_found}) | ||
| 59 | MESSAGE("** ${_package} is found. Support for ${_description} is enabled") | ||
| 60 | else(${_found}) | ||
| 61 | MESSAGE("** ${_package} not found. Support for ${_description} is disabled") | ||
| 62 | endif(${_found}) | ||
| 63 | else(${_enabled}) | ||
| 64 | MESSAGE("** ${_package} is disabled. No support for ${_description}") | ||
| 65 | endif(${_enabled}) | ||
| 66 | |||
| 67 | endmacro(REPORT_OPTIONAL_PACKAGE_STATUS) |
strigidaemon/CMakeLists.txt
(17 / 19)
|   | |||
| 16 | 16 | option(ENABLE_POLLING "enable monitoring the filesystem via polling" ON) | |
| 17 | 17 | option(ENABLE_LOG4CXX "enable use of the logging framework Log4CXX" ON) | |
| 18 | 18 | ||
| 19 | # definition of LIB_DESTINATION which is the path where the lib is installed | ||
| 20 | set (LIB_SUFFIX "" CACHE STRING "Define suffix of directory name (32/64)" ) | ||
| 21 | set (LIB_DESTINATION "${CMAKE_INSTALL_PREFIX}/lib${LIB_SUFFIX}" CACHE STRING "Library directory name" FORCE) | ||
| 22 | |||
| 19 | 23 | if(NOT MSVC AND NOT CMAKE_SYSTEM MATCHES "SunOS-5*.") | |
| 20 | 24 | add_definitions(-fPIC) | |
| 21 | 25 | endif(NOT MSVC AND NOT CMAKE_SYSTEM MATCHES "SunOS-5*.") | |
| … | … | ||
| 29 | 29 | # check for required packages | |
| 30 | 30 | if(STRIGI_VERSION_STRING) | |
| 31 | 31 | # if STRIGI_VERSION_STRING is defined, we are compiling the meta-package | |
| 32 | set(LIBSTREAMS_INCLUDES | ||
| 32 | set(LIBSTREAMS_INCLUDE_DIRS | ||
| 33 | 33 | ../libstreams/include | |
| 34 | 34 | ${CMAKE_CURRENT_BINARY_DIR}/../libstreams/include) | |
| 35 | set(LIBSTREAMANALYZER_INCLUDES | ||
| 35 | set(LIBSTREAMANALYZER_INCLUDE_DIRS | ||
| 36 | 36 | ../libstreamanalyzer/include | |
| 37 | 37 | ${CMAKE_CURRENT_BINARY_DIR}/../libstreamanalyzer/include) | |
| 38 | set(LIBSTREAMS_LIBRARIES streams) | ||
| 39 | set(LIBSTREAMANALYZER_LIBRARIES streamanalyzer) | ||
| 38 | 40 | else(STRIGI_VERSION_STRING) | |
| 39 | find_package(libstreams REQUIRED) | ||
| 40 | find_package(libstreamanalyzer REQUIRED) | ||
| 41 | find_package(LibStreams REQUIRED) | ||
| 42 | find_package(LibStreamAnalyzer REQUIRED) | ||
| 41 | 43 | endif(STRIGI_VERSION_STRING) | |
| 42 | 44 | find_package(Threads REQUIRED) | |
| 43 | 45 | find_package(LibXml2 REQUIRED) | |
| … | … | ||
| 49 | 49 | #find_optional_dep(CLucene ENABLE_CLUCENE CLucene_FOUND "CLucene backend") | |
| 50 | 50 | #find_optional_dep(Exiv2 ENABLE_EXIV2 EXIV2_FOUND "indexing of EXIF/IPTC metadata") | |
| 51 | 51 | include(ConfigureChecks.cmake) | |
| 52 | configure_file(LibSearchClient.cmake.in ${CMAKE_CURRENT_BINARY_DIR}/LibSearchClientConfig.cmake @ONLY ) | ||
| 52 | 53 | ||
| 53 | 54 | ##### building and testing ##### | |
| 54 | 55 | ||
| 55 | 56 | configure_file(${strigidaemon_SOURCE_DIR}/strigi_thread.h.cmake | |
| 56 | 57 | ${strigidaemon_BINARY_DIR}/include/strigi/strigi_thread.h) | |
| 57 | 58 | ||
| 58 | include_directories(${LIBSTREAMS_INCLUDES}) | ||
| 59 | include_directories(${LIBSTREAMANALYZER_INCLUDES}) | ||
| 59 | include_directories(${LIBSTREAMS_INCLUDE_DIRS}) | ||
| 60 | include_directories(${LIBSTREAMANALYZER_INCLUDE_DIRS}) | ||
| 60 | 61 | include_directories(${strigidaemon_SOURCE_DIR}/include) | |
| 61 | 62 | include_directories(${strigidaemon_BINARY_DIR}/include) | |
| 63 | link_directories(${LIBSTREAMS_LIBRARY_DIRS}) | ||
| 64 | link_directories(${LIBSTREAMANALYZER_LIBRARY_DIRS}) | ||
| 62 | 65 | ||
| 63 | 66 | add_subdirectory(lib) | |
| 64 | 67 | add_subdirectory(bin) | |
| … | … | ||
| 76 | 76 | ${STRIGI_HEADERS} | |
| 77 | 77 | DESTINATION include/strigi | |
| 78 | 78 | ) | |
| 79 | install(FILES ${CMAKE_CURRENT_BINARY_DIR}/LibSearchClientConfig.cmake | ||
| 80 | DESTINATION ${LIB_DESTINATION}/libsearchclient) | ||
| 79 | 81 | file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/dummy.cpp "") | |
| 80 | 82 | add_executable(strigidaemon dummy.cpp) | |
| 81 | 83 | target_link_libraries(strigidaemon libstrigidaemon) | |
| 82 | 84 | install(TARGETS strigidaemon | |
| 83 | 85 | RUNTIME DESTINATION bin) | |
| 84 | 86 | # library | |
| 85 | file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/dummy.cpp "") | ||
| 86 | add_library(searchclient SHARED ${CMAKE_CURRENT_BINARY_DIR}/dummy.cpp) | ||
| 87 | set_target_properties(searchclient PROPERTIES | ||
| 88 | VERSION ${STRIGI_VERSION_STRING} | ||
| 89 | SOVERSION ${STRIGI_VERSION_MAJOR} | ||
| 90 | DEFINE_SYMBOL MAKE_SEARCHCLIENT_LIB | ||
| 91 | ) | ||
| 92 | target_link_libraries(searchclient searchclientstatic) | ||
| 93 | install(TARGETS searchclient | ||
| 94 | LIBRARY DESTINATION ${LIB_DESTINATION} | ||
| 95 | RUNTIME DESTINATION bin | ||
| 96 | ARCHIVE DESTINATION ${LIB_DESTINATION} | ||
| 97 | ) |
|   | |||
| 1 | set(LIBSEARCHCLIENT_FOUND TRUE) | ||
| 2 | set(LIBSEARCHCLIENT_VERSION @LIBSEARCHCLIENT_VERSION@) | ||
| 3 | set(LIBSEARCHCLIENT_INCLUDE_DIRS @CMAKE_INSTALL_PREFIX@/include) | ||
| 4 | set(LIBSEARCHCLIENT_LIBRARY_DIRS @LIB_DESTINATION@) | ||
| 5 | set(LIBSEARCHCLIENT_LIBRARIES searchclient) |
strigidaemon/lib/CMakeLists.txt
(12 / 1)
|   | |||
| 1 | add_library(searchclientstatic STATIC socketclient.cpp asyncsocket.cpp | ||
| 1 | add_library(searchclient SHARED socketclient.cpp asyncsocket.cpp | ||
| 2 | 2 | asyncsocketclient.cpp) | |
| 3 | set_target_properties(searchclient PROPERTIES | ||
| 4 | VERSION ${STRIGI_VERSION_STRING} | ||
| 5 | SOVERSION ${STRIGI_VERSION_MAJOR} | ||
| 6 | DEFINE_SYMBOL MAKE_SEARCHCLIENT_LIB | ||
| 7 | ) | ||
| 8 | target_link_libraries(searchclient ${LIBSTREAMANALYZER_LIBRARIES}) | ||
| 9 | install(TARGETS searchclient | ||
| 10 | LIBRARY DESTINATION ${LIB_DESTINATION} | ||
| 11 | RUNTIME DESTINATION bin | ||
| 12 | ARCHIVE DESTINATION ${LIB_DESTINATION} | ||
| 13 | ) |
strigiutils/CMakeLists.txt
(6 / 4)
|   | |||
| 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_INCLUDEDIR | ||
| 20 | set(LIBSTREAMS_INCLUDE_DIRS | ||
| 21 | 21 | ../libstreams/include | |
| 22 | 22 | ${CMAKE_CURRENT_BINARY_DIR}/../libstreams/include) | |
| 23 | set(LIBSTREAMANALYZER_INCLUDEDIR | ||
| 23 | set(LIBSTREAMANALYZER_INCLUDE_DIRS | ||
| 24 | 24 | ../libstreamanalyzer/include | |
| 25 | 25 | ${CMAKE_CURRENT_BINARY_DIR}/../libstreamanalyzer/include) | |
| 26 | set(LIBSTREAMS_LIBRARIES streams) | ||
| 27 | set(LIBSTREAMANALYZER_LIBRARIES streamanalyzer) | ||
| 26 | 28 | else(STRIGI_VERSION_STRING) | |
| 27 | 29 | find_package(LibStreams REQUIRED) | |
| 28 | 30 | find_package(LibStreamAnalyzer REQUIRED) | |
| … | … | ||
| 32 | 32 | include(ConfigureChecks.cmake) | |
| 33 | 33 | ||
| 34 | 34 | ##### building and testing ##### | |
| 35 | include_directories(${LIBSTREAMS_INCLUDEDIR}) | ||
| 36 | include_directories(${LIBSTREAMANALYZER_INCLUDEDIR}) | ||
| 35 | include_directories(${LIBSTREAMS_INCLUDE_DIRS}) | ||
| 36 | include_directories(${LIBSTREAMANALYZER_INCLUDE_DIRS}) | ||
| 37 | 37 | link_directories(${LIBSTREAMANALYZER_LIBRARY_DIRS}) | |
| 38 | 38 | ||
| 39 | 39 | add_subdirectory(bin) |
|   | |||
| 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) |

