Changeset 19286
- Timestamp:
- 10/24/18 16:39:06 (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Mars/CMakeLists.txt
r19276 r19286 8 8 # Enable debug symbols by default 9 9 # must be done before project() statement 10 SET(CMAKE_BUILD_TYPE_INIT Release) 10 SET(CMAKE_BUILD_TYPE_INIT Release) 11 11 # (you can also set it on the command line: -D CMAKE_BUILD_TYPE=Release) 12 12 … … 107 107 108 108 109 # --------- config.h ------------- 110 111 CONFIGURE_FILE("${PROJECT_SOURCE_DIR}/cmake/root.rc.in" "${PROJECT_BINARY_DIR}/.rootrc") 112 CONFIGURE_FILE("${PROJECT_SOURCE_DIR}/cmake/rootlogon.C.in" "${PROJECT_BINARY_DIR}/rootlogon.C") 113 114 #INCLUDE_DIRECTORIES("${PROJECT_BINARY_DIR}") 115 116 SET(CMAKE_MODULE_PATH $ENV{ROOTSYS}/etc/cmake ${CMAKE_MODULE_PATH}) 117 118 119 # You need to tell CMake where to find the ROOT installation. This can be done in a number of ways: 120 # - ROOT built with classic configure/make use the provided $ROOTSYS/etc/cmake/FindROOT.cmake 121 # - ROOT built with CMake. Add in CMAKE_PREFIX_PATH the installation prefix for ROOT 122 #LIST(APPEND CMAKE_PREFIX_PATH $ENV{ROOTSYS}) 123 124 #---Locate the ROOT package and defines a number of variables (e.g. ROOT_INCLUDE_DIRS) 109 # --------- ROOT ------------- 110 111 #IF(EXISTS "$ENV{ROOTSYS}/ROOTConfig.cmake") 112 IF(DEFINED $ENV{CMAKE_PREFIX_PATH}) # -- This is supposed to be root 6 -- 113 # You need to tell CMake where to find the ROOT installation. This can be done in a number of ways: 114 # - ROOT built with classic configure/make use the provided $ROOTSYS/etc/cmake/FindROOT.cmake 115 # - ROOT built with CMake. Add in CMAKE_PREFIX_PATH the installation prefix for ROOT 116 LIST(APPEND CMAKE_PREFIX_PATH $ENV{ROOTSYS}) 117 #---Locate the ROOT package and defines a number of variables (e.g. ROOT_INCLUDE_DIRS) 118 FIND_PACKAGE(ROOT REQUIRED COMPONENTS Gui Minuit ASImage HistPainter) 119 #---Define useful ROOT functions and macros (e.g. ROOT_GENERATE_DICTIONARY) 120 INCLUDE(${ROOT_USE_FILE}) 121 ELSE() 122 # You need to tell CMake where to find the ROOT installation. This can be done in a number of ways: 123 # - ROOT built with classic configure/make use the provided $ROOTSYS/etc/cmake/FindROOT.cmake 124 # - ROOT built with CMake. Add in CMAKE_PREFIX_PATH the installation prefix for ROOT 125 SET(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "$ENV{ROOTSYS}/etc/cmake") 126 #---Locate the ROOT package and defines a number of variables (e.g. ROOT_INCLUDE_DIRS) 127 FIND_PACKAGE(ROOT REQUIRED COMPONENTS Gui Minuit ASImage HistPainter) 128 # From RootUseFile.cmake (root 6) 129 INCLUDE_DIRECTORIES(${ROOT_INCLUDE_DIRS}) 130 LINK_DIRECTORIES(${ROOT_LIBRARY_DIR}) 131 ADD_DEFINITIONS(${ROOT_DEFINITIONS}) 132 SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${ROOT_CXX_FLAGS}") 133 SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${ROOT_C_FLAGS}") 134 SET(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} ${ROOT_fortran_FLAGS}") 135 ENDIF() 125 136 126 137 # -lGui -lCore -lCint -lRIO -lNet -lHist -lGraf -lGraf3d -lGpad -lTree 127 138 # -lRint -lPostscript -lMatrix -lPhysics -lMathCore -lThread 128 139 # -lASImage -lMinuit -lHistPainter -lThread 129 130 FIND_PACKAGE(ROOT REQUIRED COMPONENTS Gui Minuit ASImage HistPainter)131 132 140 133 141 #MESSAGE("INCL_DIRS: ${ROOT_INCLUDE_DIRS}") … … 143 151 #ROOT_<option>_FOUND BOOL True for each enabled build option (e.g. cocoa, python, xrootd, etc.) 144 152 145 #---Define useful ROOT functions and macros (e.g. ROOT_GENERATE_DICTIONARY)146 #INCLUDE(${ROOT_USE_FILE})147 148 153 # function ROOT_GENERATE_DICTIONARY( dictionary 149 154 # header1 header2 ... 150 155 # LINKDEF linkdef1 ... 151 156 # OPTIONS opt1...) 157 158 CONFIGURE_FILE("${PROJECT_SOURCE_DIR}/cmake/root.rc.in" "${PROJECT_BINARY_DIR}/.rootrc") 159 CONFIGURE_FILE("${PROJECT_SOURCE_DIR}/cmake/rootlogon.C.in" "${PROJECT_BINARY_DIR}/rootlogon.C") 152 160 153 161 # -------------------------------------------------------
Note:
See TracChangeset
for help on using the changeset viewer.