Skip to content

Commit

Permalink
Updated KalmanFilter cmake
Browse files Browse the repository at this point in the history
  • Loading branch information
aalbaali committed Apr 25, 2021
1 parent 6360d01 commit 533edf1
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 14 deletions.
5 changes: 5 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,12 @@ find_package(manif REQUIRED)
# Add the RandomVariable header class
list(APPEND CMAKE_PREFIX_PATH "${CMAKE_SOURCE_DIR}/extern/RandomVariable/cmake")
find_package(RandomVariable)

# Add Kalman fitler example
message(STATUS "Building KalmanFilter")
add_subdirectory( KalmanFilter)
# Add InEKF
message(STATUS "Building InEKF")
add_subdirectory( InEKF)

# set(CPACK_PROJECT_NAME ${PROJECT_NAME})
Expand Down
6 changes: 2 additions & 4 deletions InEKF/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,10 @@ target_include_directories(example_SE2 SYSTEM PUBLIC ${manif_INCLUDE_DIRS})


if(CMAKE_BUILD_TYPE STREQUAL "Debug")
message("CMAKE_BUILD_TYPE: Debug mode\n")
# Add debug flag
target_compile_definitions(${PROJECT_NAME} PUBLIC DEBUG)
target_compile_definitions(example_SE2 PUBLIC DEBUG)
elseif(CMAKE_BUILD_TYPE STREQUAL "Release")
message("CMAKE_BUILD_TYPE: Release mode")
endif()

# Set required C++ standard flag
set_property(TARGET ${PROJECT_NAME} PROPERTY CXX_STANDARD 17)
set_property(TARGET example_SE2 PROPERTY CXX_STANDARD 17)
16 changes: 7 additions & 9 deletions KalmanFilter/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,27 +1,25 @@
cmake_minimum_required( VERSION 3.10)
project(kalman_filter)
project(example_kf)
# Find the Eigen library
find_package(Eigen3 REQUIRED)
# # Find the manif library
# find_package(manif REQUIRED)
add_executable(${PROJECT_NAME} kalman_filter.cpp)
add_executable(example_kf kalman_filter.cpp)
# add_executable(${PROJECT_NAME} playground.cpp)

target_include_directories(${PROJECT_NAME} SYSTEM PUBLIC "../include/RandomVariable/src/")
target_link_libraries(example_kf
RandomVariable::RandomVariable
)

target_include_directories(${PROJECT_NAME} SYSTEM PUBLIC ${EIGEN3_INCLUDE_DIRS})

# # Add manif include directories to the target
# target_include_directories(${PROJECT_NAME} SYSTEM PUBLIC ${manif_INCLUDE_DIRS})


if(CMAKE_BUILD_TYPE STREQUAL "Debug")
message("CMAKE_BUILD_TYPE: Debug mode\n")
# Add debug flag
target_compile_definitions(kalman_filter PUBLIC DEBUG)
target_compile_definitions(example_kf PUBLIC DEBUG)
elseif(CMAKE_BUILD_TYPE STREQUAL "Release")
message("CMAKE_BUILD_TYPE: Release mode")
endif()

# Set required C++ standard flag
set_property(TARGET ${PROJECT_NAME} PROPERTY CXX_STANDARD 17)
set_property(TARGET example_kf PROPERTY CXX_STANDARD 17)
2 changes: 1 addition & 1 deletion extern/RandomVariable

0 comments on commit 533edf1

Please sign in to comment.