made project use FetchContent insteaf of relying on submodules
This commit is contained in:
parent
1b145ec9f8
commit
f574b0abe1
@ -1,4 +1,4 @@
|
|||||||
cmake_minimum_required(VERSION 3.10)
|
cmake_minimum_required(VERSION 3.14)
|
||||||
|
|
||||||
project(Geometry VERSION 0.1 LANGUAGES CXX)
|
project(Geometry VERSION 0.1 LANGUAGES CXX)
|
||||||
|
|
||||||
@ -8,9 +8,16 @@ endif ()
|
|||||||
|
|
||||||
set(CMAKE_CXX_STANDARD 17)
|
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)
|
add_subdirectory(src)
|
||||||
|
|
||||||
|
@ -1,5 +1,3 @@
|
|||||||
add_executable(Geometry main.cpp)
|
add_executable(Geometry main.cpp)
|
||||||
|
|
||||||
target_link_libraries(Geometry PUBLIC Eigen3::Eigen)
|
target_link_libraries(Geometry PUBLIC Eigen3::Eigen)
|
||||||
|
|
||||||
target_include_directories(Geometry PUBLIC "${PROJECT_BINARY_DIR}" "${PROJECT_SOURCE_DIR}/lib/eigen/Eigen")
|
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
#define GEOMETRY_MAIN_H
|
#define GEOMETRY_MAIN_H
|
||||||
|
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
#include <Dense>
|
#include <Eigen/Dense>
|
||||||
|
|
||||||
using namespace std;
|
using namespace std;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user