if (USE_INSTALLED_HEPMC3) include_directories(${HEPMC3_INCLUDE_DIR} ${HEPMC3_INCLUDE_DIR}/rootIO) set (ptoh3 ${HEPMC3_INTERFACES_DIR}/pythia6/include/Pythia6/Pythia6ToHepMC3.cc) else() include_directories(${PROJECT_SOURCE_DIR}/include ${PROJECT_SOURCE_DIR}/rootIO/include/) set (ptoh3 ${PROJECT_SOURCE_DIR}/interfaces/pythia6/include/Pythia6/Pythia6ToHepMC3.cc) endif() add_executable(pythia6_example.exe ${CMAKE_CURRENT_SOURCE_DIR}/main63.f ${CMAKE_CURRENT_SOURCE_DIR}/pythia-6.4.28.f ${ptoh3}) LINK_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}/../outputs/lib64/ ${CMAKE_CURRENT_SOURCE_DIR}/../outputs/lib/ ) if(ROOT_FOUND) target_link_libraries(pythia6_example.exe HepMC3 HepMC3rootIO) include_directories(${ROOT_INCLUDE_DIRS}) else() target_link_libraries(pythia6_example.exe HepMC3) endif() set_target_properties(pythia6_example.exe PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/outputs/${CMAKE_INSTALL_BINDIR}) install(TARGETS pythia6_example.exe DESTINATION ${CMAKE_INSTALL_BINDIR})