/CMakeModules/FindLibLastFm.cmake

http://github.com/tomahawk-player/tomahawk · CMake · 27 lines · 11 code · 5 blank · 11 comment · 0 complexity · 8968496ccb078f635652a433c862c7be MD5 · raw file

  1. # - Try to find LibLastFm
  2. #
  3. # LIBLASTFM_FOUND - system has liblastfm
  4. # LIBLASTFM_INCLUDE_DIRS - the liblastfm include directories
  5. # LIBLASTFM_LIBRARIES - link these to use liblastfm
  6. #
  7. # (c) Dominik Schmidt <dev@dominik-schmidt.de>
  8. #
  9. # Include dir
  10. find_path(LIBLASTFM_INCLUDE_DIR
  11. # Track.h doesn't exist in liblastfm-0.3.1, was called Track back then
  12. NAMES lastfm5/Track.h
  13. )
  14. # Finally the library itself
  15. find_library(LIBLASTFM_LIBRARY
  16. NAMES lastfm5
  17. )
  18. set(LIBLASTFM_LIBRARIES ${LIBLASTFM_LIBRARY})
  19. set(LIBLASTFM_INCLUDE_DIRS ${LIBLASTFM_INCLUDE_DIR})
  20. include(FindPackageHandleStandardArgs)
  21. find_package_handle_standard_args(LibLastFm DEFAULT_MSG LIBLASTFM_LIBRARIES LIBLASTFM_INCLUDE_DIRS)
  22. mark_as_advanced(LIBLASTFM_LIBRARIES LIBLASTFM_INCLUDE_DIRS)