kalman-cpp icon indicating copy to clipboard operation
kalman-cpp copied to clipboard

CMakeLists.txt

Open jcmayoral opened this issue 2 years ago • 1 comments

Install library

jcmayoral avatar Aug 29 '22 19:08 jcmayoral

I downloaded the Eigen library and was trying to link the external library in CMake but the current code didn't work. I had to modify it as follows -

cmake_minimum_required(VERSION 2.8.4)
project(kalman)

set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")

# find_package(Eigen3 REQUIRED)
# include_directories(${"EIGEN3_INCLUDE_DIR"})

set(SOURCE_FILES kalman.cpp kalman-test.cpp)
add_executable(kalman-test ${SOURCE_FILES})
target_link_directories(kalman-test PUBLIC "../absolute_path_to_eigen-3.4.0")
target_link_libraries(kalman-test Eigen)

So cmake .. command is able to compile the project and populate the build directory but I don't see any makefile, hence make command is not working. Is there something I am missing?

mechandansinha avatar Sep 01 '22 23:09 mechandansinha