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