~ubuntu-branches/ubuntu/raring/quassel/raring-proposed

« back to all changes in this revision

Viewing changes to cmake/modules/FindQCA2.cmake

  • Committer: Bazaar Package Importer
  • Author(s): Scott Kitterman
  • Date: 2010-08-11 12:48:08 UTC
  • mfrom: (1.1.40 upstream)
  • Revision ID: james.westby@ubuntu.com-20100811124808-wl3zpp4gpbzmvn4t
Tags: 0.7~beta1-0ubuntu1
* New upstream beta release
  - Add libqca2-dev to build-depends for blowfish support
* Switch to source format v3 (Quilt) to use .bz2 tarball
  - Drop build-depends on quilt and update debian/rules
  - Add debian/source/format

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
# - Try to find QCA2 (Qt Cryptography Architecture 2)
 
2
# Once done this will define
 
3
#
 
4
#  QCA2_FOUND - system has QCA2
 
5
#  QCA2_INCLUDE_DIR - the QCA2 include directory
 
6
#  QCA2_LIBRARIES - the libraries needed to use QCA2
 
7
#  QCA2_DEFINITIONS - Compiler switches required for using QCA2
 
8
#
 
9
# use pkg-config to get the directories and then use these values
 
10
# in the FIND_PATH() and FIND_LIBRARY() calls
 
11
 
 
12
# Copyright (c) 2006, Michael Larouche, <michael.larouche@kdemail.net>
 
13
#
 
14
# Redistribution and use is allowed according to the terms of the BSD license.
 
15
# For details see the accompanying COPYING-CMAKE-SCRIPTS file.
 
16
 
 
17
include(FindLibraryWithDebug)
 
18
 
 
19
if (QCA2_INCLUDE_DIR AND QCA2_LIBRARIES)
 
20
 
 
21
  # in cache already
 
22
  set(QCA2_FOUND TRUE)
 
23
 
 
24
else (QCA2_INCLUDE_DIR AND QCA2_LIBRARIES)
 
25
 
 
26
 
 
27
  if (NOT WIN32)
 
28
    find_package(PkgConfig)
 
29
    pkg_check_modules(PC_QCA2 qca2)
 
30
    set(QCA2_DEFINITIONS ${PC_QCA2_CFLAGS_OTHER})
 
31
  endif (NOT WIN32)
 
32
 
 
33
  find_library_with_debug(QCA2_LIBRARIES
 
34
                  WIN32_DEBUG_POSTFIX d
 
35
                  NAMES qca
 
36
                  HINTS ${PC_QCA2_LIBDIR} ${PC_QCA2_LIBRARY_DIRS}
 
37
                  )
 
38
 
 
39
  find_path(QCA2_INCLUDE_DIR qca.h 
 
40
            HINTS ${PC_QCA2_INCLUDEDIR} ${PC_QCA2_INCLUDE_DIRS}
 
41
            PATH_SUFFIXES QtCrypto)
 
42
 
 
43
  include(FindPackageHandleStandardArgs)
 
44
  find_package_handle_standard_args(QCA2 QCA2_LIBRARIES QCA2_INCLUDE_DIR)
 
45
 
 
46
  mark_as_advanced(QCA2_INCLUDE_DIR QCA2_LIBRARIES)
 
47
 
 
48
endif (QCA2_INCLUDE_DIR AND QCA2_LIBRARIES)