diff --git a/userspace/engine/falco_engine.cpp b/userspace/engine/falco_engine.cpp
index 511407cb..f9c86c78 100644
--- a/userspace/engine/falco_engine.cpp
+++ b/userspace/engine/falco_engine.cpp
@@ -39,7 +39,7 @@ string lua_print_stats = "print_stats";
using namespace std;
-falco_engine::falco_engine(bool seed_rng)
+falco_engine::falco_engine(bool seed_rng, const std::string& source_dir)
: m_rules(NULL), m_next_ruleset_id(0),
m_min_priority(falco_common::PRIORITY_DEBUG),
m_sampling_ratio(1), m_sampling_multiplier(0),
@@ -48,7 +48,7 @@ falco_engine::falco_engine(bool seed_rng)
luaopen_lpeg(m_ls);
luaopen_yaml(m_ls);
- falco_common::init(m_lua_main_filename.c_str(), FALCO_ENGINE_SOURCE_LUA_DIR);
+ falco_common::init(m_lua_main_filename.c_str(), source_dir.c_str());
falco_rules::init(m_ls);
m_evttype_filter.reset(new sinsp_evttype_filter());
diff --git a/userspace/engine/falco_engine.h b/userspace/engine/falco_engine.h
index e19fb6e5..abf0ac84 100644
--- a/userspace/engine/falco_engine.h
+++ b/userspace/engine/falco_engine.h
@@ -27,6 +27,7 @@ along with falco. If not, see .
#include "rules.h"
+#include "config_falco_engine.h"
#include "falco_common.h"
//
@@ -38,7 +39,7 @@ along with falco. If not, see .
class falco_engine : public falco_common
{
public:
- falco_engine(bool seed_rng=true);
+ falco_engine(bool seed_rng=true, const std::string& rules_dir=FALCO_ENGINE_SOURCE_LUA_DIR);
virtual ~falco_engine();
//
diff --git a/userspace/falco/CMakeLists.txt b/userspace/falco/CMakeLists.txt
index 3ef7d868..736f6043 100644
--- a/userspace/falco/CMakeLists.txt
+++ b/userspace/falco/CMakeLists.txt
@@ -5,6 +5,7 @@ include_directories("${PROJECT_SOURCE_DIR}/../sysdig/userspace/libscap")
include_directories("${PROJECT_SOURCE_DIR}/../sysdig/userspace/libsinsp")
include_directories("${PROJECT_SOURCE_DIR}/userspace/engine")
include_directories("${PROJECT_BINARY_DIR}/userspace/falco")
+include_directories("${PROJECT_BINARY_DIR}/userspace/engine")
include_directories("${CURL_INCLUDE_DIR}")
include_directories("${YAMLCPP_INCLUDE_DIR}")
include_directories("${DRAIOS_DEPENDENCIES_DIR}/yaml-${DRAIOS_YAML_VERSION}/target/include")