|
|
949600 |
diff -up cmake-2.8.11-rc4/Modules/FindLua52.cmake.lua-52 cmake-2.8.11-rc4/Modules/FindLua52.cmake
|
|
|
949600 |
--- cmake-2.8.11-rc4/Modules/FindLua52.cmake.lua-52 2013-05-13 09:41:15.221278404 -0400
|
|
|
949600 |
+++ cmake-2.8.11-rc4/Modules/FindLua52.cmake 2013-05-13 09:03:43.422233385 -0400
|
|
|
949600 |
@@ -0,0 +1,73 @@
|
|
|
949600 |
+# Locate Lua library
|
|
|
949600 |
+# This module defines
|
|
|
949600 |
+# LUA52_FOUND, if false, do not try to link to Lua
|
|
|
949600 |
+# LUA_LIBRARIES
|
|
|
949600 |
+# LUA_INCLUDE_DIR, where to find lua.h
|
|
|
949600 |
+# LUA_VERSION_STRING, the version of Lua found (since CMake 2.8.8)
|
|
|
949600 |
+#
|
|
|
949600 |
+# Note that the expected include convention is
|
|
|
949600 |
+# #include "lua.h"
|
|
|
949600 |
+# and not
|
|
|
949600 |
+# #include <lua/lua.h>
|
|
|
949600 |
+# This is because, the lua location is not standardized and may exist
|
|
|
949600 |
+# in locations other than lua/
|
|
|
949600 |
+
|
|
|
949600 |
+#=============================================================================
|
|
|
949600 |
+# Copyright 2007-2009 Kitware, Inc.
|
|
|
949600 |
+#
|
|
|
949600 |
+# Distributed under the OSI-approved BSD License (the "License");
|
|
|
949600 |
+# see accompanying file Copyright.txt for details.
|
|
|
949600 |
+#
|
|
|
949600 |
+# This software is distributed WITHOUT ANY WARRANTY; without even the
|
|
|
949600 |
+# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
|
|
949600 |
+# See the License for more information.
|
|
|
949600 |
+#=============================================================================
|
|
|
949600 |
+# (To distribute this file outside of CMake, substitute the full
|
|
|
949600 |
+# License text for the above reference.)
|
|
|
949600 |
+
|
|
|
949600 |
+find_path(LUA_INCLUDE_DIR lua.h
|
|
|
949600 |
+ HINTS
|
|
|
949600 |
+ ENV LUA_DIR
|
|
|
949600 |
+ PATH_SUFFIXES include/lua52 include/lua5.2 include/lua-5.2 include/lua include
|
|
|
949600 |
+ PATHS
|
|
|
949600 |
+ ~/Library/Frameworks
|
|
|
949600 |
+ /Library/Frameworks
|
|
|
949600 |
+ /sw # Fink
|
|
|
949600 |
+ /opt/local # DarwinPorts
|
|
|
949600 |
+ /opt/csw # Blastwave
|
|
|
949600 |
+ /opt
|
|
|
949600 |
+)
|
|
|
949600 |
+
|
|
|
949600 |
+find_library(LUA_LIBRARY
|
|
|
949600 |
+ NAMES lua52 lua5.2 lua-5.2 lua
|
|
|
949600 |
+ HINTS
|
|
|
949600 |
+ ENV LUA_DIR
|
|
|
949600 |
+ PATH_SUFFIXES lib
|
|
|
949600 |
+ PATHS
|
|
|
949600 |
+ ~/Library/Frameworks
|
|
|
949600 |
+ /Library/Frameworks
|
|
|
949600 |
+ /sw
|
|
|
949600 |
+ /opt/local
|
|
|
949600 |
+ /opt/csw
|
|
|
949600 |
+ /opt
|
|
|
949600 |
+)
|
|
|
949600 |
+
|
|
|
949600 |
+if(LUA_LIBRARY)
|
|
|
949600 |
+ # include the math library for Unix
|
|
|
949600 |
+ if(UNIX AND NOT APPLE AND NOT BEOS)
|
|
|
949600 |
+ find_library(LUA_MATH_LIBRARY m)
|
|
|
949600 |
+ set( LUA_LIBRARIES "${LUA_LIBRARY};${LUA_MATH_LIBRARY}" CACHE STRING "Lua Libraries")
|
|
|
949600 |
+ # For Windows and Mac, don't need to explicitly include the math library
|
|
|
949600 |
+ else()
|
|
|
949600 |
+ set( LUA_LIBRARIES "${LUA_LIBRARY}" CACHE STRING "Lua Libraries")
|
|
|
949600 |
+ endif()
|
|
|
949600 |
+endif()
|
|
|
949600 |
+
|
|
|
949600 |
+include(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake)
|
|
|
949600 |
+# handle the QUIETLY and REQUIRED arguments and set LUA_FOUND to TRUE if
|
|
|
949600 |
+# all listed variables are TRUE
|
|
|
949600 |
+FIND_PACKAGE_HANDLE_STANDARD_ARGS(Lua52
|
|
|
949600 |
+ REQUIRED_VARS LUA_LIBRARIES LUA_INCLUDE_DIR)
|
|
|
949600 |
+
|
|
|
949600 |
+mark_as_advanced(LUA_INCLUDE_DIR LUA_LIBRARIES LUA_LIBRARY LUA_MATH_LIBRARY)
|
|
|
949600 |
+
|