~zorba-coders/zorba/bug-1188035-csv

« back to all changes in this revision

Viewing changes to cmake_modules/FindJansson.cmake

  • Committer: Tarmac
  • Author(s): Paul J. Lucas
  • Date: 2012-01-24 01:56:27 UTC
  • mfrom: (79.1.1 data-converters-module)
  • Revision ID: tarmac-20120124015627-v8to61s7w8of53m6
Removed old JSON module. Approved: Matthias Brantner, Paul J. Lucas

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# Copyright 2006-2008 The FLWOR Foundation.
2
 
3
 
# Licensed under the Apache License, Version 2.0 (the "License");
4
 
# you may not use this file except in compliance with the License.
5
 
# You may obtain a copy of the License at
6
 
7
 
# http://www.apache.org/licenses/LICENSE-2.0
8
 
9
 
# Unless required by applicable law or agreed to in writing, software
10
 
# distributed under the License is distributed on an "AS IS" BASIS,
11
 
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
 
# See the License for the specific language governing permissions and
13
 
# limitations under the License.
14
 
#
15
 
# - Find Jansson
16
 
#
17
 
# Once done this will define
18
 
#
19
 
#  Jansson_FOUND        - System has Jansson
20
 
#  Jansson_INCLUDE_DIRS - The Jansson include directories
21
 
#  Jansson_LIBRARIES    - The libraries needed to use Jansson
22
 
 
23
 
IF (Jansson_INCLUDE AND Jansson_LIBRARY)
24
 
   # in cache already
25
 
   SET(Jansson_FIND_QUIETLY TRUE)
26
 
ENDIF (Jansson_INCLUDE AND Jansson_LIBRARY)
27
 
 
28
 
SET(LIBRARY_NAMES jansson jansson.lib Release/jansson.lib bin/jansson.lib bin/Release/jansson.lib)
29
 
FIND_LIBRARY(
30
 
  Jansson_LIBRARY
31
 
  NAMES ${LIBRARY_NAMES}
32
 
  PATHS /usr/lib /usr/local/lib /opt/local/lib ${Jansson_LIBRARIES})
33
 
 
34
 
FIND_PATH(
35
 
  Jansson_INCLUDE
36
 
  NAMES jansson.h
37
 
  PATH_SUFFIXES jansson src
38
 
  PATHS ${Jansson_INCLUDE_DIRS})
39
 
 
40
 
IF(Jansson_LIBRARY AND Jansson_INCLUDE)
41
 
  SET(Jansson_FOUND TRUE)
42
 
  SET(Jansson_LIBRARIES ${Jansson_LIBRARY})
43
 
  SET(Jansson_INCLUDE_DIRS ${Jansson_INCLUDE})
44
 
ELSE(Jansson_LIBRARY AND Jansson_INCLUDE)
45
 
  IF(NOT Jansson_LIBRARY)
46
 
    MESSAGE(STATUS "Jansson static library could not be found matching one of: ${LIBRARY_NAMES}")
47
 
  ENDIF(NOT Jansson_LIBRARY)
48
 
  IF(NOT Jansson_INCLUDE)
49
 
    MESSAGE(STATUS "Jansson source directory could not be found.")
50
 
  ENDIF(NOT Jansson_INCLUDE)
51
 
 
52
 
  SET(Jansson_FOUND FALSE)
53
 
  SET(Jansson_LIBRARIES)
54
 
  SET(Jansson_INCLUDE)
55
 
ENDIF (Jansson_LIBRARY AND Jansson_INCLUDE)
56
 
 
57
 
IF(Jansson_FOUND)
58
 
  IF(NOT Jansson_FIND_QUIETLY)
59
 
    MESSAGE(STATUS "Found Jansson              : ${Jansson_LIBRARY}")
60
 
    MESSAGE(STATUS "Found Jansson include path : ${Jansson_INCLUDE_DIRS}")
61
 
  ENDIF(NOT Jansson_FIND_QUIETLY)
62
 
ELSE(Jansson_FOUND)
63
 
  MESSAGE(STATUS "Could not find Jansson library.")
64
 
ENDIF(Jansson_FOUND)