Changes for Root6 (Mikolaj)
[u/mrichter/AliRoot.git] / EPOS / epos167 / CMakeLists.txt
CommitLineData
9d62600c 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 EPOS)
18
19# Module include folder
33037845 20include_directories(${AliRoot_SOURCE_DIR}/EPOS
21 ${AliRoot_SOURCE_DIR}/EPOS/epos167
9d62600c 22 )
23
24# Additional include folders in alphabetical order
25include_directories(${AliRoot_SOURCE_DIR}/EVGEN
26 ${AliRoot_SOURCE_DIR}/STEER/STEER
27 ${AliRoot_SOURCE_DIR}/STEER/STEERBase
28 )
29
30# Sources in alphabetical order
31set(SRCS
32 epostimer.cxx
33 ${AliRoot_SOURCE_DIR}/EPOS/TEpos.cxx
34 ${AliRoot_SOURCE_DIR}/EPOS/AliGenEpos.cxx
35 ${AliRoot_SOURCE_DIR}/EPOS/AliGenEposIsajetToPdgConverter.cxx
36 )
37
38# Headers
39set(HDRS
40 ${AliRoot_SOURCE_DIR}/EPOS/TEpos.h
41 ${AliRoot_SOURCE_DIR}/EPOS/AliGenEpos.h
42 ${AliRoot_SOURCE_DIR}/EPOS/AliGenEposIsajetToPdgConverter.h
43 )
44
45# Fortran sources
46set(FSRCS
47 epos-app-158.f
48 epos-bas-168.f
49 epos-con-161.f
50 epos-dky-165.f
51 epos-dro-168.f
52 epos-ems-165.f
53 epos-fra-163.f
54 epos-ico-158.f
55 epos-yyy-168.f
56 epos-ids-165.f
57 epos-int-168.f
58 epos-jps-164.f
59 epos-omg-160.f
60 epos-par-129.f
61 epos-sem-165.f
62 epos-rsh-165.f
63 epos-qsh-165.f
64 epos-tim-155.f
65 epos-uti-165.f
66 epos-xan-154.f
67 epos-xpr-165.f
68 eposm.f
69 eposu.f
70 )
71
72# Generate the dictionary
73# It will create G_ARG1.cxx and G_ARG1.h / ARG1 = function first argument
74get_directory_property(incdirs INCLUDE_DIRECTORIES)
75generate_dictionary("${MODULE}" "${MODULE}LinkDef.h" "${HDRS}" "${incdirs}")
76
77# Generate the ROOT map
78# Dependecies
79set(LIBDEPS STEERBase STEER EVGEN Core EG MathCore)
80generate_rootmap("${MODULE}" "${LIBDEPS}" "${CMAKE_CURRENT_SOURCE_DIR}/${MODULE}LinkDef.h")
81
82# Add a library to the project using the specified source files
83add_library(${MODULE} SHARED ${SRCS} G__${MODULE}.cxx ${CSRCS} ${FSRCS})
d76274fd 84target_link_libraries(${MODULE} ${LIBDEPS})
9d62600c 85
86# Additional compilation and linking flags
87set(CMAKE_C_FLAGS "-ansi ${CMAKE_C_FLAGS}")
68aeb13b 88set(MODULE_COMPILE_FLAGS "")
9d62600c 89set(MODULE_LINK_FLAGS)
90
91# System dependent: Modify the way the library is build
92if(${CMAKE_SYSTEM} MATCHES Darwin)
93 set(MODULE_LINK_FLAGS "-undefined dynamic_lookup ${MODULE_LINK_FLAGS}")
94endif(${CMAKE_SYSTEM} MATCHES Darwin)
95
96# Target properties
97set_target_properties(${MODULE} PROPERTIES FORTRAN_FLAGS "")
98set_target_properties(${MODULE} PROPERTIES COMPILE_FLAGS "${MODULE_COMPILE_FLAGS}")
99set_target_properties(${MODULE} PROPERTIES LINK_FLAGS "${MODULE_LINK_FLAGS}")
100
101# Installation
102install(TARGETS ${MODULE}
103 ARCHIVE DESTINATION lib
104 LIBRARY DESTINATION lib)
105install(FILES ${HDRS} DESTINATION include)