]> git.uio.no Git - u/mrichter/AliRoot.git/blob - LHAPDF/lhapdf5.5.1/CMakeLists.txt
a54ddc24ec465c9291f29d951f39de3bbe47a1b0
[u/mrichter/AliRoot.git] / LHAPDF / lhapdf5.5.1 / CMakeLists.txt
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 lhapdf)
18
19 # Module include folder
20 include_directories(${AliRoot_SOURCE_DIR}/LHAPDF/lhapdf5.5.1
21                     ${AliRoot_SOURCE_DIR}/LHAPDF/lhapdf5.5.1/include
22                     ${AliRoot_SOURCE_DIR}/LHAPDF/lhapdf5.5.1/src
23                    )
24
25 # Additional include folders in alphabetical order
26 include_directories(
27                    )
28
29 # Sources in alphabetical order
30 set(SRCS
31     ${AliRoot_SOURCE_DIR}/LHAPDF/AliStructFuncType.cxx 
32     src/version.cxx  
33     src/getdatapath.cxx
34    )
35
36 # Headers
37 set(HDRS
38     ${AliRoot_SOURCE_DIR}/LHAPDF/AliStructFuncType.h
39    )
40
41 # C sources
42 set(CSRCS
43     src/binreloc.c
44    )
45
46 # Fortran sources
47 set(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/evolution.f
57     src/inputPDF.f
58     src/LHpdflib.F
59     src/parameter.f
60     src/QCDNUM.f
61     src/QCDparams.f
62     src/Sqcdnum.f
63     src/wrapa02.f
64     src/wrapa02m.f
65     src/wrapabfkwpi.f
66     src/wrapacfgpg.f
67     src/wrapcteq5.f
68     src/wrapcteq6.f
69     src/wrapcteq6lg.f
70     src/wrapdgg.f
71     src/wrapdog.f
72     src/wrapEVLCTEQ.f
73     src/wrapevolve.f
74     src/wrapgrv.f
75     src/wrapgrvg.f
76     src/wrapgrvpi.f
77     src/wrapgsg96.f
78     src/wrapgsg.f
79     src/wraph1.f
80     src/wraplacg.f
81     src/wrapowpi.f
82     src/wrapmrst.f
83     src/wrapQCDNUM3.f
84     src/wrapQCDNUM4.f
85     src/wrapQCDNUM.f
86     src/wrapsasg.f
87     src/wrapsmrspi.f
88     src/wrapwhitg.f
89     src/wrapzeus.f
90     src/lhaglue.f
91     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 add_definitions(-DDEFAULTPREFIXPATH="NONE"  -DDEFAULTLHAPATH="${AliRoot_SOURCE_DIR}/LHAPDF/PDFsets")
107
108 # Additional compilation and linking flags
109 set(CMAKE_C_FLAGS "-ansi ${CMAKE_C_FLAGS}")
110 set(MODULE_COMPILE_FLAGS "")
111 set(MODULE_LINK_FLAGS)
112
113 # System dependent: Modify the way the library is build
114 if(${CMAKE_SYSTEM} MATCHES Darwin)
115     set(MODULE_LINK_FLAGS "-undefined dynamic_lookup ${MODULE_LINK_FLAGS}")
116 endif(${CMAKE_SYSTEM} MATCHES Darwin)
117
118 # Target properties
119 set_target_properties(${MODULE} PROPERTIES FORTRAN_FLAGS "")
120 set_target_properties(${MODULE} PROPERTIES COMPILE_FLAGS "${MODULE_COMPILE_FLAGS}")
121 set_target_properties(${MODULE} PROPERTIES Fortran_FORMAT FREE)
122 set_target_properties(${MODULE} PROPERTIES LINK_FLAGS "${MODULE_LINK_FLAGS}")
123
124 # Linking the library
125 target_link_libraries(${MODULE} ${LIBDEPS})
126
127 # Installation
128 install(TARGETS ${MODULE}
129         ARCHIVE DESTINATION lib
130         LIBRARY DESTINATION lib)
131 install(FILES ${HDRS} DESTINATION include)