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