-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathFindROOT.cmake
More file actions
23 lines (19 loc) · 883 Bytes
/
FindROOT.cmake
File metadata and controls
23 lines (19 loc) · 883 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
# - Finds ROOT instalation
# This module sets up ROOT information
# It defines:
# ROOT_FOUND If ROOT is found
find_program(ROOT_CONFIG_EXECUTABLE root-config
PATHS $ENV{ROOTSYS}/bin)
if(NOT ROOT_CONFIG_EXECUTABLE)
set(ROOT_FOUND FALSE)
MESSAGE(STATUS "ROOT: NOT Found!")
else()
set(ROOT_FOUND TRUE)
execute_process(COMMAND ${ROOT_CONFIG_EXECUTABLE} "--cflags" OUTPUT_VARIABLE ROOT_CFLAGS OUTPUT_STRIP_TRAILING_WHITESPACE)
execute_process(COMMAND ${ROOT_CONFIG_EXECUTABLE} "--libs" OUTPUT_VARIABLE ROOT_LIBS OUTPUT_STRIP_TRAILING_WHITESPACE)
execute_process(COMMAND ${ROOT_CONFIG_EXECUTABLE} "--incdir" OUTPUT_VARIABLE ROOT_INCDIR OUTPUT_STRIP_TRAILING_WHITESPACE)
message(STATUS "ROOT: Found!")
message(STATUS " CFlags: " ${ROOT_CFLAGS})
message(STATUS " Libs: " ${ROOT_LIBS})
message(STATUS " Incdir: " ${ROOT_INCDIR})
endif()