git clone https://github.com/strasdat/Sophus.git
下載完成后
cd Sophus
git checkout a621ff
mkdir build
cd build
cmake ..
make
sudo make install
Sophus庫的使用,為了編譯他,請在cmake工程中的CMakeLists.txt文件中添加以下內容
# 尋找Sophus庫
find_package( Sophus REQUIRED )
# 添加頭文件路徑
include_directories( ${Sophus_INCLUDE_DIRS} )
add_executable( xxx xxx.cpp)
#鏈接庫
target_link_libraries( xxx ${Sophus_LIBRARIES} )