]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
RAW + ROOT map including ROOT libs
authoragrigora <alina.grigoras@cern.ch>
Fri, 3 Oct 2014 15:18:47 +0000 (17:18 +0200)
committeragrigora <alina.grigoras@cern.ch>
Mon, 15 Dec 2014 12:51:22 +0000 (13:51 +0100)
15 files changed:
CMakeLists.txt
RAW/CMakeLists.txt
RAW/MDC/CMakeLists.txt
RAW/RAWDatabase/AliRawDataHeader.h [moved from RAW/AliRawDataHeader.h with 100% similarity]
RAW/RAWDatabase/AliRawDataHeaderV3.h [moved from RAW/AliRawDataHeaderV3.h with 100% similarity]
RAW/RAWDatabase/AliStats.h
RAW/RAWDatabase/CMakeLists.txt
RAW/RAWDatarec/CMakeLists.txt
RAW/RAWDatarecOnline/CMakeLists.txt
RAW/RAWDatasim/CMakeLists.txt
RAW/alirawdump/CMakeLists.txt
RAW/almdc/CMakeLists.txt
RAW/dateStream/CMakeLists.txt
cmake/CMakeALICE.cmake
cmake/FindROOT.cmake

index ae7a5a8053e5593f5e94ce7cfa875b75154dd7f1..d42c9cc7f763728f563e4b8212ad651ec0bdc9af 100644 (file)
@@ -117,7 +117,7 @@ add_subdirectory (STEER)
 add_subdirectory (STAT)
 add_subdirectory (OADB)
 add_subdirectory (ANALYSIS)
-#add_subdirectory (RAW)
+add_subdirectory (RAW)
 #add_subdirectory (ITS)
 #add_subdirectory (TPC)
 #add_subdirectory (VZERO)
index dc7f021d2fae2a624e8b052327fadef18da64826..cc41ee2e2b21672fecc287519d624304fec8d5bb 100644 (file)
@@ -1,10 +1,22 @@
-# AliRoot Build System CMakeLists for RAW
-#
-# Author: Johny Jose m(johny.jose@cern.ch)
-#         Port of previous Makefile build to cmake
+# **************************************************************************
+# * Copyright(c) 1998-2014, ALICE Experiment at CERN, All rights reserved. *
+# *                                                                        *
+# * Author: The ALICE Off-line Project.                                    *
+# * Contributors are mentioned in the code where appropriate.              *
+# *                                                                        *
+# * Permission to use, copy, modify and distribute this software and its   *
+# * documentation strictly for non-commercial purposes is hereby granted   *
+# * without fee, provided that the above copyright notice appears in all   *
+# * copies and that both the copyright notice and this permission notice   *
+# * appear in the supporting documentation. The authors make no claims     *
+# * about the suitability of this software for any purpose. It is          *
+# * provided "as is" without express or implied warranty.                  *
+# **************************************************************************
 
-cmake_minimum_required(VERSION 2.8.8 FATAL_ERROR)
-
-file(GLOB PACKAGES CMake*.pkg)
-
-ALICE_BuildModule()
+# include the libraries
+add_subdirectory (RAWDatabase)
+add_subdirectory (RAWDatarec)
+add_subdirectory (RAWDatasim)
+add_subdirectory (RAWDatarecOnline)
+add_subdirectory (MDC)
+add_subdirectory (alirawdump)
index 1a11f6b49be47742f15b74d83118a07c243b92f6..6c3261d1a457dcc0c99ed43bb13bd9df510571cb 100644 (file)
@@ -22,6 +22,8 @@ include_directories(${CMAKE_SOURCE_DIR}/RAW/${MODULE})
 # Additional include folders in alphabetical order except ROOT
 include_directories(${ROOT_INCLUDE_DIRS}
                     ${CMAKE_SOURCE_DIR}/ITS
+                    ${CMAKE_SOURCE_DIR}/RAW/RAWDatabase
+                    ${CMAKE_SOURCE_DIR}/RAW/RAWDatarec
                     ${CMAKE_SOURCE_DIR}/STEER/ESD
                     ${CMAKE_SOURCE_DIR}/STEER/STEERBase
                     ${CMAKE_SOURCE_DIR}/TPC
@@ -48,6 +50,11 @@ string(REPLACE ".cxx" ".h" HDRS "${SRCS}")
 get_directory_property(incdirs INCLUDE_DIRECTORIES)
 generate_dictionary("${MODULE}" "${MODULE}LinkDef.h" "${HDRS}" "${incdirs}")
 
+# Generate the ROOT map
+# Dependecies
+set(LIBDEPS ITS ESD RAWDataBase RAWDatarec STEERBase TPC)
+generate_rootmap("${MODULE}" "${LIBDEPS}" "${CMAKE_CURRENT_SOURCE_DIR}/${MODULE}LinkDef.h")
+
 # Add a library to the project using the specified source files
 add_library(${MODULE} SHARED ${SRCS} G__${MODULE}.cxx)
 
index 3d8b0cbdf4323284c9a1ed16bd39e92f8e28e86e..9002f29453418263ffcd4fca5d3a2a1fdfbbc0e5 100644 (file)
@@ -12,6 +12,7 @@
 //                                                                      //
 //////////////////////////////////////////////////////////////////////////
 
+
 #ifndef ROOT_TObject
 #include <TObject.h>
 #endif
 #include <TString.h>
 #endif
 
-
 // Forward class declarations
-class TH1F;
-
+#ifndef ROOT_TH1F
+#include <TH1F.h>
+#endif
 
 class AliStats : public TObject {
 
index 07ad9875dc43c9d4e1530ad1ca44fdb0303a6353..4358d6911135809642fcb9d49d36690b222880ce 100644 (file)
@@ -48,13 +48,18 @@ set(SRCS
 string(REPLACE ".cxx" ".h" HDRS "${SRCS}")
 
 # Extra headers in alphabetical order
-set(HDRS ${HDRS} AliRawEventHeaderVersions.h)
+set(HDRS ${HDRS} AliRawEventHeaderVersions.h AliRawDataHeader.h AliRawDataHeaderV3.h)
 
 # Generate the dictionary
 # It will create G_ARG1.cxx and G_ARG1.h / ARG1 = function first argument
 get_directory_property(incdirs INCLUDE_DIRECTORIES)
 generate_dictionary("${MODULE}" "${MODULE}LinkDef.h" "${HDRS}" "${incdirs}")
 
+# Generate the ROOT map
+# Dependecies
+set(LIBDEPS ESD STEERBase)
+generate_rootmap("${MODULE}" "${LIBDEPS}" "${CMAKE_CURRENT_SOURCE_DIR}/${MODULE}LinkDef.h")
+
 # Add a library to the project using the specified source files
 add_library(${MODULE} SHARED ${SRCS} G__${MODULE}.cxx)
 
index fabf591f4f57f2b99f3f2caf3aa4391a30b0b2b8..ce716f3d4343b6607b9d81ac574a22d592986504 100644 (file)
@@ -22,7 +22,9 @@ include_directories(${CMAKE_SOURCE_DIR}/RAW/${MODULE})
 # Additional include folders in alphabetical order except ROOT
 include_directories(${ROOT_INCLUDE_DIRS}
                     ${CMAKE_SOURCE_DIR}/HLT/rec
+                    ${CMAKE_SOURCE_DIR}/RAW/RAWDatabase
                     ${CMAKE_SOURCE_DIR}/STEER/ESD
+                    ${CMAKE_SOURCE_DIR}/STEER/STEERBase
                    )
 # Sources in alphabetical order
 set(SRCS
@@ -49,6 +51,11 @@ string(REPLACE ".cxx" ".h" HDRS "${SRCS}")
 get_directory_property(incdirs INCLUDE_DIRECTORIES)
 generate_dictionary("${MODULE}" "${MODULE}LinkDef.h" "${HDRS}" "${incdirs}")
 
+# Generate the ROOT map
+# Dependecies
+set(LIBDEPS ESD HLTrec RAWDatabase STEERBase)
+generate_rootmap("${MODULE}" "${LIBDEPS}" "${CMAKE_CURRENT_SOURCE_DIR}/${MODULE}LinkDef.h")
+
 # Add a library to the project using the specified source files
 add_library(${MODULE} SHARED ${SRCS} G__${MODULE}.cxx)
 
index 36b8708a0fa478f04961e17ae2eb4b0c3872ae41..a2144ccfd28cb91be1df8f4d55e2eb0fada7df65 100644 (file)
@@ -21,7 +21,10 @@ include_directories(${CMAKE_SOURCE_DIR}/RAW/${MODULE})
 
 # Additional include folders in alphabetical order except ROOT
 include_directories(${ROOT_INCLUDE_DIRS}
+                    ${CMAKE_SOURCE_DIR}/RAW/RAWDatabase
+                    ${CMAKE_SOURCE_DIR}/RAW/RAWDatarec
                     ${CMAKE_SOURCE_DIR}/STEER/ESD
+                    ${CMAKE_SOURCE_DIR}/STEER/STEERBase
                    )
 
 # Sources in alphabetical order
@@ -37,6 +40,11 @@ string(REPLACE ".cxx" ".h" HDRS "${SRCS}")
 get_directory_property(incdirs INCLUDE_DIRECTORIES)
 generate_dictionary("${MODULE}" "${MODULE}LinkDef.h" "${HDRS}" "${incdirs}")
 
+# Generate the ROOT map
+# Dependecies
+set(LIBDEPS ESD RAWDatabase RAWDatarec STEERBase)
+generate_rootmap("${MODULE}" "${LIBDEPS}" "${CMAKE_CURRENT_SOURCE_DIR}/${MODULE}LinkDef.h")
+
 # Add a library to the project using the specified source files
 add_library(${MODULE} SHARED ${SRCS} G__${MODULE}.cxx)
 
index 109489dd2e321550d61414112af712858bb93bcc..5e4d028a41611bf231af5cd433170ab010b419f3 100644 (file)
@@ -21,7 +21,9 @@ include_directories(${CMAKE_SOURCE_DIR}/RAW/${MODULE})
 
 # Additional include folders in alphabetical order except ROOT
 include_directories(${ROOT_INCLUDE_DIRS}
+                    ${CMAKE_SOURCE_DIR}/RAW/RAWDatabase
                     ${CMAKE_SOURCE_DIR}/STEER/STEER
+                    ${CMAKE_SOURCE_DIR}/STEER/STEERBase
                    )
 
 # Sources in alphabetical order
@@ -39,6 +41,11 @@ string(REPLACE ".cxx" ".h" HDRS "${SRCS}")
 get_directory_property(incdirs INCLUDE_DIRECTORIES)
 generate_dictionary("${MODULE}" "${MODULE}LinkDef.h" "${HDRS}" "${incdirs}")
 
+# Generate the ROOT map
+# Dependecies
+set(LIBDEPS RAWDatabase STEERBase STEER)
+generate_rootmap("${MODULE}" "${LIBDEPS}" "${CMAKE_CURRENT_SOURCE_DIR}/${MODULE}LinkDef.h")
+
 # Add a library to the project using the specified source files
 add_library(${MODULE} SHARED ${SRCS} G__${MODULE}.cxx)
 
index 290273187b2acba00e0fe7afc6bae10ed6326656..1a115486a3492a8b5f2e865f715d6274441897aa 100644 (file)
@@ -26,11 +26,16 @@ include_directories(${ROOT_INCLUDE_DIRS}
                     ${CMAKE_SOURCE_DIR}/STEER/STEERBase
                    )
 
-set(ROOTEXTRALIBS "-L${ROOTLIBDIR} -lThread -lGeom -lVMC -lMinuit")
+link_directories(${ROOT_LIBDIR})
+
+# Libraries which are not in the default ROOT list (root-config --libs)
+set(ROOTEXTRALIBS Geom VMC Minuit)
 
 # Add an executable to the project using the specified source files
 add_executable(${MODULE} alirawdump_main.cxx)
-target_link_libraries(${MODULE} STEERBase RAWDatabase ${ROOTEXTRALIBS} ${ROOTLIBS})
+
+message(STATUS "LIBS = ${ROOT_LIBRARIES}")
+target_link_libraries(${MODULE} STEERBase RAWDatabase ${ROOTEXTRALIBS} ${ROOT_LIBRARIES})
 
 # Installation
 install(TARGETS ${MODULE} RUNTIME DESTINATION bin)
\ No newline at end of file
index e6a925ef96f9c9da078f185fcfeeeab9b89d8212..7e89023c259944168695a0fa2910a3d9b176c796 100644 (file)
@@ -1,20 +1,37 @@
-cmake_minimum_required (VERSION 2.8)
+# **************************************************************************
+# * Copyright(c) 1998-2014, ALICE Experiment at CERN, All rights reserved. *
+# *                                                                        *
+# * Author: The ALICE Off-line Project.                                    *
+# * Contributors are mentioned in the code where appropriate.              *
+# *                                                                        *
+# * Permission to use, copy, modify and distribute this software and its   *
+# * documentation strictly for non-commercial purposes is hereby granted   *
+# * without fee, provided that the above copyright notice appears in all   *
+# * copies and that both the copyright notice and this permission notice   *
+# * appear in the supporting documentation. The authors make no claims     *
+# * about the suitability of this software for any purpose. It is          *
+# * provided "as is" without express or implied warranty.                  *
+# **************************************************************************
 
 # Module
 set (MODULE alimdc)
 include_directories(${CMAKE_SOURCE_DIR}/${MODULE})
-include_directories( ${ROOTSYS}/include ${CMAKE_SOURCE_DIR}/STEER/STEERBase  ${CMAKE_SOURCE_DIR}/RAW/RAWDatabase ${CMAKE_SOURCE_DIR}/RAW/RAWDatarec)
 
-# Standard Root libraries
-execute_process(COMMAND root-config --libs OUTPUT_VARIABLE ROOTLIBS OUTPUT_STRIP_TRAILING_WHITESPACE)
+# Aditional include folders in alphabetical order except ROOT
+include_directories(${ROOT_INCLUDE_DIRS} 
+                    ${CMAKE_SOURCE_DIR}/STEER/STEERBase
+                    ${CMAKE_SOURCE_DIR}/RAW/RAWDatabase
+                    ${CMAKE_SOURCE_DIR}/RAW/RAWDatarec
+                   )
 
-# Additional Root libraries
-execute_process(COMMAND root-config --libdir OUTPUT_VARIABLE ROOTLIBDIR OUTPUT_STRIP_TRAILING_WHITESPACE)
-set(ROOTEXTRALIBS "-L${ROOTLIBDIR} -lThread -lGeom -lVMC -lMinuit")
+link_directories(${ROOT_LIBDIR})
+
+# ROOT libraries that are not in root-config --libs
+set(ROOTEXTRALIBS Geom VMC Minuit)
 
 # Add an executable to the project using the specified source files
 add_executable(${MODULE} alimdc_main.cxx)
-target_link_libraries(${MODULE} STEERBase RAWDatabase ${ROOTEXTRALIBS} ${ROOTLIBS})
+target_link_libraries(${MODULE} STEERBase RAWDatabase ${ROOTEXTRALIBS} ${ROOT_LIBRARIES})
 
 # Installation
 install(TARGETS ${MODULE} RUNTIME DESTINATION bin)
index 9780442380f16a4595399baa56666a19c24e2244..65b9e916645917a1b2ca1a76c02faf56705526d1 100644 (file)
@@ -1,20 +1,39 @@
-cmake_minimum_required (VERSION 2.8)
+# **************************************************************************
+# * Copyright(c) 1998-2014, ALICE Experiment at CERN, All rights reserved. *
+# *                                                                        *
+# * Author: The ALICE Off-line Project.                                    *
+# * Contributors are mentioned in the code where appropriate.              *
+# *                                                                        *
+# * Permission to use, copy, modify and distribute this software and its   *
+# * documentation strictly for non-commercial purposes is hereby granted   *
+# * without fee, provided that the above copyright notice appears in all   *
+# * copies and that both the copyright notice and this permission notice   *
+# * appear in the supporting documentation. The authors make no claims     *
+# * about the suitability of this software for any purpose. It is          *
+# * provided "as is" without express or implied warranty.                  *
+# **************************************************************************
 
 # Module
-set (MODULE dateStream)
+set(MODULE dateStream)
+
 include_directories(${CMAKE_SOURCE_DIR}/${MODULE})
-include_directories( ${ROOTSYS}/include ${CMAKE_SOURCE_DIR}/STEER/STEERBase  ${CMAKE_SOURCE_DIR}/RAW/RAWDatabase ${CMAKE_SOURCE_DIR}/RAW/RAWDatarec)
 
-# Standard Root libraries
-execute_process(COMMAND root-config --libs OUTPUT_VARIABLE ROOTLIBS OUTPUT_STRIP_TRAILING_WHITESPACE)
+# Aditional include folders in alphabetical order except ROOT
+include_directories(${ROOT_INCLUDE_DIRS}
+                    ${CMAKE_SOURCE_DIR}/RAW/RAWDatabase
+                    ${CMAKE_SOURCE_DIR}/RAW/RAWDatarec
+                    ${CMAKE_SOURCE_DIR}/STEER/STEERBase
+                   )
+
+
+link_directories(${ROOT_LIBDIR})
 
-# Additional Root libraries
-execute_process(COMMAND root-config --libdir OUTPUT_VARIABLE ROOTLIBDIR OUTPUT_STRIP_TRAILING_WHITESPACE)
-set(ROOTEXTRALIBS "-L${ROOTLIBDIR} -lThread -lGeom -lVMC -lMinuit")
+# Aditional ROOT libraries that are not shoed by root-config --libs
+set(ROOTEXTRALIBS Geom VMC Minuit)
 
 # Add an executable to the project using the specified source files
 add_executable(${MODULE} alimdc_main.cxx)
-target_link_libraries(${MODULE} STEERBase RAWDatabase ${ROOTEXTRALIBS} ${ROOTLIBS})
+target_link_libraries(${MODULE} STEERBase RAWDatabase ${ROOTEXTRALIBS} ${ROOT_LIBRARIES})
 
 # Installation
 install(TARGETS ${MODULE} RUNTIME DESTINATION bin)
index 47505823c6bc87e88dedd78d7f461a4bfc9481a6..6cb09370ba992938804120a3321320dfeb6e2b04 100644 (file)
@@ -35,25 +35,25 @@ endmacro(generate_dictionary)
 # @LIBDEPS - library dependencies
 # @LINKDEF - LinkDef header
 macro(generate_rootmap LIBNAME LIBDEPS LINKDEF)
-    message(STATUS "LIBNAME = ${LIBNAME}")
-    message(STATUS "LIBDEPS = ${LIBDEPS}")
-    message(STATUS "LINKDEF = ${LINKDEF}")
+#    message(STATUS "LIBNAME = ${LIBNAME}")
+#    message(STATUS "LIBDEPS = ${LIBDEPS}")
+#    message(STATUS "LINKDEF = ${LINKDEF}")
     
-    message(STATUS "ROOT_LIBMAP=${ROOT_LIBMAP}")
+#    message(STATUS "ROOT_LIBMAP=${ROOT_LIBMAP}")
     
-    foreach(d ${LIBDEPS})
-        get_filename_component(_ext ${d} EXT)
-        if(_ext)
-            set(Int_DEPENDENCIES ${Int_DEPENDENCIES} ${d})
+    foreach(file ${LIBDEPS})
+        get_filename_component(ext ${file} EXT)
+        if(ext)
+            set(LOCAL_DEPS ${DEPENDENCIES} ${file})
         else()
-            set(Int_DEPENDENCIES ${Int_DEPENDENCIES} lib${d}.so)
+            set(LOCAL_DEPS ${DEPENDENCIES} lib${file}.so)
         endif()
     endforeach()
     
     message(STATUS "Generating ROOT map for ${LIBNAME}")
     add_custom_command(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/lib${LIBNAME}.rootmap
                        COMMAND LD_LIBRARY_PATH=${ROOT_LIBDIR}:$ENV{LD_LIBRARY_PATH} ${ROOT_LIBMAP}
-                       ARGS -o ${CMAKE_CURRENT_BINARY_DIR}/lib${LIBNAME}.rootmap -l lib${LIBNAME}.so -d ${Int_DEPENDENCIES} -c ${LINKDEF}
+                       ARGS -o ${CMAKE_CURRENT_BINARY_DIR}/lib${LIBNAME}.rootmap -l lib${LIBNAME}.so -d ${LOCAL_DEPS} -c ${LINKDEF}
                        DEPENDS ${LIBNAME}
                        WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} VERBATIM
                       )
index b422181cf3b494094cac6d4cd1a1515144a06cc0..8a665319e7a8bc045eb00af1a740e48271bd7bc4 100644 (file)
@@ -26,8 +26,8 @@
 # - ROOT_FEATURES - list of build features for ROOT
 # - ROOT_LIBDIR - full path to ROOT library folder
 # - ROOT_LIBRARIES - libraries needed for the package to be used
+# - ROOT_GLIBRARIES - regular + GUI ROOT libraries + path to be used during linking
 # - ROOT_INCLUDE_DIRS - full path to ROOT include folder
-# - ROOT_GLIBS - regular + GUI ROOT libraries + path to be used during linking
 # - ROOT_HASALIEN - ROOT was built with AliEn support
 # - ROOT_HASXML - ROOT was built with XML support
 
@@ -69,7 +69,8 @@ if(ROOTSYS)
     if(error)
         message(FATAL_ERROR "Error retrieving ROOT version : ${error}")
     endif(error)
-
+    string(STRIP ${ROOT_VERSION} ROOT_VERSION)
+    
     # Extract major, minor, and patch versions from
     string(REGEX REPLACE "^([0-9]+)\\.[0-9][0-9]+\\/[0-9][0-9]+.*" "\\1" ROOT_VERSION_MAJOR "${ROOT_VERSION}")
     string(REGEX REPLACE "^[0-9]+\\.([0-9][0-9])+\\/[0-9][0-9]+.*" "\\1" ROOT_VERSION_MINOR "${ROOT_VERSION}")
@@ -83,42 +84,68 @@ if(ROOTSYS)
     else()
         message(STATUS "ROOT was build with the following features: ${ROOT_FEATURES}")
     endif(error)
-
+    string(STRIP ${ROOT_FEATURES} ROOT_FEATURES)
+    
     # Checking for ROOT libdir
     execute_process(COMMAND ${ROOT_CONFIG} --libdir OUTPUT_VARIABLE ROOT_LIBDIR ERROR_VARIABLE error OUTPUT_STRIP_TRAILING_WHITESPACE )
     if(error)
         message(FATAL_ERROR "Error retrieving ROOT libdir: ${error}")
     endif(error)
+    string(STRIP ${ROOT_LIBDIR} ROOT_LIBDIR)
 
     # Checking for ROOT libs
-    execute_process(COMMAND ${ROOT_CONFIG} --libs OUTPUT_VARIABLE ROOT_LIBRARIES ERROR_VARIABLE error OUTPUT_STRIP_TRAILING_WHITESPACE )
+    execute_process(COMMAND ${ROOT_CONFIG} --noldflags --libs OUTPUT_VARIABLE ROOT_LIBS ERROR_VARIABLE error OUTPUT_STRIP_TRAILING_WHITESPACE )
     if(error)
         message(FATAL_ERROR "Error retrieving ROOT libdir: ${error}")
     endif(error)
-
+    string(STRIP ${ROOT_LIBS} ROOT_LIBS)
+    
+    foreach(lib ${ROOT_LIBS})
+        string(REPLACE "-rdynamic" "" new_lib ${lib})
+        string(REPLACE "-l" "" lib ${new_lib})
+        set(ROOT_LIBRARIES ${ROOT_LIBRARIES} ${lib})
+    endforeach()
+    string(STRIP ${ROOT_LIBRARIES} ROOT_LIBRARIES)
+    separate_arguments(ROOT_LIBRARIES)
+    
     # Checking for ROOT incdir
     execute_process(COMMAND ${ROOT_CONFIG} --incdir OUTPUT_VARIABLE ROOT_INCDIR ERROR_VARIABLE error OUTPUT_STRIP_TRAILING_WHITESPACE )
     if(error)
         message(FATAL_ERROR "Error retrieving ROOT incdir: ${error}")
     endif(error)
-
+    string(STRIP ${ROOT_INCDIR} ROOT_INCDIR)
+    
     # Checking for glibs
-    execute_process(COMMAND ${ROOT_CONFIG} --glibs OUTPUT_VARIABLE ROOT_GLIBS ERROR_VARIABLE error OUTPUT_STRIP_TRAILING_WHITESPACE )
+    execute_process(COMMAND ${ROOT_CONFIG} --noldflags --glibs OUTPUT_VARIABLE ROOT_GLIBS ERROR_VARIABLE error OUTPUT_STRIP_TRAILING_WHITESPACE )
     if(error)
         message(FATAL_ERROR "Error retrieving ROOT glibs: ${error}")
     endif(error)
 
     # Checking for glibs
+    string(STRIP ${ROOT_GLIBS} ROOT_GLIBS)
+
+    foreach(lib ${ROOT_GLIBS})
+        string(REPLACE "-rdynamic" "" new_lib "${lib}")
+        string(REPLACE "-l" "" lib "${new_lib}")
+        set(ROOT_GLIBRARIES ${ROOT_GLIBRARIES} ${lib})
+    endforeach()
+    string(STRIP ${ROOT_GLIBRARIES} ROOT_GLIBRARIES)
+    separate_arguments(ROOT_GLIBRARIES)
+    
+    # Checking for AliEn support
     execute_process(COMMAND ${ROOT_CONFIG} --has-alien OUTPUT_VARIABLE ROOT_HASALIEN ERROR_VARIABLE error OUTPUT_STRIP_TRAILING_WHITESPACE )
     if(error)
         message(FATAL_ERROR "Error checking if ROOT was build with AliEn support: ${error}")
     endif(error)
-
+    string(STRIP ${ROOT_HASALIEN} ROOT_HASALIEN)
+    
+    # Checking for xml support
     execute_process(COMMAND ${ROOT_CONFIG} --has-xml OUTPUT_VARIABLE ROOT_HASXML ERROR_VARIABLE error OUTPUT_STRIP_TRAILING_WHITESPACE )
     if(error)
         message(FATAL_ERROR "Error checking if ROOT was build with xml support: ${error}")
     endif(error)
-
+    string(STRIP ${ROOT_HASXML} ROOT_HASXML)
+    
     set(ROOT_FOUND TRUE)
 else()
     message(FATAL_ERROR "ROOT installation not found! Please point to the ROOT installation using -DROOTSYS=ROOT_INSTALL_DIR.")