~ubuntu-branches/ubuntu/trusty/avogadro/trusty-proposed

« back to all changes in this revision

Viewing changes to cmake/modules/FindOpenBabel2.cmake

  • Committer: Bazaar Package Importer
  • Author(s): Rohan Garg
  • Date: 2011-05-20 18:55:49 UTC
  • mfrom: (3.2.13 sid)
  • Revision ID: james.westby@ubuntu.com-20110520185549-berzu8h9f9330xji
Tags: 1.0.3-1ubuntu1
* Merge from debian, remaining changes (LP: #787458, #784267)
  - Disable builds for ARM as build dependency on libOpenGL and 
    libQtOpenGL

Show diffs side-by-side

added added

removed removed

Lines of Context:
9
9
# Redistribution and use is allowed according to the terms of the BSD license.
10
10
# For details see the accompanying COPYING-CMAKE-SCRIPTS file.
11
11
 
 
12
include (MacroEnsureVersion)
 
13
 
12
14
if (OPENBABEL2_INCLUDE_DIR AND OPENBABEL2_LIBRARIES AND OPENBABEL2_VERSION_MET)
13
15
  # in cache already
14
16
  set(OPENBABEL2_FOUND TRUE)
15
17
 
16
18
else (OPENBABEL2_INCLUDE_DIR AND OPENBABEL2_LIBRARIES AND OPENBABEL2_VERSION_MET)
17
 
  if(EMBED_OPENBABEL)
18
 
    # Building a super-package, rely on the embedded paths
19
 
    set(OPENBABEL2_VERSION_MET TRUE)
20
 
    set(OPENBABEL2_INCLUDE_DIR "${CMAKE_SOURCE_DIR}../openbabel/include")
21
 
    # This is a kludge -- need to ask Marcus how to handle it better
22
 
    find_library(OPENBABEL2_LIBRARIES NAMES openbabel openbabel-2
23
 
      PATHS
24
 
      ${_obLinkDir}
25
 
      ${GNUWIN32_DIR}/lib
26
 
      $ENV{OPENBABEL2_LIBRARIES}
27
 
    )
28
 
  else(EMBED_OPENBABEL)
29
 
  # Typical case -- find an installed OpenBabel
30
19
  if(NOT WIN32)
31
20
 
32
21
    # Use the newer PkgConfig stuff
66
55
      $ENV{OPENBABEL2_LIBRARIES}
67
56
    )
68
57
  endif(OPENBABEL2_VERSION_MET)
69
 
  endif(EMBED_OPENBABEL)
70
58
 
71
59
  if(OPENBABEL2_INCLUDE_DIR AND OPENBABEL2_LIBRARIES AND OPENBABEL2_VERSION_MET)
72
60
    set(OPENBABEL2_FOUND TRUE)