Skip to content

Commit d6e7a57

Browse files
committed
Adding AliRoot as on optional dependency to AliceO2
1 parent c22abfa commit d6e7a57

2 files changed

Lines changed: 43 additions & 0 deletions

File tree

CMakeLists.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,8 @@ endif(NOT ALICEO2_MODULAR_BUILD)
4343

4444
find_package(FairRoot)
4545

46+
find_package(AliRoot)
47+
4648
# Load some basic macros which are needed later on
4749
include(FairMacros)
4850
include(WriteConfigFile)

cmake/modules/FindAliRoot.cmake

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
# **************************************************************************
2+
# * Copyright(c) 1998-2015, ALICE Experiment at CERN, All rights reserved. *
3+
# * *
4+
# * Author: The ALICE Off-line Project. *
5+
# * Contributors are mentioned in the code where appropriate. *
6+
# * *
7+
# * Permission to use, copy, modify and distribute this software and its *
8+
# * documentation strictly for non-commercial purposes is hereby granted *
9+
# * without fee, provided that the above copyright notice appears in all *
10+
# * copies and that both the copyright notice and this permission notice *
11+
# * appear in the supporting documentation. The authors make no claims *
12+
# * about the suitability of this software for any purpose. It is *
13+
# * provided "as is" without express or implied warranty. *
14+
# **************************************************************************
15+
16+
set(AliRoot_FOUND FALSE)
17+
18+
if(ALIROOT)
19+
20+
# Check if AliRoot is really installed there
21+
if(EXISTS ${ALIROOT}/bin/aliroot AND EXISTS ${ALIROOT}/lib AND EXISTS ${ALIROOT}/include)
22+
23+
include_directories(
24+
${ALIROOT}/include
25+
${ALIROOT}/include/pythia
26+
)
27+
28+
link_directories(${ALIROOT}/lib)
29+
30+
set(AliRoot_FOUND TRUE)
31+
32+
message(STATUS "AliRoot ... - found ${ALIROOT}")
33+
34+
endif()
35+
endif(ALIROOT)
36+
37+
if(NOT AliRoot_FOUND)
38+
if(AliRoot_FIND_REQUIRED)
39+
message(FATAL_ERROR "Please point to the AliRoot Core installation using -DALIROOT=<ALIROOT_CORE_INSTALL_DIR>")
40+
endif(AliRoot_FIND_REQUIRED)
41+
endif(NOT AliRoot_FOUND)

0 commit comments

Comments
 (0)