cmake_modules/FindLua.cmake
author nemo
Sat, 27 Mar 2010 03:55:12 +0000
changeset 3096 9330eead14fa
parent 3067 330e60f5dde8
child 3125 f110cc84ac50
permissions -rw-r--r--
Remove Distance from flake kick, reduce calls to Random() in flame replacing w/ checks on game tick and a little randomness.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
2924
908851e59958 Engine:
smxx
parents:
diff changeset
     1
# Find the Lua library
908851e59958 Engine:
smxx
parents:
diff changeset
     2
#
908851e59958 Engine:
smxx
parents:
diff changeset
     3
2925
d088b5f813c9 CMAKE SMASH!
smxx
parents: 2924
diff changeset
     4
IF(NOT LUA_LIBRARY)
d088b5f813c9 CMAKE SMASH!
smxx
parents: 2924
diff changeset
     5
	IF(WIN32)
3067
smxx
parents: 2925
diff changeset
     6
		SET(LUA_DEFAULT lua.dll)
2925
d088b5f813c9 CMAKE SMASH!
smxx
parents: 2924
diff changeset
     7
	ELSE(WIN32)
d088b5f813c9 CMAKE SMASH!
smxx
parents: 2924
diff changeset
     8
		IF(APPLE)
3067
smxx
parents: 2925
diff changeset
     9
			SET(LUA_DEFAULT lua)
2925
d088b5f813c9 CMAKE SMASH!
smxx
parents: 2924
diff changeset
    10
		ELSE(APPLE)
3067
smxx
parents: 2925
diff changeset
    11
			#locate the system's lua library
smxx
parents: 2925
diff changeset
    12
			FIND_LIBRARY(LUA_DEFAULT NAMES lua51 lua5.1 lua-5.1 lua PATHS /lib /usr/lib /usr/local/lib /usr/pkg/lib)
smxx
parents: 2925
diff changeset
    13
			#remove the path (fpc doesn't like it - why?)
smxx
parents: 2925
diff changeset
    14
			GET_FILENAME_COMPONENT(LUA_DEFAULT ${LUA_DEFAULT} NAME)
2925
d088b5f813c9 CMAKE SMASH!
smxx
parents: 2924
diff changeset
    15
		ENDIF(APPLE)
d088b5f813c9 CMAKE SMASH!
smxx
parents: 2924
diff changeset
    16
	ENDIF(WIN32)
d088b5f813c9 CMAKE SMASH!
smxx
parents: 2924
diff changeset
    17
	SET(LUA_LIBRARY ${LUA_DEFAULT} CACHE STRING "Lua library to link to; file name without path only!")
3067
smxx
parents: 2925
diff changeset
    18
	UNSET(LUA_DEFAULT)
2925
d088b5f813c9 CMAKE SMASH!
smxx
parents: 2924
diff changeset
    19
ENDIF(NOT LUA_LIBRARY)