]> git.uio.no Git - u/mrichter/AliRoot.git/blame - PWG/mftmuondep/charmonium/CMakeLists.txt
Merge branch 'feature-movesplit'
[u/mrichter/AliRoot.git] / PWG / mftmuondep / charmonium / CMakeLists.txt
CommitLineData
14072065 1# **************************************************************************
2# * Copyright(c) 1998-2014, 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. *
c0cccc26 14# **************************************************************************
14072065 15
3349234f 16# Module name -> library name
c0cccc26 17set (MODULE PWGmftmuondepCharmonium)
14072065 18
19# Module include folder
20include_directories(${AliRoot_SOURCE_DIR}/PWG/mftmuondep/charmonium)
21
29c3a5bb 22# Aditional include directories in alphabetical order
23include_directories(${AliRoot_SOURCE_DIR}/ANALYSIS/ANALYSIS
24 ${AliRoot_SOURCE_DIR}/ANALYSIS/ANALYSISalice
6a637a06 25 ${AliRoot_SOURCE_DIR}/EVENTMIX
29c3a5bb 26 ${AliRoot_SOURCE_DIR}/MFT/MFTbase
27 ${AliRoot_SOURCE_DIR}/MUON/MUONrec
28 ${AliRoot_SOURCE_DIR}/STEER/AOD
29 ${AliRoot_SOURCE_DIR}/STEER/STEERBase
30 )
14072065 31# Sources - alphabetical order
32set(SRCS
3c213689 33 AliAnalysisTaskDimuonBackground.cxx
34 )
14072065 35
36# Headers from sources
37string(REPLACE ".cxx" ".h" HDRS "${SRCS}")
38
3c213689 39# Generate the dictionary
40# It will create G_ARG1.cxx and G_ARG1.h / ARG1 = function first argument
3349234f 41# It expect the name of the LinkDef file to be ${MODULE}LinkDef.h
3c213689 42get_directory_property(incdirs INCLUDE_DIRECTORIES)
43generate_dictionary("${MODULE}" "${MODULE}LinkDef.h" "${HDRS}" "${incdirs}")
44
3349234f 45# VERY IMPORTANT - ADD the correct dependecies
46# Seach any Root class you use inside the ROOT rootmaps and add Root library to the dependency
47# AliRoot classes are usually located in the name of the include
48# Ex: ${AliRoot_SOURCE_DIR}/ANALYSIS/ANALYSIS -> ANALYSIS
6a637a06 49# ${AliRoot_SOURCE_DIR}/EVENTMIX - EventMixing
29c3a5bb 50set(ROOT_DEPENDENCIES Core EG Hist MathCore)
51set(ALIROOT_DEPENDENCIES STEERBase AOD ANALYSIS ANALYSISalice EventMixing MUONrec MFTbase)
3c213689 52
3349234f 53# Generate the ROOT map used to automatically load the dependecies
54# Load only the upper level libraries, there is no need to load the dependecies
55# If symbols are not found it means that the dependecies are not correctly defined
3c213689 56set(LIBDEPS ${ALIROOT_DEPENDENCIES} ${ROOT_DEPENDENCIES})
57generate_rootmap("${MODULE}" "${LIBDEPS}" "${CMAKE_CURRENT_SOURCE_DIR}/${MODULE}LinkDef.h")
58
3349234f 59# Creating the actual library
3c213689 60add_library(${MODULE} SHARED ${SRCS} G__${MODULE}.cxx)
61target_link_libraries(${MODULE} ${LIBDEPS})
62
3349234f 63# Custom compilation and linking flags if needed
3c213689 64set(MODULE_COMPILE_FLAGS)
65set(MODULE_LINK_FLAGS)
66
67# Setting custom compilation flags for the object
68set_target_properties(${MODULE} PROPERTIES COMPILE_FLAGS "${MODULE_COMPILE_FLAGS}")
69# Setting customlinking flags for the library
70set_target_properties(${MODULE} PROPERTIES LINK_FLAGS "${MODULE_LINK_FLAGS}")
71
e9fe51c2 72# System dependent: Modify the way the library is build
73if(${CMAKE_SYSTEM} MATCHES Darwin)
74 set_target_properties(${MODULE} PROPERTIES LINK_FLAGS "-undefined dynamic_lookup")
75endif(${CMAKE_SYSTEM} MATCHES Darwin)
76
3349234f 77# Library installation
3c213689 78install(TARGETS ${MODULE}
79 ARCHIVE DESTINATION lib
80 LIBRARY DESTINATION lib)
81
3349234f 82# Headers installation
3c213689 83install(FILES ${HDRS} DESTINATION include)
84
85# Install the macros
86install(FILES AddTaskDimuonBackground.C DESTINATION PWG/mftmuondep/charmonium)
87
c0cccc26 88message(STATUS "PWG mftmuondep charmonium enabled")