PageRenderTime 82ms CodeModel.GetById 40ms app.highlight 1ms RepoModel.GetById 39ms app.codeStats 0ms

/CMakeModules/FindLibEchonest.cmake

http://github.com/tomahawk-player/tomahawk
CMake | 42 lines | 30 code | 6 blank | 6 comment | 2 complexity | 0ab38750fdc0302a2d4d4fdd6b380117 MD5 | raw file
 1# - Find libechonest
 2# Find the libechonest includes and the libechonest libraries
 3# This module defines
 4# LIBECHONEST_INCLUDE_DIR, root echonest include dir. Include echonest includes with echonest/foo.h
 5# LIBECHONEST_LIBRARY, the path to libechonest
 6# LIBECHONEST_FOUND, whether libechonest was found
 7
 8
 9find_path(LIBECHONEST_INCLUDE_DIR NAMES echonest_export.h
10   HINTS
11   ~/usr/include
12   /opt/local/include
13   /usr/include
14   /usr/local/include
15   /opt/kde4/include
16   ${KDE4_INCLUDE_DIR}
17   PATH_SUFFIXES echonest
18)
19
20find_library( LIBECHONEST_LIBRARY NAMES echonest
21    PATHS
22    ~/usr/lib
23   /opt/local/lib
24   /usr/lib
25   /usr/lib64
26   /usr/local/lib
27   /opt/kde4/lib
28   ${KDE4_LIB_DIR}
29)
30
31
32if(LIBECHONEST_INCLUDE_DIR AND LIBECHONEST_LIBRARY)
33   set(LIBECHONEST_FOUND TRUE)
34   message(STATUS "Found libechonest: ${LIBECHONEST_INCLUDE_DIR}, ${LIBECHONEST_LIBRARY}")
35else(LIBECHONEST_INCLUDE_DIR AND LIBECHONEST_LIBRARY)
36   set(LIBECHONEST_FOUND FALSE)   
37   if (LIBECHONEST_FIND_REQUIRED)
38      message(FATAL_ERROR "Could NOT find required package libechonest")
39   endif(LIBECHONEST_FIND_REQUIRED)
40endif(LIBECHONEST_INCLUDE_DIR AND LIBECHONEST_LIBRARY)
41
42mark_as_advanced(LIBECHONEST_INCLUDE_DIR LIBECHONEST_LIBRARY)