I am attempting to include the Eigen libraries into my project.
I am using CMake and FetchContent to build the project. I was able to include another library using the same method.
A snippit of my "dependencies.cmake" is included below:
if (NOT TARGET endftk )
FetchContent_Declare( endftk
GIT_REPOSITORY https://github.com/njoy/ENDFtk.git
GIT_TAG origin/develop )
FetchContent_MakeAvailable( endftk)
endif()
if (NOT TARGET Eigen)
FetchContent_Declare( Eigen
GIT_REPOSITORY https://gitlab.com/libeigen/eigen.git
GIT_TAG origin/master )
FetchContent_MakeAvailable( Eigen)
endif()
I link both libraries using:
target_link_libraries(POLR
INTERFACE ENDFtk
INTERFACE eigen )
in my main header file I then include the libraries using:
#include <ENDFtk.hpp>
#include <Eigen>
I've also tried using the following:
#include <Eigen3>
#include <eigen>
#include <Eigen.hpp>
All of which fail with the following error message when attempting to make:
fatal error: Eigen: No such file or directory
However, I have no such issue including and using the ENDFtk library.
I've looked in my build/_deps
folder and I do see Eigen (and ENDFtk) there.
Does anybody know what I need to do in order to get Eigen to include?
I'm using: cmake version 3.22.1 gcc version 11.3.0
Please let me know if there is any crucial information I'm leaving out.
Note: POLR is the name of my project.