PWGLFrsnextra converted to native cmake
[u/mrichter/AliRoot.git] / PWGLF / RESONANCES / extra / CMakeLists.txt
CommitLineData
ac0f35bc 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. *
14# **************************************************************************/
15
16#Module
17set (MODULE PWGLFrsnextra)
18
19# Module include folder
20include_directories(${AliRoot_SOURCE_DIR}/PWGLF/RESONANCES/extra)
21
22# Additional includes - alphabetical order except ROOT
23include_directories(${ROOT_INCLUDE_DIRS}
24 ${AliRoot_SOURCE_DIR}/ANALYSIS/ANALYSIS
25 ${AliRoot_SOURCE_DIR}/ANALYSIS/ANALYSISalice
26 ${AliRoot_SOURCE_DIR}/CORRFW
27 ${AliRoot_SOURCE_DIR}/PWGLF/RESONANCES
28 ${AliRoot_SOURCE_DIR}/STEER/AOD
29 ${AliRoot_SOURCE_DIR}/STEER/CDB
30 ${AliRoot_SOURCE_DIR}/STEER/ESD
31 ${AliRoot_SOURCE_DIR}/STEER/STEERBase
32 ${AliRoot_SOURCE_DIR}/TOF/TOFbase
33 ${AliRoot_SOURCE_DIR}/TOF/TOFrec
34 )
35
36# Sources - alphabetical order
37set(SRCS
38 AliRsnTOFT0maker.cxx
39 AliRsnTOFCorrectionESD.cxx
40 AliRsnAnalysisPhi900GeV.cxx
41 AliRsnAnalysisPhi7TeV.cxx
42 AliAnalysisTaskSigma1385.cxx
43 AliXiStar.cxx
44 AliXiStarEventCollection.cxx
45 )
46
47# Headers from sources
48string(REPLACE ".cxx" ".h" HDRS "${SRCS}")
49
50# Generate the dictionary
51# It will create G_ARG1.cxx and G_ARG1.h / ARG1 = function first argument
52get_directory_property(incdirs INCLUDE_DIRECTORIES)
53generate_dictionary("${MODULE}" "${MODULE}LinkDef.h" "${HDRS}" "${incdirs}")
54
55# Add a shared library
56add_library(${MODULE} SHARED ${SRCS} G__${MODULE}.cxx)
57
58# Generate the ROOT map
59# Dependecies
60set(LIBDEPS ANALYSISalice CDB CORRFW TOFbase TOFrec)
61generate_rootmap("${MODULE}" "${LIBDEPS}" "${CMAKE_CURRENT_SOURCE_DIR}/${MODULE}LinkDef.h")
62
63# Linking the library
64target_link_libraries(${MODULE} ${LIBDEPS})
65
66# Public include folders that will be propagated to the dependecies
67target_include_directories(${MODULE} PUBLIC ${incdirs})
68
69# System dependent: Modify the way the library is build
70if(${CMAKE_SYSTEM} MATCHES Darwin)
71 set_target_properties(${MODULE} PROPERTIES LINK_FLAGS "-undefined dynamic_lookup")
72endif(${CMAKE_SYSTEM} MATCHES Darwin)
73
74# Installation
75install(TARGETS ${MODULE}
76 ARCHIVE DESTINATION lib
77 LIBRARY DESTINATION lib)
78install(FILES ${HDRS} DESTINATION include)