From 8525c20831996482548487cdbae0ee4dd8dba8b8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ga=C3=ABl=20=C3=89corchard?= Date: Thu, 12 Oct 2023 12:59:24 +0200 Subject: [PATCH] Fix some issues with the build system MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit There is still an issue: `aguya.cpp:51:16: error: ‘kaguya’ has not been declared`. Signed-off-by: Gaël Écorchard --- cmake/Packages/FindKaguyaBuild.cmake | 1 + cmake/Packages/FindLuaBuild/LuaVanilla.cmake | 8 +++++--- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/cmake/Packages/FindKaguyaBuild.cmake b/cmake/Packages/FindKaguyaBuild.cmake index fe7719a3..8d0579f8 100644 --- a/cmake/Packages/FindKaguyaBuild.cmake +++ b/cmake/Packages/FindKaguyaBuild.cmake @@ -45,6 +45,7 @@ ExternalProject_Add(KAGUYA_BUILD_SOURCE GIT_SHALLOW TRUE GIT_SUBMODULES "" GIT_REPOSITORY https://github.com/satoren/kaguya.git + GIT_TAG main PREFIX ${kaguya_build_toplevel} SOURCE_DIR ${kaguya_build_toplevel} DOWNLOAD_DIR ${kaguya_build_toplevel} diff --git a/cmake/Packages/FindLuaBuild/LuaVanilla.cmake b/cmake/Packages/FindLuaBuild/LuaVanilla.cmake index b4c3c800..2b30dde5 100644 --- a/cmake/Packages/FindLuaBuild/LuaVanilla.cmake +++ b/cmake/Packages/FindLuaBuild/LuaVanilla.cmake @@ -199,7 +199,7 @@ extern \"C\" { file(TO_NATIVE_PATH "${LUA_VANILLA_SOURCE_LUA_HPP}" LUA_VANILLA_SOURCE_LUA_HPP) endif() - set(LUA_VANILLA_INCLUDE_DIRS ${lua-vanilla_SOURCE_DIR}/include) + set(LUA_VANILLA_INCLUDE_DIRS ${lua-vanilla_SOURCE_DIR}/src) endif() # # Target names @@ -246,12 +246,14 @@ else() endif() if (WIN32) else() - target_compile_definitions(${liblua} + target_compile_definitions(${liblua} PRIVATE LUA_USE_LINUX) endif() target_compile_options(${liblua} PRIVATE ${LUA_VANILLA_LUALIB_COMPILER_OPTIONS}) -add_dependencies(${liblua} LUA_VANILLA) +if (LUA_LOCAL_DIR) + add_dependencies(${liblua} LUA_VANILLA) +endif() target_link_libraries(${liblua} PRIVATE ${CMAKE_DL_LIBS}) if (UNIX) target_link_libraries(${liblua} PRIVATE m)