Fixes for object target dependencies
[u/mrichter/AliRoot.git] / RAW / alimdc / CMakeLists.txt
CommitLineData
a0f34e87 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# **************************************************************************
0224bae4 15
16# Module
17set (MODULE alimdc)
427d561c 18include_directories(${AliRoot_SOURCE_DIR}/${MODULE})
0224bae4 19
a0f34e87 20# Aditional include folders in alphabetical order except ROOT
21include_directories(${ROOT_INCLUDE_DIRS}
427d561c 22 ${AliRoot_SOURCE_DIR}/RAW/MDC
23 ${AliRoot_SOURCE_DIR}/RAW/RAWDatabase
24 ${AliRoot_SOURCE_DIR}/RAW/RAWDatarec
25 ${AliRoot_SOURCE_DIR}/STEER/ESD
26 ${AliRoot_SOURCE_DIR}/STEER/STEERBase
a0f34e87 27 )
0224bae4 28
a0f34e87 29link_directories(${ROOT_LIBDIR})
30
31# ROOT libraries that are not in root-config --libs
32set(ROOTEXTRALIBS Geom VMC Minuit)
0224bae4 33
34# Add an executable to the project using the specified source files
35add_executable(${MODULE} alimdc_main.cxx)
27d54f3d 36target_link_libraries(${MODULE} STEERBase ESD MDC RAWDatabase RAWDatarec ${ROOTEXTRALIBS} ${ROOT_LIBRARIES})
0224bae4 37
ca331a9c 38# Compile and link flags
39set(MODULE_COMPILE_FLAGS)
40set(MODULE_LINK_FLAGS)
41
42if(DATE_FOUND)
43 set(MODULE_COMPILE_FLAGS "${DATE_CFLAGS}")
44 set(MODULE_LINK_FLAGS "${DATE_LDFLAGS} ${DATE_LIBS}")
45endif(DATE_FOUND)
46
47# Additional compilation and linking flags
68aeb13b 48set(MODULE_COMPILE_FLAGS " ${MODULE_COMPILE_FLAGS}")
ca331a9c 49
50# System dependent: Modify the way the library is build
51if(${CMAKE_SYSTEM} MATCHES Darwin)
52 set(MODULE_LINK_FLAGS "-undefined dynamic_lookup ${MODULE_LINK_FLAGS}")
53endif(${CMAKE_SYSTEM} MATCHES Darwin)
54
55# Setting target compile and linking flags
56set_target_properties(${MODULE} PROPERTIES COMPILE_FLAGS "${MODULE_COMPILE_FLAGS}")
57set_target_properties(${MODULE} PROPERTIES LINK_FLAGS "${MODULE_LINK_FLAGS}")
58
0224bae4 59# Installation
60install(TARGETS ${MODULE} RUNTIME DESTINATION bin)