diff --git a/CMakeLists.txt b/CMakeLists.txt index 2b8d89e..1b67fb8 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.10) +cmake_minimum_required(VERSION 3.14) project(Geometry VERSION 0.1 LANGUAGES CXX) @@ -8,9 +8,16 @@ endif () set(CMAKE_CXX_STANDARD 17) -include_directories(${PROJECT_SOURCE_DIR}/include) +include(FetchContent) -add_subdirectory(lib/eigen) +FetchContent_Declare( + eigen + GIT_REPOSITORY https://gitlab.com/libeigen/eigen.git + GIT_TAG 3.4.0 +) +FetchContent_MakeAvailable(eigen) + +include_directories(${PROJECT_SOURCE_DIR}/include) add_subdirectory(src) diff --git a/app/CMakeLists.txt b/app/CMakeLists.txt index c639e6e..c5a8f51 100644 --- a/app/CMakeLists.txt +++ b/app/CMakeLists.txt @@ -1,5 +1,3 @@ add_executable(Geometry main.cpp) target_link_libraries(Geometry PUBLIC Eigen3::Eigen) - -target_include_directories(Geometry PUBLIC "${PROJECT_BINARY_DIR}" "${PROJECT_SOURCE_DIR}/lib/eigen/Eigen") diff --git a/include/main.h b/include/main.h index 74c6840..c9d4a50 100644 --- a/include/main.h +++ b/include/main.h @@ -6,7 +6,7 @@ #define GEOMETRY_MAIN_H #include -#include +#include using namespace std;