Blame SOURCES/cmake-2.8.11-rc4-lua-5.2.patch

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