aboutsummaryrefslogtreecommitdiffhomepage
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorGravatar hamelin.philippe <hamelin.philippe@ireq.ca>2011-01-17 09:59:40 -0500
committerGravatar hamelin.philippe <hamelin.philippe@ireq.ca>2011-01-17 09:59:40 -0500
commit5e28f3400578048a2122b83cd1b79a9dfc33a017 (patch)
tree7d0c8c16d227c1610caaee69d875c356e35776a1 /CMakeLists.txt
parent5010033d88ee9cab2df4fbdd7b023e9d80256c98 (diff)
Replace CMAKE_SOURCE_DIR with PROJECT_SOURCE_DIR to allow the cmake project to be included by a root project.
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt2
1 files changed, 1 insertions, 1 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index c4a0634f0..b2d19524b 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -24,7 +24,7 @@ endif()
#############################################################################
# automatically parse the version number
-file(READ "${CMAKE_SOURCE_DIR}/Eigen/src/Core/util/Macros.h" _eigen_version_header)
+file(READ "${PROJECT_SOURCE_DIR}/Eigen/src/Core/util/Macros.h" _eigen_version_header)
string(REGEX MATCH "define[ \t]+EIGEN_WORLD_VERSION[ \t]+([0-9]+)" _eigen_world_version_match "${_eigen_version_header}")
set(EIGEN_WORLD_VERSION "${CMAKE_MATCH_1}")
string(REGEX MATCH "define[ \t]+EIGEN_MAJOR_VERSION[ \t]+([0-9]+)" _eigen_major_version_match "${_eigen_version_header}")