Fix for DA
authorjjose <jjose@f7af4fe6-9843-0410-8265-dc069ae4e863>
Mon, 25 Oct 2010 15:06:17 +0000 (15:06 +0000)
committerjjose <jjose@f7af4fe6-9843-0410-8265-dc069ae4e863>
Mon, 25 Oct 2010 15:06:17 +0000 (15:06 +0000)
CMakeLists.txt
cmake/ALICE_CMake.cmake
cmake/CMakeDA.cmake

index 0edd1fa054698811e3af5fd099a84d653b4de945..1a08b5dc30f13915af3940f37a7089c2d5d0d155 100644 (file)
@@ -32,6 +32,7 @@ endif(NOT ALICE_INSTALL)
 
 get_filename_component(PROJECT_SOURCE_DIR "${PROJECT_SOURCE_DIR}" REALPATH)
 set(CMAKE_MODULE_PATH "${PROJECT_SOURCE_DIR}/cmake")
+set(CPACK_COMPONENTS_ALL MDC)
 
 include(ALICE_CMake)
 
@@ -69,6 +70,12 @@ find_package(GEANT3)
 
 find_package(AMORE)
 
+# AliRoot CPack configuration                                                    
+#-------------------------------
+
+find_package(CPack)
+
+
 #--------------------------------------------------------------------------------#
 # Environment/Compiler Configuration                                             #
 #--------------------------------------------------------------------------------#
@@ -94,6 +101,7 @@ file(MAKE_DIRECTORY ${CMAKE_INCLUDE_EXPORT_DIRECTORY})
 set(EXPORTDIRS "${ALICE_INSTALL}/include")
 set(BINLIBDIRS "-L${CMAKE_LIBRARY_OUTPUT_DIRECTORY}")
 
+
 #--------------------------------------------------------------------------------#
 # AliRoot Modules                                                                #
 #--------------------------------------------------------------------------------#
@@ -103,6 +111,7 @@ set(BINLIBDIRS "-L${CMAKE_LIBRARY_OUTPUT_DIRECTORY}")
 
 #set(EXCLUDEMODULES THydjet SHUTTLE)
 
+
 # Standard Modules
 # ------------------------------
 set(ALIROOTMODULES STEER PHOS TRD TPC ZDC MUON PMD FMD TOF ITS ACORDE HMPID T0 BCM STRUCT VZERO THijing THbtp EMCAL THerwig TEPEMGEN FASTSIM TPHIC RAW MONITOR ANALYSIS JETAN HLT LHC ESDCheck STAT TTherminator CORRFW DPMJET TDPMjet PWG0 PWG1 PWG2 PWG3 PWG4 TRIGGER PYTHIA8 )
@@ -205,7 +214,6 @@ endif(DATE_FOUND AND AMORE_FOUND)
 # AliMdc RPM
 # ------------------------------
 
-
 include (InstallRequiredSystemLibraries)
 include (CPack)
 
index 9775d73605c048b96209d14cf6d66ec754067298..b75fc85658973e53d46f110dc3ff01034683b455 100644 (file)
@@ -500,9 +500,9 @@ macro(ALICE_BuildExecutable)
 
 # AliMDC
 # ------------------------------
-  if(PACKAGE STREQUAL "alimdc")
+  if(PACKAGE STREQUAL "alimdc" AND GENERATEPACKAGES)
 
-    add_executable(${PACKAGE}-static EXCLUDE_FROM_ALL ${PFS} ${PCS} ${PS} ${PDS})
+    add_executable(${PACKAGE}-static ${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
@@ -516,10 +516,27 @@ macro(ALICE_BuildExecutable)
     add_dependencies(libAliMDC RAWDatabase-static STEERBase-static MDC-static ESD-static)
     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)
-                       
 
-
-  endif(PACKAGE STREQUAL "alimdc")
+    install(TARGETS ${PACKAGE}-static RUNTIME DESTINATION bin COMPONENT MDC)
+    install(FILES ${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/libAliMDC.a ${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/libAliMDC.a ${ROOTLIBDIR}/libRoot.a ${ROOTLIBDIR}/libfreetype.a ${ROOTLIBDIR}/libpcre.a DESTINATION lib COMPONENT MDC)
+    install(FILES ${PROJECT_SOURCE_DIR}/RAW/mdc.h DESTINATION include COMPONENT MDC)
+    set(CPACK_RPM_PACKAGE_SUMMARY "AliMDC static libraries")
+    set(CPACK_RPM_PACKAGE_NAME "alimdc")
+    set(CPACK_RPM_PACKAGE_VERSION "${ALIMDCVERSION}")
+    set(CPACK_RPM_PACKAGE_RELEASE "${ALIMDCRELEASE}")
+    set(CPACK_RPM_PACKAGE_LICENSE "Copyright: CERN ALICE Off-line Group")
+    set(CPACK_RPM_PACKAGE_VENDOR "ALICE Core Off-line Group")
+    set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "AliMDC static libraries")
+    set(CPACK_RPM_PACKAGE_GROUP "Applications/Alice")
+    set(CPACK_RPM_PACKAGE_REQUIRES "glibc")
+    set(CPACK_PACKAGE_VERSION "1.0.0")
+    set(CPACK_PACKAGE_VERSION_MAJOR "1")
+    set(CPACK_PACKAGE_VERSION_MINOR "0")
+    set(CPACK_PACKAGE_VERSION_PATCH "0")
+    set(CPACK_PACKAGE_INSTALL_DIRECTORY "/opt/")
+    add_component_package(MDC alimdc-rpm)
+
+  endif(PACKAGE STREQUAL "alimdc" AND GENERATEPACKAGES)
 
   list(FIND EXCLUDEMODULES ${MODULE} RESULT)
   if(NOT RESULT STREQUAL "-1")
@@ -557,3 +574,5 @@ macro(ALICE_GenerateLinkDef)
   endforeach(class)
   file (APPEND ${PDAL} "#endif\n")
 endmacro(ALICE_GenerateLinkDef)
+
+
index 0612c526cea02aac53bd096e21be39d917fa08cd..4255e5243fc83eeb2c40f8f31e7643edf5bd8014 100644 (file)
@@ -194,7 +194,7 @@ foreach(detector ${ONLINEDETECTORS} )
          endforeach(_lib)
          list (APPEND ZIP && ar r "../lib${DALIB}.a" "*.o")
 
-         add_custom_target( ${DALIB} COMMAND rm -rf junk && mkdir -p junk 
+         add_custom_target( ${DALIB} COMMAND rm -rf junk${DAEXE} && mkdir -p junk${DAEXE} 
                                COMMAND cd junk${DAEXE} ${ZIP}
                                COMMAND cd ../ && rm -rf junk${DAEXE}
                                DEPENDS ${ALIROOTALIBS}