File tree Expand file tree Collapse file tree 2 files changed +5
-2
lines changed Expand file tree Collapse file tree 2 files changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -316,7 +316,6 @@ if (MATX_EN_FILEIO OR MATX_EN_VISUALIZATION OR MATX_EN_PYBIND11 OR MATX_BUILD_EX
316
316
set (MATX_EN_PYBIND11 ON )
317
317
target_compile_definitions (matx INTERFACE MATX_ENABLE_PYBIND11 )
318
318
target_compile_definitions (matx INTERFACE MATX_ENABLE_FILEIO )
319
- target_compile_options (matx INTERFACE -DMATX_ROOT= "${PROJECT_SOURCE_DIR} " )
320
319
321
320
include (cmake/GetPyBind11.cmake )
322
321
find_package (Python3 REQUIRED COMPONENTS Interpreter Development )
Original file line number Diff line number Diff line change 39
39
#include < pybind11/embed.h>
40
40
#include < pybind11/numpy.h>
41
41
#include < optional>
42
+ #include < filesystem>
43
+
44
+ namespace fs = std::filesystem;
42
45
43
46
namespace matx {
44
47
@@ -94,7 +97,8 @@ class MatXPybind {
94
97
}
95
98
}
96
99
97
- AddPath (std::string (MATX_ROOT) + GENERATORS_PATH);
100
+ const auto current_dir = fs::path (__FILE__).parent_path ();
101
+ AddPath ((current_dir.string () + " /../../.." ) + GENERATORS_PATH);
98
102
}
99
103
100
104
void AddPath (const std::string &path)
You can’t perform that action at this time.
0 commit comments