~neon/kdenetwork/trunk

« back to all changes in this revision

Viewing changes to kget/cmake/modules/FindLibMms.cmake

  • Committer: uwolfer
  • Date: 2013-06-08 10:12:41 UTC
  • Revision ID: svn-v4:283d02a7-25f6-0310-bc7c-ecb5cbfe19da:trunk/KDE/kdenetwork:1357331
kdenetwork has moved to Git

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# - Try to find the libmms library
2
 
# Once done this will define
3
 
#
4
 
#  LIBMMS_FOUND - system has libmms
5
 
#  LIBMMS_INCLUDE_DIR - the libmms include directory
6
 
#  LIBMMS_LIBRARIES - Link these to use libmms
7
 
 
8
 
# Copyright (c) 2007 Joris Guisson <joris.guisson@gmail.com>
9
 
# Copyright (c) 2007 Charles Connell <charles@connells.org> (This was based upon FindKopete.cmake)
10
 
#
11
 
# Redistribution and use is allowed according to the terms of the BSD license.
12
 
# For details see the accompanying COPYING-CMAKE-SCRIPTS file.
13
 
 
14
 
if(LIBMMS_INCLUDE_DIR AND LIBMMS_LIBRARIES)
15
 
 
16
 
  # read from cache
17
 
  set(LIBMMS_FOUND TRUE)
18
 
 
19
 
else(LIBMMS_INCLUDE_DIR AND LIBMMS_LIBRARIES)
20
 
 
21
 
  FIND_PATH(LIBMMS_INCLUDE_DIR 
22
 
    NAMES
23
 
    mmsx.h
24
 
    PATHS
25
 
    ${INCLUDE_INSTALL_DIR}
26
 
    PATH_SUFFIXES
27
 
    libmms
28
 
    )
29
 
  
30
 
  FIND_LIBRARY(LIBMMS_LIBRARIES 
31
 
    NAMES
32
 
    mms
33
 
    PATHS
34
 
    ${LIB_INSTALL_DIR}
35
 
    )
36
 
  if(LIBMMS_INCLUDE_DIR AND LIBMMS_LIBRARIES)
37
 
    set(LIBMMS_FOUND TRUE)
38
 
  endif(LIBMMS_INCLUDE_DIR AND LIBMMS_LIBRARIES)
39
 
 
40
 
  if(LIBMMS_FOUND)
41
 
    if(NOT LIBKTORRENT_FIND_QUIETLY)
42
 
      message(STATUS "Found libmms: ${LIBMMS_LIBRARIES} ")
43
 
    endif(NOT LIBKTORRENT_FIND_QUIETLY)
44
 
  else(LIBMMS_FOUND)
45
 
    if(LIBKTORRENT_FIND_REQUIRED)
46
 
      if(NOT LIBMMS_INCLUDE_DIR)
47
 
    message(FATAL_ERROR "Could not find libmms includes.")
48
 
      endif(NOT LIBMMS_INCLUDE_DIR)
49
 
      if(NOT LIBMMS_LIBRARIES)
50
 
    message(FATAL_ERROR "Could not find libmms library.")
51
 
      endif(NOT LIBMMS_LIBRARIES)
52
 
    else(LIBKTORRENT_FIND_REQUIRED)
53
 
      if(NOT LIBMMS_INCLUDE_DIR)
54
 
        message(STATUS "Could not find libmms includes.")
55
 
      endif(NOT LIBMMS_INCLUDE_DIR)
56
 
      if(NOT LIBMMS_LIBRARIES)
57
 
        message(STATUS "Could not find libmms library.")
58
 
      endif(NOT LIBMMS_LIBRARIES)
59
 
    endif(LIBKTORRENT_FIND_REQUIRED)
60
 
  endif(LIBMMS_FOUND)
61
 
 
62
 
endif(LIBMMS_INCLUDE_DIR AND LIBMMS_LIBRARIES)