-
Notifications
You must be signed in to change notification settings - Fork 13
/
CMakeLists.txt
68 lines (42 loc) · 2.01 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
########################################################
# cmake file for building KalFit libraries
# @author Jan Engels, DESY
# @author F. Gaede, DESY
CMAKE_MINIMUM_REQUIRED( VERSION 2.6 FATAL_ERROR )
########################################################
# project name
PROJECT( KalTest )
# project version
SET( KalTest_VERSION_MAJOR 2 )
SET( KalTest_VERSION_MINOR 5 )
SET( KalTest_VERSION_PATCH 2 )
cmake_policy(SET CMP0008 NEW)
### DEPENDENCIES ############################################################
FIND_PACKAGE( ILCUTIL COMPONENTS ILCSOFT_CMAKE_MODULES REQUIRED )
FIND_PACKAGE( ROOT REQUIRED COMPONENTS Eve)
LINK_LIBRARIES( ${ROOT_COMPONENT_LIBRARIES} )
# load default settings from ILCSOFT_CMAKE_MODULES
INCLUDE( ilcsoft_default_settings )
# macros for generating root dict sources with rootcint
SET( ROOT_DICT_CINT_DEFINITIONS "-DHANDLE_DICT_EXCEPTIONS=IGNORED_FOR_CINT" )
# ROOTConfig.cmake uses a different name for rootcint than we used to in FINDROOT.cmake
#SET( ROOT_CINT_EXECUTABLE ${ROOT_rootcint_CMD} )
INCLUDE( MacroRootDict )
### LIBRARY AND TOOLS #######################################################
#---- use 5 dimensional track state:
OPTION( BUILD_WITH_T0_FIT "Set to ON to build with t0 fit (kSdim=6)" OFF )
IF( NOT BUILD_WITH_T0_FIT)
ADD_DEFINITIONS( -D __NOT0__ )
ENDIF()
ADD_SUBDIRECTORY( ./src )
# --------- kaltest examples -------------------------------------------------
# if this option is set to ON examples will be built with default target 'make'
# if set to OFF examples will only be built with target 'make examples'
OPTION( BUILD_EXAMPLES "Set to ON to build examples" OFF )
MESSAGE( STATUS "BUILD_EXAMPLES = ${BUILD_EXAMPLES}" )
ADD_SUBDIRECTORY( ./examples/kaltest )
# ----------------------------------------------------------------------------
# display some variables and write them to cache
DISPLAY_STD_VARIABLES()
# generate and install following configuration files
GENERATE_PACKAGE_CONFIGURATION_FILES( KalTestConfig.cmake KalTestConfigVersion.cmake KalTestLibDeps.cmake )