Mercurial > hg > orthanc
annotate Resources/CMake/LuaConfiguration.cmake @ 1794:bdfae6e17d23 worklists
integration mainline->worklists
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Thu, 19 Nov 2015 16:02:35 +0100 |
parents | fbf763bb1fa3 |
children | 8b51b133bb8b |
rev | line source |
---|---|
735 | 1 if (STATIC_BUILD OR NOT USE_SYSTEM_LUA) |
2 SET(LUA_SOURCES_DIR ${CMAKE_BINARY_DIR}/lua-5.1.5) | |
1537
fbf763bb1fa3
error detection in patches
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1487
diff
changeset
|
3 SET(LUA_MD5 "2e115fe26e435e33b0d5c022e4490567") |
fbf763bb1fa3
error detection in patches
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1487
diff
changeset
|
4 SET(LUA_URL "http://www.montefiore.ulg.ac.be/~jodogne/Orthanc/ThirdPartyDownloads/lua-5.1.5.tar.gz") |
fbf763bb1fa3
error detection in patches
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1487
diff
changeset
|
5 |
fbf763bb1fa3
error detection in patches
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1487
diff
changeset
|
6 DownloadPackage(${LUA_MD5} ${LUA_URL} "${LUA_SOURCES_DIR}") |
735 | 7 |
8 add_definitions( | |
9 #-DLUA_LIB=1 | |
10 #-Dluaall_c=1 | |
11 #-DLUA_COMPAT_ALL=1 # Compile a generic version of Lua | |
12 ) | |
13 | |
14 include_directories( | |
15 ${LUA_SOURCES_DIR}/src | |
16 ) | |
17 | |
18 set(LUA_SOURCES | |
19 # Core Lua | |
20 ${LUA_SOURCES_DIR}/src/lapi.c | |
21 ${LUA_SOURCES_DIR}/src/lcode.c | |
22 ${LUA_SOURCES_DIR}/src/ldebug.c | |
23 ${LUA_SOURCES_DIR}/src/ldo.c | |
24 ${LUA_SOURCES_DIR}/src/ldump.c | |
25 ${LUA_SOURCES_DIR}/src/lfunc.c | |
26 ${LUA_SOURCES_DIR}/src/lgc.c | |
27 ${LUA_SOURCES_DIR}/src/llex.c | |
28 ${LUA_SOURCES_DIR}/src/lmem.c | |
29 ${LUA_SOURCES_DIR}/src/lobject.c | |
30 ${LUA_SOURCES_DIR}/src/lopcodes.c | |
31 ${LUA_SOURCES_DIR}/src/lparser.c | |
32 ${LUA_SOURCES_DIR}/src/lstate.c | |
33 ${LUA_SOURCES_DIR}/src/lstring.c | |
34 ${LUA_SOURCES_DIR}/src/ltable.c | |
35 ${LUA_SOURCES_DIR}/src/ltm.c | |
36 ${LUA_SOURCES_DIR}/src/lundump.c | |
37 ${LUA_SOURCES_DIR}/src/lvm.c | |
38 ${LUA_SOURCES_DIR}/src/lzio.c | |
39 | |
40 # Base Lua modules | |
41 ${LUA_SOURCES_DIR}/src/lauxlib.c | |
42 ${LUA_SOURCES_DIR}/src/lbaselib.c | |
43 ${LUA_SOURCES_DIR}/src/ldblib.c | |
44 ${LUA_SOURCES_DIR}/src/liolib.c | |
45 ${LUA_SOURCES_DIR}/src/lmathlib.c | |
46 ${LUA_SOURCES_DIR}/src/loslib.c | |
47 ${LUA_SOURCES_DIR}/src/ltablib.c | |
48 ${LUA_SOURCES_DIR}/src/lstrlib.c | |
49 ${LUA_SOURCES_DIR}/src/loadlib.c | |
50 ${LUA_SOURCES_DIR}/src/linit.c | |
51 ) | |
52 | |
53 source_group(ThirdParty\\Lua REGULAR_EXPRESSION ${LUA_SOURCES_DIR}/.*) | |
54 | |
55 else() | |
56 include(FindLua51) | |
57 | |
58 if (NOT LUA51_FOUND) | |
59 message(FATAL_ERROR "Please install the liblua-dev package") | |
60 endif() | |
61 | |
62 include_directories(${LUA_INCLUDE_DIR}) | |
63 link_libraries(${LUA_LIBRARIES}) | |
64 endif() |