Changeset 19323


Ignore:
Timestamp:
Oct 29, 2018, 4:59:31 PM (10 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/FACT++/CMakeLists.txt

    r19322 r19323  
    235235SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -pedantic -DMIPSEL -DPROTOCOL=1 -Dunix -Dlinux")
    236236
     237
    237238# --------- ROOT -------------
    238239
    239 #IF(EXISTS "$ENV{ROOTSYS}/ROOTConfig.cmake")
    240 IF(DEFINED ENV{CMAKE_PREFIX_PATH}) # -- This is supposed to be root 6 --
    241    # You need to tell CMake where to find the ROOT installation. This can be done in a number of ways:
    242    #   - ROOT built with classic configure/make use the provided $ROOTSYS/etc/cmake/FindROOT.cmake
    243    #   - ROOT built with CMake. Add in CMAKE_PREFIX_PATH the installation prefix for ROOT
    244    LIST(APPEND CMAKE_PREFIX_PATH $ENV{ROOTSYS})
    245    #---Locate the ROOT package and defines a number of variables (e.g. ROOT_INCLUDE_DIRS)
    246    FIND_PACKAGE(ROOT REQUIRED COMPONENTS Gui Minuit ASImage HistPainter)
    247    #---Define useful ROOT functions and macros (e.g. ROOT_GENERATE_DICTIONARY)
     240# You need to tell CMake where to find the ROOT installation. This can be done in a number of ways:
     241#   - ROOT built with classic configure/make use the provided $ROOTSYS/etc/cmake/FindROOT.cmake
     242#   - ROOT built with CMake. Add in CMAKE_PREFIX_PATH the installation prefix for ROOT
     243SET(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "$ENV{ROOTSYS}/etc/cmake")
     244
     245#--- Root libGQt only required to build the GUI (fact)
     246IF (NOT TOOLS_ONLY)
     247   SET(ROOT_REQUIRED_COMPONENTS "GQt")
     248ENDIF()
     249
     250#---Locate the ROOT package and defines a number of variables (e.g. ROOT_INCLUDE_DIRS)
     251FIND_PACKAGE(ROOT REQUIRED COMPONENTS ${ROOT_REQUIRED_COMPONENTS})
     252
     253IF(NOT DEFINED ROOT_CONFIG_EXECUTABLE)
     254   FIND_PACKAGE_MESSAGE(RootFound "Found ROOT: ${ROOT_INCLUDE_DIRS}" "[${ROOT_INCLUDE_DIRS}][${ROOT_LIBRARY_DIR}]")
     255ENDIF()
     256
     257#---Define useful ROOT functions and macros (e.g. ROOT_GENERATE_DICTIONARY)
     258IF(DEFINED ROOT_USE_FILE)
     259   FIND_PACKAGE_MESSAGE(RootInclude "Setup ROOT: ${ROOT_USE_FILE}" "[${ROOT_USE_FILE}]")
    248260   INCLUDE(${ROOT_USE_FILE})
    249261ELSE()
    250    # You need to tell CMake where to find the ROOT installation. This can be done in a number of ways:
    251    #   - ROOT built with classic configure/make use the provided $ROOTSYS/etc/cmake/FindROOT.cmake
    252    #   - ROOT built with CMake. Add in CMAKE_PREFIX_PATH the installation prefix for ROOT
    253    SET(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "$ENV{ROOTSYS}/etc/cmake")
    254    #---Locate the ROOT package and defines a number of variables (e.g. ROOT_INCLUDE_DIRS)
    255    FIND_PACKAGE(ROOT REQUIRED COMPONENTS GQt)
    256262   # From RootUseFile.cmake (root 6)
    257263   INCLUDE_DIRECTORIES(${ROOT_INCLUDE_DIRS})
     
    263269ENDIF()
    264270
    265 IF(NOT DEFINED ROOT_CONFIG_EXECUTABLE)
    266    FIND_PACKAGE_MESSAGE(RootInc "Found ROOT: ${ROOT_INCLUDE_DIRS}" "[${ROOT_INCLUDE_DIRS}][${ROOT_LIBRARY_DIR}]")
    267 ENDIF()
    268271
    269272# -lGui -lCore -lCint -lRIO -lNet -lHist -lGraf -lGraf3d -lGpad -lTree
     
    290293# -------------------------------------------------------
    291294
    292 INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR})
    293295INCLUDE_DIRECTORIES(pal)
    294296INCLUDE_DIRECTORIES(erfa/src)
Note: See TracChangeset for help on using the changeset viewer.