|
@@ -3,7 +3,7 @@
|
|
# It tries to find the root-config script which gives you all the needed information.
|
|
# It tries to find the root-config script which gives you all the needed information.
|
|
# If the system variable ROOTSYS is set this is straight forward.
|
|
# If the system variable ROOTSYS is set this is straight forward.
|
|
# If not the module uses the pathes given in ROOT_CONFIG_SEARCHPATH.
|
|
# If not the module uses the pathes given in ROOT_CONFIG_SEARCHPATH.
|
|
-# If you need an other path you should add this path to this varaible.
|
|
|
|
|
|
+# If you need an other path you should add this path to this varaible.
|
|
# The root-config script is then used to detect basically everything else.
|
|
# The root-config script is then used to detect basically everything else.
|
|
# This module defines a number of key variables and macros.
|
|
# This module defines a number of key variables and macros.
|
|
|
|
|
|
@@ -27,16 +27,16 @@ SET(ROOT_CONFIG_EXECUTABLE ROOT_CONFIG_EXECUTABLE-NOTFOUND)
|
|
FIND_PROGRAM(ROOT_CONFIG_EXECUTABLE NAMES root-config PATHS
|
|
FIND_PROGRAM(ROOT_CONFIG_EXECUTABLE NAMES root-config PATHS
|
|
${ROOT_CONFIG_SEARCHPATH}
|
|
${ROOT_CONFIG_SEARCHPATH}
|
|
NO_DEFAULT_PATH)
|
|
NO_DEFAULT_PATH)
|
|
-
|
|
|
|
|
|
+
|
|
IF (${ROOT_CONFIG_EXECUTABLE} MATCHES "ROOT_CONFIG_EXECUTABLE-NOTFOUND")
|
|
IF (${ROOT_CONFIG_EXECUTABLE} MATCHES "ROOT_CONFIG_EXECUTABLE-NOTFOUND")
|
|
MESSAGE( FATAL_ERROR "ROOT not installed in the searchpath and ROOTSYS is not set. Please
|
|
MESSAGE( FATAL_ERROR "ROOT not installed in the searchpath and ROOTSYS is not set. Please
|
|
set ROOTSYS or add the path to your ROOT installation in the Macro FindROOT.cmake in the
|
|
set ROOTSYS or add the path to your ROOT installation in the Macro FindROOT.cmake in the
|
|
subdirectory cmake/modules.")
|
|
subdirectory cmake/modules.")
|
|
ELSE (${ROOT_CONFIG_EXECUTABLE} MATCHES "ROOT_CONFIG_EXECUTABLE-NOTFOUND")
|
|
ELSE (${ROOT_CONFIG_EXECUTABLE} MATCHES "ROOT_CONFIG_EXECUTABLE-NOTFOUND")
|
|
- STRING(REGEX REPLACE "(^.*)/bin/root-config" "\\1" test ${ROOT_CONFIG_EXECUTABLE})
|
|
|
|
|
|
+ STRING(REGEX REPLACE "(^.*)/bin/root-config" "\\1" test ${ROOT_CONFIG_EXECUTABLE})
|
|
SET( ENV{ROOTSYS} ${test})
|
|
SET( ENV{ROOTSYS} ${test})
|
|
set( ROOTSYS ${test})
|
|
set( ROOTSYS ${test})
|
|
-ENDIF (${ROOT_CONFIG_EXECUTABLE} MATCHES "ROOT_CONFIG_EXECUTABLE-NOTFOUND")
|
|
|
|
|
|
+ENDIF (${ROOT_CONFIG_EXECUTABLE} MATCHES "ROOT_CONFIG_EXECUTABLE-NOTFOUND")
|
|
|
|
|
|
# root config is a bash script and not commonly executable under Windows
|
|
# root config is a bash script and not commonly executable under Windows
|
|
# make some static assumptions instead
|
|
# make some static assumptions instead
|
|
@@ -55,11 +55,11 @@ IF (WIN32)
|
|
)
|
|
)
|
|
MESSAGE(STATUS "Found ROOT: $ENV{ROOTSYS}/bin/root (WIN32/version not identified)")
|
|
MESSAGE(STATUS "Found ROOT: $ENV{ROOTSYS}/bin/root (WIN32/version not identified)")
|
|
ENDIF (ROOT_CONFIG_EXECUTABLE)
|
|
ENDIF (ROOT_CONFIG_EXECUTABLE)
|
|
-
|
|
|
|
|
|
+
|
|
ELSE(WIN32)
|
|
ELSE(WIN32)
|
|
|
|
|
|
IF (ROOT_CONFIG_EXECUTABLE)
|
|
IF (ROOT_CONFIG_EXECUTABLE)
|
|
-
|
|
|
|
|
|
+
|
|
SET(ROOT_FOUND FALSE)
|
|
SET(ROOT_FOUND FALSE)
|
|
|
|
|
|
EXEC_PROGRAM(${ROOT_CONFIG_EXECUTABLE} ARGS "--version" OUTPUT_VARIABLE ROOTVERSION)
|
|
EXEC_PROGRAM(${ROOT_CONFIG_EXECUTABLE} ARGS "--version" OUTPUT_VARIABLE ROOTVERSION)
|
|
@@ -70,12 +70,12 @@ ELSE(WIN32)
|
|
IF (NOT ROOT_MIN_VERSION)
|
|
IF (NOT ROOT_MIN_VERSION)
|
|
SET(ROOT_MIN_VERSION "5.00/00")
|
|
SET(ROOT_MIN_VERSION "5.00/00")
|
|
ENDIF (NOT ROOT_MIN_VERSION)
|
|
ENDIF (NOT ROOT_MIN_VERSION)
|
|
-
|
|
|
|
|
|
+
|
|
# now parse the parts of the user given version string into variables
|
|
# now parse the parts of the user given version string into variables
|
|
STRING(REGEX REPLACE "^([0-9]+)\\.[0-9][0-9]+\\/[0-9][0-9]+" "\\1" req_root_major_vers "${ROOT_MIN_VERSION}")
|
|
STRING(REGEX REPLACE "^([0-9]+)\\.[0-9][0-9]+\\/[0-9][0-9]+" "\\1" req_root_major_vers "${ROOT_MIN_VERSION}")
|
|
STRING(REGEX REPLACE "^[0-9]+\\.([0-9][0-9])+\\/[0-9][0-9]+.*" "\\1" req_root_minor_vers "${ROOT_MIN_VERSION}")
|
|
STRING(REGEX REPLACE "^[0-9]+\\.([0-9][0-9])+\\/[0-9][0-9]+.*" "\\1" req_root_minor_vers "${ROOT_MIN_VERSION}")
|
|
STRING(REGEX REPLACE "^[0-9]+\\.[0-9][0-9]+\\/([0-9][0-9]+)" "\\1" req_root_patch_vers "${ROOT_MIN_VERSION}")
|
|
STRING(REGEX REPLACE "^[0-9]+\\.[0-9][0-9]+\\/([0-9][0-9]+)" "\\1" req_root_patch_vers "${ROOT_MIN_VERSION}")
|
|
-
|
|
|
|
|
|
+
|
|
# and now the version string given by qmake
|
|
# and now the version string given by qmake
|
|
STRING(REGEX REPLACE "^([0-9]+)\\.[0-9][0-9]+\\/[0-9][0-9]+.*" "\\1" found_root_major_vers "${ROOTVERSION}")
|
|
STRING(REGEX REPLACE "^([0-9]+)\\.[0-9][0-9]+\\/[0-9][0-9]+.*" "\\1" found_root_major_vers "${ROOTVERSION}")
|
|
STRING(REGEX REPLACE "^[0-9]+\\.([0-9][0-9])+\\/[0-9][0-9]+.*" "\\1" found_root_minor_vers "${ROOTVERSION}")
|
|
STRING(REGEX REPLACE "^[0-9]+\\.([0-9][0-9])+\\/[0-9][0-9]+.*" "\\1" found_root_minor_vers "${ROOTVERSION}")
|
|
@@ -88,7 +88,7 @@ ELSE(WIN32)
|
|
# compute an overall version number which can be compared at once
|
|
# compute an overall version number which can be compared at once
|
|
MATH(EXPR req_vers "${req_root_major_vers}*10000 + ${req_root_minor_vers}*100 + ${req_root_patch_vers}")
|
|
MATH(EXPR req_vers "${req_root_major_vers}*10000 + ${req_root_minor_vers}*100 + ${req_root_patch_vers}")
|
|
MATH(EXPR found_vers "${found_root_major_vers}*10000 + ${found_root_minor_vers}*100 + ${found_root_patch_vers}")
|
|
MATH(EXPR found_vers "${found_root_major_vers}*10000 + ${found_root_minor_vers}*100 + ${found_root_patch_vers}")
|
|
-
|
|
|
|
|
|
+
|
|
IF (found_vers LESS req_vers)
|
|
IF (found_vers LESS req_vers)
|
|
SET(ROOT_FOUND FALSE)
|
|
SET(ROOT_FOUND FALSE)
|
|
SET(ROOT_INSTALLED_VERSION_TOO_OLD TRUE)
|
|
SET(ROOT_INSTALLED_VERSION_TOO_OLD TRUE)
|
|
@@ -120,7 +120,7 @@ ELSE(WIN32)
|
|
MESSAGE("Warning: ROOT_CONFIG_EXECUTABLE reported ${ROOT_LIBRARY_DIR_TMP} as library path,")
|
|
MESSAGE("Warning: ROOT_CONFIG_EXECUTABLE reported ${ROOT_LIBRARY_DIR_TMP} as library path,")
|
|
MESSAGE("Warning: but ${ROOT_LIBRARY_DIR_TMP} does NOT exist, ROOT must NOT be installed correctly.")
|
|
MESSAGE("Warning: but ${ROOT_LIBRARY_DIR_TMP} does NOT exist, ROOT must NOT be installed correctly.")
|
|
ENDIF(EXISTS "${ROOT_LIBRARY_DIR_TMP}")
|
|
ENDIF(EXISTS "${ROOT_LIBRARY_DIR_TMP}")
|
|
-
|
|
|
|
|
|
+
|
|
# ask root-config for the binary dir
|
|
# ask root-config for the binary dir
|
|
EXEC_PROGRAM(${ROOT_CONFIG_EXECUTABLE}
|
|
EXEC_PROGRAM(${ROOT_CONFIG_EXECUTABLE}
|
|
ARGS "--bindir"
|
|
ARGS "--bindir"
|
|
@@ -129,15 +129,15 @@ ELSE(WIN32)
|
|
|
|
|
|
# ask root-config for the include dir
|
|
# ask root-config for the include dir
|
|
EXEC_PROGRAM( ${ROOT_CONFIG_EXECUTABLE}
|
|
EXEC_PROGRAM( ${ROOT_CONFIG_EXECUTABLE}
|
|
- ARGS "--incdir"
|
|
|
|
|
|
+ ARGS "--incdir"
|
|
OUTPUT_VARIABLE root_headers )
|
|
OUTPUT_VARIABLE root_headers )
|
|
SET(ROOT_INCLUDE_DIR ${root_headers})
|
|
SET(ROOT_INCLUDE_DIR ${root_headers})
|
|
# CACHE INTERNAL "")
|
|
# CACHE INTERNAL "")
|
|
|
|
|
|
# ask root-config for the library varaibles
|
|
# ask root-config for the library varaibles
|
|
EXEC_PROGRAM( ${ROOT_CONFIG_EXECUTABLE}
|
|
EXEC_PROGRAM( ${ROOT_CONFIG_EXECUTABLE}
|
|
- # ARGS "--noldflags --noauxlibs --libs"
|
|
|
|
- ARGS "--glibs"
|
|
|
|
|
|
+ # ARGS "--noldflags --noauxlibs --libs"
|
|
|
|
+ ARGS "--glibs"
|
|
OUTPUT_VARIABLE root_flags )
|
|
OUTPUT_VARIABLE root_flags )
|
|
|
|
|
|
# STRING(REGEX MATCHALL "([^ ])+" root_libs_all ${root_flags})
|
|
# STRING(REGEX MATCHALL "([^ ])+" root_libs_all ${root_flags})
|
|
@@ -156,8 +156,8 @@ ELSE(WIN32)
|
|
|
|
|
|
#######################################
|
|
#######################################
|
|
#
|
|
#
|
|
- # Check the executables of ROOT
|
|
|
|
- # ( rootcint )
|
|
|
|
|
|
+ # Check the executables of ROOT
|
|
|
|
+ # ( rootcint )
|
|
#
|
|
#
|
|
#######################################
|
|
#######################################
|
|
|
|
|
|
@@ -177,11 +177,11 @@ ENDIF(WIN32)
|
|
###########################################
|
|
###########################################
|
|
|
|
|
|
MACRO (ROOT_GENERATE_DICTIONARY INFILES LINKDEF_FILE OUTFILE INCLUDE_DIRS_IN)
|
|
MACRO (ROOT_GENERATE_DICTIONARY INFILES LINKDEF_FILE OUTFILE INCLUDE_DIRS_IN)
|
|
-
|
|
|
|
|
|
+
|
|
set(INCLUDE_DIRS)
|
|
set(INCLUDE_DIRS)
|
|
|
|
|
|
foreach (_current_FILE ${INCLUDE_DIRS_IN})
|
|
foreach (_current_FILE ${INCLUDE_DIRS_IN})
|
|
- set(INCLUDE_DIRS ${INCLUDE_DIRS} -I${_current_FILE})
|
|
|
|
|
|
+ set(INCLUDE_DIRS ${INCLUDE_DIRS} -I${_current_FILE})
|
|
endforeach (_current_FILE ${INCLUDE_DIRS_IN})
|
|
endforeach (_current_FILE ${INCLUDE_DIRS_IN})
|
|
|
|
|
|
if (CMAKE_SYSTEM_NAME MATCHES Linux)
|
|
if (CMAKE_SYSTEM_NAME MATCHES Linux)
|
|
@@ -210,7 +210,7 @@ MACRO (GENERATE_ROOT_TEST_SCRIPT SCRIPT_FULL_NAME)
|
|
#MESSAGE("Name: ${file_name}")
|
|
#MESSAGE("Name: ${file_name}")
|
|
#MESSAGE("Shell Name: ${shell_script_name}")
|
|
#MESSAGE("Shell Name: ${shell_script_name}")
|
|
|
|
|
|
- string(REPLACE ${PROJECT_SOURCE_DIR}
|
|
|
|
|
|
+ string(REPLACE ${PROJECT_SOURCE_DIR}
|
|
${PROJECT_BINARY_DIR} new_path ${path_name}
|
|
${PROJECT_BINARY_DIR} new_path ${path_name}
|
|
)
|
|
)
|
|
|
|
|