mroche / rpms / cmake

Forked from rpms/cmake 3 years ago
Clone

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

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