project(gtsam_test)
cmake_minimum_required(VERSION 2.8)
add_compile_options(-std=c++14)
find_package(Boost 1.43 COMPONENTS serialization system filesystem thread program_options date_time timer chrono)
FIND_PACKAGE(GTSAM REQUIRED)
FIND_PACKAGE(OpenCV REQUIRED)
FIND_PACKAGE(PCL REQUIRED)

INCLUDE_DIRECTORIES(${Boost_INCLUDE_DIR})
INCLUDE_DIRECTORIES(${GTSAM_INCLUDE_DIR})
INCLUDE_DIRECTORIES(${OpenCV_INCLUDE_DIR})
INCLUDE_DIRECTORIES(${PCL_INCLUDE_DIRS})
INCLUDE_DIRECTORIES("/usr/include/eigen3")
add_executable(gtsam_test sample.cpp speedFactor.cpp speedFactor.h)
# 链接库 
target_link_libraries(gtsam_test  gtsam ${OpenCV_LIBRARIES} ${PCL_LIBRARIES})

add_executable(speed_solve speed_solve/sample.cpp speed_solve/pose2d.cpp speed_solve/trajectory.cpp speed_solve/PoseSpeedFactor.cpp speed_solve/PoseSpeedFactor.h)
# 链接库
target_link_libraries(speed_solve  gtsam )


add_executable(xyz_solve edge3_test/sample.cpp edge3_test/Edge3Factor.cpp )
target_link_libraries(xyz_solve  gtsam )

add_executable(imuPrient   imuPrientSample/sample.cpp)
target_link_libraries(imuPrient  gtsam )