Changeset 19324


Ignore:
Timestamp:
Oct 29, 2018, 5:04:54 PM (7 months ago)
Author:
tbretz
Message:
Now this version works for 5.34 with a classical compilation, 6.x compiled with cmake and 6.x downloaded as binary distirbution.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Mars/CMakeLists.txt

    r19321 r19324  
    107107# --------- ROOT -------------
    108108
    109 #IF(EXISTS "$ENV{ROOTSYS}/ROOTConfig.cmake")
    110 IF(DEFINED ENV{CMAKE_PREFIX_PATH}) # -- This is if compiled with cmake --
    111    # You need to tell CMake where to find the ROOT installation. This can be done in a number of ways:
    112    #   - ROOT built with classic configure/make use the provided $ROOTSYS/etc/cmake/FindROOT.cmake
    113    #   - ROOT built with CMake. Add in CMAKE_PREFIX_PATH the installation prefix for ROOT
    114    LIST(APPEND CMAKE_PREFIX_PATH $ENV{ROOTSYS})
    115    #---Locate the ROOT package and defines a number of variables (e.g. ROOT_INCLUDE_DIRS)
    116    FIND_PACKAGE(ROOT REQUIRED COMPONENTS Gui Minuit ASImage HistPainter)
    117    #---Define useful ROOT functions and macros (e.g. ROOT_GENERATE_DICTIONARY)
     109# You need to tell CMake where to find the ROOT installation. This can be done in a number of ways:
     110#   - ROOT built with classic configure/make use the provided $ROOTSYS/etc/cmake/FindROOT.cmake
     111#   - ROOT built with CMake. Add in CMAKE_PREFIX_PATH the installation prefix for ROOT
     112SET(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "$ENV{ROOTSYS}/etc/cmake")
     113
     114#---Locate the ROOT package and defines a number of variables (e.g. ROOT_INCLUDE_DIRS)
     115FIND_PACKAGE(ROOT REQUIRED COMPONENTS Gui Minuit ASImage HistPainter)
     116
     117IF(NOT DEFINED ROOT_CONFIG_EXECUTABLE)
     118   FIND_PACKAGE_MESSAGE(RootFound "Found ROOT: ${ROOT_INCLUDE_DIRS}" "[${ROOT_INCLUDE_DIRS}][${ROOT_LIBRARY_DIR}]")
     119ENDIF()
     120
     121#---Define useful ROOT functions and macros (e.g. ROOT_GENERATE_DICTIONARY)
     122IF(DEFINED ROOT_USE_FILE)
     123   FIND_PACKAGE_MESSAGE(RootInclude "Setup ROOT: ${ROOT_USE_FILE}" "[${ROOT_USE_FILE}]")
    118124   INCLUDE(${ROOT_USE_FILE})
    119125ELSE()
    120    # You need to tell CMake where to find the ROOT installation. This can be done in a number of ways:
    121    #   - ROOT built with classic configure/make use the provided $ROOTSYS/etc/cmake/FindROOT.cmake
    122    #   - ROOT built with CMake. Add in CMAKE_PREFIX_PATH the installation prefix for ROOT
    123    SET(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "$ENV{ROOTSYS}/etc/cmake")
    124    #---Locate the ROOT package and defines a number of variables (e.g. ROOT_INCLUDE_DIRS)
    125    FIND_PACKAGE(ROOT REQUIRED COMPONENTS Gui Minuit ASImage HistPainter)
    126126   # From RootUseFile.cmake (root 6)
    127127   INCLUDE_DIRECTORIES(${ROOT_INCLUDE_DIRS})
     
    132132   SET(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} ${ROOT_fortran_FLAGS}")
    133133ENDIF()
    134 
    135 IF(NOT DEFINED ROOT_CONFIG_EXECUTABLE)
    136    FIND_PACKAGE_MESSAGE(RootInc "Found ROOT: ${ROOT_INCLUDE_DIRS}" "[${ROOT_INCLUDE_DIRS}][${ROOT_LIBRARY_DIR}]")
    137 ENDIF()
    138 
    139134
    140135# -lGui -lCore -lCint -lRIO -lNet -lHist -lGraf -lGraf3d -lGpad -lTree
Note: See TracChangeset for help on using the changeset viewer.