-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCMakeLists.txt
91 lines (59 loc) · 2.9 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
91
#############################################################################
#
# CMAKE file for building Marlin package - SiStripDigi
#
# @author Zbynek Drasal
# @author J. Duarte Campderros (modifications)
#
#############################################################################
# CMake compatibility issues: don't modify this, please!
CMAKE_MINIMUM_REQUIRED( VERSION 2.6.2 FATAL_ERROR )
# Project name
PROJECT( SiStripDigi )
# Project version
SET( ${PROJECT_NAME}_MAJOR_VERSION 1 )
SET( ${PROJECT_NAME}_MINOR_VERSION 0 )
SET( ${PROJECT_NAME}_PATCH_LEVEL 3 )
SET( ILCUTIL_DIR /usr/local/ilcsoft/v01-08/ilcutil/trunk )
SET( GEAR_DIR /usr/local/ilcsoft/v01-08/gear/trunk )
SET( LCIO_DIR /usr/local/ilcsoft/v01-08/lcio/trunk )
#####
ADD_DEFINITIONS( -DROOT_OUTPUT_LAND -DROOT_OUTPUT)
# El puto gear, lo necesita marlin/Global.h)
ADD_DEFINITIONS( -DUSE_GEAR )
### DEPENDENCIES #######################################################
FIND_PACKAGE( ILCUTIL COMPONENTS ILCSOFT_CMAKE_MODULES ILCTEST REQUIRED )
# load default settings from ILCSOFT_CMAKE_MODULES
INCLUDE( ilcsoft_default_settings )
# required packages
FIND_PACKAGE( LCIO REQUIRED )
FIND_PACKAGE( ROOT REQUIRED )
FIND_PACKAGE( CLHEP REQUIRED )
FIND_PACKAGE( GEAR REQUIRED )
FIND_PACKAGE( Marlin REQUIRED )
# export SiStripDigi_DEPENDS_INCLUDE_DIRS to SiStripDigiConfig.cmake
SET( SiStripDigi_DEPENDS_INCLUDE_DIRS ${ROOT_INCLUDE_DIRS} ${CLHEP_INCLUDE_DIRS} ${Marlin_INCLUDE_DIRS} ${LCIO_INCLUDE_DIRS} ${GEAR_INCLUDE_DIRS} ${streamlog_INCLUDE_DIRS} )
SET( SiStripDigi_DEPENDS_LIBRARY_DIRS ${ROOT_LIBRARY_DIRS} ${CLHEP_LIBRARY_DIRS} ${Marlin_LIBRARY_DIRS} ${LCIO_LIBRARY_DIRS} ${GEAR_LIBRARY_DIRS} ${streamlog_LIBRARY_DIRS} )
SET( SiStripDigi_DEPENDS_LIBRARIES ${ROOT_LIBRARIES} ${CLHEP_LIBRARIES} ${Marlin_LIBRARIES} ${LCIO_LIBRARIES} ${GEAR_LIBRARIES} ${streamlog_LIBRARIES} )
INCLUDE_DIRECTORIES( ${SiStripDigi_DEPENDS_INCLUDE_DIRS} )
LINK_LIBRARIES( ${SiStripDigi_DEPENDS_LIBRARIES} )
### DOCUMENTATION ###########################################################
OPTION( INSTALL_DOC "Set to OFF to skip build/install Documentation" OFF )
IF( INSTALL_DOC )
FIND_PACKAGE( Doxygen )
IF( DOXYGEN_FOUND )
ADD_SUBDIRECTORY( ./doc )
ELSE()
MESSAGE( SEND_ERROR "Could not find doxygen required to build documentation" )
MESSAGE( "Please install doxygen or set INSTALL_DOC to OFF" )
MESSAGE( "" )
ENDIF()
ENDIF()
### LIBRARY AND TOOLS #######################################################
# get list of all source files
#AUX_SOURCE_DIRECTORY( src lib_srcs )
ADD_SUBDIRECTORY( ./source )
# display some variables and write them to cache
DISPLAY_STD_VARIABLES()
# generate and install following configuration files
GENERATE_PACKAGE_CONFIGURATION_FILES( SiStripDigiConfig.cmake SiStripDigiConfigVersion.cmake SiStripDigiLibDeps.cmake )