author | unc0rr |
Wed, 03 Apr 2013 00:03:46 +0400 | |
branch | webgl |
changeset 8839 | caa57115d7ea |
parent 8330 | aaefa587e277 |
child 9236 | ddd675825672 |
permissions | -rw-r--r-- |
7031
d5ea24399a48
when Lua is not found, fallback to compiling the one that comes bundled in our sources
koda
parents:
5171
diff
changeset
|
1 |
#this file is included only when system Lua library is not found |
d5ea24399a48
when Lua is not found, fallback to compiling the one that comes bundled in our sources
koda
parents:
5171
diff
changeset
|
2 |
|
8044 | 3 |
#TODO: when NOPASCAL=1 it should use clang here too |
4 |
||
3697 | 5 |
file(GLOB lua_src *.c *.h) |
2822 | 6 |
|
7031
d5ea24399a48
when Lua is not found, fallback to compiling the one that comes bundled in our sources
koda
parents:
5171
diff
changeset
|
7 |
if(WIN32) |
d5ea24399a48
when Lua is not found, fallback to compiling the one that comes bundled in our sources
koda
parents:
5171
diff
changeset
|
8 |
add_definitions(-DLUA_BUILD_AS_DLL) |
d5ea24399a48
when Lua is not found, fallback to compiling the one that comes bundled in our sources
koda
parents:
5171
diff
changeset
|
9 |
add_library(lua SHARED ${lua_src}) |
2822 | 10 |
|
7262 | 11 |
set(LUA_LIBRARY lua.dll) |
12 |
||
7031
d5ea24399a48
when Lua is not found, fallback to compiling the one that comes bundled in our sources
koda
parents:
5171
diff
changeset
|
13 |
set_target_properties(lua PROPERTIES PREFIX "") |
8316
89232b2fa1d6
cmake rework, cleanup a lot of redundant sections, separate library and binary install location, unify osx and win handling of the data directory (tested on win, lin and mac)
koda
parents:
7718
diff
changeset
|
14 |
install(TARGETS lua RUNTIME DESTINATION ${target_library_install_dir}) |
7031
d5ea24399a48
when Lua is not found, fallback to compiling the one that comes bundled in our sources
koda
parents:
5171
diff
changeset
|
15 |
else(WIN32) |
d5ea24399a48
when Lua is not found, fallback to compiling the one that comes bundled in our sources
koda
parents:
5171
diff
changeset
|
16 |
add_definitions(-DLUA_USE_LINUX) |
d5ea24399a48
when Lua is not found, fallback to compiling the one that comes bundled in our sources
koda
parents:
5171
diff
changeset
|
17 |
add_library(lua STATIC ${lua_src}) |
7704
b25add2fdfa6
slight tweak to lua linking (that will break everything, i'm sure)
koda
parents:
7262
diff
changeset
|
18 |
set(LUA_LIBRARY lua) |
2822 | 19 |
endif(WIN32) |
20 |
||
21 |
||
22 |