Fix for AliEn warnings
authoragrigora <alina.grigoras@cern.ch>
Tue, 16 Dec 2014 14:42:15 +0000 (15:42 +0100)
committeragrigora <alina.grigoras@cern.ch>
Tue, 16 Dec 2014 14:42:27 +0000 (15:42 +0100)
cmake/FindROOT.cmake

index a2b86f2..c131149 100644 (file)
@@ -148,12 +148,25 @@ if(ROOTSYS)
            if(ALIEN)
                add_definitions(-DWITHALIEN)
                
-               # AliEn might bring some system libraries, we need to follow them
-               link_directories(${ALIEN}/lib)
-               link_directories(${ALIEN}/api/lib)
+               # AliEn might bring some system libraries, we need to use them
+               if(EXISTS "${ALIEN}/lib")
+                   link_directories(${ALIEN}/lib)
+               endif()
+               
+               # api/lib should always exists
+               if(EXISTS "${ALIEN}/api/lib")
+                   link_directories(${ALIEN}/api/lib)
+               endif()
                
                # include for AliEn
-               include_directories(${ALIEN}/include)
+               if(EXISTS "${ALIEN}/include")
+                   include_directories(${ALIEN}/include)
+               endif()
+               
+               # api/include always exists
+               if(EXISTS "${ALIEN}/api/include")
+                   include_directories(${ALIEN}/api/include)
+               endif()
                
                set(ROOT_HASALIEN TRUE)
            else(ALIEN)