Added alimdc-static target
authorjjose <jjose@f7af4fe6-9843-0410-8265-dc069ae4e863>
Fri, 22 Oct 2010 11:18:44 +0000 (11:18 +0000)
committerjjose <jjose@f7af4fe6-9843-0410-8265-dc069ae4e863>
Fri, 22 Oct 2010 11:18:44 +0000 (11:18 +0000)
CMakeLists.txt
cmake/ALICE_CMake.cmake

index 6972ce8..69450fb 100644 (file)
@@ -180,6 +180,8 @@ set(EXPORTFILES)
 add_custom_target(alilibs-static)
 add_custom_target(include-headers)
 add_custom_target(DA-all)
+
+
 # Add Modules
 # ------------------------------
 foreach(MODULE ${MODDIRS})
@@ -199,6 +201,10 @@ endif(DATE_FOUND AND AMORE_FOUND)
 # Additional Targets                                                             #
 #--------------------------------------------------------------------------------#
 
+# AliMdc RPM
+# ------------------------------
+
+
 include (InstallRequiredSystemLibraries)
 include (CPack)
 
index 5cb5c0e..9424bef 100644 (file)
@@ -498,6 +498,26 @@ macro(ALICE_BuildExecutable)
     add_dependencies(${MODULE}-all ${PACKAGE})
   endif(ALIPROFILE STREQUAL "YES")
 
+# AliMDC
+# ------------------------------
+  if(PACKAGE STREQUAL "alimdc")
+
+    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
+                       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_dependencies(libAliMDC RAWDatabase-static STEERBase-static MDC-static ESD-static)
+    add_dependencies(${PACKAGE}-static libAliMDC)
+    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")
+
   list(FIND EXCLUDEMODULES ${MODULE} RESULT)
   if(NOT RESULT STREQUAL "-1")
     set_property(TARGET ${PACKAGE} PROPERTY EXCLUDE_FROM_ALL TRUE)