forked from JeffersonLab/analyzer
-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
55 lines (47 loc) · 1.85 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
cmake_minimum_required(VERSION 3.5)
project(Podd VERSION 1.7.0 LANGUAGES CXX)
set(EXTVERS .3-devel)
#----------------------------------------------------------------------------
# Use our modules and utility functions
set(CMAKE_MODULE_PATH
${PROJECT_SOURCE_DIR}/cmake/Modules
${CMAKE_MODULE_PATH}
)
include(PoddCMakeEnv)
#----------------------------------------------------------------------------
# Build utility programs by default unless we are a submodule
if("${CMAKE_PROJECT_NAME}" STREQUAL "${PROJECT_NAME}")
option(${PROJECT_NAME_UC}_BUILD_UTILS "Build utility programs" ON)
else()
option(${PROJECT_NAME_UC}_BUILD_UTILS "Build utility programs" OFF)
endif()
#----------------------------------------------------------------------------
# Install in GNU-style directory layout
include(GNUInstallDirs)
set(INSTALL_CONFIGDIR ${CMAKE_INSTALL_LIBDIR}/${MAIN_PROJECT_NAME_LC})
#----------------------------------------------------------------------------
# Find ROOT (using our custom FindROOT.cmake)
set(minimum_root_version 5.10)
find_package(ROOT ${minimum_root_version} REQUIRED)
# Register this dependency - it's in our public interface
config_add_dependency(ROOT ${minimum_root_version})
#----------------------------------------------------------------------------
# Set up the compiler flags
set_compiler_flags("${ROOT_CXX_FLAGS}")
set_diagnostic_flags(WALL WEXTRA)
report_build_info()
#----------------------------------------------------------------------------
# Directories in which we build things
add_subdirectory(hana_decode)
add_subdirectory(src)
if(${PROJECT_NAME_UC}_BUILD_UTILS)
add_subdirectory(utils)
endif()
add_subdirectory(cmake)
#----------------------------------------------------------------------------
# Install additional components
install(DIRECTORY scripts/ DESTINATION scripts
USE_SOURCE_PERMISSIONS
PATTERN "*.C"
PATTERN "*.sh"
)