cmake_modules/FindLua.cmake
author unc0rr
Wed, 30 Apr 2014 15:26:50 +0400
changeset 10235 bafca1686867
parent 10232 93afc42147c8
child 10238 7e20804db6a2
permissions -rw-r--r--
Drawn maps optimizer - first steps: - Break paths into segments

# Find liblua
#
# Once done this will define
#  LUA_FOUND - system has Lua
#  LUA_INCLUDE_DIR - the Lua include directory
#  LUA_LIBRARY - The library needed to use Lua
# Copyright (c) 2013, Vittorio Giovara <vittorio.giovara@gmail.com>
#
# Distributed under the OSI-approved BSD License (the "License");
# see accompanying file Copyright.txt for details.
#
# This software is distributed WITHOUT ANY WARRANTY; without even the
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
# See the License for more information.

include(FindPackageHandleStandardArgs)

find_path(LUA_INCLUDE_DIR lua.h
                          PATHS /usr/include /usr/local/include /usr/pkg/include
                          PATH_SUFFIXES lua5.2 lua52)
find_library(LUA_LIBRARY NAMES lua52 lua5.2 lua-5.2 lua
                         PATHS /lib /usr/lib /usr/local/lib /usr/pkg/lib)

find_package_handle_standard_args(Lua DEFAULT_MSG LUA_LIBRARY LUA_INCLUDE_DIR)
mark_as_advanced(LUA_INCLUDE_DIR LUA_LIBRARY)