~ubuntu-branches/ubuntu/karmic/kdepim/karmic-backports

« back to all changes in this revision

Viewing changes to akonadi/cmake/modules/FindOpenChange.cmake

  • Committer: Bazaar Package Importer
  • Author(s): Christian Mangold
  • Date: 2009-07-10 06:34:50 UTC
  • mfrom: (1.1.40 upstream)
  • Revision ID: james.westby@ubuntu.com-20090710063450-neojgew2fh0n3y0u
Tags: 4:4.2.96-0ubuntu1
* New upstream release
* Bump kde build-deps to 4.2.96

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# - Try to find the OpenChange MAPI library
2
 
# Once done this will define
3
 
#
4
 
#  LIBMAPI_FOUND - system has OpenChange MAPI library (libmapi)
5
 
#  LIBMAPI_INCLUDE_DIRS - the libmapi include directories
6
 
#  LIBMAPI_LIBRARIES - Required libmapi link libraries
7
 
#  LIBMAPI_DEFINITIONS - Compiler switches for libmapi
8
 
#
9
 
# Copyright (C) 2007 Brad Hards (bradh@frogmouth.net)
10
 
#
11
 
# Redistribution and use is allowed according to the terms of the BSD license.
12
 
# For details see the COPYING-CMAKE-SCRIPTS file in kdelibs/cmake/modules/
13
 
 
14
 
if (LIBMAPI_INCLUDE_DIRS AND LIBMAPI_LIBRARIES)
15
 
 
16
 
  # in cache already
17
 
  SET(LIBMAPI_FOUND TRUE)
18
 
 
19
 
else (LIBMAPI_INCLUDE_DIRS AND LIBMAPI_LIBRARIES)
20
 
  if(NOT WIN32)
21
 
    find_package(PkgConfig)
22
 
#TODO: Add QUIET parameter once kdelibs 4.3 is required for kdepim
23
 
#    pkg_check_modules(libmapi QUIET libmapi)
24
 
    pkg_check_modules(libmapi libmapi)
25
 
  endif(NOT WIN32)
26
 
 
27
 
  set(LIBMAPI_DEFINITIONS ${libmapi_CFLAGS})
28
 
  set(LIBMAPI_INCLUDE_DIRS ${libmapi_INCLUDE_DIRS})
29
 
  find_library(LIBMAPI_LIBRARIES NAMES mapi PATHS ${libmapi_LIBRARY_DIRS})
30
 
  
31
 
  if (LIBMAPI_INCLUDE_DIRS AND LIBMAPI_LIBRARIES)
32
 
     set(LIBMAPI_FOUND TRUE)
33
 
  endif (LIBMAPI_INCLUDE_DIRS AND LIBMAPI_LIBRARIES)
34
 
  
35
 
  if (LIBMAPI_FOUND)
36
 
    if (NOT OpenChange_FIND_QUIETLY)
37
 
      message(STATUS "Found OpenChange MAPI library: ${LIBMAPI_LIBRARIES}")
38
 
    endif (NOT OpenChange_FIND_QUIETLY)
39
 
  else (LIBMAPI_FOUND)
40
 
    if (OpenChange_FIND_REQUIRED)
41
 
      message(FATAL_ERROR "Could NOT find OpenChange MAPI library")
42
 
    endif (OpenChange_FIND_REQUIRED)
43
 
  endif (LIBMAPI_FOUND)
44
 
  
45
 
  MARK_AS_ADVANCED(LIBMAPI_INCLUDE_DIRS LIBMAPI_LIBRARIES LIBMAPI_DEFINITIONS)
46
 
  
47
 
endif (LIBMAPI_INCLUDE_DIRS AND LIBMAPI_LIBRARIES)