1
# - Try to find the QtOAuth library
2
# Once done this will define
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
9
# Copyright © 2010, Mehrdad Momeny <mehrdad.momeny@gmail.com>
10
# Copyright © 2010, Harald Sitter <apachelogger@ubuntu.com>
12
# Redistribution and use is allowed according to the terms of the BSD license.
13
# For details see the accompanying COPYING-CMAKE-SCRIPTS file.
15
if (QTOAUTH_INCLUDE_DIR AND QTOAUTH_LIBRARY)
17
set(QTOAUTH_FOUND TRUE)
18
else (QTOAUTH_INCLUDE_DIR AND QTOAUTH_LIBRARY)
20
find_package(PkgConfig)
21
pkg_check_modules(PC_QTOAUTH QUIET qoauth)
22
set(QTOAUTH_DEFINITIONS ${PC_QTOAUTH_CFLAGS_OTHER})
25
find_library(QTOAUTH_LIBRARY NAMES qoauth
26
HINTS ${PC_QTOAUTH_LIBDIR} ${PC_QTOAUTH_LIBRARY_DIRS}
29
find_path(QTOAUTH_INCLUDE_DIR QtOAuth/interface.h
30
HINTS ${PC_QTOAUTH_INCLUDEDIR} ${PC_QTOAUTH_INCLUDE_DIRS}
33
include(FindPackageHandleStandardArgs)
34
find_package_handle_standard_args(QtOAuth DEFAULT_MSG QTOAUTH_LIBRARY QTOAUTH_INCLUDE_DIR)
36
mark_as_advanced(QTOAUTH_INCLUDE_DIR QTOAUTH_LIBRARY)
37
endif (QTOAUTH_INCLUDE_DIR AND QTOAUTH_LIBRARY)