]> git.uio.no Git - u/mrichter/AliRoot.git/blob - MUON/MUONgraphics/CMakeLists.txt
Fixes for object target dependencies
[u/mrichter/AliRoot.git] / MUON / MUONgraphics / CMakeLists.txt
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
17 set(MODULE MUONgraphics)
18
19 # Module include folder
20 include_directories(${AliRoot_SOURCE_DIR}/MUON/${MODULE})
21
22 # Additional include folders in alphabetical order except ROOT
23 include_directories(${ROOT_INCLUDE_DIRS}
24                     ${AliRoot_SOURCE_DIR}/MUON/MUONbase
25                     ${AliRoot_SOURCE_DIR}/MUON/MUONcalib
26                     ${AliRoot_SOURCE_DIR}/MUON/MUONcore
27                     ${AliRoot_SOURCE_DIR}/MUON/MUONgeometry
28                     ${AliRoot_SOURCE_DIR}/MUON/MUONmapping
29                     ${AliRoot_SOURCE_DIR}/MUON/MUONrec
30                     ${AliRoot_SOURCE_DIR}/RAW/RAWDatabase
31                     ${AliRoot_SOURCE_DIR}/RAW/RAWDatarec
32                     ${AliRoot_SOURCE_DIR}/STEER/CDB
33                     ${AliRoot_SOURCE_DIR}/STEER/ESD
34                     ${AliRoot_SOURCE_DIR}/STEER/STEER
35                     ${AliRoot_SOURCE_DIR}/STEER/STEERBase
36                    )
37
38 # Sources in alphabetical order
39 set(SRCS
40     AliMUONAlignmentCompareDialog.cxx
41     AliMUONAttPainter.cxx
42     AliMUONAttPainterSelectorFrame.cxx
43     AliMUONBusPatchPainter.cxx
44     AliMUONChamberPainter.cxx
45     AliMUONContour.cxx
46     AliMUONContourHandler.cxx
47     AliMUONContourMaker.cxx
48     AliMUONContourMakerTest.cxx
49     AliMUONContourPainter.cxx
50     AliMUONDEPainter.cxx
51     AliMUONManuContourMaker.cxx
52     AliMUONManuPadPainter.cxx
53     AliMUONManuPainter.cxx
54     AliMUONMchViewApplication.cxx
55     AliMUONNode.cxx
56     AliMUONPainterColorSlider.cxx
57     AliMUONPainterDataRegistry.cxx
58     AliMUONPainterDataSourceFrame.cxx
59     AliMUONPainterDataSourceItem.cxx
60     AliMUONPainterEnv.cxx
61     AliMUONPainterGroup.cxx
62     AliMUONPainterHelper.cxx
63     AliMUONPainterHighlighter.cxx
64     AliMUONPainterInterfaceHelper.cxx
65     AliMUONPainterMasterFrame.cxx
66     AliMUONPainterMatrix.cxx
67     AliMUONPainterMatrixFrame.cxx
68     AliMUONPainterPadStore.cxx
69     AliMUONPainterPlotSelector.cxx
70     AliMUONPainterRegistry.cxx
71     AliMUONPCBPainter.cxx
72     AliMUONPointWithRef.cxx
73     AliMUONPolygon.cxx
74     AliMUONSegment.cxx
75     AliMUONSegmentTree.cxx
76     AliMUONTrackerDataCompareDialog.cxx
77     AliMUONTrackerDataHistogrammer.cxx
78     AliMUONTrackerDataWrapper.cxx
79     AliMUONTrackerHV.cxx
80     AliMUONVPainter.cxx
81    )
82
83 # Headers from sources
84 string(REPLACE ".cxx" ".h" HDRS "${SRCS}")
85
86 # Generate the dictionary
87 # It will create G_ARG1.cxx and G_ARG1.h / ARG1 = function first argument
88 get_directory_property(incdirs INCLUDE_DIRECTORIES)
89 generate_dictionary("${MODULE}" "${MODULE}LinkDef.h" "${HDRS}" "${incdirs}")
90
91 # Generate the ROOT map
92 # Dependecies
93 set(LIBDEPS STEERBase STEER CDB ESD RAWDatabase RAWDatarec MUONbase MUONcore MUONmapping MUONcalib MUONrec MUONgeometry)
94 generate_rootmap("${MODULE}" "${LIBDEPS}" "${CMAKE_CURRENT_SOURCE_DIR}/${MODULE}LinkDef.h")
95
96
97 # Add a library to the project using the specified source files
98 add_library(${MODULE} SHARED ${SRCS} G__${MODULE}.cxx)
99
100 # Additional compilation flags
101 set_target_properties(${MODULE} PROPERTIES COMPILE_FLAGS "")
102
103 # System dependent: Modify the way the library is build
104 if(${CMAKE_SYSTEM} MATCHES Darwin)
105     set_target_properties(${MODULE} PROPERTIES LINK_FLAGS "-undefined dynamic_lookup")
106 endif(${CMAKE_SYSTEM} MATCHES Darwin)
107
108 # Installation
109 install(TARGETS ${MODULE}
110         ARCHIVE DESTINATION lib
111         LIBRARY DESTINATION lib)
112
113 install(FILES ${HDRS} DESTINATION include)