1 # **************************************************************************
2 # * Copyright(c) 1998-2014, ALICE Experiment at CERN, All rights reserved. *
4 # * Author: The ALICE Off-line Project. *
5 # * Contributors are mentioned in the code where appropriate. *
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 # **************************************************************************
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
25 # Additional include folders in alphabetical order
29 # Sources in alphabetical order
31 ${AliRoot_SOURCE_DIR}/LHAPDF/AliStructFuncType.cxx
38 ${AliRoot_SOURCE_DIR}/LHAPDF/AliStructFuncType.h
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}")
99 # Generate the ROOT map
102 generate_rootmap("${MODULE}" "${LIBDEPS}" "${CMAKE_CURRENT_SOURCE_DIR}/${MODULE}LinkDef.h")
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")
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)
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)
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}")
124 # Linking the library
125 target_link_libraries(${MODULE} ${LIBDEPS})
128 install(TARGETS ${MODULE}
129 ARCHIVE DESTINATION lib
130 LIBRARY DESTINATION lib)
131 install(FILES ${HDRS} DESTINATION include)