fix problems in the efficiency plot (Markus)
[u/mrichter/AliRoot.git] / CMakeLists.txt
1 # -*- mode: cmake -*-
2 # The name of our project is "AliRoot".  
3
4 # Check if cmake has the required version
5 Cmake_Minimum_Required(VERSION 2.6 FATAL_ERROR)
6
7 # Set name of our project to AliRoot. To be done after check of cmake version
8 Project(AliRoot)
9
10 # Set AliRoot variables
11 Set(ALICE_ROOT $ENV{ALICE_ROOT})
12 Set(ALICE      $ENV{ALICE})
13 Set(ALICE_STATIC_BUILD ON CACHE BOOL "Build also statics libs")
14
15 #Set(CMAKE_VERBOSE_MAKEFILE ON)
16
17 # where to look first for cmake modules, before ${CMAKE_ROOT}/Modules/ 
18 Set(CMAKE_MODULE_PATH "${ALICE_ROOT}/cmake/modules")
19
20 # Load some basic macros which are needed later on
21 #Include(WriteConfigFile)
22 Include(Dart)
23 Include(ALICEMacros)
24
25 # Check if the user wants to build the project in the source directory
26 Check_out_of_Source_Build()
27
28 # searches for needed packages
29
30 # Setup ROOT
31 Find_package(ROOT 5.0.0 REQUIRED)
32 Enable_Language(Fortran)
33 Set(ALIROOT_INSTALL_DIR ${ALICE_ROOT}/${ALICE_TARGET})
34
35 # Setup GEANT3
36 Find_package(GEANT3 REQUIRED)
37
38 # Setup RuleChecker
39 Find_Package(RuleChecker)
40
41 # Check if DATE is installed
42 Find_Package(DATE)
43
44 # Setup system dependent flags 
45 SetupSystem()
46
47 # Set the library version in the main CMakeLists.txt
48 SET(ALIROOT_MAJOR_VERSION 0)
49 SET(ALIROOT_MINOR_VERSION 0)
50 SET(ALIROOT_PATCH_VERSION 0)
51 SET(ALIROOT_VERSION "${ALIROOT_MAJOR_VERSION}.${ALIROOT_MINOR_VERSION}.${ALIROOT_PATCH_VERSION}")
52 SET(ALIROOT_LIBRARY_PROPERTIES ${ALIROOT_LIBRARY_PROPERTIES}
53     VERSION "${ALIROOT_VERSION}"
54     SOVERSION "${ALIROOT_MAJOR_VERSION}"
55     SUFFIX ".so"
56 )
57
58 # Set version variables
59 Execute_process(COMMAND svn info $ENV{ALICE_ROOT} 
60   OUTPUT_VARIABLE _svn_out)
61
62 String(REGEX REPLACE "^.*Revision: ([^\n]*).*$" "\\1" 
63   ALIROOT_SVN_REVISION ${_svn_out})
64 String(REGEX REPLACE "^.*URL: https://alisoft.cern.ch/AliRoot/([^\n]*).*$" "w \\1"
65   ALIROOT_SVN_BRANCH ${_svn_out})
66
67 # Additional targets
68 Add_Custom_Target(check-all COMMENT "Checking coding conventions")
69
70 # Configure special include file
71 If(UNIX)
72   Set(_in ${CMAKE_CURRENT_SOURCE_DIR}/STEER/ARVersion.h.in)
73   Set(_out ${CMAKE_CURRENT_BINARY_DIR}/STEER/ARVersion.h)
74   Add_custom_target(ARversion ALL
75     COMMAND sed < ${_in}
76                 -e "s/\\@ALIROOT_SVN_REVISION\\@/${ALIROOT_SVN_REVISION}/" 
77                 -e "s/\\@ALIROOT_SVN_BRANCH\\@/${ALIROOT_SVN_BRANCH}/" 
78                 -e "s/\\@ALIROOT_VERSION\\@/${ALIROOT_VERSION}/" >  ${_out})
79   Install(FILES ${_out} DESTINATION ${ALIROOT_INSTALL_DIR}/include)
80 Endif(UNIX)
81
82 # This would work, but just once... we want this to happen at every make
83 #  Configure_file(${CMAKE_CURRENT_SOURCE_DIR}/STEER/ARVersion.h.in 
84 #${CMAKE_CURRENT_BINARY_DIR}/STEER/ARVersion.h @ONLY)
85
86 # Recurse into the given subdirectories.  This does not actually
87 # cause another cmake executable to run.  The same process will walk through
88 # the project's entire directory structure.
89
90 #Add_subdirectory(PYTHIA8) 
91 #Add_subdirectory(TFluka) 
92 #Add_subdirectory(THydjet) 
93
94 Add_subdirectory(ACORDE) 
95 Add_subdirectory(ANALYSIS) 
96 Add_subdirectory(BCM) 
97 Add_subdirectory(CORRFW) 
98 Add_subdirectory(DPMJET) 
99 Add_subdirectory(EMCAL) 
100 Add_subdirectory(ESDCheck) 
101 Add_subdirectory(EVE) 
102 Add_subdirectory(EVGEN) 
103 Add_subdirectory(FASTSIM) 
104 Add_subdirectory(FMD)
105 Add_subdirectory(HBTAN)
106 Add_subdirectory(HERWIG) 
107 Add_subdirectory(HIJING) 
108 Add_subdirectory(HLT) 
109 Add_subdirectory(HMPID) 
110 Add_subdirectory(ITS) 
111 Add_subdirectory(JETAN)
112 Add_subdirectory(LHAPDF) 
113 Add_subdirectory(LHC) 
114 Add_subdirectory(MICROCERN) 
115 Add_subdirectory(MONITOR) 
116 Add_subdirectory(MUON) 
117 Add_subdirectory(PHOS) 
118 Add_subdirectory(PMD) 
119 Add_subdirectory(PWG0) 
120 Add_subdirectory(PWG1) 
121 Add_subdirectory(PWG2) 
122 Add_subdirectory(PWG3) 
123 Add_subdirectory(PWG4)
124 Add_subdirectory(PYTHIA6)
125 Add_subdirectory(RALICE) 
126 Add_subdirectory(RAW) 
127 Add_subdirectory(STAT) 
128 Add_subdirectory(STEER)
129 Add_subdirectory(STRUCT) 
130 Add_subdirectory(T0) 
131 Add_subdirectory(TDPMjet) 
132 Add_subdirectory(TEPEMGEN) 
133 Add_subdirectory(THbtp) 
134 Add_subdirectory(THerwig) 
135 Add_subdirectory(THijing)
136 Add_subdirectory(TIsajet) 
137 Add_subdirectory(TOF) 
138 Add_subdirectory(TPC)
139 Add_subdirectory(TPHIC) 
140 Add_subdirectory(TRD) 
141 Add_subdirectory(TTherminator) 
142 Add_subdirectory(VZERO) 
143 Add_subdirectory(ZDC) 
144
145 Add_subdirectory(ALIROOT)
146