File: FindLoudmouth.cmake

package info (click to toggle)
amarok 3.3.1-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 112,168 kB
  • sloc: cpp: 195,056; xml: 4,322; ansic: 2,634; javascript: 673; ruby: 528; python: 507; sh: 252; makefile: 12
file content (46 lines) | stat: -rw-r--r-- 1,215 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
# - Try to find the loudmouth library
# Once done this will define
#
#  LOUDMOUTH_FOUND - system has libgpod
#  LOUDMOUTH_INCLUDE_DIRS - the libgpod include directory
#  LOUDMOUTH_LIBRARIES - Link these to use libgpod
#  LOUDMOUTH_DEFINITIONS - Compiler switches required for using libgpod
#

if (LOUDMOUTH_INCLUDE_DIRS AND LOUDMOUTH_LIBRARIES)

  # in cache already
  set(LOUDMOUTH_FOUND TRUE)

else ()
  if(NOT WIN32)
    # use pkg-config to get the directories and then use these values
    # in the FIND_PATH() and FIND_LIBRARY() calls
    find_package(PkgConfig)
    pkg_search_module(LOUDMOUTH loudmouth-1.0)

  else()

    find_path(LOUDMOUTH_INCLUDE_DIRS loudmouth/loudmouth.h /usr/include/loudmouth-1.0
      ${_LOUDMOUTHIncDir}
    )

    find_library(LOUDMOUTH_LIBRARIES NAMES loudmouth-1
      PATHS
      ${_LOUDMOUTHLinkDir}
    )

  endif()

  if (LOUDMOUTH_INCLUDE_DIRS AND LOUDMOUTH_LIBRARIES)
    set(LOUDMOUTH_FOUND TRUE)
  else ()
    set(LOUDMOUTH_FOUND_FALSE)
  endif ()

  include(FindPackageHandleStandardArgs)
  find_package_handle_standard_args(Loudmouth DEFAULT_MSG LOUDMOUTH_INCLUDE_DIRS LOUDMOUTH_LIBRARIES )
 
  mark_as_advanced(LOUDMOUTH_INCLUDE_DIRS LOUDMOUTH_LIBRARIES)
  
endif ()