[Cmake-commits] [cmake-commits] alex committed FindLua50.cmake 1.2 1.3 FindLua51.cmake 1.2 1.3

cmake-commits at cmake.org cmake-commits at cmake.org
Mon Mar 10 13:26:13 EDT 2008


Update of /cvsroot/CMake/CMake/Modules
In directory public:/mounts/ram/cvs-serv8032

Modified Files:
	FindLua50.cmake FindLua51.cmake 
Log Message:
ENH: use the standard find_package_handle_standard_args() for lua 5.0 and
5.1

Alex


Index: FindLua50.cmake
===================================================================
RCS file: /cvsroot/CMake/CMake/Modules/FindLua50.cmake,v
retrieving revision 1.2
retrieving revision 1.3
diff -C 2 -d -r1.2 -r1.3
*** FindLua50.cmake	16 Jan 2008 02:20:11 -0000	1.2
--- FindLua50.cmake	10 Mar 2008 17:26:11 -0000	1.3
***************
*** 1,12 ****
  # Locate Lua library
  # This module defines
! # LUA_LIBRARIES, both lua and lualib
! # LUA_FOUND, if false, do not try to link to Lua 
! # LUA_INCLUDE_DIR, where to find lua.h and lualib.h (and probably lauxlib.h)
  #
  # 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/
--- 1,12 ----
  # Locate Lua library
  # This module defines
! #  LUA_LIBRARIES, both lua and lualib
! #  LUA_FOUND, if false, do not try to link to Lua 
! #  LUA_INCLUDE_DIR, where to find lua.h and lualib.h (and probably lauxlib.h)
  #
  # 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/
***************
*** 93,100 ****
  
  
  
! SET(LUA_FOUND "NO")
! IF(LUA_LIBRARIES AND LUA_INCLUDE_DIR)
!   SET(LUA_FOUND "YES")
! ENDIF(LUA_LIBRARIES AND LUA_INCLUDE_DIR)
  
--- 93,101 ----
  
  
+ 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(Lua50  DEFAULT_MSG  LUA_LIBRARIES LUA_INCLUDE_DIR)
  
! MARK_AS_ADVANCED(LUA_INCLUDE_DIR LUA_LIBRARIES)
  

Index: FindLua51.cmake
===================================================================
RCS file: /cvsroot/CMake/CMake/Modules/FindLua51.cmake,v
retrieving revision 1.2
retrieving revision 1.3
diff -C 2 -d -r1.2 -r1.3
*** FindLua51.cmake	16 Jan 2008 02:20:11 -0000	1.2
--- FindLua51.cmake	10 Mar 2008 17:26:11 -0000	1.3
***************
*** 1,12 ****
  # Locate Lua library
  # This module defines
! # LUA_LIBRARIES
! # LUA_FOUND, if false, do not try to link to Lua 
! # LUA_INCLUDE_DIR, where to find lua.h 
  #
  # 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/
--- 1,12 ----
  # Locate Lua library
  # This module defines
! #  LUA_LIBRARIES
! #  LUA_FOUND, if false, do not try to link to Lua 
! #  LUA_INCLUDE_DIR, where to find lua.h 
  #
  # 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/
***************
*** 58,63 ****
    # include the math library for Unix
    IF(UNIX AND NOT APPLE)
!     FIND_LIBRARY(MATH_LIBRARY_FOR_LUA m)
!     SET( LUA_LIBRARIES "${LUA_LIBRARY};${MATH_LIBRARY_FOR_LUA}" CACHE STRING "Lua Libraries")
    # For Windows and Mac, don't need to explicitly include the math library
    ELSE(UNIX AND NOT APPLE)
--- 58,63 ----
    # include the math library for Unix
    IF(UNIX AND NOT APPLE)
!     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(UNIX AND NOT APPLE)
***************
*** 66,72 ****
  ENDIF(LUA_LIBRARY)
  
! SET(LUA_FOUND "NO")
! IF(LUA_LIBRARIES AND LUA_INCLUDE_DIR)
!   SET(LUA_FOUND "YES")
! ENDIF(LUA_LIBRARIES AND LUA_INCLUDE_DIR)
  
--- 66,74 ----
  ENDIF(LUA_LIBRARY)
  
! 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(Lua50  DEFAULT_MSG  LUA_LIBRARIES LUA_INCLUDE_DIR)
! 
! MARK_AS_ADVANCED(LUA_INCLUDE_DIR LUA_LIBRARIES LUA_LIBRARY LUA_MATH_LIBRARY)
  



More information about the Cmake-commits mailing list