]> git.uio.no Git - u/mrichter/AliRoot.git/blame_incremental - RAW/RAWDatabase/CMakeLists.txt
generate_shared_library and generate_static_library macros
[u/mrichter/AliRoot.git] / RAW / RAWDatabase / CMakeLists.txt
... / ...
CommitLineData
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# Mandatory fields, set empty if not needed
17# MODULE - target name
18# MODULE_SRCS - list of sources that belong to the library
19# MODULE_HDRS - list of headers that belong to the library
20# MODULE_HDRS_INSTALL - list of headers that will be installed
21# MODULE_INCLUDES - list of include directories
22# ROOT and current folder are taken by default
23# To add extra include folders use either
24# - include_directories(${MODULE} FOLDER)
25# - target_include_directories(${MODULE}-object FOLDER)
26# MODULE_ROOT_DEPENDENCIES
27# MODULE_ALIROOT_DEPENDENCIES
28# MODULE_COMPILE_FLAGS - compilation flags for the ${MODULE}-object target
29# MODULE_LINK_FLAGS - linking flags for ${MODULE} target
30# - other flags accesible thorough standard cmake procedures
31#
32# Target/directory properties are accesible thorough cmake standard procedures
33# Target object name = ${MODULE}-object
34# Target library name = ${MODULE}
35# Shared and static library targets are using the same object target
36
37
38# Module name
39set(MODULE RAWDatabase)
40
41# Sources in alphabetical order
42set(MODULE_SRCS
43 AliAltroMapping.cxx
44 AliCaloAltroMapping.cxx
45 AliRawDataArray.cxx
46 AliRawDataArrayV2.cxx
47 AliRawData.cxx
48 AliRawEquipment.cxx
49 AliRawEquipmentHeader.cxx
50 AliRawEquipmentV2.cxx
51 AliRawEvent.cxx
52 AliRawEventHeaderBase.cxx
53 AliRawEventTag.cxx
54 AliRawEventV2.cxx
55 AliRawVEquipment.cxx
56 AliRawVEvent.cxx
57 AliStats.cxx
58 )
59
60# Headers from sources
61string(REPLACE ".cxx" ".h" MODULE_HDRS "${MODULE_SRCS}")
62
63# Extra headers in alphabetical order
64set(MODULE_HDRS ${MODULE_HDRS}
65 AliRawDataHeader.h
66 AliRawDataHeaderV3.h
67 AliRawEventHeaderVersions.h
68 )
69
70# List of headers to be installed
71set(MODULE_HDRS_INSTALL ${MODULE_HDRS})
72
73# List of include folders
74set(MODULE_INCLUDES
75 STEER/ESD
76 STEER/STEERBase
77 )
78
79# Root dependecies - please solve all symbols by searching them inside the *.rootmap files
80set(MODULE_ROOT_DEPENDENCIES Core Hist RIO)
81# AliRoot dependencies
82set(MODULE_ALIROOT_DEPENDENCIES ESD STEERBase)
83
84# Compilation and linking flags
85set(MODULE_COMPILE_FLAGS)
86set(MODULE_LINK_FLAGS)
87
88if(DATE_FOUND)
89 set(MODULE_COMPILE_FLAGS "${DATE_CFLAGS}")
90 set(MODULE_LINK_FLAGS "${DATE_LDFLAGS} ${DATE_LIBS}")
91endif(DATE_FOUND)
92
93# Additional compilation and linking flags
94set(MODULE_COMPILE_FLAGS " ${MODULE_COMPILE_FLAGS}")
95
96# System dependent: Modify the way the library is build
97if(${CMAKE_SYSTEM} MATCHES Darwin)
98 set(MODULE_LINK_FLAGS "-undefined dynamic_lookup ${MODULE_LINK_FLAGS}")
99endif(${CMAKE_SYSTEM} MATCHES Darwin)
100
101# Generating the static library
102generate_shared_library()
103
104# Static version if DA enabled
105if(ALIROOT_STATIC)
106 generate_static_library()
107endif(ALIROOT_STATIC)