-
Notifications
You must be signed in to change notification settings - Fork 1
/
CMakeLists.txt
40 lines (29 loc) · 1.08 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
### Check if cmake has the required version
cmake_minimum_required(VERSION 3.1 FATAL_ERROR)
### Set the project name
project(GASTPC)
### Require C++11
set(CMAKE_CXX_STANDARD 11)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS} "-Wno-overloaded-virtual -Wno-shadow")
### Append to the CMAKE_MODULE_PATH variable the path to the directory
### with additional CMake modules
set(CMAKE_MODULE_PATH "${GASTPC_SOURCE_DIR}/cmake" "${CMAKE_MODULE_PATH}")
### Look for external dependencies
find_package(Geant4 REQUIRED vis_opengl_x11)
find_package(ROOT REQUIRED Geom EGPythia6 TreePlayer)
find_package(GENIE REQUIRED)
find_package(LibXml2)
find_package(Log4cpp)
include(${Geant4_USE_FILE})
if(EXISTS ${ROOT_USE_FILE})
### ROOT found using the ROOTConfig.cmake module
include(${ROOT_USE_FILE})
else()
### ROOT found using the FindROOT.cmake module
include_directories(${ROOT_INCLUDE_DIRS})
endif()
include_directories(${GENIE_INCLUDE_DIRS})
set(LIBRARY_OUTPUT_PATH "${CMAKE_BINARY_DIR}/lib")
set(EXECUTABLE_OUTPUT_PATH "${CMAKE_BINARY_DIR}/bin")
add_subdirectory(gastpc)