-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
61 lines (45 loc) · 1.93 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
# CMakeLists for ROOTPlotter
# Author: N. Oblath
# Minimum cmake version 2.6 required by the scripts to get Git information
cmake_minimum_required (VERSION 2.6)
# Specify the local directory for CMake modules
set (CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/cmake/")
# Define the project
project (ROOTPlotter)
# Include the build script
include (PackageBuilder)
# Set the version and associated variables
pbuilder_prepare_project (0 1 0)
if (${CMAKE_SYSTEM_NAME} MATCHES "Linux")
list (APPEND LIBS rt)
set (CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,--no-as-needed")
endif (${CMAKE_SYSTEM_NAME} MATCHES "Linux")
# ROOT
find_package (ROOT 5.28)
if (ROOT_FOUND)
list (APPEND LIBS ${ROOT_LIBRARIES})
include_directories (${ROOT_INCLUDE_DIR})
else (ROOT_FOUND)
message(FATAL_ERROR "ROOT was not found!")
endif (ROOT_FOUND)
# add an option to build the validation tests
option (ROOTPlotter_ENABLE_TESTING "Build the validation tests and enable CMake testing" OFF)
if (ROOTPlotter_ENABLE_TESTING)
enable_testing ()
endif (ROOTPlotter_ENABLE_TESTING)
# Subdirectories
include_directories (
${PROJECT_SOURCE_DIR}/Library
${PROJECT_SOURCE_DIR}/Library/Utility
)
add_subdirectory (Library)
#add_subdirectory (Validation)
pbuilder_install_config_files()
# Doxygen documentation can be built with "make doc" (it's not included with the "all" make target)
# By default it builds in the source tree.
#add_subdirectory (Documentation/ReferenceGuide)
# this is apparently not the right way to run the link_dylibs script
#execute_process (COMMAND ${PROJECT_SOURCE_DIR}/Scripts/link_dylibs.sh ${PROJECT_BINARY_DIR}/lib)
install (CODE "execute_process (COMMAND ${PROJECT_SOURCE_DIR}/Scripts/link_dylibs.sh ${LIB_INSTALL_DIR})")
configure_file (${CMAKE_CURRENT_SOURCE_DIR}/Scripts/LoadLibraries.C.in ${PROJECT_BINARY_DIR}/LoadLibraries.C)
install (FILES ${PROJECT_BINARY_DIR}/LoadLibraries.C DESTINATION ${LIB_INSTALL_DIR})