blob: 0ffaecc51d337cacd6d08527f03421b632974d31 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
|
--- dependencies/lib-lua/CMakeLists.txt.orig 2021-04-23 09:23:24 UTC
+++ dependencies/lib-lua/CMakeLists.txt
@@ -1,4 +1,21 @@
# \file dependencies/lib-lua/CMakeLists.txt
+
+option(LOCAL_LUA_LIB "Download and build Lua instead of searching the system" ON)
+if (NOT LOCAL_LUA_LIB)
+ message(STATUS "Using system Lua")
+ find_package(Lua "5.3" REQUIRED)
+ if (NOT LUA_FOUND)
+ message(FATAL_ERROR "Lua 5.3 not found")
+ endif()
+
+ set(LUA_INCLUDE_DIRS "${LUA_INCLUDE_DIR}" PARENT_SCOPE)
+
+ add_library(lua INTERFACE)
+ target_link_libraries(lua INTERFACE "${LUA_LIBRARY}")
+
+ return()
+endif()
+
message(STATUS "<lua>")
CMAKE_MINIMUM_REQUIRED(VERSION 3.1)
|