forked from iLCSoft/DDMarlinPandora
-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
90 lines (62 loc) · 2.71 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
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
########################################################
# cmake file for building DDMarlinPandora
# @author Jan Engels, DESY
CMAKE_MINIMUM_REQUIRED(VERSION 2.8.2 FATAL_ERROR)
########################################################
# project name
PROJECT( DDMarlinPandora )
# project version# continuing from MarlinPandora version 2.0.0 revision 1934
SET( DDMarlinPandora_VERSION_MAJOR 0 )
SET( DDMarlinPandora_VERSION_MINOR 12 )
SET( DDMarlinPandora_VERSION_PATCH 2 )
### CMAKE ###################################################################
# load default settings from ILCSOFT_CMAKE_MODULES
FIND_PACKAGE( ILCUTIL COMPONENTS ILCSOFT_CMAKE_MODULES REQUIRED )
INCLUDE( ilcsoft_default_settings )
### SOURCE ##################################################################
#include directories
INCLUDE_DIRECTORIES( ./include )
INSTALL_DIRECTORY( ./include DESTINATION . FILES_MATCHING PATTERN "*.h" )
AUX_SOURCE_DIRECTORY( ./src/ DDMarlinPandora_SRCS )
### DEPENDENCIES ############################################################
FIND_PACKAGE( Marlin 1.0 REQUIRED )
FIND_PACKAGE( MarlinUtil 01.10 REQUIRED )
FIND_PACKAGE( PandoraSDK 03.00.00 REQUIRED )
FIND_PACKAGE( LCContent 03.00.00 REQUIRED )
FIND_PACKAGE( DD4hep REQUIRED )
FIND_PACKAGE( ROOT REQUIRED )
FIND_PACKAGE( MarlinTrk REQUIRED )
FOREACH( pkg PandoraSDK Marlin MarlinUtil LCContent DD4hep ROOT MarlinTrk )
IF( ${pkg}_FOUND )
INCLUDE_DIRECTORIES( SYSTEM ${${pkg}_INCLUDE_DIRS} )
LINK_LIBRARIES( ${${pkg}_LIBRARIES} )
ADD_DEFINITIONS ( ${${pkg}_DEFINITIONS} )
ENDIF()
ENDFOREACH()
IF( PANDORA_MONITORING )
FIND_PACKAGE( PandoraMonitoring 03.00.00 REQUIRED )
IF( PandoraMonitoring_FOUND )
INCLUDE_DIRECTORIES( SYSTEM ${PandoraMonitoring_INCLUDE_DIRS} )
LINK_LIBRARIES( ${PandoraMonitoring_LIBRARIES} )
ADD_DEFINITIONS ( ${PandoraMonitoring_DEFINITIONS} )
ADD_DEFINITIONS( "-DMONITORING" )
ENDIF()
ENDIF()
### DOCUMENTATION ###########################################################
OPTION( INSTALL_DOC "Set to OFF to skip build/install Documentation" OFF )
IF( INSTALL_DOC AND EXISTS "${PROJECT_SOURCE_DIR}/doc/CMakeLists.txt" )
ADD_SUBDIRECTORY( ./doc )
ELSE()
MESSAGE( STATUS "INSTALL_DOC set to OFF" )
SET( INSTALL_DOC OFF )
ENDIF()
### LIBRARY #################################################################
# add library
ADD_SHARED_LIBRARY( DDMarlinPandora ${DDMarlinPandora_SRCS} )
### INSTALL #################################################################
# install library
INSTALL_SHARED_LIBRARY( DDMarlinPandora DESTINATION lib )
# install header files
INSTALL_DIRECTORY( ./include DESTINATION . )
# display some variables and write them to cache
DISPLAY_STD_VARIABLES()