1# - try to find TooN headers
2#
3# Users may optionally supply:
4#  TOON_ROOT_DIR - a prefix to start searching for the toon headers.
5#
6# Cache Variables: (probably not for direct use in your scripts)
7#  TOON_INCLUDE_DIR
8#
9# Non-cache variables you might use in your CMakeLists.txt:
10#  TOON_FOUND
11#  TOON_INCLUDE_DIRS
12#  TOON_LIBRARIES
13#
14# Requires these CMake modules:
15#  FindPackageHandleStandardArgs (known included with CMake >=2.6.2)
16#
17# Original Author:
18# 2009-2010 Ryan Pavlik <rpavlik@iastate.edu> <abiryan@ryand.net>
19# http://academic.cleardefinition.com
20# Iowa State University HCI Graduate Program/VRAC
21#
22# Copyright Iowa State University 2009-2010.
23# Distributed under the Boost Software License, Version 1.0.
24# (See accompanying file LICENSE_1_0.txt or copy at
25# http://www.boost.org/LICENSE_1_0.txt)
26
27set(TOON_ROOT_DIR
28	"${TOON_ROOT_DIR}"
29	CACHE
30	PATH
31	"Path to search for TooN")
32
33###
34# Dependencies
35###
36if(NOT LAPACKLIBS_ROOT_DIR)
37	set(LAPACKLIBS_ROOT_DIR "${TOON_ROOT_DIR}")
38endif()
39find_package(LAPACKLibs QUIET)
40
41###
42# Configure TooN
43###
44find_path(TOON_INCLUDE_DIR
45	NAMES
46	TooN/TooN.h
47	HINTS
48	"${TOON_ROOT_DIR}"
49	PATH_SUFFIXES
50	include)
51mark_as_advanced(TOON_INCLUDE_DIR)
52
53# handle the QUIETLY and REQUIRED arguments and set xxx_FOUND to TRUE if
54# all listed variables are TRUE
55include(FindPackageHandleStandardArgs)
56find_package_handle_standard_args(TooN
57	DEFAULT_MSG
58	TOON_INCLUDE_DIR
59	LAPACKLIBS_FOUND)
60
61if(TOON_FOUND)
62	set(TOON_INCLUDE_DIRS "${TOON_INCLUDE_DIR}")
63	set(TOON_LIBRARIES ${LAPACKLIBS_LIBRARIES})
64	mark_as_advanced(TOON_ROOT_DIR)
65endif()
66
67
68
69