CMake: Removing all lhapdf link dependencies
[u/mrichter/AliRoot.git] / EVGEN / CMakeLists.txt
index fb83127..2b21421 100644 (file)
 set(MODULE EVGEN)
 
 # Module include folder
-include_directories(${CMAKE_SOURCE_DIR}/${MODULE})
+include_directories(${AliRoot_SOURCE_DIR}/${MODULE})
 
 # Additional include folders in alphabetical order except ROOT
-include_directories(${ROOT_INCLUDE_DIRS}
-                    ${CMAKE_SOURCE_DIR}/FASTSIM
-                    ${CMAKE_SOURCE_DIR}/LHAPDF
-                    ${CMAKE_SOURCE_DIR}/PYTHIA6/AliPythia6
-                    ${CMAKE_SOURCE_DIR}/STEER/ESD
-                    ${CMAKE_SOURCE_DIR}/STEER/STEER
-                    ${CMAKE_SOURCE_DIR}/STEER/STEERBase
-                    ${CMAKE_SOURCE_DIR}/TEvtGen
+include_directories(${ROOT_INCLUDE_DIR}
+                    ${AliRoot_SOURCE_DIR}/FASTSIM
+                    ${AliRoot_SOURCE_DIR}/LHAPDF
+                    ${AliRoot_SOURCE_DIR}/STEER/ESD
+                    ${AliRoot_SOURCE_DIR}/STEER/STEER
+                    ${AliRoot_SOURCE_DIR}/STEER/STEERBase
+                    ${AliRoot_SOURCE_DIR}/TEvtGen
+                    ${AliRoot_SOURCE_DIR}/TEvtGen/THepMCParser
                    )
 
 # Sources
@@ -98,6 +98,9 @@ set(SRCS
 # Headers from sources
 string(REPLACE ".cxx" ".h" HDRS "${SRCS}")
 
+# Additional header files
+set(HDRS ${HDRS} AliDecayer.h)
+
 # Generate the dictionary
 # It will create G_ARG1.cxx and G_ARG1.h / ARG1 = function first argument
 get_directory_property(incdirs INCLUDE_DIRECTORIES)
@@ -105,14 +108,17 @@ generate_dictionary("${MODULE}" "${MODULE}LinkDef.h" "${HDRS}" "${incdirs}")
 
 # Generate the ROOT map
 # Dependecies
-set(LIBDEPS STEERbase STEER ESD AliPythia6 lhapdf TEvtGen FASTSIM)
+set(LIBDEPS STEERBase STEER ESD TEvtGen FASTSIM THepMCParser)
 generate_rootmap("${MODULE}" "${LIBDEPS}" "${CMAKE_CURRENT_SOURCE_DIR}/${MODULE}LinkDef.h")
 
 # Add a library to the project using the specified source files
 add_library(${MODULE} SHARED ${SRCS} G__${MODULE}.cxx)
 
 # Additional compilation flags
-set_target_properties(${MODULE} PROPERTIES COMPILE_FLAGS "-O -g")
+set_target_properties(${MODULE} PROPERTIES COMPILE_FLAGS "")
+
+# Linking the library
+target_link_libraries(${MODULE} ${LIBDEPS})
 
 # System dependent: Modify the way the library is build
 if(${CMAKE_SYSTEM} MATCHES Darwin)