forked from JPETTomography/j-pet-event-display
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCMakeLists.txt
70 lines (59 loc) · 1.83 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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
cmake_minimum_required(VERSION 2.6)
project(JPET_Event_Display CXX) # using only C++
list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake)
add_subdirectory(j-pet-framework)
include_directories(j-pet-framework ${Framework_INCLUDE_DIRS})
add_definitions(${Framework_DEFINITIONS})
find_package(ROOT REQUIRED COMPONENTS
Gui
Rint
Geom
GeomPainter
TreePlayer
Hist
HistPainter
Physics
RIO
Thread
Gpad
Tree
Html
Core
)
find_package(Boost 1.41.0 REQUIRED COMPONENTS
filesystem
program_options
regex
system
unit_test_framework
)
set(INCLUDE_PARENT ${ROOT_INCLUDE_DIRS} ${Boost_INCLUDE_DIRS} )
set(DEFINITIONS_PARENT ${ROOT_DEFINITIONS} ${Boost_DEFINITIONS} )
set(LIBRARY_PARENT ${ROOT_LIBRARY_DIRS} ${Boost_LIBRARY_DIRS} )
add_subdirectory(src)
add_subdirectory(tests)
add_subdirectory(geometry)
add_definitions(-std=c++11 -Wall -Wunused-parameter -Wextra)
include_directories(${INCLUDE_PARENT})
add_definitions(${DEFINITIONS_PARENT})
link_directories(${LIBRARY_PARENT})
add_executable(EventDisplay.exe ${CMAKE_CURRENT_SOURCE_DIR}/main.cpp)
target_link_libraries(EventDisplay.exe eventDisplay JPetFramework ${Boost_LIBRARIES} ${ROOT_LIBRARIES})
add_executable(createGeometryPET.exe ${CMAKE_CURRENT_SOURCE_DIR}/geometry/createGeometryPET.cpp)
target_link_libraries(createGeometryPET.exe geometryGenerator ${Boost_LIBRARIES} ${ROOT_LIBRARIES})
add_custom_command(
OUTPUT JPET_geom.root
COMMAND createGeometryPET.exe
DEPENDS
COMMENT "Create geometry for visualizator"
VERBATIM
)
add_custom_target(
CreateGeometry ALL
DEPENDS JPET_geom.root
)
set(DOWNLOAD_DATA ${CMAKE_CURRENT_SOURCE_DIR}/download_data.sh ${CMAKE_CURRENT_BINARY_DIR})
if(NOT DOWNLOAD_DATA_HAPPENED)
execute_process(COMMAND ${DOWNLOAD_DATA})
set(DOWNLOAD_DATA_HAPPENED TRUE CACHE BOOL "Has the download happened?" FORCE)
endif()