Mercurial > hg > orthanc
annotate OrthancFramework/Resources/CMake/LuaConfiguration.cmake @ 4766:388d108f6e4b
Added "Level" option to POST /tools/bulk-modify
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Mon, 16 Aug 2021 10:54:38 +0200 |
parents | e915102093de |
children | 7053502fbf97 |
rev | line source |
---|---|
4120
304842a0d152
adding missing license headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4044
diff
changeset
|
1 # Orthanc - A Lightweight, RESTful DICOM Store |
304842a0d152
adding missing license headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4044
diff
changeset
|
2 # Copyright (C) 2012-2016 Sebastien Jodogne, Medical Physics |
304842a0d152
adding missing license headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4044
diff
changeset
|
3 # Department, University Hospital of Liege, Belgium |
4437
d9473bd5ed43
upgrade to year 2021
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4120
diff
changeset
|
4 # Copyright (C) 2017-2021 Osimis S.A., Belgium |
4120
304842a0d152
adding missing license headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4044
diff
changeset
|
5 # |
304842a0d152
adding missing license headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4044
diff
changeset
|
6 # This program is free software: you can redistribute it and/or |
304842a0d152
adding missing license headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4044
diff
changeset
|
7 # modify it under the terms of the GNU Lesser General Public License |
304842a0d152
adding missing license headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4044
diff
changeset
|
8 # as published by the Free Software Foundation, either version 3 of |
304842a0d152
adding missing license headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4044
diff
changeset
|
9 # the License, or (at your option) any later version. |
304842a0d152
adding missing license headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4044
diff
changeset
|
10 # |
304842a0d152
adding missing license headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4044
diff
changeset
|
11 # This program is distributed in the hope that it will be useful, but |
304842a0d152
adding missing license headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4044
diff
changeset
|
12 # WITHOUT ANY WARRANTY; without even the implied warranty of |
304842a0d152
adding missing license headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4044
diff
changeset
|
13 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
304842a0d152
adding missing license headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4044
diff
changeset
|
14 # Lesser General Public License for more details. |
304842a0d152
adding missing license headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4044
diff
changeset
|
15 # |
304842a0d152
adding missing license headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4044
diff
changeset
|
16 # You should have received a copy of the GNU Lesser General Public |
304842a0d152
adding missing license headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4044
diff
changeset
|
17 # License along with this program. If not, see |
304842a0d152
adding missing license headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4044
diff
changeset
|
18 # <http://www.gnu.org/licenses/>. |
304842a0d152
adding missing license headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4044
diff
changeset
|
19 |
304842a0d152
adding missing license headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4044
diff
changeset
|
20 |
735 | 21 if (STATIC_BUILD OR NOT USE_SYSTEM_LUA) |
2947 | 22 SET(LUA_SOURCES_DIR ${CMAKE_BINARY_DIR}/lua-5.3.5) |
23 SET(LUA_MD5 "4f4b4f323fd3514a68e0ab3da8ce3455") | |
3133
0c2a8d5e0097
moving third-party dependencies to another server
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2947
diff
changeset
|
24 SET(LUA_URL "http://orthanc.osimis.io/ThirdPartyDownloads/lua-5.3.5.tar.gz") |
1537
fbf763bb1fa3
error detection in patches
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1487
diff
changeset
|
25 |
fbf763bb1fa3
error detection in patches
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1487
diff
changeset
|
26 DownloadPackage(${LUA_MD5} ${LUA_URL} "${LUA_SOURCES_DIR}") |
735 | 27 |
2478
1e2d5e14b3d3
New CMake option: ENABLE_LUA_MODULES to enable Lua modules
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2477
diff
changeset
|
28 if (ENABLE_LUA_MODULES) |
1e2d5e14b3d3
New CMake option: ENABLE_LUA_MODULES to enable Lua modules
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2477
diff
changeset
|
29 if (${CMAKE_SYSTEM_NAME} STREQUAL "Linux" OR |
1e2d5e14b3d3
New CMake option: ENABLE_LUA_MODULES to enable Lua modules
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2477
diff
changeset
|
30 ${CMAKE_SYSTEM_NAME} STREQUAL "kFreeBSD" OR |
1e2d5e14b3d3
New CMake option: ENABLE_LUA_MODULES to enable Lua modules
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2477
diff
changeset
|
31 ${CMAKE_SYSTEM_NAME} STREQUAL "FreeBSD" OR |
1e2d5e14b3d3
New CMake option: ENABLE_LUA_MODULES to enable Lua modules
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2477
diff
changeset
|
32 ${CMAKE_SYSTEM_NAME} STREQUAL "OpenBSD") |
1e2d5e14b3d3
New CMake option: ENABLE_LUA_MODULES to enable Lua modules
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2477
diff
changeset
|
33 # Enable loading of shared libraries (for UNIX-like) |
1e2d5e14b3d3
New CMake option: ENABLE_LUA_MODULES to enable Lua modules
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2477
diff
changeset
|
34 add_definitions(-DLUA_USE_DLOPEN=1) |
1e2d5e14b3d3
New CMake option: ENABLE_LUA_MODULES to enable Lua modules
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2477
diff
changeset
|
35 |
1e2d5e14b3d3
New CMake option: ENABLE_LUA_MODULES to enable Lua modules
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2477
diff
changeset
|
36 # Publish the functions of the Lua engine (that are built within |
1e2d5e14b3d3
New CMake option: ENABLE_LUA_MODULES to enable Lua modules
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2477
diff
changeset
|
37 # the Orthanc binary) as global symbols, so that the external |
1e2d5e14b3d3
New CMake option: ENABLE_LUA_MODULES to enable Lua modules
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2477
diff
changeset
|
38 # shared libraries can call them |
1e2d5e14b3d3
New CMake option: ENABLE_LUA_MODULES to enable Lua modules
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2477
diff
changeset
|
39 set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,--export-dynamic") |
1e2d5e14b3d3
New CMake option: ENABLE_LUA_MODULES to enable Lua modules
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2477
diff
changeset
|
40 |
2947 | 41 if (${CMAKE_SYSTEM_NAME} STREQUAL "Linux" OR |
42 ${CMAKE_SYSTEM_NAME} STREQUAL "kFreeBSD") | |
43 add_definitions(-DLUA_USE_LINUX=1) | |
44 elseif (${CMAKE_SYSTEM_NAME} STREQUAL "FreeBSD") | |
45 add_definitions( | |
46 -DLUA_USE_LINUX=1 | |
47 -DLUA_USE_READLINE=1 | |
48 ) | |
49 elseif (${CMAKE_SYSTEM_NAME} STREQUAL "OpenBSD") | |
50 add_definitions(-DLUA_USE_POSIX=1) | |
51 endif() | |
52 | |
2478
1e2d5e14b3d3
New CMake option: ENABLE_LUA_MODULES to enable Lua modules
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2477
diff
changeset
|
53 elseif(${CMAKE_SYSTEM_NAME} STREQUAL "Windows") |
2947 | 54 add_definitions( |
55 -DLUA_DL_DLL=1 # Enable loading of shared libraries (for Microsoft Windows) | |
56 ) | |
2478
1e2d5e14b3d3
New CMake option: ENABLE_LUA_MODULES to enable Lua modules
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2477
diff
changeset
|
57 |
1e2d5e14b3d3
New CMake option: ENABLE_LUA_MODULES to enable Lua modules
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2477
diff
changeset
|
58 elseif (${CMAKE_SYSTEM_NAME} STREQUAL "Darwin") |
2947 | 59 add_definitions( |
60 -DLUA_USE_MACOSX=1 | |
61 -DLUA_DL_DYLD=1 # Enable loading of shared libraries (for Apple OS X) | |
62 ) | |
2478
1e2d5e14b3d3
New CMake option: ENABLE_LUA_MODULES to enable Lua modules
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2477
diff
changeset
|
63 |
1e2d5e14b3d3
New CMake option: ENABLE_LUA_MODULES to enable Lua modules
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2477
diff
changeset
|
64 else() |
1e2d5e14b3d3
New CMake option: ENABLE_LUA_MODULES to enable Lua modules
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2477
diff
changeset
|
65 message(FATAL_ERROR "Support your platform here") |
1e2d5e14b3d3
New CMake option: ENABLE_LUA_MODULES to enable Lua modules
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2477
diff
changeset
|
66 endif() |
2477 | 67 endif() |
735 | 68 |
2947 | 69 add_definitions( |
70 -DLUA_COMPAT_5_2=1 | |
71 ) | |
72 | |
735 | 73 include_directories( |
74 ${LUA_SOURCES_DIR}/src | |
75 ) | |
76 | |
77 set(LUA_SOURCES | |
2947 | 78 # Don't compile the Lua command-line |
79 #${LUA_SOURCES_DIR}/src/lua.c | |
80 #${LUA_SOURCES_DIR}/src/luac.c | |
81 | |
735 | 82 # Core Lua |
83 ${LUA_SOURCES_DIR}/src/lapi.c | |
2947 | 84 ${LUA_SOURCES_DIR}/src/lcode.c |
85 ${LUA_SOURCES_DIR}/src/lctype.c | |
86 ${LUA_SOURCES_DIR}/src/ldebug.c | |
87 ${LUA_SOURCES_DIR}/src/ldo.c | |
88 ${LUA_SOURCES_DIR}/src/ldump.c | |
89 ${LUA_SOURCES_DIR}/src/lfunc.c | |
735 | 90 ${LUA_SOURCES_DIR}/src/lgc.c |
91 ${LUA_SOURCES_DIR}/src/llex.c | |
2947 | 92 ${LUA_SOURCES_DIR}/src/lmem.c |
93 ${LUA_SOURCES_DIR}/src/lobject.c | |
94 ${LUA_SOURCES_DIR}/src/lopcodes.c | |
735 | 95 ${LUA_SOURCES_DIR}/src/lparser.c |
2947 | 96 ${LUA_SOURCES_DIR}/src/lstate.c |
735 | 97 ${LUA_SOURCES_DIR}/src/lstring.c |
98 ${LUA_SOURCES_DIR}/src/ltable.c | |
99 ${LUA_SOURCES_DIR}/src/ltm.c | |
2947 | 100 ${LUA_SOURCES_DIR}/src/lundump.c |
101 ${LUA_SOURCES_DIR}/src/lvm.c | |
735 | 102 ${LUA_SOURCES_DIR}/src/lzio.c |
103 | |
104 # Base Lua modules | |
105 ${LUA_SOURCES_DIR}/src/lauxlib.c | |
106 ${LUA_SOURCES_DIR}/src/lbaselib.c | |
2947 | 107 ${LUA_SOURCES_DIR}/src/lbitlib.c |
108 ${LUA_SOURCES_DIR}/src/lcorolib.c | |
735 | 109 ${LUA_SOURCES_DIR}/src/ldblib.c |
110 ${LUA_SOURCES_DIR}/src/liolib.c | |
111 ${LUA_SOURCES_DIR}/src/lmathlib.c | |
2947 | 112 ${LUA_SOURCES_DIR}/src/loadlib.c |
735 | 113 ${LUA_SOURCES_DIR}/src/loslib.c |
2947 | 114 ${LUA_SOURCES_DIR}/src/lstrlib.c |
735 | 115 ${LUA_SOURCES_DIR}/src/ltablib.c |
2947 | 116 ${LUA_SOURCES_DIR}/src/lutf8lib.c |
117 | |
735 | 118 ${LUA_SOURCES_DIR}/src/linit.c |
119 ) | |
120 | |
121 source_group(ThirdParty\\Lua REGULAR_EXPRESSION ${LUA_SOURCES_DIR}/.*) | |
122 | |
4649
e915102093de
New CMake option: "ORTHANC_LUA_VERSION" to use a specific version of system-wide Lua
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4437
diff
changeset
|
123 elseif ((CMAKE_CROSSCOMPILING AND |
e915102093de
New CMake option: "ORTHANC_LUA_VERSION" to use a specific version of system-wide Lua
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4437
diff
changeset
|
124 "${CMAKE_SYSTEM_VERSION}" STREQUAL "CrossToolNg") OR |
e915102093de
New CMake option: "ORTHANC_LUA_VERSION" to use a specific version of system-wide Lua
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4437
diff
changeset
|
125 NOT "${ORTHANC_LUA_VERSION}" STREQUAL "") |
3833
a3e38994d95a
compilation on mips qemu
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3336
diff
changeset
|
126 |
4649
e915102093de
New CMake option: "ORTHANC_LUA_VERSION" to use a specific version of system-wide Lua
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4437
diff
changeset
|
127 if ("${ORTHANC_LUA_VERSION}" STREQUAL "") |
e915102093de
New CMake option: "ORTHANC_LUA_VERSION" to use a specific version of system-wide Lua
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4437
diff
changeset
|
128 set(LUA_VERSIONS 5.3 5.2 5.1) |
e915102093de
New CMake option: "ORTHANC_LUA_VERSION" to use a specific version of system-wide Lua
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4437
diff
changeset
|
129 else() |
e915102093de
New CMake option: "ORTHANC_LUA_VERSION" to use a specific version of system-wide Lua
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4437
diff
changeset
|
130 # New in Orthanc 1.9.3 |
e915102093de
New CMake option: "ORTHANC_LUA_VERSION" to use a specific version of system-wide Lua
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4437
diff
changeset
|
131 set(LUA_VERSIONS ${ORTHANC_LUA_VERSION}) |
e915102093de
New CMake option: "ORTHANC_LUA_VERSION" to use a specific version of system-wide Lua
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4437
diff
changeset
|
132 endif() |
3833
a3e38994d95a
compilation on mips qemu
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3336
diff
changeset
|
133 |
a3e38994d95a
compilation on mips qemu
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3336
diff
changeset
|
134 unset(LUA_VERSION) |
a3e38994d95a
compilation on mips qemu
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3336
diff
changeset
|
135 foreach(version IN ITEMS ${LUA_VERSIONS}) |
a3e38994d95a
compilation on mips qemu
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3336
diff
changeset
|
136 CHECK_INCLUDE_FILE(lua${version}/lua.h HAVE_LUA${version}_H) |
a3e38994d95a
compilation on mips qemu
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3336
diff
changeset
|
137 if (HAVE_LUA${version}_H) |
a3e38994d95a
compilation on mips qemu
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3336
diff
changeset
|
138 set(LUA_VERSION ${version}) |
a3e38994d95a
compilation on mips qemu
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3336
diff
changeset
|
139 break() |
a3e38994d95a
compilation on mips qemu
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3336
diff
changeset
|
140 endif() |
a3e38994d95a
compilation on mips qemu
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3336
diff
changeset
|
141 endforeach() |
a3e38994d95a
compilation on mips qemu
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3336
diff
changeset
|
142 |
a3e38994d95a
compilation on mips qemu
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3336
diff
changeset
|
143 if (NOT LUA_VERSION) |
a3e38994d95a
compilation on mips qemu
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3336
diff
changeset
|
144 message(FATAL_ERROR "Please install the liblua-dev package") |
a3e38994d95a
compilation on mips qemu
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3336
diff
changeset
|
145 endif() |
a3e38994d95a
compilation on mips qemu
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3336
diff
changeset
|
146 |
4649
e915102093de
New CMake option: "ORTHANC_LUA_VERSION" to use a specific version of system-wide Lua
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4437
diff
changeset
|
147 if ("${CMAKE_SYSTEM_VERSION}" STREQUAL "CrossToolNg") |
e915102093de
New CMake option: "ORTHANC_LUA_VERSION" to use a specific version of system-wide Lua
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4437
diff
changeset
|
148 set(LUA_INCLUDE_DIR ${CROSSTOOL_NG_IMAGE}/usr/include/lua${LUA_VERSION}) |
e915102093de
New CMake option: "ORTHANC_LUA_VERSION" to use a specific version of system-wide Lua
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4437
diff
changeset
|
149 else() |
e915102093de
New CMake option: "ORTHANC_LUA_VERSION" to use a specific version of system-wide Lua
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4437
diff
changeset
|
150 # New in Orthanc 1.9.3 |
e915102093de
New CMake option: "ORTHANC_LUA_VERSION" to use a specific version of system-wide Lua
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4437
diff
changeset
|
151 find_path(LUA_INCLUDE_DIR |
e915102093de
New CMake option: "ORTHANC_LUA_VERSION" to use a specific version of system-wide Lua
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4437
diff
changeset
|
152 NAMES lua.h |
e915102093de
New CMake option: "ORTHANC_LUA_VERSION" to use a specific version of system-wide Lua
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4437
diff
changeset
|
153 PATHS |
e915102093de
New CMake option: "ORTHANC_LUA_VERSION" to use a specific version of system-wide Lua
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4437
diff
changeset
|
154 /usr/include/lua${LUA_VERSION} |
e915102093de
New CMake option: "ORTHANC_LUA_VERSION" to use a specific version of system-wide Lua
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4437
diff
changeset
|
155 /usr/local/include/lua${LUA_VERSION} |
e915102093de
New CMake option: "ORTHANC_LUA_VERSION" to use a specific version of system-wide Lua
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4437
diff
changeset
|
156 ) |
e915102093de
New CMake option: "ORTHANC_LUA_VERSION" to use a specific version of system-wide Lua
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4437
diff
changeset
|
157 endif() |
e915102093de
New CMake option: "ORTHANC_LUA_VERSION" to use a specific version of system-wide Lua
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4437
diff
changeset
|
158 |
e915102093de
New CMake option: "ORTHANC_LUA_VERSION" to use a specific version of system-wide Lua
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4437
diff
changeset
|
159 message("Lua include dir: ${LUA_INCLUDE_DIR}") |
e915102093de
New CMake option: "ORTHANC_LUA_VERSION" to use a specific version of system-wide Lua
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4437
diff
changeset
|
160 include_directories(${LUA_INCLUDE_DIR}) |
e915102093de
New CMake option: "ORTHANC_LUA_VERSION" to use a specific version of system-wide Lua
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4437
diff
changeset
|
161 |
e915102093de
New CMake option: "ORTHANC_LUA_VERSION" to use a specific version of system-wide Lua
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4437
diff
changeset
|
162 CHECK_LIBRARY_EXISTS(lua${LUA_VERSION} "lua_call" "${LUA_LIB_DIR}" HAVE_LUA_LIB_1) # Lua 5.1 |
e915102093de
New CMake option: "ORTHANC_LUA_VERSION" to use a specific version of system-wide Lua
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4437
diff
changeset
|
163 CHECK_LIBRARY_EXISTS(lua${LUA_VERSION} "lua_callk" "${LUA_LIB_DIR}" HAVE_LUA_LIB_2) # Lua 5.3 |
e915102093de
New CMake option: "ORTHANC_LUA_VERSION" to use a specific version of system-wide Lua
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4437
diff
changeset
|
164 if (NOT HAVE_LUA_LIB_1 AND NOT HAVE_LUA_LIB_2) |
3833
a3e38994d95a
compilation on mips qemu
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3336
diff
changeset
|
165 message(FATAL_ERROR "Please install the liblua package") |
a3e38994d95a
compilation on mips qemu
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3336
diff
changeset
|
166 endif() |
a3e38994d95a
compilation on mips qemu
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3336
diff
changeset
|
167 |
a3e38994d95a
compilation on mips qemu
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3336
diff
changeset
|
168 link_libraries(lua${LUA_VERSION}) |
a3e38994d95a
compilation on mips qemu
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3336
diff
changeset
|
169 |
735 | 170 else() |
3336
01905b67f8b5
drop specific version of lua
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3133
diff
changeset
|
171 include(FindLua) |
4649
e915102093de
New CMake option: "ORTHANC_LUA_VERSION" to use a specific version of system-wide Lua
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4437
diff
changeset
|
172 |
3336
01905b67f8b5
drop specific version of lua
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3133
diff
changeset
|
173 if (NOT LUA_FOUND) |
735 | 174 message(FATAL_ERROR "Please install the liblua-dev package") |
175 endif() | |
4649
e915102093de
New CMake option: "ORTHANC_LUA_VERSION" to use a specific version of system-wide Lua
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4437
diff
changeset
|
176 |
735 | 177 include_directories(${LUA_INCLUDE_DIR}) |
178 link_libraries(${LUA_LIBRARIES}) | |
179 endif() |