]> git.uio.no Git - u/mrichter/AliRoot.git/blame - LHAPDF/lhapdf-5.9.1/CMakeLists.txt
Update master to aliroot
[u/mrichter/AliRoot.git] / LHAPDF / lhapdf-5.9.1 / CMakeLists.txt
CommitLineData
6f2f7765 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
33037845 17set(MODULE lhapdf_5_9_1)
6f2f7765 18
19# Module include folder
20include_directories(${AliRoot_SOURCE_DIR}/LHAPDF/lhapdf-5.9.1
21 ${AliRoot_SOURCE_DIR}/LHAPDF/lhapdf-5.9.1/include
22 ${AliRoot_SOURCE_DIR}/LHAPDF/lhapdf-5.9.1/src
23 )
24
25# Additional include folders in alphabetical order except ROOT
f0315837 26include_directories(${ROOT_INCLUDE_DIR}
6f2f7765 27 )
28
29# Sources in alphabetical order
30set(SRCS
31 ${AliRoot_SOURCE_DIR}/LHAPDF/AliStructFuncType.cxx
32 src/version.cxx
33 src/getdatapath.cxx
34 )
35
36# Headers
37set(HDRS
38 ${AliRoot_SOURCE_DIR}/LHAPDF/AliStructFuncType.h
39 )
40
41# C sources
42set(CSRCS
43 src/binreloc.c
44 )
45
46# Fortran sources
47set(FSRCS
085e8693 48 src/alphas.f
49 src/commoninit.f
50 src/description.f
51 src/eks98.f
52 src/eksarp.f
53 src/eps08.f
54 src/eps09.f
55 src/EVLCTEQ.f
56 src/EVLNNPDF.f
57 src/evolution.f
58 src/inputPDF.F
59 src/LHpdflib.F
60 src/parameter.F
61 src/QCDNUM.F
62 src/QCDparams.f
63 src/Smrst.f
64 src/Sqcdnum.f
65 src/Szeus.f
66 src/uncertainties.f
67 src/wrapNNPDF.f
68 src/wrapNNPDF20grid.f
69 src/wrapNNPDF20qedgrid.f
70 src/wrapNNPDFgrid.f
71 src/wrapa02m.f
72 src/wrapabfkwpi.f
73 src/wrapabkm09.f
74 src/wrapabm11.f
75 src/wrapacfgpg.f
76 src/wrapct12.f
77 src/wrapcteq5.f
78 src/wrapcteq6.f
79 src/wrapcteq65.f
80 src/wrapcteq6lg.f
81 src/wrapdgg.f
82 src/wrapdog.f
83 src/wrapEVLCTEQ.f
84 src/wrapevolve.F
85 src/wrapgjr.f
86 src/wrapgrv.f
87 src/wrapgrvg.f
88 src/wrapgrvpi.f
89 src/wrapgsg96.f
90 src/wrapgsg.f
91 src/wraph1.f
92 src/wraphera.f
93 src/wrapheragrid.f
94 src/wraphkn.f
95 src/wraplacg.f
96 src/wrapowpi.f
97 src/wrapmrst.f
98 src/wrapmrst2006.f
99 src/wrapmrst98.f
100 src/wrapmrstqed.f
101 src/wrapQCDNUM3.f
102 src/wrapQCDNUM4.f
103 src/wrapQCDNUM.F
104 src/wrapsasg.f
105 src/wrapmstw.f
106 src/wrapsmrspi.f
107 src/wrapwhitg.f
108 src/wrapzeus.f
109 src/lhaglue.f
110 src/wrapUSER.f
111 src/wrapusergrid.f
112 src/wrapXNN.f
113 )
6f2f7765 114
115# Generate the dictionary
116# It will create G_ARG1.cxx and G_ARG1.h / ARG1 = function first argument
117get_directory_property(incdirs INCLUDE_DIRECTORIES)
118generate_dictionary("${MODULE}" "lhapdfLinkDef.h" "${HDRS}" "${incdirs}")
119
120# Generate the ROOT map
121# Dependecies
122set(LIBDEPS Core)
4297ae75 123generate_rootmap("${MODULE}" "${LIBDEPS}" "${CMAKE_CURRENT_SOURCE_DIR}/lhapdfLinkDef.h")
6f2f7765 124
125# Add a library to the project using the specified source files
126add_library(${MODULE} SHARED ${SRCS} G__${MODULE}.cxx ${CSRCS} ${FSRCS})
127
128# Definitions
085e8693 129add_definitions(-DDEFAULTPREFIXPATH="NONE" -DDEFAULTLHAPATH="${AliRoot_SOURCE_DIR}/LHAPDF/PDFsets" -DCTEQ)
6f2f7765 130
131# Additional compilation and linking flags
132set(CMAKE_C_FLAGS "-ansi ${CMAKE_C_FLAGS}")
68aeb13b 133set(MODULE_COMPILE_FLAGS "")
6f2f7765 134set(MODULE_LINK_FLAGS)
135
136# System dependent: Modify the way the library is build
137if(${CMAKE_SYSTEM} MATCHES Darwin)
138 set(MODULE_LINK_FLAGS "-undefined dynamic_lookup ${MODULE_LINK_FLAGS}")
139endif(${CMAKE_SYSTEM} MATCHES Darwin)
140
141# Target properties
142set_target_properties(${MODULE} PROPERTIES COMPILE_FLAGS "${MODULE_COMPILE_FLAGS}")
143set_target_properties(${MODULE} PROPERTIES Fortran_FORMAT FREE)
144set_target_properties(${MODULE} PROPERTIES LINK_FLAGS "${MODULE_LINK_FLAGS}")
145
2a1514aa 146# Linking the library
147target_link_libraries(${MODULE} ${LIBDEPS})
148
6f2f7765 149# Installation
150install(TARGETS ${MODULE}
151 ARCHIVE DESTINATION lib
152 LIBRARY DESTINATION lib)
153install(FILES ${HDRS} DESTINATION include)