CMake: actual fix for compat with CMake v2.8.11
authordberzano <dario.berzano@cern.ch>
Mon, 2 Feb 2015 17:58:33 +0000 (18:58 +0100)
committerdberzano <dario.berzano@cern.ch>
Mon, 2 Feb 2015 18:00:35 +0000 (19:00 +0100)
a3c4bad6c822f84a2fa19893cf16afe22103eb1f did not really fix it

cmake/CMakeALICE.cmake

index 8bc298e..e9c90e1 100644 (file)
@@ -311,10 +311,10 @@ function(install_relative)
     # Prepare a distinct install command for each file, depending on its path
     foreach(_FILE ${_FILES})
 
-        if(CMAKE_VERSION VERSION_GREATER "2.8.11")
-            get_filename_component(_FILEPREFIX ${_FILE} DIRECTORY)
-        else()
+        if(CMAKE_VERSION VERSION_LESS "2.8.12")
             get_filename_component(_FILEPREFIX ${_FILE} PATH)
+        else()
+            get_filename_component(_FILEPREFIX ${_FILE} DIRECTORY)
         endif()
         #message(STATUS "[install_relative] ${_FILE} --> ${_FILEPREFIX}")