~ubuntu-branches/ubuntu/vivid/muon/vivid-proposed

« back to all changes in this revision

Viewing changes to cmake/FindQtOAuth.cmake

Tags: upstream-1.3.65
Import upstream version 1.3.65

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
# - Try to find the QtOAuth library
 
2
# Once done this will define
 
3
#
 
4
#  QTOAUTH_FOUND - system has the QtOAuth library
 
5
#  QTOAUTH_INCLUDE_DIR - the QtOAuth include directory
 
6
#  QTOAUTH_LIBRARY - Link this to use the QtOAuth 
 
7
#  QTOAUTH_DEFINITIONS - Compiler switches required for using QOAuth
 
8
#
 
9
# Copyright © 2010, Mehrdad Momeny <mehrdad.momeny@gmail.com>
 
10
# Copyright © 2010, Harald Sitter <apachelogger@ubuntu.com>
 
11
#
 
12
# Redistribution and use is allowed according to the terms of the BSD license.
 
13
# For details see the accompanying COPYING-CMAKE-SCRIPTS file.
 
14
 
 
15
if (QTOAUTH_INCLUDE_DIR AND QTOAUTH_LIBRARY)
 
16
  # in cache already
 
17
  set(QTOAUTH_FOUND TRUE)
 
18
else (QTOAUTH_INCLUDE_DIR AND QTOAUTH_LIBRARY)
 
19
  if (NOT WIN32)
 
20
    find_package(PkgConfig)
 
21
    pkg_check_modules(PC_QTOAUTH QUIET qoauth)
 
22
    set(QTOAUTH_DEFINITIONS ${PC_QTOAUTH_CFLAGS_OTHER})
 
23
  endif(NOT WIN32)
 
24
 
 
25
  find_library(QTOAUTH_LIBRARY NAMES qoauth
 
26
    HINTS ${PC_QTOAUTH_LIBDIR} ${PC_QTOAUTH_LIBRARY_DIRS}
 
27
  )
 
28
 
 
29
  find_path(QTOAUTH_INCLUDE_DIR QtOAuth/interface.h
 
30
    HINTS ${PC_QTOAUTH_INCLUDEDIR} ${PC_QTOAUTH_INCLUDE_DIRS}
 
31
  )
 
32
 
 
33
  include(FindPackageHandleStandardArgs)
 
34
  find_package_handle_standard_args(QtOAuth DEFAULT_MSG QTOAUTH_LIBRARY QTOAUTH_INCLUDE_DIR)
 
35
 
 
36
  mark_as_advanced(QTOAUTH_INCLUDE_DIR QTOAUTH_LIBRARY)
 
37
endif (QTOAUTH_INCLUDE_DIR AND QTOAUTH_LIBRARY)