summaryrefslogtreecommitdiff
path: root/infra/cmake/packages/EigenSource-fd6845384b86Config.cmake
diff options
context:
space:
mode:
Diffstat (limited to 'infra/cmake/packages/EigenSource-fd6845384b86Config.cmake')
-rw-r--r--infra/cmake/packages/EigenSource-fd6845384b86Config.cmake26
1 files changed, 26 insertions, 0 deletions
diff --git a/infra/cmake/packages/EigenSource-fd6845384b86Config.cmake b/infra/cmake/packages/EigenSource-fd6845384b86Config.cmake
new file mode 100644
index 000000000..dc322cfc8
--- /dev/null
+++ b/infra/cmake/packages/EigenSource-fd6845384b86Config.cmake
@@ -0,0 +1,26 @@
+# find_package rejects version with commit number. Commit ID is appended to the package name
+# as a workaround.
+#
+# TODO Find a better way
+function(_import)
+ if(NOT DOWNLOAD_EIGEN)
+ set(EigenSource_FOUND FALSE PARENT_SCOPE)
+ return()
+ endif(NOT DOWNLOAD_EIGEN)
+
+ nnas_include(ExternalSourceTools)
+ nnas_include(ThirdPartyTools)
+
+ ThirdParty_URL(EIGEN_URL PACKAGE Eigen VERSION fd6845384b86)
+
+ ExternalSource_Download(EIGEN
+ DIRNAME EIGEN-fd6845384b86
+ CHECKSUM MD5=4c884968ede816a84c70e2cd2c81de8d
+ ${EIGEN_URL}
+ )
+
+ set(EigenSource_DIR ${EIGEN_SOURCE_DIR} PARENT_SCOPE)
+ set(EigenSource-fd6845384b86_FOUND TRUE PARENT_SCOPE)
+endfunction(_import)
+
+_import()