2011-03-06 10:07:24 -07:00
|
|
|
# - Try to find the tolua++
|
2011-03-05 15:36:56 -07:00
|
|
|
# Once done this will define
|
|
|
|
#
|
2011-03-26 16:25:36 -06:00
|
|
|
# TOLUA++_FOUND - system has tolua++
|
|
|
|
# TOLUA++_APP - the tolua++ program
|
2011-03-06 10:07:24 -07:00
|
|
|
# TOLUA++_INLUDE_DIR - the tolua++ include directory
|
|
|
|
# TOLUA++_LIBRARY - the tolua++ library
|
2011-03-05 15:36:56 -07:00
|
|
|
|
|
|
|
# Copyright (c) 2011, Pali Rohár <pali.rohar@gmail.com>
|
|
|
|
#
|
|
|
|
# Redistribution and use is allowed according to the terms of the BSD license.
|
|
|
|
# For details see the accompanying COPYING-CMAKE-SCRIPTS file.
|
|
|
|
|
2011-03-06 10:07:24 -07:00
|
|
|
if(TOLUA++_INCLUDE_DIR AND TOLUA++_LIBRARY AND TOLUA++_APP)
|
2011-03-05 15:36:56 -07:00
|
|
|
set(TOLUA++_FOUND true)
|
|
|
|
else()
|
2011-03-06 10:07:24 -07:00
|
|
|
find_path(TOLUA++_INCLUDE_DIR tolua++.h)
|
|
|
|
find_library(TOLUA++_LIBRARY NAMES tolua++ tolua++5.1)
|
|
|
|
find_program(TOLUA++_APP NAMES tolua++ tolua++5.1)
|
|
|
|
|
2011-03-26 16:25:36 -06:00
|
|
|
if(TOLUA++_INCLUDE_DIR AND TOLUA++_LIBRARY AND TOLUA++_APP)
|
2011-03-05 15:36:56 -07:00
|
|
|
set(TOLUA++_FOUND true)
|
2011-03-06 10:07:24 -07:00
|
|
|
message(STATUS "Found program tolua++: ${TOLUA++_APP}")
|
|
|
|
message(STATUS "Found library tolua++: ${TOLUA++_LIBRARY}")
|
|
|
|
else()
|
2011-03-26 16:25:36 -06:00
|
|
|
set(TOLUA++_FOUND false)
|
|
|
|
message(FATAL_ERROR "Could not find library or program tolua++")
|
2011-03-06 10:07:24 -07:00
|
|
|
endif()
|
|
|
|
|
|
|
|
mark_as_advanced(TOLUA++_INCLUDE_DIR AND TOLUA++_LIBRARY AND TOLUA++_APP)
|
2011-03-05 15:36:56 -07:00
|
|
|
endif()
|