From 382285eff0bec875e93d9e70b15effccb3688126 Mon Sep 17 00:00:00 2001
From: Kubat <mael.martin31@gmail.com>
Date: Wed, 14 Jul 2021 13:28:52 +0200
Subject: [PATCH] BUILD FIX: Disable precompiled headers for lua for now + fix
 the lua-cli

---
 CMakeLists.txt                  |  3 ---
 vendor/lua-5.4.3/CMakeLists.txt | 11 ++---------
 2 files changed, 2 insertions(+), 12 deletions(-)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index bc0778e7..cced477b 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -73,9 +73,6 @@ target_precompile_headers(Vivy
 
         # STL headers
         <memory>
-
-    REUSE_FROM
-        lua
 )
 
 # More options and warnings
diff --git a/vendor/lua-5.4.3/CMakeLists.txt b/vendor/lua-5.4.3/CMakeLists.txt
index a27db59c..8e586510 100644
--- a/vendor/lua-5.4.3/CMakeLists.txt
+++ b/vendor/lua-5.4.3/CMakeLists.txt
@@ -11,13 +11,6 @@ list(REMOVE_ITEM Lua_SRC "src/lua.c" "src/luac.c")
 
 add_library(lua STATIC ${Lua_SRC} ${Lua_INC})
 target_include_directories(lua PUBLIC "${CMAKE_CURRENT_SOURCE_DIR}/src/")
-target_precompile_headers(lua
-    PUBLIC
-        "${CMAKE_CURRENT_SOURCE_DIR}/src/lua.h"
-        "${CMAKE_CURRENT_SOURCE_DIR}/src/lualib.h"
-        "${CMAKE_CURRENT_SOURCE_DIR}/src/lauxlib.h"
-    PRIVATE
-        ${Lua_INC}
-)
 
-add_executable(lua-cli lua src/lua.c)
+add_executable(lua-cli src/lua.c)
+target_link_libraries(lua-cli PRIVATE lua)
-- 
GitLab