Skip to content
Snippets Groups Projects
Commit dc5d7415 authored by Martin Urban's avatar Martin Urban
Browse files

Removed hardcoded paths from CMakeLists, adapt to new PXL version, fix include of the Generator

parent 912868a4
No related branches found
No related tags found
No related merge requests found
......@@ -9,37 +9,25 @@ set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}")
#name of the pxl-module
SET(PXLMODULENAME Pythia8Module)
#files to be added to the module library
add_library(${PXLMODULENAME} MODULE
Pythia8Generator.cpp
)
#check for pxl
FIND_PACKAGE(PXL)
FIND_PACKAGE(Pythia8)
FIND_PACKAGE(PXL REQUIRED astro core hep modules)
FIND_PACKAGE(PkgConfig)
pkg_check_modules(PYTHIA8 REQUIRED pythia8)
#insert needed plugins here
#ADD_PXL_PLUGIN(pxl-astro)
ADD_PXL_PLUGIN(pxl-core)
ADD_PXL_PLUGIN(pxl-hep)
ADD_PXL_PLUGIN(pxl-modules)
MESSAGE( STATUS "PYTHIA8_LIBRARIES " ${PYTHIA8_LIBRARIES})
#add additional external libraries as needed
include_directories(
${PXL_INCLUDE_DIRS} ${Pythia8_INCLUDE_DIRS}
${PYTHIA8_INCLUDE_DIRS}
)
link_directories(
${PXL_LIBRARIES} ${Pythia8_LIBRARIES}
${PYTHIA8_LIBRARY_DIRS}
)
target_link_libraries (${PXLMODULENAME}
${PXL_LIBRARIES} ${Pythia8_LIBRARIES}
)
SET_TARGET_PROPERTIES(${PXLMODULENAME} PROPERTIES COMPILE_FLAGS -fPIC)
#set install destination
INSTALL(TARGETS ${PXLMODULENAME} LIBRARY DESTINATION
${PXL_PLUGIN_INSTALL_PATH})
add_pxl_plugin(${PXLMODULENAME} Pythia8Generator.cpp)
# ${PYTHIA8_LIBRARIES} can not be used because of a bug in the package config
# ${PYTHIA8_LIBRARIES}=Pythia8 (captial P)
target_link_libraries (${PXLMODULENAME}
pythia8
)
......@@ -8,7 +8,7 @@
#include "pxl/core/Event.hh"
#include "pxl/hep/EventView.hh"
#include "Pythia.h"
#include "Pythia8/Pythia.h"
#include<cmath>
#include<string>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment