-
Notifications
You must be signed in to change notification settings - Fork 2
/
CMakeLists.txt
32 lines (22 loc) · 922 Bytes
/
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
project(GPos)
set(CMAKE_SKIP_BUILD_RPATH FALSE)
set(CMAKE_BUILD_WITH_INSTALL_RPATH FALSE)
set(CMAKE_INSTALL_RPATH "./install")
set(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE)
set(CMAKE_CXX_STANDARD 11)
set(CMAKE_CXX_STANDARD_REQUIRED on)
cmake_minimum_required(VERSION 3.11 FATAL_ERROR)
find_package(MPI REQUIRED)
find_package(Geant4 REQUIRED)
find_package(G4mpi REQUIRED)
find_package(openPMD CONFIG REQUIRED)
include(${Geant4_USE_FILE})
include_directories(${Geant4_INCLUDE_DIR} ${G4mpi_INCLUDE_DIR})
include_directories(${PROJECT_SOURCE_DIR}/include)
file(GLOB sources ${PROJECT_SOURCE_DIR}/src/*.cc)
file(GLOB headers ${PROJECT_SOURCE_DIR}/include/*.hh)
add_executable(GPos src/GPos.cc ${sources} ${headers})
target_link_libraries(GPos PRIVATE ${G4mpi_LIBRARIES})
target_link_libraries(GPos PRIVATE ${Geant4_LIBRARIES})
target_link_libraries(GPos PRIVATE openPMD::openPMD)
install(TARGETS GPos DESTINATION bin)