# HG changeset patch # User smxx # Date 1267633177 0 # Node ID d088b5f813c9283862d33a0b8edd441f14a38da5 # Parent 908851e59958be1e02346ae30dcf66afe5230f1a CMAKE SMASH! diff -r 908851e59958 -r d088b5f813c9 cmake_modules/FindLua.cmake --- a/cmake_modules/FindLua.cmake Wed Mar 03 15:04:39 2010 +0000 +++ b/cmake_modules/FindLua.cmake Wed Mar 03 16:19:37 2010 +0000 @@ -1,11 +1,15 @@ # Find the Lua library # -IF(UNIX) - FIND_LIBRARY(LUA_LIBRARY NAMES lua5.1 lua) -ELSE(UNIX) - IF(WIN32) - SET(LUA_LIBRARY lua.dll CACHE FILEPATH "Path to the lua library to be used. This should be set to 'lua.dll' or 'lua' under Win32/Apple to use the bundled copy.") - else(WIN32) - ENDIF(WIN32) -ENDIF(UNIX) \ No newline at end of file +IF(NOT LUA_LIBRARY) + IF(WIN32) + set(LUA_DEFAULT lua.dll) + ELSE(WIN32) + IF(APPLE) + set(LUA_DEFAULT lua) + ELSE(APPLE) + set(LUA_DEFAULT lua5.1.so) + ENDIF(APPLE) + ENDIF(WIN32) + SET(LUA_LIBRARY ${LUA_DEFAULT} CACHE STRING "Lua library to link to; file name without path only!") +ENDIF(NOT LUA_LIBRARY) \ No newline at end of file