Debian Codegraph @

examples/RootIOExample/CMakeLists.txt

raw
1
2 include_directories(${PROJECT_SOURCE_DIR}/include ${CMAKE_CURRENT_SOURCE_DIR} ${PROJECT_SOURCE_DIR}/rootIO/include ${ROOT_INCLUDE_DIR})
3
4 add_executable(rootIO_example_read.exe ${CMAKE_CURRENT_SOURCE_DIR}/rootIO_example_read.cc)
5 target_link_libraries(rootIO_example_read.exe ${ROOT_LIBRARIES} HepMC3 HepMC3rootIO)
6 set_target_properties(rootIO_example_read.exe PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/outputs/${CMAKE_INSTALL_BINDIR})
7
8 add_executable(rootIO_example_write.exe ${CMAKE_CURRENT_SOURCE_DIR}/rootIO_example_write.cc)
9 target_link_libraries(rootIO_example_write.exe ${ROOT_LIBRARIES} HepMC3 HepMC3rootIO)
10 set_target_properties(rootIO_example_write.exe PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/outputs/${CMAKE_INSTALL_BINDIR})
11
12 # create environment scripts
13
14 set(bindir "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_BINDIR}")
15 set(libdir "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}:${ROOT_LIBRARY_DIR}")
16
17 configure_file(
18 ${CMAKE_CURRENT_SOURCE_DIR}/rootIO_example_env.sh.in
19 ${PROJECT_BINARY_DIR}/outputs/${CMAKE_INSTALL_BINDIR}/rootIO_example_env.sh
20 @ONLY
21 )
22
23 # installs
24 install(TARGETS rootIO_example_write.exe rootIO_example_read.exe DESTINATION ${CMAKE_INSTALL_BINDIR})
25 install(FILES example.hepmc3 DESTINATION ${CMAKE_INSTALL_BINDIR})
26 install(DIRECTORY ${PROJECT_BINARY_DIR}/outputs/${CMAKE_INSTALL_BINDIR}/ DESTINATION ${CMAKE_INSTALL_BINDIR}
27 FILES_MATCHING PATTERN "*env.sh*")