- make nested classes in AliTRDtrapConfig public for cling compatible I/O
[u/mrichter/AliRoot.git] / CMakeLists.txt
1 # -*- mode: cmake -*-
2
3 # Top level CMakeList.txt file for the AliRoot Build System
4 #
5 # Author: Johny Jose (johny.jose@cern.ch)
6 #         Port of previous Makefile build to cmake
7
8
9 cmake_minimum_required(VERSION 2.8.4 FATAL_ERROR)
10
11 #--------------------------------------------------------------------------------#
12 # Set Basic CMake Configuration                                                  #
13 #--------------------------------------------------------------------------------#
14
15 project(AliRoot CXX C Fortran)
16
17 # Environment variables
18 set(ALICE $ENV{ALICE})
19 if(NOT ALICE)
20   message(WARNING "Environment variable ALICE is not set")
21 endif(NOT ALICE)
22
23 set(ALICE_ROOT $ENV{ALICE_ROOT})
24 if(NOT ALICE_ROOT)
25   message(FATAL_ERROR "Please set ALICE_ROOT to the AliRoot source directory")
26 endif(NOT ALICE_ROOT)
27
28 set(ALICE_INSTALL $ENV{ALICE_INSTALL})
29 # Set AliRoot Installation directory 
30 if(NOT ALICE_INSTALL)
31   message(STATUS "AliRoot files will be installed in ${ALICE_ROOT}. You can specify a different location by setting ALICE_INSTALL environment variable")
32   set(ALICE_INSTALL ${ALICE_ROOT})
33 else()
34   message(STATUS "AliRoot files will be installed in ${ALICE_INSTALL}")
35 endif(NOT ALICE_INSTALL)
36 if(${ALICE_INSTALL} STREQUAL ${CMAKE_BINARY_DIR})
37   message(FATAL_ERROR "Install dir should be different from build dir")
38 endif()
39 set(CMAKE_INSTALL_PREFIX ${ALICE_INSTALL})
40
41 # Environment for SHUTTLE
42 set(DIMDIR $ENV{DIMDIR})
43 set(ODIR $ENV{ODIR})
44
45 get_filename_component(PROJECT_SOURCE_DIR "${PROJECT_SOURCE_DIR}" REALPATH)
46 set(CMAKE_MODULE_PATH "${PROJECT_SOURCE_DIR}/cmake")
47 set(CPACK_COMPONENTS_ALL MDC)
48
49 include(ALICE_CMake)
50
51 #--------------------------------------------------------------------------------#
52 # Find Packages                                                                  #
53 #--------------------------------------------------------------------------------#
54
55 # Subversion
56 # ------------------------------
57
58 find_package(Subversion REQUIRED)
59
60 # ROOT
61 # ------------------------------
62
63 find_package(ROOT REQUIRED)
64
65 # IRST Rule Checker 
66 # ------------------------------
67
68 find_package(RuleChecker)
69
70 # DATE
71 # ------------------------------ 
72
73 find_package(DATE)
74
75 # GEANT3
76 # ------------------------------
77
78 find_package(GEANT3)
79
80 # AMORE
81 # ------------------------------
82
83 find_package(AMORE)
84
85 # AliRoot CPack configuration                                                    
86 #-------------------------------
87
88 find_package(CPack)
89
90 # ZeroMQ
91 # ------------------------------
92 find_package(ZeroMQ)
93
94 #--------------------------------------------------------------------------------#
95 # Environment/Compiler Configuration                                             #
96 #--------------------------------------------------------------------------------#
97
98 ALICE_CheckOutOfSourceBuild()
99 ALICE_RootConfig(CMAKE_CXX_COMPILER --cxx)
100 ALICE_RootConfig(CMAKE_C_COMPILER --cc)
101 ALICE_RootConfig(CMAKE_Fortran_COMPILER --f77)
102 ALICE_ConfigurePlatform()
103 ALICE_ConfigureCompiler()
104
105
106 #--------------------------------------------------------------------------------#
107 # AliRoot Path Settings                                                          #
108 #--------------------------------------------------------------------------------#
109
110 ALICE_DevFlagsOutput()
111 set(CMAKE_RUNTIME_OUTPUT_DIRECTORY "${PROJECT_BINARY_DIR}/bin/tgt_${ALICE_TARGET}")
112 set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY "${PROJECT_BINARY_DIR}/lib/tgt_${ALICE_TARGET}")
113 set(CMAKE_LIBRARY_OUTPUT_DIRECTORY "${PROJECT_BINARY_DIR}/lib/tgt_${ALICE_TARGET}")
114 set(CMAKE_INCLUDE_EXPORT_DIRECTORY "${PROJECT_BINARY_DIR}/include")
115 file(MAKE_DIRECTORY ${CMAKE_INCLUDE_EXPORT_DIRECTORY})
116 set(EXPORTDIRS "${ALICE_INSTALL}/include")
117 set(BINLIBDIRS "-L${CMAKE_LIBRARY_OUTPUT_DIRECTORY}")
118
119
120 #--------------------------------------------------------------------------------#
121 # AliRoot Modules                                                                #
122 #--------------------------------------------------------------------------------#
123
124 # Exclude Module from all target
125 # ------------------------------
126
127 #set(EXCLUDEMODULES THydjet SHUTTLE)
128
129
130 # Standard Modules
131 # ------------------------------
132 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 STAT TTherminator CORRFW DPMJET TDPMjet PWGPP PWG PWGCF PWGGA PWGHF PWGDQ PWGJE PWGLF PWGUD TRIGGER PYTHIA8 TAmpt OADB MFT TEvtGen)
133
134 if(THydjet)
135   list(APPEND ALIROOTMODULES THydjet)
136 endif(THydjet)
137
138 if(SHUTTLE)
139   list(APPEND ALIROOTMODULES SHUTTLE)
140 endif(SHUTTLE)
141
142 # Additional Modules
143 # ------------------------------
144 list(APPEND ALIROOTMODULES TUHKMgen EPOS)
145
146 # EVE
147 # ------------------------------
148 ALICE_RootConfig(EVE --has-opengl)
149 if(NOT EVE STREQUAL "no")
150   list(APPEND ALIROOTMODULES EVE)
151 endif(NOT EVE STREQUAL "no")
152
153 # CERN Modules
154 # ------------------------------
155 set(CERNMODULES LHAPDF HIJING MICROCERN HERWIG)
156
157 # Check for Pythia 6
158 if(EXISTS ${ROOTINCDIR}/TPythia6.h)
159   set(PYTHIA6 TRUE)
160   list(APPEND CERNMODULES PYTHIA6 EVGEN)
161 elseif(NOT NOPYTHIA)
162   message(FATAL_ERROR "ROOT must have Pythia6 enabled !")
163 endif(EXISTS ${ROOTINCDIR}/TPythia6.h)
164
165 # Set Final list of modules 
166 set(MODULES ${ALIROOTMODULES} ${CERNMODULES} ALIROOT)
167
168 # Set Module directories
169 set(MODDIRS ${MODULES})
170
171 # Libraries for Linking
172 # ------------------------------
173 set(ALILIBS MUON TPC PMD TRD FMD TOF ITS PHOS ACORDE HMPID VZERO ZDC STRUCT T0 EVGEN STEER TRIGGER MFT)
174 set(LIBS ${ROOTCLIBS} ${ROOTPLIBS} ${SYSLIBS})
175
176 # Configure ARVerion.h
177 # ------------------------------
178 if(Subversion_FOUND)
179   if(EXISTS ${PROJECT_SOURCE_DIR}/.svn/ )
180   Subversion_WC_INFO(${PROJECT_SOURCE_DIR} PROJECT)
181   set(ALIROOT_SVN_REVISION ${PROJECT_WC_REVISION})
182   set(ALIROOT_SVN_BRANCH ${PROJECT_WC_URL})
183   string(REGEX MATCH "[^/]+$" ALIROOT_SVN_BRANCH ${ALIROOT_SVN_BRANCH})
184
185   elseif(EXISTS ${PROJECT_SOURCE_DIR}/.git/ )
186     if(EXISTS ${PROJECT_SOURCE_DIR}/.git/svn/refs )
187     execute_process(WORKING_DIRECTORY ${PROJECT_SOURCE_DIR} COMMAND git svn info OUTPUT_VARIABLE OUTPUTVAR)
188     string(REPLACE "\n" ";" OUTPUTVAR ${OUTPUTVAR})
189     foreach(f ${OUTPUTVAR})
190       if(${f} MATCHES URL)
191         string(REGEX MATCH "[^/]+$" ALIROOT_SVN_BRANCH ${f})
192       elseif(${f} MATCHES Revision)
193         string(REGEX MATCH "[^: ]+$" ALIROOT_SVN_REVISION ${f})
194       endif(${f} MATCHES URL)   
195     endforeach()
196     else()
197       execute_process(WORKING_DIRECTORY ${PROJECT_SOURCE_DIR} COMMAND git log -1 OUTPUT_VARIABLE OUTPUTVAR)
198       string(REPLACE "\n" ";" OUTPUTVAR ${OUTPUTVAR})
199       foreach(f ${OUTPUTVAR})
200         if(${f} MATCHES "^[ ]*git-svn-id:")
201           string(REGEX REPLACE "^.*/(.*)[@].*$" "\\1" ALIROOT_SVN_BRANCH "${f}" )
202           string(REGEX REPLACE "^.*/.*[@](.*) .*$" "\\1" ALIROOT_SVN_REVISION "${f}" )
203         endif(${f} MATCHES "^[ ]*git-svn-id:")
204       endforeach()
205       if(${ALIROOT_SVN_BRANCH}x STREQUAL "x")
206         set(ALIROOT_SVN_BRANCH "git clone")
207         set(ALIROOT_SVN_REVISION "-1")
208       endif(${ALIROOT_SVN_BRANCH}x STREQUAL "x")
209     endif(EXISTS ${PROJECT_SOURCE_DIR}/.git/svn/refs )
210   endif(EXISTS ${PROJECT_SOURCE_DIR}/.svn/ )
211
212   message(STATUS "Aliroot Revision - ${ALIROOT_SVN_REVISION} Branch - ${ALIROOT_SVN_BRANCH}")
213   if(EXISTS ${CMAKE_INCLUDE_EXPORT_DIRECTORY}/ARVersion.h)
214     file(REMOVE ${CMAKE_INCLUDE_EXPORT_DIRECTORY}/ARVersion.h)
215   endif(EXISTS ${CMAKE_INCLUDE_EXPORT_DIRECTORY}/ARVersion.h)
216   configure_file(${PROJECT_SOURCE_DIR}/cmake/ARVersion.h.tmp ${CMAKE_INCLUDE_EXPORT_DIRECTORY}/ARVersion.h @ONLY)
217 endif(Subversion_FOUND)
218 string (REPLACE "-" "." ALIROOT_SVN_BRANCH_SPEC "${ALIROOT_SVN_BRANCH}")
219
220 #--------------------------------------------------------------------------------#
221 # Build Modules                                                                  #
222 #--------------------------------------------------------------------------------#
223
224 # Module Variables
225 # ------------------------------
226 set(ALLLIBS)
227 set(ALLEXECS)
228 set(INCLUDEFILES)
229 set(BINLIBS)
230 set(EXPORTFILES)
231
232 # Top Level Build Targets
233 # ------------------------------
234
235 add_custom_target(alilibs-static)
236 add_custom_target(include-headers ALL)
237 add_custom_target(DA-all)
238 add_custom_target(check-all) 
239 add_custom_target(check-hxml)
240 add_custom_target(smell-all) 
241 add_custom_target(htmldoc) 
242 add_custom_target(par-all)
243 add_custom_target(test-par-all)
244
245 #NY file(GLOB CFILES_LIST ${CMAKE_SOURCE_DIR}/macros/*.C)
246
247 add_custom_command(TARGET htmldoc
248                    PRE_BUILD
249                    COMMAND mkdir -p html
250                    COMMAND rm -rf html/roothtml
251                    COMMAND rm -f html/picts
252                    COMMAND cd html &&
253                             aliroot -q -b \"mkhtml.C(0,1)\"
254                    WORKING_DIRECTORY ${CMAKE_SOURCE_DIR})
255
256 # Include Vc, which provides the static libVc and the relevant CMake macros
257 include(Vc/Vc.cmake)
258 add_subdirectory(Vc)
259
260 # Add Modules   
261 # ------------------------------
262 foreach(MODULE ${MODDIRS})
263   set(${MODULE}ALIBS)
264 #RS  configure_file(${PROJECT_SOURCE_DIR}/cmake/Module.tmp ${PROJECT_SOURCE_DIR}/${MODULE}/CMakeLists.txt @ONLY)
265   add_custom_target(${MODULE}-all ALL)
266   add_custom_target(${MODULE}-par-all)
267   add_custom_target(test-${MODULE}-par-all)
268   add_custom_target(${MODULE}-all-static)
269   add_dependencies(alilibs-static "${MODULE}-static")
270   add_subdirectory(${MODULE})
271   
272 #NY  set(dir "${CMAKE_SOURCE_DIR}/${MODULE}")
273 #NY  if (EXISTS "${dir}")
274 #NY      file(GLOB CFILES_MOD ${dir}/*.C)
275 #NY      list(LENGTH CFILES_MOD len)
276 #NY      if (${len} GREATER 0)
277 #NY        list(APPEND CFILES_LIST "${CFILES_MOD}")
278 #NY      endif (${len} GREATER 0)
279 #NY  endif(EXISTS "${dir}")
280 endforeach(MODULE)
281
282 #NY foreach(cfile ${CFILES_LIST})
283 #NY     add_custom_command(TARGET htmldoc
284 #NY                    PRE_BUILD
285 #NY                    COMMAND cd html && 
286 #NY                            aliroot -b -q \"mkhtml.C(\"${cfile}\")\" > /dev/null
287 #NY                    WORKING_DIRECTORY ${CMAKE_SOURCE_DIR})
288 #NY endforeach(cfile)
289
290 if(DATE_FOUND)
291   include (CMakeDA)
292 endif(DATE_FOUND)
293
294 if(RULECHECKER_FOUND)
295     add_custom_target(factfile DEPENDS ${FACTFILE})
296     add_custom_command( OUTPUT ${FACTFILE}
297                         COMMAND ${CMAKE_COMMAND} -E echo "Re-generating factfile"
298                         COMMAND ${JAVA_RUNTIME}  -Xmx1024M -jar ${FACTEXTRACTOR_JAR} ${CMAKE_BINARY_DIR} ${CMAKE_BINARY_DIR}                    
299                         DEPENDS check-hxml ${CMAKE_BINARY_DIR}/check-hxml-touchfile ${_factfile_deps} 
300                         WORKING_DIRECTORY ${CMAKE_BINARY_DIR})
301 endif(RULECHECKER_FOUND)
302
303 #--------------------------------------------------------------------------------#
304 # Additional Targets                                                             #
305 #--------------------------------------------------------------------------------#
306
307 # AliMdc RPM
308 # ------------------------------
309
310 execute_process(
311 COMMAND root-config --libdir 
312 OUTPUT_VARIABLE ROOTALIBDIR)
313 string(REPLACE "\n" "" ROOTALIBDIR ${ROOTALIBDIR}) 
314
315 execute_process(
316 COMMAND root-config --arch 
317 OUTPUT_VARIABLE ARCHITECTURE)
318
319
320 set(AEXT a)
321 set(LIBPATH ${CMAKE_BINARY_DIR}/lib/tgt_${ALICE_TARGET})
322 set(BINPATH ${CMAKE_BINARY_DIR}/bin/tgt_${ALICE_TARGET})
323 set(EXPORTDIR ${ALICE_ROOT}/include)
324 set(BINLIBDIRS -L${ALICE_ROOT}/${LIBPATH})
325 set(RAWDIRO ${CMAKE_BINARY_DIR}/RAW)
326 set(ALIMDCSPECFILE ${RAWDIRO}/alimdc.spec)
327 set(RAWDatabaseALIB ${LIBPATH}/libRAWDatabase.${AEXT})
328 set(ESDALIB ${LIBPATH}/libESD.${AEXT})
329 set(STEERBaseALIB ${LIBPATH}/libSTEERBase.${AEXT})
330 set(MDCALIB ${LIBPATH}/libMDC.${AEXT})
331 set(MODDIRO RAW/tgt_${ALICE_TARGET})
332
333
334 if( ${ARCHITECTURE} MATCHES "linuxx8664gcc" )
335 set(ALIMDCARCHDIR x86_64)
336 elseif( ${ARCHITECTURE} MATCHES "linux" )
337 set(ALIMDCARCHDIR i386)
338 elseif( ${ARCHITECTURE} MATCHES "linuxia64gcc" )
339 set(ALIMDCARCHDIR ia64)
340 elseif(NOT DEFINED ${ARCHITECTURE})
341 message("alimdc-rpm: Unknown architecture" )
342 else( ${ARCHITECTURE} MATCHES "linuxx8664gcc" )
343 message("alimdc-rpm: Unknown architecture" )
344 endif( ${ARCHITECTURE} MATCHES "linuxx8664gcc" )
345
346
347 add_custom_target( alimdc-rpm
348 DEPENDS alimdc-static alimdc-specfile
349 )
350
351 add_custom_command(
352 TARGET alimdc-rpm
353 POST_BUILD 
354 COMMAND rm -rf ${ALICE_ROOT}/alimdc-root
355 COMMAND mkdir -p ${ALICE_ROOT}/alimdc-root/opt/alimdc/lib
356 COMMAND mkdir -p ${ALICE_ROOT}/alimdc-root/opt/alimdc/include
357 COMMAND cp ${ALICE_ROOT}/RAW/mdc.h ${ALICE_ROOT}/alimdc-root/opt/alimdc/include
358 COMMAND cp ${LIBPATH}/libAliMDC.a ${ALICE_ROOT}/alimdc-root/opt/alimdc/lib
359 COMMAND cp ${ROOTALIBDIR}/libRoot.a ${ALICE_ROOT}/alimdc-root/opt/alimdc/lib
360 COMMAND cp ${ROOTALIBDIR}/liblzma.a ${ALICE_ROOT}/alimdc-root/opt/alimdc/lib
361 COMMAND cp ${ROOTALIBDIR}/libpcre.a ${ALICE_ROOT}/alimdc-root/opt/alimdc/lib
362 COMMAND cp ${ROOTALIBDIR}/libfreetype.a ${ALICE_ROOT}/alimdc-root/opt/alimdc/lib
363 COMMAND cp ${ROOTALIBDIR}/libpcre.a ${ALICE_ROOT}/alimdc-root/opt/alimdc/lib
364 COMMAND rm -rf ${ALICE_ROOT}/RPMS
365 COMMAND mkdir -p ${ALICE_ROOT}/RPMS/${ALIMDCARCHDIR}/
366 COMMAND rpmbuild --verbose --define "_topdir ${ALICE_ROOT}" --define "_tmppath ${ALICE_ROOT}" -bb ${ALIMDCSPECFILE} 
367 COMMAND cp -p ${ALICE_ROOT}/RPMS/${ALIMDCARCHDIR}/alimdc-*.rpm .
368 COMMAND rm -rf ${ALICE_ROOT}/alimdc-root
369 COMMAND rm -rf ${ALICE_ROOT}/RPMS
370 COMMAND echo "***** alimdc RPM created and put in ${CMAKE_BINARY_DIR} folder *****"
371 )
372
373 add_custom_command(
374 TARGET ${RAWDIRO}
375 COMMAND mkdir-p ${RAWDIRO}
376 )
377
378
379 add_custom_target( alimdc-specfile
380 DEPENDS ${RAWDIRO}
381 )
382
383 add_custom_command( 
384 TARGET alimdc-specfile
385 POST_BUILD
386 COMMAND rm -rf ${ALIMDCSPECFILE}
387 COMMAND @echo "***** Making alimdc RPM spec-file ${ALIMDCSPECFILE} *****"
388 COMMAND @echo '\# RPM specfile for alimdc static libs' >> ${ALIMDCSPECFILE} 
389 COMMAND @echo '\# Package contains both ROOT and AliRoot' >> ${ALIMDCSPECFILE}
390 COMMAND @echo '\# static libs needed by mStreamRecorder' >> ${ALIMDCSPECFILE}
391 COMMAND @echo '\# in order to ROOT-ify the incoming raw' >> ${ALIMDCSPECFILE}
392 COMMAND @echo '\# data' >> ${ALIMDCSPECFILE}
393 COMMAND @echo '\# Example how-to build alimdc RPM:' >> ${ALIMDCSPECFILE}
394 COMMAND @echo '\# cd ${ALICE_ROOT}' >> ${ALIMDCSPECFILE}
395 COMMAND @echo '\# make alimdc-rpm' >> ${ALIMDCSPECFILE}
396 COMMAND @echo "" >> ${ALIMDCSPECFILE}
397 COMMAND @echo "Summary: AliMDC static libraries" >> ${ALIMDCSPECFILE}
398 COMMAND @echo "Name: alimdc" >> ${ALIMDCSPECFILE}
399 COMMAND @echo "Version:  ${ALIROOT_SVN_BRANCH_SPEC}" >> ${ALIMDCSPECFILE}
400 COMMAND @echo "Release: ${ALIROOT_SVN_REVISION}" >> ${ALIMDCSPECFILE}
401 COMMAND @echo '\# Copyright: CERN Alice Off-line' >> ${ALIMDCSPECFILE}
402 COMMAND @echo "License: CERN Alice Off-line" >> ${ALIMDCSPECFILE}
403 COMMAND @echo "Vendor: ALICE Core Off-line Group" >> ${ALIMDCSPECFILE}
404 COMMAND @echo "URL: http://aliceinfo.cern.ch" >> ${ALIMDCSPECFILE}
405 COMMAND @echo "Group: Applications/Alice" >> ${ALIMDCSPECFILE}
406 COMMAND @echo "Prefix: /opt/%{name}" >> ${ALIMDCSPECFILE}
407 COMMAND @echo "BuildRoot: %{_tmppath}/%{name}-root" >> ${ALIMDCSPECFILE}
408 COMMAND @echo "" >> ${ALIMDCSPECFILE}
409 COMMAND @echo '\# automatic dependencies' >> ${ALIMDCSPECFILE}
410 COMMAND @echo "AutoReqProv: yes" >> ${ALIMDCSPECFILE}
411 COMMAND @echo "" >> ${ALIMDCSPECFILE}
412 COMMAND @echo '\# list here required RPM packages for runtime' >> ${ALIMDCSPECFILE}
413 COMMAND @echo "Requires: glibc" >> ${ALIMDCSPECFILE}
414 COMMAND @echo "" >> ${ALIMDCSPECFILE}
415 COMMAND @echo "Provides: alimdc" >> ${ALIMDCSPECFILE}
416 COMMAND @echo "" >> ${ALIMDCSPECFILE}
417 COMMAND @echo '\# description of the package' >> ${ALIMDCSPECFILE}
418 COMMAND @echo "%description" >> ${ALIMDCSPECFILE}
419 COMMAND @echo "Package contains both ROOT and AliRoot" >> ${ALIMDCSPECFILE}
420 COMMAND @echo "static libs needed by mStreamRecorder" >> ${ALIMDCSPECFILE}
421 COMMAND @echo "in order to ROOT-ify the incoming raw" >> ${ALIMDCSPECFILE}
422 COMMAND @echo "data. The package version correspond to" >> ${ALIMDCSPECFILE}
423 COMMAND @echo "the AliRoot one." >> ${ALIMDCSPECFILE}
424 COMMAND @echo "" >> ${ALIMDCSPECFILE}
425 COMMAND @echo '\# list of files to be installed' >> ${ALIMDCSPECFILE}
426 COMMAND @echo "%files" >> ${ALIMDCSPECFILE}
427 COMMAND @echo '%defattr (-,root,root)' >> ${ALIMDCSPECFILE}
428 COMMAND @echo "%{prefix}/lib/libAliMDC.a" >> ${ALIMDCSPECFILE}
429 COMMAND @echo "%{prefix}/lib/libRoot.a" >> ${ALIMDCSPECFILE}
430 COMMAND @echo "%{prefix}/lib/libpcre.a" >> ${ALIMDCSPECFILE}
431 COMMAND @echo "%{prefix}/lib/liblzma.a" >> ${ALIMDCSPECFILE}
432 COMMAND @echo "%{prefix}/lib/libfreetype.a" >> ${ALIMDCSPECFILE}
433 COMMAND @echo "%{prefix}/include/mdc.h" >> ${ALIMDCSPECFILE}
434 )
435
436
437 add_custom_target( alimdc-static
438 DEPENDS ${LIBPATH} ${BINPATH} RAW-all-static STEER-all-static )
439
440 add_custom_command( 
441 TARGET alimdc-static
442 POST_BUILD
443 COMMAND ar r ${LIBPATH}/alimdccxxo.a ${CMAKE_BINARY_DIR}/RAW/CMakeFiles/alimdc.dir/alimdc_main.cxx.o
444 COMMAND rm -rf ${LIBPATH}/libAliMDC.a
445 COMMAND ar x ${RAWDatabaseALIB}
446 COMMAND ar x ${MDCALIB}
447 COMMAND ar x ${ESDALIB}
448 COMMAND ar x ${STEERBaseALIB}
449 COMMAND ar r ${LIBPATH}/libAliMDC.a *.o
450 COMMAND ar t ${RAWDatabaseALIB} | xargs rm 
451 COMMAND ar t ${MDCALIB} | xargs rm 
452 COMMAND ar t ${ESDALIB} | xargs rm 
453 COMMAND ar t ${STEERBaseALIB} | xargs rm 
454 COMMAND ${CMAKE_CXX_COMPILER} ${LDFLAGS} -o ${BINPATH}/alimdca ${LIBPATH}/alimdccxxo.a ${LIBPATH}/libAliMDC.a ${ROOTALIBDIR}/libRoot.a ${ROOTALIBDIR}/libfreetype.a ${ROOTALIBDIR}/libpcre.a ${ROOTALIBDIR}/liblzma.a -pthread -ldl -lz
455 COMMAND @echo "Target alimdc-static made"
456 )
457
458 add_custom_command(
459 TARGET ${LIBPATH}
460 COMMAND mkdir -p ${LIBPATH}
461 )
462
463
464 #include (MakefileDA) 
465 include (InstallRequiredSystemLibraries)
466 include (CPack)
467
468 # Install data
469 # ------------------------------
470 install ( DIRECTORY data 
471           DESTINATION . )
472 install ( DIRECTORY OCDB 
473           DESTINATION . 
474           PATTERN ".svn" EXCLUDE)
475 install ( DIRECTORY QAref 
476           DESTINATION . 
477           PATTERN ".svn" EXCLUDE)
478 install ( DIRECTORY GRP 
479           DESTINATION . 
480           PATTERN ".svn" EXCLUDE)
481
482 #
483 # EOF
484 #
485