chore(lua): Use PACKAGE_DATADIR and AM_CPPFLAGS

This commit is contained in:
PRESFIL
2025-07-07 11:30:57 +00:00
committed by Jari Sundell
parent 7022722c64
commit 8dcf2bc609
3 changed files with 4 additions and 3 deletions
+1 -1
View File
@@ -196,4 +196,4 @@ libsub_root_a_SOURCES = \
thread_worker.h
AM_CPPFLAGS = -I$(srcdir) -I$(top_srcdir)
AM_CPPFLAGS = -I$(srcdir) -I$(top_srcdir) -DPACKAGE_DATADIR=\"$(pkgdatadir)\"
+2 -2
View File
@@ -23,12 +23,12 @@
namespace rpc {
#ifdef HAVE_LUA
const int LuaEngine::flag_string;
const std::string LuaEngine::module_name = "rtorrent";
const std::string LuaEngine::local_path = LUA_DATADIR "/?.lua;" LUA_DATADIR "/?/init.lua";
#ifdef HAVE_LUA
LuaEngine::LuaEngine() {
m_luaState = luaL_newstate();
luaL_openlibs(m_luaState);
+1
View File
@@ -6,6 +6,7 @@
#ifdef HAVE_LUA
#include <lua.hpp>
#define LUA_DATADIR PACKAGE_DATADIR "/lua"
#endif
namespace rpc {