|
|
@ -38,11 +38,25 @@ find_path(LUA_INCLUDE_DIR lua.h
|
|
|
|
/opt
|
|
|
|
/opt
|
|
|
|
)
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
|
|
find_library(LUA_LIBRARY
|
|
|
|
FIND_LIBRARY(LUA_LIBRARY
|
|
|
|
NAMES lua53 lua5.3 lua-5.3 lua
|
|
|
|
NAMES lua53 lua5.3 lua-5.3 lua
|
|
|
|
HINTS
|
|
|
|
HINTS
|
|
|
|
ENV LUA_DIR
|
|
|
|
$ENV{LUA_DIR}
|
|
|
|
PATH_SUFFIXES lib
|
|
|
|
PATH_SUFFIXES lib64 lib
|
|
|
|
|
|
|
|
PATHS
|
|
|
|
|
|
|
|
~/Library/Frameworks
|
|
|
|
|
|
|
|
/Library/Frameworks
|
|
|
|
|
|
|
|
/sw
|
|
|
|
|
|
|
|
/opt/local
|
|
|
|
|
|
|
|
/opt/csw
|
|
|
|
|
|
|
|
/opt
|
|
|
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
FIND_LIBRARY(LUA_LIBRARY_DEBUG
|
|
|
|
|
|
|
|
NAMES lua53-d lua5.3-d lua-5.3-d lua-d lua53d lua5.3d lua-5.3d luad
|
|
|
|
|
|
|
|
HINTS
|
|
|
|
|
|
|
|
$ENV{LUA_DIR}
|
|
|
|
|
|
|
|
PATH_SUFFIXES lib64 lib
|
|
|
|
PATHS
|
|
|
|
PATHS
|
|
|
|
~/Library/Frameworks
|
|
|
|
~/Library/Frameworks
|
|
|
|
/Library/Frameworks
|
|
|
|
/Library/Frameworks
|
|
|
@ -59,7 +73,11 @@ if(LUA_LIBRARY)
|
|
|
|
set( LUA_LIBRARIES "${LUA_LIBRARY};${LUA_MATH_LIBRARY}" CACHE STRING "Lua Libraries")
|
|
|
|
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
|
|
|
|
# For Windows and Mac, don't need to explicitly include the math library
|
|
|
|
else()
|
|
|
|
else()
|
|
|
|
set( LUA_LIBRARIES "${LUA_LIBRARY}" CACHE STRING "Lua Libraries")
|
|
|
|
if (LUA_LIBRARY_DEBUG)
|
|
|
|
|
|
|
|
set( LUA_LIBRARIES optimized ${LUA_LIBRARY} debug ${LUA_LIBRARY_DEBUG} CACHE STRING "Lua Libraries")
|
|
|
|
|
|
|
|
else
|
|
|
|
|
|
|
|
set( LUA_LIBRARIES "${LUA_LIBRARY}" CACHE STRING "Lua Libraries")
|
|
|
|
|
|
|
|
endif()
|
|
|
|
endif()
|
|
|
|
endif()
|
|
|
|
endif()
|
|
|
|
endif()
|
|
|
|
|
|
|
|
|
|
|
@ -77,5 +95,5 @@ FIND_PACKAGE_HANDLE_STANDARD_ARGS(Lua53
|
|
|
|
REQUIRED_VARS LUA_LIBRARIES LUA_INCLUDE_DIR
|
|
|
|
REQUIRED_VARS LUA_LIBRARIES LUA_INCLUDE_DIR
|
|
|
|
VERSION_VAR LUA_VERSION_STRING)
|
|
|
|
VERSION_VAR LUA_VERSION_STRING)
|
|
|
|
|
|
|
|
|
|
|
|
mark_as_advanced(LUA_INCLUDE_DIR LUA_LIBRARIES LUA_LIBRARY LUA_MATH_LIBRARY)
|
|
|
|
mark_as_advanced(LUA_INCLUDE_DIR LUA_LIBRARIES LUA_LIBRARY LUA_LIBRARY_DEBUG LUA_MATH_LIBRARY)
|
|
|
|
|
|
|
|
|
|
|
|