From: dberzano Date: Mon, 2 Feb 2015 17:34:36 +0000 (+0100) Subject: CMake: fixed compat problem with CMake v2.8.11 X-Git-Url: http://git.uio.no/git/?a=commitdiff_plain;h=a3c4bad6c822f84a2fa19893cf16afe22103eb1f;p=u%2Fmrichter%2FAliRoot.git CMake: fixed compat problem with CMake v2.8.11 --- diff --git a/CMakeLists.txt b/CMakeLists.txt index 91d2c9bfc8d..fcc380cb816 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -118,7 +118,7 @@ set(ALIROOT_STATIC CACHE STRING "ENABLE static building of AliRoot: ON") if(DA) if(NOT DIMDIR AND NOT ODIR) set(DA FALSE) - message(FATAL_ERROR "Das enabled but no DIMDIR and ODIR set. Please set DIMDIR to DIM installation and ODIR to platform (default linux)") + message(FATAL_ERROR "DAs enabled but no DIMDIR and ODIR set. Please set DIMDIR to DIM installation and ODIR to platform (default linux)") endif() if(NOT DATE_FOUND) diff --git a/cmake/CMakeALICE.cmake b/cmake/CMakeALICE.cmake index c8f0e24a08b..8bc298e9631 100644 --- a/cmake/CMakeALICE.cmake +++ b/cmake/CMakeALICE.cmake @@ -311,7 +311,11 @@ function(install_relative) # Prepare a distinct install command for each file, depending on its path foreach(_FILE ${_FILES}) - get_filename_component(_FILEPREFIX ${_FILE} DIRECTORY) + if(CMAKE_VERSION VERSION_GREATER "2.8.11") + get_filename_component(_FILEPREFIX ${_FILE} DIRECTORY) + else() + get_filename_component(_FILEPREFIX ${_FILE} PATH) + endif() #message(STATUS "[install_relative] ${_FILE} --> ${_FILEPREFIX}") string(SUBSTRING ${_FILE} 0 1 _FILE_FIRST)