diff options
author | David Cole <david.cole@kitware.com> | 2012-03-21 17:27:58 (GMT) |
---|---|---|
committer | CMake Topic Stage <kwrobot@kitware.com> | 2012-03-21 17:27:58 (GMT) |
commit | 44495fa78c97de9b28e5828932ec1c68c648fa13 (patch) | |
tree | 7e56c78d41a0fef80fa3dd1af1c9b4043e4a5115 /Modules | |
parent | d6d221d4bd64604a525a9d8880b6b8f910704784 (diff) | |
parent | 00af40b29b5170b9709b6a676bf765595d9a0aee (diff) | |
download | CMake-44495fa78c97de9b28e5828932ec1c68c648fa13.zip CMake-44495fa78c97de9b28e5828932ec1c68c648fa13.tar.gz CMake-44495fa78c97de9b28e5828932ec1c68c648fa13.tar.bz2 |
Merge topic 'UseRealPathWhenFindingEclipse'
00af40b Eclipse: fix #13036, make version detection work with symlinks
Diffstat (limited to 'Modules')
-rw-r--r-- | Modules/CMakeFindEclipseCDT4.cmake | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/Modules/CMakeFindEclipseCDT4.cmake b/Modules/CMakeFindEclipseCDT4.cmake index dd06128..a4264e7 100644 --- a/Modules/CMakeFindEclipseCDT4.cmake +++ b/Modules/CMakeFindEclipseCDT4.cmake @@ -20,7 +20,9 @@ FIND_PROGRAM(CMAKE_ECLIPSE_EXECUTABLE NAMES eclipse DOC "The Eclipse executable" FUNCTION(_FIND_ECLIPSE_VERSION) # This code is in a function so the variables used here have only local scope IF(CMAKE_ECLIPSE_EXECUTABLE) - GET_FILENAME_COMPONENT(_ECLIPSE_DIR "${CMAKE_ECLIPSE_EXECUTABLE}" PATH) + # use REALPATH to resolve symlinks (http://public.kitware.com/Bug/view.php?id=13036) + GET_FILENAME_COMPONENT(_REALPATH_CMAKE_ECLIPSE_EXECUTABLE "${CMAKE_ECLIPSE_EXECUTABLE}" REALPATH) + GET_FILENAME_COMPONENT(_ECLIPSE_DIR "${_REALPATH_CMAKE_ECLIPSE_EXECUTABLE}" PATH) FILE(GLOB _ECLIPSE_FEATURE_DIR "${_ECLIPSE_DIR}/features/org.eclipse.platform*") IF("${_ECLIPSE_FEATURE_DIR}" MATCHES ".+org.eclipse.platform_([0-9]+\\.[0-9]+).+") SET(_ECLIPSE_VERSION ${CMAKE_MATCH_1}) |