Blob Blame History Raw
diff -up awesome-3.5.6/awesomeConfig.cmake.lua-53 awesome-3.5.6/awesomeConfig.cmake
--- awesome-3.5.6/awesomeConfig.cmake.lua-53	2015-01-16 11:50:17.285481422 -0500
+++ awesome-3.5.6/awesomeConfig.cmake	2015-01-16 11:50:17.288481386 -0500
@@ -64,8 +64,8 @@ a_find_program(CONVERT_EXECUTABLE conver
 include(FindDoxygen)
 # pkg-config
 include(FindPkgConfig)
-# lua 5.2
-include(FindLua52)
+# lua 5.3
+include(${SOURCE_DIR}/FindLua53.cmake)
 # }}}
 
 # {{{ Check if documentation can be build
@@ -189,7 +189,7 @@ else()
 endif()
 
 # Error check
-if(NOT LUA52_FOUND AND NOT LUA51_FOUND AND NOT LUA50_FOUND) # This is a workaround to a cmake bug
+if(NOT LUA53_FOUND AND NOT LUA52_FOUND AND NOT LUA51_FOUND AND NOT LUA50_FOUND) # This is a workaround to a cmake bug
     message(FATAL_ERROR "lua library not found")
 endif()
 
diff -up awesome-3.5.6/FindLua53.cmake.lua-53 awesome-3.5.6/FindLua53.cmake
--- awesome-3.5.6/FindLua53.cmake.lua-53	2015-01-16 11:50:17.288481386 -0500
+++ awesome-3.5.6/FindLua53.cmake	2015-01-16 11:51:33.821555666 -0500
@@ -0,0 +1,92 @@
+# Locate Lua library
+# This module defines
+#  LUA53_FOUND, if false, do not try to link to Lua
+#  LUA_LIBRARIES
+#  LUA_INCLUDE_DIR, where to find lua.h
+#  LUA_VERSION_STRING, the version of Lua found (since CMake 2.8.8)
+#
+# Note that the expected include convention is
+#  #include "lua.h"
+# and not
+#  #include <lua/lua.h>
+# This is because, the lua location is not standardized and may exist
+# in locations other than lua/
+
+#=============================================================================
+# Copyright 2007-2009 Kitware, Inc.
+# All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+# 
+# * Redistributions of source code must retain the above copyright
+#   notice, this list of conditions and the following disclaimer.
+#
+# * Redistributions in binary form must reproduce the above copyright
+#   notice, this list of conditions and the following disclaimer in the
+#   documentation and/or other materials provided with the distribution.
+# 
+# * Neither the names of Kitware, Inc., the Insight Software Consortium,
+#   nor the names of their contributors may be used to endorse or promote
+#   products derived from this software without specific prior written
+#   permission.
+#
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+# HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+find_path(LUA_INCLUDE_DIR lua.h
+  HINTS
+    ENV LUA_DIR
+  PATH_SUFFIXES include/lua53 include/lua5.3 include/lua-5.3 include/lua include
+  PATHS
+  ~/Library/Frameworks
+  /Library/Frameworks
+  /sw # Fink
+  /opt/local # DarwinPorts
+  /opt/csw # Blastwave
+  /opt
+)
+
+find_library(LUA_LIBRARY
+  NAMES lua53 lua5.3 lua-5.3 lua
+  HINTS
+    ENV LUA_DIR
+  PATH_SUFFIXES lib
+  PATHS
+  ~/Library/Frameworks
+  /Library/Frameworks
+  /sw
+  /opt/local
+  /opt/csw
+  /opt
+)
+
+if(LUA_LIBRARY)
+  # include the math library for Unix
+  if(UNIX AND NOT APPLE AND NOT BEOS)
+    find_library(LUA_MATH_LIBRARY m)
+    set( LUA_LIBRARIES "${LUA_LIBRARY};${LUA_MATH_LIBRARY}" CACHE STRING "Lua Libraries")
+  # For Windows and Mac, don't need to explicitly include the math library
+  else()
+    set( LUA_LIBRARIES "${LUA_LIBRARY}" CACHE STRING "Lua Libraries")
+  endif()
+endif()
+
+include(FindPackageHandleStandardArgs)
+# handle the QUIETLY and REQUIRED arguments and set LUA_FOUND to TRUE if
+# all listed variables are TRUE
+FIND_PACKAGE_HANDLE_STANDARD_ARGS(Lua53
+                                  REQUIRED_VARS LUA_LIBRARIES LUA_INCLUDE_DIR)
+
+mark_as_advanced(LUA_INCLUDE_DIR LUA_LIBRARIES LUA_LIBRARY LUA_MATH_LIBRARY)
+