]>
Commit | Line | Data |
---|---|---|
1dbe1076 | 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 | # ************************************************************************** | |
6d839a5c | 15 | |
1dbe1076 | 16 | # Module |
17 | set(MODULE lhapdf) | |
6d839a5c | 18 | |
1dbe1076 | 19 | # Module include folder |
427d561c | 20 | include_directories(${AliRoot_SOURCE_DIR}/LHAPDF) |
6d839a5c | 21 | |
1dbe1076 | 22 | # Additional include folders in alphabetical order except ROOT |
23 | include_directories(${ROOT_INCLUDE_DIRS} | |
427d561c | 24 | ${AliRoot_SOURCE_DIR}/LHAPDF/lhapdf5.5.1 |
25 | ${AliRoot_SOURCE_DIR}/LHAPDF/lhapdf5.5.1/include | |
26 | ${AliRoot_SOURCE_DIR}/LHAPDF/lhapdf5.5.1/src | |
1dbe1076 | 27 | ) |
28 | ||
29 | # Sources in alphabetical order | |
30 | set(SRCS | |
31 | AliStructFuncType.cxx | |
32 | lhapdf5.5.1/src/version.cxx | |
33 | lhapdf5.5.1/src/getdatapath.cxx | |
34 | ) | |
35 | ||
36 | # Headers | |
37 | set(HDRS | |
38 | AliStructFuncType.h | |
39 | ) | |
40 | ||
41 | # C sources | |
42 | set(CSRCS | |
43 | lhapdf5.5.1/src/binreloc.c | |
44 | ) | |
45 | ||
46 | # Fortran sources | |
47 | set(FSRCS | |
48 | lhapdf5.5.1/src/alphas.f | |
49 | lhapdf5.5.1/src/commoninit.f | |
50 | lhapdf5.5.1/src/description.f | |
51 | lhapdf5.5.1/src/eks98.f | |
52 | lhapdf5.5.1/src/eksarp.f | |
53 | lhapdf5.5.1/src/eps08.f | |
54 | lhapdf5.5.1/src/eps09.f | |
55 | lhapdf5.5.1/src/EVLCTEQ.f | |
56 | lhapdf5.5.1/src/evolution.f | |
57 | lhapdf5.5.1/src/inputPDF.f | |
58 | lhapdf5.5.1/src/LHpdflib.F | |
59 | lhapdf5.5.1/src/parameter.f | |
60 | lhapdf5.5.1/src/QCDNUM.f | |
61 | lhapdf5.5.1/src/QCDparams.f | |
62 | lhapdf5.5.1/src/Sqcdnum.f | |
63 | lhapdf5.5.1/src/wrapa02.f | |
64 | lhapdf5.5.1/src/wrapa02m.f | |
65 | lhapdf5.5.1/src/wrapabfkwpi.f | |
66 | lhapdf5.5.1/src/wrapacfgpg.f | |
67 | lhapdf5.5.1/src/wrapcteq5.f | |
68 | lhapdf5.5.1/src/wrapcteq6.f | |
69 | lhapdf5.5.1/src/wrapcteq6lg.f | |
70 | lhapdf5.5.1/src/wrapdgg.f | |
71 | lhapdf5.5.1/src/wrapdog.f | |
72 | lhapdf5.5.1/src/wrapEVLCTEQ.f | |
73 | lhapdf5.5.1/src/wrapevolve.f | |
74 | lhapdf5.5.1/src/wrapgrv.f | |
75 | lhapdf5.5.1/src/wrapgrvg.f | |
76 | lhapdf5.5.1/src/wrapgrvpi.f | |
77 | lhapdf5.5.1/src/wrapgsg96.f | |
78 | lhapdf5.5.1/src/wrapgsg.f | |
79 | lhapdf5.5.1/src/wraph1.f | |
80 | lhapdf5.5.1/src/wraplacg.f | |
81 | lhapdf5.5.1/src/wrapowpi.f | |
82 | lhapdf5.5.1/src/wrapmrst.f | |
83 | lhapdf5.5.1/src/wrapQCDNUM3.f | |
84 | lhapdf5.5.1/src/wrapQCDNUM4.f | |
85 | lhapdf5.5.1/src/wrapQCDNUM.f | |
86 | lhapdf5.5.1/src/wrapsasg.f | |
87 | lhapdf5.5.1/src/wrapsmrspi.f | |
88 | lhapdf5.5.1/src/wrapwhitg.f | |
89 | lhapdf5.5.1/src/wrapzeus.f | |
90 | lhapdf5.5.1/src/lhaglue.f | |
91 | lhapdf5.5.1/src/wrapUSER.f | |
92 | ) | |
93 | ||
94 | # Generate the dictionary | |
95 | # It will create G_ARG1.cxx and G_ARG1.h / ARG1 = function first argument | |
96 | get_directory_property(incdirs INCLUDE_DIRECTORIES) | |
97 | generate_dictionary("${MODULE}" "${MODULE}LinkDef.h" "${HDRS}" "${incdirs}") | |
98 | ||
99 | # Generate the ROOT map | |
100 | # Dependecies | |
101 | set(LIBDEPS Core) | |
102 | generate_rootmap("${MODULE}" "${LIBDEPS}" "${CMAKE_CURRENT_SOURCE_DIR}/${MODULE}LinkDef.h") | |
103 | ||
104 | # Add a library to the project using the specified source files | |
105 | add_library(${MODULE} SHARED ${SRCS} G__${MODULE}.cxx ${CSRCS} ${FSRCS}) | |
106 | ||
107 | # Additional compilation flags | |
ea65eb92 | 108 | set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -ansi") |
1dbe1076 | 109 | set_target_properties(${MODULE} PROPERTIES COMPILE_FLAGS "-O -g" Fortran_FORMAT FREE ) |
427d561c | 110 | add_definitions(-DDEFAULTPREFIXPATH="NONE" -DDEFAULTLHAPATH="${AliRoot_SOURCE_DIR}/LHAPDF/PDFsets") |
1dbe1076 | 111 | |
112 | # System dependent: Modify the way the library is build | |
113 | if(${CMAKE_SYSTEM} MATCHES Darwin) | |
114 | set_target_properties(${MODULE} PROPERTIES LINK_FLAGS "-undefined dynamic_lookup") | |
115 | endif(${CMAKE_SYSTEM} MATCHES Darwin) | |
116 | ||
117 | # Installation | |
118 | install(TARGETS ${MODULE} | |
119 | ARCHIVE DESTINATION lib | |
120 | LIBRARY DESTINATION lib) | |
121 | install(FILES ${HDRS} DESTINATION include) | |
122 | install(DIRECTORY PDFsets DESTINATION LHAPDF) |