Created
June 26, 2023 13:58
-
-
Save alecjacobson/d265aa4b140a5aa80fa234adbcb3238f to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/CMakeLists.txt b/CMakeLists.txt | |
index 8801572..a4ab77b 100644 | |
--- a/CMakeLists.txt | |
+++ b/CMakeLists.txt | |
@@ -21,9 +21,11 @@ include(FeatureSummary) # More verbose Output for libraries using set_package_pr | |
# Look for supporting libraries | |
# ----------------------------- | |
-find_package(Eigen3 NO_MODULE REQUIRED) | |
-set_package_properties(Eigen3 PROPERTIES TYPE REQUIRED PURPOSE "C++ vector data structures") | |
-message(STATUS "Found Eigen3 Version: ${Eigen3_VERSION} Path: ${Eigen3_DIR}") | |
+if(NOT TARGET Eigen3::Eigen) | |
+ findjpackage(Eigen3 NO_MODULE REQUIRED) | |
+ set_package_properties(Eigen3 PROPERTIES TYPE REQUIRED PURPOSE "C++ vector data structures") | |
+ message(STATUS "Found Eigen3 Version: ${Eigen3_VERSION} Path: ${Eigen3_DIR}") | |
+endif() | |
# Setup library | |
# ------------- |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment