From a9aa6165bb254c386c419c72b01674ff02adb157 Mon Sep 17 00:00:00 2001 From: "Jamin W. Collins" Date: Mon, 29 Apr 2024 21:44:23 -0600 Subject: [PATCH] adding Eigen dependency, needed by OpenCV Signed-off-by: Jamin W. Collins --- deps/CMakeLists.txt | 2 ++ deps/Eigen/Eigen.cmake | 8 ++++++++ src/libslic3r/CMakeLists.txt | 2 ++ 3 files changed, 12 insertions(+) create mode 100644 deps/Eigen/Eigen.cmake diff --git a/deps/CMakeLists.txt b/deps/CMakeLists.txt index a21cc1bb5cc..aaaf2e2268b 100644 --- a/deps/CMakeLists.txt +++ b/deps/CMakeLists.txt @@ -221,6 +221,7 @@ endif () set(DEP_Boost_COMPONENTS system iostreams filesystem thread log locale regex date_time) include(Boost/Boost.cmake) +include(Eigen/Eigen.cmake) # The order of includes respects the dependencies between libraries include(Cereal/Cereal.cmake) @@ -258,6 +259,7 @@ include(FREETYPE/FREETYPE.cmake) set(_dep_list dep_Boost + dep_Eigen dep_TBB ${CURL_PKG} dep_wxWidgets diff --git a/deps/Eigen/Eigen.cmake b/deps/Eigen/Eigen.cmake new file mode 100644 index 00000000000..4d334041983 --- /dev/null +++ b/deps/Eigen/Eigen.cmake @@ -0,0 +1,8 @@ +orcaslicer_add_cmake_project( + Eigen + URL https://gitlab.com/libeigen/eigen/-/archive/3.4.0/eigen-3.4.0.tar.gz + URL_HASH SHA256=8586084f71f9bde545ee7fa6d00288b264a2b7ac3607b974e54d13e7162c1c72 + CMAKE_ARGS + -DCMAKE_POSITION_INDEPENDENT_CODE=ON + -DBUILD_TESTING=OFF +) diff --git a/src/libslic3r/CMakeLists.txt b/src/libslic3r/CMakeLists.txt index 926619dbf33..d1fb67d3edd 100644 --- a/src/libslic3r/CMakeLists.txt +++ b/src/libslic3r/CMakeLists.txt @@ -476,6 +476,8 @@ set(CGAL_DO_NOT_WARN_ABOUT_CMAKE_BUILD_TYPE ON CACHE BOOL "" FORCE) cmake_policy(PUSH) cmake_policy(SET CMP0011 NEW) find_package(CGAL REQUIRED) +# OpenCV depends on Eigen3, but does not use find_package to find it. +find_package(Eigen3 CONFIG) find_package(OpenCV REQUIRED core) cmake_policy(POP)