Changeset 19757 for trunk


Ignore:
Timestamp:
10/11/19 09:35:19 (5 years ago)
Author:
tbretz
Message:
Changed the strategy how root finds GQt (if available at all) and minor improvements to the output.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/FACT++/CMakeLists.txt

    r19754 r19757  
    227227      LIST(APPEND CMAKE_PREFIX_PATH $ENV{ROOTSYS})
    228228   ENDIF()
    229 ELSE()
    230    SET(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "$ENV{ROOTSYS}/etc/cmake")
    231 ENDIF()
     229ENDIF()
     230SET(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "$ENV{ROOTSYS}/etc/cmake")
    232231
    233232#---Locate the ROOT package and defines a number of variables (e.g. ROOT_INCLUDE_DIRS)
    234233IF (NOT TOOLS_ONLY AND NOT VIEWER_ONLY)
    235    FIND_PACKAGE(ROOT REQUIRED COMPONENTS GQt)
    236 ELSE()
    237    FIND_PACKAGE(ROOT REQUIRED COMPONENTS)
    238 ENDIF()
    239 
    240 #---Locate the ROOT package and defines a number of variables (e.g. ROOT_INCLUDE_DIRS)
     234#   SET(ROOT_CONFIG_DEBUG 1)
     235   FIND_PACKAGE(ROOT OPTIONAL_COMPONENTS GQt)
     236ENDIF()
     237
    241238IF(NOT DEFINED ROOT_CONFIG_EXECUTABLE)
    242    FIND_PACKAGE_MESSAGE(RootFound "Found ROOT: ${ROOT_INCLUDE_DIRS} [${ROOT_VERSION}]" "[${ROOT_INCLUDE_DIRS}][${ROOT_LIBRARY_DIR}][${ROOT_VERSION}]")
     239   FIND_PACKAGE_MESSAGE(RootFound "Found ROOT: ${ROOT_INCLUDE_DIRS}" "[${ROOT_INCLUDE_DIRS}][${ROOT_LIBRARY_DIR}][${ROOT_VERSION}]")
     240ENDIF()
     241
     242IF (NOT TOOLS_ONLY AND NOT VIEWER_ONLY AND NOT ROOT_GQt_LIBRARY)
     243   IF(ROOT_VERSION VERSION_LESS 6.18)
     244      MESSAGE(FATAL_ERROR "Root version [${ROOT_VERSION}] less than 6.18, but component GQt not found.")
     245   ELSE()
     246      MESSAGE(WARNING "Root version [${ROOT_VERSION}] does not support GQt, GUI [fact] turned off.")
     247   ENDIF()
    243248ENDIF()
    244249
    245250#---Define useful ROOT functions and macros (e.g. ROOT_GENERATE_DICTIONARY)
     251FIND_PACKAGE_MESSAGE(RootInclude "Setup ROOT: [${ROOT_VERSION}] ${ROOT_USE_FILE}" "[${ROOT_VERSION}][${ROOT_USE_FILE}]")
    246252IF(DEFINED ROOT_USE_FILE)
    247    FIND_PACKAGE_MESSAGE(RootInclude "Setup ROOT: ${ROOT_USE_FILE}" "[${ROOT_USE_FILE}]")
    248253   INCLUDE(${ROOT_USE_FILE})
    249254ELSE()
    250    FIND_PACKAGE_MESSAGE(RootInclude "Setup ROOT: ${ROOT_VERSION}" "[${ROOT_VERSION}]")
    251255   # From RootUseFile.cmake (root 6)
    252256   INCLUDE_DIRECTORIES(${ROOT_INCLUDE_DIRS})
     
    836840# --------------------------------------------------------
    837841
    838 IF(NOT TOOLS_ONLY AND NOT VIEWER_ONLY)
     842IF(NOT TOOLS_ONLY AND NOT VIEWER_ONLY AND ROOT_GQt_FOUND)
    839843
    840844QT4_ADD_RESOURCES(FACT_QT_RESOURCES gui/design.qrc)
     
    881885#test_LDADD = libStateMachine.la libTools.la libTime.la libDim++.la libDim.la libConfiguration.la
    882886
    883 ENDIF(NOT TOOLS_ONLY AND NOT VIEWER_ONLY)
     887ENDIF(NOT TOOLS_ONLY AND NOT VIEWER_ONLY AND ROOT_GQt_FOUND)
    884888
    885889
Note: See TracChangeset for help on using the changeset viewer.