/CMakeModules/FindCLuceneUnstable.cmake

http://github.com/tomahawk-player/tomahawk · CMake · 37 lines · 18 code · 8 blank · 11 comment · 0 complexity · 0e8abba3134667f396f5a795ae26e1cf MD5 · raw file

  1. # - Try to find clucene-unstable
  2. # This is a workaround for distros, that want to ship a recent enough clucene but don't want to replace the old version
  3. #
  4. # CLUCENEUNSTABLE_FOUND - system has clucene-unstable
  5. # CLUCENE_UNSTABLE_INCLUDE_DIR - the clucene-unstable include directories
  6. # CLUCENE_UNSTABLE_LIBS - link these to use clucene-unstable
  7. #
  8. # (c) Dominik Schmidt <dev@dominik-schmidt.de>
  9. #
  10. # Include dir
  11. find_path(CLUCENE_UNSTABLE_INCLUDE_DIR
  12. NAMES CLucene.h
  13. PATH_SUFFIXES clucene-unstable
  14. PATHS ${KDE4_INCLUDE_DIR}
  15. )
  16. # Finally the library itself
  17. find_library(CLUCENE_UNSTABLE_SHARED_LIB
  18. NAMES clucene-unstable-shared
  19. PATHS ${KDE4_LIB_DIR}
  20. )
  21. find_library(CLUCENE_UNSTABLE_CORE_LIB
  22. NAMES clucene-unstable-core
  23. PATHS ${KDE4_LIB_DIR}
  24. )
  25. SET( CLUCENE_UNSTABLE_LIBS ${CLUCENE_UNSTABLE_SHARED_LIB} ${CLUCENE_UNSTABLE_CORE_LIB} )
  26. SET( CLUCENE_UNSTABLE_INCLUDE_DIRS ${CLUCENE_UNSTABLE_INCLUDE_DIR})
  27. INCLUDE(FindPackageHandleStandardArgs)
  28. FIND_PACKAGE_HANDLE_STANDARD_ARGS(CLuceneUnstable DEFAULT_MSG CLUCENE_UNSTABLE_LIBS CLUCENE_UNSTABLE_INCLUDE_DIRS)
  29. MARK_AS_ADVANCED(CLUCENE_UNSTABLE_LIBS CLUCENE_UNSTABLE_INCLUDE_DIRS)