blob: cb71e21237b82e0e932f930c12d4c992f6d71442 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
|
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -30,25 +30,16 @@
endif()
# Lua
-include(FetchContent)
-FetchContent_Declare(lua
- URL https://www.lua.org/ftp/lua-5.4.7.tar.gz
- URL_HASH SHA256=9fbf5e28ef86c69858f6d3d34eccc32e911c1a28b4120ff3e84aaa70cfbf1e30
- DOWNLOAD_EXTRACT_TIMESTAMP true)
-FetchContent_MakeAvailable(lua)
-file(GLOB lua_src CONFIGURE_DEPENDS ${lua_SOURCE_DIR}/src/*.c)
-list(REMOVE_ITEM lua_src ${lua_SOURCE_DIR}/src/lua.c ${lua_SOURCE_DIR}/src/luac.c)
-add_library(lua ${lua_src})
-target_include_directories(lua PUBLIC ${lua_SOURCE_DIR}/src)
-target_sources(lua PRIVATE ${lua_src})
+find_package(Lua REQUIRED)
add_executable(vtm "src/vtm.cpp" ${WIN32_RESOURCES})
# add_executable(term "src/netxs/apps/term.cpp")
# add_executable(calc "src/netxs/apps/calc.cpp")
-target_link_libraries(vtm lua)
-# target_link_libraries(term lua)
-# target_link_libraries(calc lua)
+target_include_directories(vtm PRIVATE ${LUA_INCLUDE_DIR})
+target_link_libraries(vtm ${LUA_LIBRARIES})
+# target_link_libraries(term ${LUA_LIBRARIES})
+# target_link_libraries(calc ${LUA_LIBRARIES})
if(NOT WIN32)
install(TARGETS vtm DESTINATION bin)
|