Describe the bug
After installing symforce with python3 -m pip install ., my C++ program has an error using #include <symforce/slam/imu_preintegration/imu_factor.h> because the slam subdirectory is not installed. Libraries are also missing.
To Reproduce
Clone the symforce repository, cd into it, and run python3 -m pip install . to install.
On my computer this installs headers into /Library/Frameworks/Python.framework/Versions/3.9/include and libraries into /Library/Frameworks/Python.framework/Versions/3.9/lib/.
Make a file test.cc
#include <symforce/slam/imu_preintegration/imu_factor.h>
int main() {
return 0;
}
Try building the test program with the flags that have otherwise worked for me.
clang test.cc -std=c++17 -DSPDLOG_FMT_EXTERNAL=1 -I/usr/local/include/eigen3 -I/Library/Frameworks/Python.framework/Versions/3.9/include
test.cc:1:10: fatal error: 'symforce/slam/imu_preintegration/imu_factor.h' file not found
I was able to fix this issue by adding the following lines to symforce/slam/CMakeLists.txt:
Describe the bug After installing symforce with
python3 -m pip install .
, my C++ program has an error using#include <symforce/slam/imu_preintegration/imu_factor.h>
because theslam
subdirectory is not installed. Libraries are also missing.To Reproduce Clone the symforce repository,
cd
into it, and runpython3 -m pip install .
to install. On my computer this installs headers into/Library/Frameworks/Python.framework/Versions/3.9/include
and libraries into/Library/Frameworks/Python.framework/Versions/3.9/lib/
.Make a file
test.cc
Try building the test program with the flags that have otherwise worked for me.
I was able to fix this issue by adding the following lines to
symforce/slam/CMakeLists.txt
:Expected behavior All standard Symforce libraries and headers should be installed when running a build/install command.
Environment (please complete the following information):
Additional context cmake version 3.26.3