macro and flowevent maker to run part of the code in root
[u/mrichter/AliRoot.git] / TFluka / CMakeLists.txt
CommitLineData
e969a926 1# -*- mode: cmake -*-
2# Create a library called "lib<name>" which includes the source files given in
3# the array .
4# The extension is already found. Any number of sources could be listed here.
5
6set(INCLUDE_DIRECTORIES
7${CMAKE_SOURCE_DIR}/TFluka
8${CMAKE_SOURCE_DIR}/include
9${ROOT_INCLUDE_DIR}
10)
11
12include_directories( ${INCLUDE_DIRECTORIES})
13
14set(LINK_DIRECTORIES
15${ROOT_LIBRARY_DIR}
16)
17
18link_directories( ${LINK_DIRECTORIES})
19
20SetModule()
21
22set(TFluka_SRCS
23TFluka.cxx
24TFlukaMCGeometry.cxx
25TFlukaCerenkov.cxx
26TFlukaConfigOption.cxx
27TFlukaScoringOption.cxx
28magfld.cxx
29source.cxx
30mgdraw.cxx
31bxdraw.cxx
32eedraw.cxx
33endraw.cxx
34sodraw.cxx
35usdraw.cxx
36stupre.cxx
37stuprf.cxx
38abscff.cxx
39dffcff.cxx
40queffc.cxx
41rflctv.cxx
42rfrndx.cxx
43)
44set(TFluka_FSRCS
45FLUKA_input.f
46crnkvp.f
47)
48
49If(RULE_CHECKER_FOUND)
50 CHECK_RULES("${TFluka_SRCS}" "${INCLUDE_DIRECTORIES}" TFluka_RULES)
51endIf(RULE_CHECKER_FOUND)
52
53# fill list of header files from list of source files
54# by exchanging the file extension
55CHANGE_FILE_EXTENSION(*.cxx *.h TFluka_HEADERS "${TFluka_SRCS}")
56
57set(TFluka_LINKDEF TFlukaLinkDef.h)
58set(TFluka_DICTIONARY ${CMAKE_CURRENT_BINARY_DIR}/TFlukaDict.cxx)
59
60ROOT_GENERATE_DICTIONARY("${TFluka_HEADERS}" "${TFluka_LINKDEF}" "${TFluka_DICTIONARY}" "${INCLUDE_DIRECTORIES}")
61
62set(TFluka_SRCS ${TFluka_SRCS} ${TFluka_DICTIONARY})
63
64add_library(TFluka SHARED ${TFluka_SRCS} ${TFluka_FSRCS})
65target_link_libraries(TFluka ${ROOT_LIBRARIES})
66#set_target_properties(TFluka PROPERTIES ${CBMROOT_LIBRARY_PROPERTIES})
67SET_TARGET_PROPERTIES(TFluka PROPERTIES LINKER_LANGUAGE CXX)
68
69################ install ###################
70install(TARGETS TFluka DESTINATION ${CMAKE_BINARY_DIR}/lib)
71