]> git.uio.no Git - u/mrichter/AliRoot.git/blame_incremental - LHAPDF/lhapdf-5.9.1/CMakeLists.txt
Fixes for object target dependencies
[u/mrichter/AliRoot.git] / LHAPDF / lhapdf-5.9.1 / CMakeLists.txt
... / ...
CommitLineData
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 lhapdf-5.9.1)
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
26include_directories(
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
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/lhaglue.f
60 src/LHpdflib.f
61 src/parameter.F
62 src/QCDNUM.F
63 src/QCDparams.f
64 src/Smrst.f
65 src/Sqcdnum.f
66 src/Szeus.f
67 src/uncertainties.f
68 src/wrapa02m.f
69 src/wrapabfkwpi.f
70 src/wrapabkm09.f
71 src/wrapabm11.f
72 src/wrapacfgpg.f
73 src/wrapct12.f
74 src/wrapcteq5.f
75 src/wrapcteq65.f
76 src/wrapcteq6.f
77 src/wrapcteq6lg.f
78 src/wrapdgg.f
79 src/wrapdog.f
80 src/wrapEVLCTEQ.f
81 src/wrapevolve.F
82 src/wrapgjr.f
83 src/wrapgrv.f
84 src/wrapgrvg.f
85 src/wrapgrvpi.f
86 src/wrapgsg96.f
87 src/wrapgsg.f
88 src/wraph1.f
89 src/wraphera.f
90 src/wrapheragrid.f
91 src/wraphkn.f
92 src/wraplacg.f
93 src/wrapmrst2006.f
94 src/wrapmrst98.f
95 src/wrapmrst.f
96 src/wrapmrstqed.f
97 src/wrapmstw.f
98 src/wrapNNPDF20grid.f
99 src/wrapNNPDF20qedgrid.f
100 src/wrapNNPDF.f
101 src/wrapNNPDFgrid.f
102 src/wrapowpi.f
103 src/wrapQCDNUM3.f
104 src/wrapQCDNUM4.f
105 src/wrapQCDNUM.f
106 src/wrapsasg.f
107 src/wrapsmrspi.f
108 src/wrapUSER.f
109 src/wrapusergrid.f
110 src/wrapwhitg.f
111 src/wrapXNN.f
112 src/wrapzeus.f
113 )
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)
123generate_rootmap("${MODULE}" "${LIBDEPS}" "${CMAKE_CURRENT_SOURCE_DIR}/${MODULE}LinkDef.h")
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
129add_definitions(-DDEFAULTPREFIXPATH="NONE" -DDEFAULTLHAPATH="${AliRoot_SOURCE_DIR}/LHAPDF/PDFsets")
130
131# Additional compilation and linking flags
132set(CMAKE_C_FLAGS "-ansi ${CMAKE_C_FLAGS}")
133set(CMAKE_Fortran_FLAGS "-cpp")
134set(MODULE_COMPILE_FLAGS "")
135set(MODULE_LINK_FLAGS)
136
137# System dependent: Modify the way the library is build
138if(${CMAKE_SYSTEM} MATCHES Darwin)
139 set(MODULE_LINK_FLAGS "-undefined dynamic_lookup ${MODULE_LINK_FLAGS}")
140endif(${CMAKE_SYSTEM} MATCHES Darwin)
141
142# Target properties
143set_target_properties(${MODULE} PROPERTIES COMPILE_FLAGS "${MODULE_COMPILE_FLAGS}")
144set_target_properties(${MODULE} PROPERTIES Fortran_FORMAT FREE)
145set_target_properties(${MODULE} PROPERTIES LINK_FLAGS "${MODULE_LINK_FLAGS}")
146
147# Installation
148install(TARGETS ${MODULE}
149 ARCHIVE DESTINATION lib
150 LIBRARY DESTINATION lib)
151install(FILES ${HDRS} DESTINATION include)