Fixed a bug with finding svn repository thru a symlink and excluded alimdc-static...
authorjjose <jjose@f7af4fe6-9843-0410-8265-dc069ae4e863>
Fri, 22 Oct 2010 12:29:29 +0000 (12:29 +0000)
committerjjose <jjose@f7af4fe6-9843-0410-8265-dc069ae4e863>
Fri, 22 Oct 2010 12:29:29 +0000 (12:29 +0000)
CMakeLists.txt
cmake/ALICE_CMake.cmake
cmake/FindROOT.cmake

index 69450fb..0edd1fa 100644 (file)
@@ -30,6 +30,7 @@ else()
   message(STATUS "AliRoot files will be installed in ${ALICE_INSTALL}")
 endif(NOT ALICE_INSTALL)
 
+get_filename_component(PROJECT_SOURCE_DIR "${PROJECT_SOURCE_DIR}" REALPATH)
 set(CMAKE_MODULE_PATH "${PROJECT_SOURCE_DIR}/cmake")
 
 include(ALICE_CMake)
index 9424bef..9775d73 100644 (file)
@@ -502,16 +502,19 @@ macro(ALICE_BuildExecutable)
 # ------------------------------
   if(PACKAGE STREQUAL "alimdc")
 
-    add_executable(${PACKAGE}-static ${PFS} ${PCS} ${PS} ${PDS})
+    add_executable(${PACKAGE}-static EXCLUDE_FROM_ALL ${PFS} ${PCS} ${PS} ${PDS})
     set_target_properties(${PACKAGE}-static PROPERTIES OUTPUT_NAME alimdca)
     add_custom_target( libAliMDC
                         COMMAND rm -rf ${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/libAliMDC.a
                        COMMAND rm -rf junkmdc
                        COMMAND mkdir junkmdc && cd junkmdc && ar x ../libRAWDatabase.a && ar x ../libMDC.a && ar x ../libESD.a && ar x ../libSTEERBase.a && ar r ../libAliMDC.a *.o && cd .. && rm -rf junkmdc
-                       DEPENDS 
                        WORKING_DIRECTORY ${CMAKE_LIBRARY_OUTPUT_DIRECTORY})
+    add_custom_target( root-static-libs 
+                       COMMAND make static
+                      WORKING_DIRECTORY ${ROOTSYS} )
+                      
     add_dependencies(libAliMDC RAWDatabase-static STEERBase-static MDC-static ESD-static)
-    add_dependencies(${PACKAGE}-static libAliMDC)
+    add_dependencies(${PACKAGE}-static libAliMDC root-static-libs)
     target_link_libraries(${PACKAGE}-static ${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/libAliMDC.a ${ROOTLIBDIR}/libRoot.a ${ROOTLIBDIR}/libfreetype.a ${ROOTLIBDIR}/libpcre.a -pthread -ldl -lcurses)
                        
 
index f2ed06e..3c73c4b 100644 (file)
@@ -5,6 +5,12 @@
 
 cmake_minimum_required(VERSION 2.8 FATAL_ERROR)
 
+set(ROOTSYS $ENV{ROOTSYS})
+if(NOT ROOTSYS)
+  message(FATAL_ERROR "Environment variable $ROOTSYS is not set !")
+else()
+  get_filename_component(ROOTSYS "${ROOTSYS}" REALPATH)
+endif(NOT ROOTSYS)
 find_program(ROOT_CONFIG NAMES root-config)
 find_program(ROOTCINT NAMES rootcint)
 if(NOT ROOT_CONFIG)
@@ -25,6 +31,7 @@ if(ROOT_CONFIG AND ROOTCINT)
   ALICE_RootConfig(ROOTHASXML --has-xml)
   set(ROOTCLIBS ${ROOTCLIBS} -lThread -lMinuit -lVMC -lEG -lGeom -lTreePlayer -lXMLIO -lXMLParser -lProof -lProofPlayer -lMLP -lSpectrum -L${ROOTPLUGDIR} )
   set(ROOTPLIBS $ENV{ROOTPLIBS})
+  message(STATUS "ROOTSYS directory : ${ROOTSYS}") 
   message(STATUS "ROOT include directory: ${ROOTINCDIR}")
   message(STATUS "ROOT library directory: ${ROOTLIBDIR}")
 else()