add eigen dep

This commit is contained in:
papush! 2021-11-09 22:17:14 +01:00
parent d76d891fca
commit c664ee1b8a
2 changed files with 13 additions and 1 deletions

View File

@ -4,6 +4,7 @@ project(tp LANGUAGES C CXX)
find_package(Qt5 REQUIRED COMPONENTS Core Gui Widgets) find_package(Qt5 REQUIRED COMPONENTS Core Gui Widgets)
add_subdirectory(external/OpenMesh) add_subdirectory(external/OpenMesh)
add_subdirectory(external/Eigen)
add_executable(${PROJECT_NAME}) add_executable(${PROJECT_NAME})
target_sources(${PROJECT_NAME} PRIVATE target_sources(${PROJECT_NAME} PRIVATE
@ -24,7 +25,8 @@ target_sources(${PROJECT_NAME} PRIVATE
src/util.h) src/util.h)
target_link_libraries(${PROJECT_NAME} PRIVATE target_link_libraries(${PROJECT_NAME} PRIVATE
Qt5::Core Qt5::Gui Qt5::Widgets Qt5::Core Qt5::Gui Qt5::Widgets
OpenMeshCore) OpenMeshCore
eigen)
target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_11) target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_11)
set_target_properties(${PROJECT_NAME} PROPERTIES set_target_properties(${PROJECT_NAME} PROPERTIES
AUTOMOC ON AUTOMOC ON

10
external/Eigen/CMakeLists.txt vendored Normal file
View File

@ -0,0 +1,10 @@
cmake_minimum_required(VERSION 3.15)
include(FetchContent)
FetchContent_Declare(
Eigen
URL https://gitlab.com/libeigen/eigen/-/archive/3.4.0/eigen-3.4.0.tar.gz
URL_HASH MD5=4c527a9171d71a72a9d4186e65bea559)
FetchContent_MakeAvailable(Eigen)