Eclipse: improve (fix ?) version detection on OSX

This is probably related to a framework installation I guess.
This is part of the patch in #13367 from Nicholas Yue.

Alex
This commit is contained in:
Alex Neundorf 2012-07-28 11:58:04 +02:00
parent bcccddc7e9
commit 53cc1026bc
1 changed files with 3 additions and 0 deletions

View File

@ -24,6 +24,9 @@ FUNCTION(_FIND_ECLIPSE_VERSION)
GET_FILENAME_COMPONENT(_REALPATH_CMAKE_ECLIPSE_EXECUTABLE "${CMAKE_ECLIPSE_EXECUTABLE}" REALPATH) GET_FILENAME_COMPONENT(_REALPATH_CMAKE_ECLIPSE_EXECUTABLE "${CMAKE_ECLIPSE_EXECUTABLE}" REALPATH)
GET_FILENAME_COMPONENT(_ECLIPSE_DIR "${_REALPATH_CMAKE_ECLIPSE_EXECUTABLE}" PATH) GET_FILENAME_COMPONENT(_ECLIPSE_DIR "${_REALPATH_CMAKE_ECLIPSE_EXECUTABLE}" PATH)
FILE(GLOB _ECLIPSE_FEATURE_DIR "${_ECLIPSE_DIR}/features/org.eclipse.platform*") FILE(GLOB _ECLIPSE_FEATURE_DIR "${_ECLIPSE_DIR}/features/org.eclipse.platform*")
IF(APPLE AND NOT _ECLIPSE_FEATURE_DIR)
FILE(GLOB _ECLIPSE_FEATURE_DIR "${_ECLIPSE_DIR}/../../../features/org.eclipse.platform*")
ENDIF()
IF("${_ECLIPSE_FEATURE_DIR}" MATCHES ".+org.eclipse.platform_([0-9]+\\.[0-9]+).+") IF("${_ECLIPSE_FEATURE_DIR}" MATCHES ".+org.eclipse.platform_([0-9]+\\.[0-9]+).+")
SET(_ECLIPSE_VERSION ${CMAKE_MATCH_1}) SET(_ECLIPSE_VERSION ${CMAKE_MATCH_1})
ENDIF() ENDIF()