-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCMakeLists.txt
46 lines (35 loc) · 1.35 KB
/
CMakeLists.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
cmake_minimum_required(VERSION 3.16)
project(cevns_sim)
find_package(Geant4 REQUIRED ui_all vis_all)
include(${Geant4_USE_FILE})
message("HI")
# Include geant4 files
include_directories(${PROJECT_SOURCE_DIR}/src/DetectorGeometry)
include_directories(${PROJECT_SOURCE_DIR}/src/PGAHandler)
include_directories(${PROJECT_SOURCE_DIR}/src/PrimaryGeneratorActions)
include_directories(${PROJECT_SOURCE_DIR}/src/PhysicsLists)
include_directories(${PROJECT_SOURCE_DIR}/src/SimulationActions)
include_directories(${PROJECT_SOURCE_DIR}/src/Analysis)
include_directories(${PROJECT_SOURCE_DIR}/src/Commands)
include_directories(${PROJECT_SOURCE_DIR}/src)
include_directories(${Geant4_INCLUDE_DIR})
# Add executable and link to Geant4 libraries
file(GLOB_RECURSE headers ${PROJECT_SOURCE_DIR}/src/*.hh)
file(GLOB_RECURSE sources ${PROJECT_SOURCE_DIR}/src/*.cc)
message("Headers are ${headers}")
message("Sources are ${sources}")
add_executable(cevns_sim cevns_sim.cc ${sources} ${headers})
target_link_libraries(cevns_sim ${Geant4_LIBRARIES})
# Copy scripts to build directory
set(cevns_sim_SCRIPTS
vis.mac)
foreach(_script ${cevns_sim_SCRIPTS})
message(_script)
configure_file(
${PROJECT_SOURCE_DIR}/${_script}
${PROJECT_BINARY_DIR}/${_script}
COPYONLY
)
endforeach()
# install executable to bin
install(TARGETS cevns_sim DESTINATION bin)