Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ruanhaishen
Lua Json
Commits
10ebcd21
Commit
10ebcd21
authored
Nov 02, 2019
by
seny
Browse files
cmake: add support for building against LuaVela
parent
cd777e72
Changes
1
Hide whitespace changes
Inline
Side-by-side
CMakeLists.txt
View file @
10ebcd21
cmake_minimum_required
(
VERSION 3.0
)
project
(
lua-json
)
set
(
USE_LUA_VERSION
""
CACHE STRING
"Build for Lua version 'X.Y' (
or '
jit' for Lua
JIT
)."
)
set
(
USE_LUA_VERSION
""
CACHE STRING
"Build for Lua version 'X.Y' (
'jit' for LuaJIT, 'u
jit' for Lua
Vela
)."
)
set
(
ver 5.1
)
if
(
USE_LUA_VERSION MATCHES
"^[0-9]
\\
.[0-9]$"
)
set
(
ver
${
USE_LUA_VERSION
}
)
string
(
REGEX REPLACE
"
\\
."
""
ver_
${
USE_LUA_VERSION
}
)
set
(
lua lua-
${
ver
}
lua
${
ver
}
lua
${
ver_
}
)
elseif
(
USE_LUA_VERSION MATCHES
"^(jit|)$"
)
set
(
lua lua
${
USE_LUA_VERSION
}
)
set
(
ver 5.1
)
elseif
(
USE_LUA_VERSION STREQUAL
"jit"
)
set
(
lua luajit
)
elseif
(
USE_LUA_VERSION STREQUAL
"ujit"
)
set
(
lua ujit
)
elseif
(
USE_LUA_VERSION STREQUAL
""
)
set
(
lua lua
)
else
()
message
(
FATAL_ERROR
"Unrecognized Lua version '
${
USE_LUA_VERSION
}
'"
)
endif
()
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment