From 707fcf0d8a7270f7970df522f4fe6b27c99c9a27 Mon Sep 17 00:00:00 2001 From: Guangyun Han Date: Wed, 11 Sep 2024 17:02:44 +0800 Subject: [PATCH] fix: respect onnxruntime_USE_PREINSTALLED_EIGEN option --- cmake/external/onnxruntime_external_deps.cmake | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/cmake/external/onnxruntime_external_deps.cmake b/cmake/external/onnxruntime_external_deps.cmake index 43f18abbe9522..2c6c4e709fb88 100644 --- a/cmake/external/onnxruntime_external_deps.cmake +++ b/cmake/external/onnxruntime_external_deps.cmake @@ -542,7 +542,9 @@ if(TARGET ONNX::onnx_proto AND NOT TARGET onnx_proto) add_library(onnx_proto ALIAS ONNX::onnx_proto) endif() -find_package(Eigen3 CONFIG) +if (onnxruntime_USE_PREINSTALLED_EIGEN) + find_package(Eigen3 CONFIG) +endif() if(Eigen3_FOUND) get_target_property(eigen_INCLUDE_DIRS Eigen3::Eigen INTERFACE_INCLUDE_DIRECTORIES) else()