1
# Copyright 2006-2008 The FLWOR Foundation.
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
7
# http://www.apache.org/licenses/LICENSE-2.0
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.
17
# Once done this will define
19
# Jansson_FOUND - System has Jansson
20
# Jansson_INCLUDE_DIRS - The Jansson include directories
21
# Jansson_LIBRARIES - The libraries needed to use Jansson
23
IF (Jansson_INCLUDE AND Jansson_LIBRARY)
25
SET(Jansson_FIND_QUIETLY TRUE)
26
ENDIF (Jansson_INCLUDE AND Jansson_LIBRARY)
28
SET(LIBRARY_NAMES jansson jansson.lib Release/jansson.lib bin/jansson.lib bin/Release/jansson.lib)
31
NAMES ${LIBRARY_NAMES}
32
PATHS /usr/lib /usr/local/lib /opt/local/lib ${Jansson_LIBRARIES})
37
PATH_SUFFIXES jansson src
38
PATHS ${Jansson_INCLUDE_DIRS})
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)
52
SET(Jansson_FOUND FALSE)
53
SET(Jansson_LIBRARIES)
55
ENDIF (Jansson_LIBRARY AND Jansson_INCLUDE)
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)
63
MESSAGE(STATUS "Could not find Jansson library.")